Drag[en]gine Script Module DragonScript
1.23
|
Divide container into 5 areas each with at most one widget inside. More...
Classes | |
enum | Area |
Area to place widget in. More... | |
Public Member Functions | |
void | addWidget (Widget widget, Object settings) |
Add widget to layout into area. More... | |
void | doLayout (Container container) |
Layout widgets in container. More... | |
Widget | getBottomWidget () |
Widget in bottom area or null if empty. More... | |
Widget | getContentWidget () |
Widget in content area or null if empty. More... | |
int | getGap () |
Gap between areas in pixels. More... | |
Widget | getLeftWidget () |
Widget in left area or null if empty. More... | |
Point | getMinimumSize (Container container) |
Minimal size required for layout in container. More... | |
Point | getMinimumSizeForHeight (Container container, int height) |
Minimum size of layout using reference widget height and variable width. More... | |
Point | getMinimumSizeForWidth (Container container, int width) |
Minimum size of layout using reference width and variable height. More... | |
Widget | getRightWidget () |
Widget in right area or null if empty. More... | |
Widget | getTopWidget () |
Widget in top area or null if empty. More... | |
BorderLayout | new () |
Create layout with 0 gap. More... | |
BorderLayout | new (int gap) |
Create layout. More... | |
void | removeWidget (Widget widget) |
Remove widget from layout. More... | |
void | setGap (int gap) |
Set gap between areas in pixels. More... | |
Protected Member Functions | |
Point | getMinimumSizeFor (Container container, int width, int height) |
Minimum size of layout using reference and variable size. More... | |
Divide container into 5 areas each with at most one widget inside.
The top, right, bottom and left area are of fixed size fitting in width respectively height the minimum size of the widget inside if present. The center area is stretched to fill the remaining space.
Instances of this layout can not be shared by multiple widgets.
void Dragengine.Gui.Layouts.BorderLayout.addWidget | ( | Widget | widget, |
Object | settings | ||
) |
Add widget to layout into area.
EInvalidParam | widget is null. |
EInvalidParam | settings is not of type Area . |
EInvalidParam | area is not empty. |
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.BorderLayout.doLayout | ( | Container | container | ) |
Layout widgets in container.
Implements Dragengine.Gui.Layout.
Widget Dragengine.Gui.Layouts.BorderLayout.getBottomWidget | ( | ) |
Widget in bottom area or null if empty.
Widget Dragengine.Gui.Layouts.BorderLayout.getContentWidget | ( | ) |
Widget in content area or null if empty.
int Dragengine.Gui.Layouts.BorderLayout.getGap | ( | ) |
Gap between areas in pixels.
Minimal size required for layout in container.
Implements Dragengine.Gui.Layout.
|
protected |
Minimum size of layout using reference and variable size.
If X_AXIS is used height is the reference size. If Y_AXIS is used widthis the reference size.
Point Dragengine.Gui.Layouts.BorderLayout.getMinimumSizeForHeight | ( | Container | container, |
int | height | ||
) |
Minimum size of layout using reference widget height and variable width.
Implements Dragengine.Gui.Layout.
Minimum size of layout using reference width and variable height.
Implements Dragengine.Gui.Layout.
Widget Dragengine.Gui.Layouts.BorderLayout.getRightWidget | ( | ) |
Widget in right area or null if empty.
BorderLayout Dragengine.Gui.Layouts.BorderLayout.new | ( | ) |
Create layout with 0 gap.
BorderLayout Dragengine.Gui.Layouts.BorderLayout.new | ( | int | gap | ) |
Create layout.
gap | Gap in pixels between areas. Gap can be negative to overlap areas. |
void Dragengine.Gui.Layouts.BorderLayout.removeWidget | ( | Widget | widget | ) |
Remove widget from layout.
Implements Dragengine.Gui.Layout.
void Dragengine.Gui.Layouts.BorderLayout.setGap | ( | int | gap | ) |
Set gap between areas in pixels.
Can be negative to overlap widgets.