Closed felixmaker closed 1 year ago
Hi
Can you post an fl example? Currently Flex has set_margin(val) and margin(). So it assumes that all margins on all sides are the same. I don’t think fluid supports different margins either. But I might not have kept up with the changes to fluid. If you have an example I could add the necessary code generation to fl2rust and fltk-rs.
So I tried with latest fluid, and it does enable setting different margins. I'll add support for that in the next few days.
Sorry to be late! Here is my fl example:
# data file for the Fltk User Interface Designer (fluid)
version 1.0400
header_name {.h}
code_name {.cxx}
class UserInterface {open
} {
Function {make_window()} {open
} {
Fl_Window {} {open
xywh {350 200 200 200} type Double visible
} {
Fl_Flex {} {open selected
xywh {0 0 200 200} margins {10 20 10 10} gap 20 set_size_tuples {2 0 25 1 25 }
} {
Fl_Input {} {
label {input:}
xywh {10 20 180 25} align 5
}
Fl_Input {} {
label {input:}
xywh {10 65 180 25} align 5
}
}
}
}
}
I've updated the fl2rust to support margins and published a new release. I've also added it to fltk-rs, but the release will be next week.
Thank you!
This should work now with the latest release of fltk-rs (1.4.7)
It works! Thank you!
When adding margin to a flex in fluid, it cases widgets in flex do not generate.
It seems
margin (int *left, int *top, int *right, int *bottom) const
do not exist in fltk-rs. https://www.fltk.org/doc-1.4/classFl__Flex.html#ac40bc6a709b1e07402e73d1401129486