|
|
take following widget_class as example:
code generated before this change:
QD_CondChecker_hasItem::QD_CondChecker_hasItem(int X, int Y, int W, int H, const char *L)
: Fl_Group(0, 0, W, H, L) {
{ Fl_Box* o = new Fl_Box(0, 0, 115, 25, "Has");
o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ m_input = new Fl_Value_Input(115, 0, 45, 25);
m_input->labeltype(FL_NO_LABEL);
} // Fl_Value_Input* m_input
{ Fl_Box* o = new Fl_Box(160, 0, 50, 25, "Item");
o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Choice* o = new Fl_Choice(210, 0, 145, 25);
o->down_box(FL_BORDER_BOX);
o->labeltype(FL_NO_LABEL);
o->menu(menu_);
} // Fl_Choice* o
position(X, Y);
end();
resizable(this);
}
after this change, with auto-rescaling:
QD_CondChecker_hasItem::QD_CondChecker_hasItem(int X, int Y, int W, int H, const char *L) :
Fl_Group(0, 0, W, H, L)
{
{ Fl_Box* o = new Fl_Box(round(W*0.000000), round(H*0.000000), round(W*0.323944), round(H*1.000000), "Has");
o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ m_input = new Fl_Value_Input(round(W*0.323944), round(H*0.000000), round(W*0.126761), round(H*1.000000));
m_input->labeltype(FL_NO_LABEL);
} // Fl_Value_Input* m_input
{ Fl_Box* o = new Fl_Box(round(W*0.450704), round(H*0.000000), round(W*0.140845), round(H*1.000000), "Item");
o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Choice* o = new Fl_Choice(round(W*0.591549), round(H*0.000000), round(W*0.408451), round(H*1.000000));
o->down_box(FL_BORDER_BOX);
o->labeltype(FL_NO_LABEL);
o->menu(menu_);
} // Fl_Choice* o
position(X, Y);
end();
resizable(this);
}
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/pull/477/c1210026734@github.com>
[ Direct Link to Message ] | |
|
| |