|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| void | doLayout (Container container) |
| Layout widgets in container. | |
| Widget | getBottomWidget () |
| Widget in bottom area or null if empty. | |
| Widget | getContentWidget () |
| Widget in content area or null if empty. | |
| int | getGap () |
| Gap between areas in pixels. | |
| Widget | getLeftWidget () |
| Widget in left area or null if empty. | |
| Point | getMinimumSize (Container container) |
| Minimal size required for layout in container. | |
| Point | getMinimumSizeForHeight (Container container, int height) |
| Minimum size of layout using reference widget height and variable width. | |
| Point | getMinimumSizeForWidth (Container container, int width) |
| Minimum size of layout using reference width and variable height. | |
| Widget | getRightWidget () |
| Widget in right area or null if empty. | |
| Widget | getTopWidget () |
| Widget in top area or null if empty. | |
| BorderLayout | new () |
| Create layout with 0 gap. | |
| BorderLayout | new (int gap) |
| Create layout. | |
| void | removeWidget (Widget widget) |
| Remove widget from layout. | |
| void | setGap (int gap) |
| Set gap between areas in pixels. | |
Protected Member Functions | |
| Point | getMinimumSizeFor (Container container, int width, int height) |
| Minimum size of layout using reference and variable size. | |
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.
Referenced by getMinimumSizeForWidth().
| void Dragengine.Gui.Layouts.BorderLayout.doLayout | ( | Container | container | ) |
| Widget Dragengine.Gui.Layouts.BorderLayout.getBottomWidget | ( | ) |
Widget in bottom area or null if empty.
References getLeftWidget(), getRightWidget(), and getTopWidget().
Referenced by removeWidget().
| Widget Dragengine.Gui.Layouts.BorderLayout.getContentWidget | ( | ) |
| int Dragengine.Gui.Layouts.BorderLayout.getGap | ( | ) |
| Widget Dragengine.Gui.Layouts.BorderLayout.getLeftWidget | ( | ) |
Widget in left area or null if empty.
Referenced by getBottomWidget().
Minimal size required for layout in container.
Implements Dragengine.Gui.Layout.
Referenced by getMinimumSizeFor().
|
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.
References doLayout(), getMinimumSize(), getMinimumSizeFor(), getMinimumSizeForHeight(), getMinimumSizeForWidth(), new(), and removeWidget().
Referenced by getMinimumSizeFor().
| 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.
References new().
Referenced by getMinimumSizeFor().
Minimum size of layout using reference width and variable height.
Implements Dragengine.Gui.Layout.
References addWidget().
Referenced by getMinimumSizeFor().
| Widget Dragengine.Gui.Layouts.BorderLayout.getRightWidget | ( | ) |
Widget in right area or null if empty.
Referenced by getBottomWidget().
| Widget Dragengine.Gui.Layouts.BorderLayout.getTopWidget | ( | ) |
Widget in top area or null if empty.
References getContentWidget().
Referenced by getBottomWidget().
| BorderLayout Dragengine.Gui.Layouts.BorderLayout.new | ( | ) |
Create layout with 0 gap.
References new().
Referenced by getMinimumSizeFor(), getMinimumSizeForHeight(), new(), and new().
| BorderLayout Dragengine.Gui.Layouts.BorderLayout.new | ( | int | gap | ) |
| void Dragengine.Gui.Layouts.BorderLayout.removeWidget | ( | Widget | widget | ) |
Remove widget from layout.
Implements Dragengine.Gui.Layout.
References getBottomWidget().
Referenced by getMinimumSizeFor().
| void Dragengine.Gui.Layouts.BorderLayout.setGap | ( | int | gap | ) |
Set gap between areas in pixels.
Can be negative to overlap widgets.
Referenced by getContentWidget(), and new().