Hi Rick,
There is a documentation update about sizers:
https://github.com/linux4sam/egt/blob/master/docs/src/layout.md About your questions:
- Orientation: It's probably something that should go away from the public API. It's legacy stuff when there was only the BoxSizer class. The HorizontalBoxSizer, VerticalBoxSizer and FlexBoxSizer automatically set the orientation. If you create a FlexBoxSizer and change the orientation to vertical, it would behave as a VerticalBoxSizer.
- Justification: It's about positioning the widget within a row. If there are free space in the row, start will put all the widgets at the beginning of the row, ending at the end, middle at the middle and justify will put space between widgets. The way justification works comes from the layout library (
https://github.com/linux4sam/layout).
To see how it behaves, you can use this example:
#include <egt/ui>
using namespace std;
using namespace egt;
int main(void)
{
Application app;
TopWindow top;
FlexBoxSizer sizer(top, Justification::justify);
Button b1(sizer, "b1", Rect(0, 0, 100, 50));
Button b2(sizer, "b2", Rect(0, 0, 100, 50));
Button b3(sizer, "b3", Rect(0, 0, 50, 50));
Button b4(sizer, "b4", Rect(0, 0, 50, 50));
Button b5(sizer, "b5", Rect(0, 0, 500, 50));
top.show();
return app.run();
}
Regards
Ludovic