Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Layouts.BorderLayout Class Reference

Divide container into 5 areas each with at most one widget inside. More...

Inheritance diagram for Dragengine.Gui.Layouts.BorderLayout:
Dragengine.Gui.Layout

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.

Detailed Description

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.

Member Function Documentation

◆ addWidget()

void Dragengine.Gui.Layouts.BorderLayout.addWidget ( Widget widget,
Object settings )

Add widget to layout into area.

Parameters
widgetWidget to add to layout.
settingsArea to place widget in. Has to be of type Area .
Exceptions
EInvalidParamwidget is null.
EInvalidParamsettings is not of type Area .
EInvalidParamarea is not empty.

Implements Dragengine.Gui.Layout.

Referenced by getMinimumSizeForWidth().

◆ doLayout()

void Dragengine.Gui.Layouts.BorderLayout.doLayout ( Container container)

Layout widgets in container.

Implements Dragengine.Gui.Layout.

Referenced by getMinimumSizeFor().

◆ getBottomWidget()

Widget Dragengine.Gui.Layouts.BorderLayout.getBottomWidget ( )

Widget in bottom area or null if empty.

References getLeftWidget(), getRightWidget(), and getTopWidget().

Referenced by removeWidget().

◆ getContentWidget()

Widget Dragengine.Gui.Layouts.BorderLayout.getContentWidget ( )

Widget in content area or null if empty.

References setGap().

Referenced by getTopWidget().

◆ getGap()

int Dragengine.Gui.Layouts.BorderLayout.getGap ( )

Gap between areas in pixels.

References getGap().

Referenced by getGap().

◆ getLeftWidget()

Widget Dragengine.Gui.Layouts.BorderLayout.getLeftWidget ( )

Widget in left area or null if empty.

Referenced by getBottomWidget().

◆ getMinimumSize()

Point Dragengine.Gui.Layouts.BorderLayout.getMinimumSize ( Container container)

Minimal size required for layout in container.

Implements Dragengine.Gui.Layout.

Referenced by getMinimumSizeFor().

◆ getMinimumSizeFor()

Point Dragengine.Gui.Layouts.BorderLayout.getMinimumSizeFor ( Container container,
int width,
int height )
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().

◆ getMinimumSizeForHeight()

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().

◆ getMinimumSizeForWidth()

Point Dragengine.Gui.Layouts.BorderLayout.getMinimumSizeForWidth ( Container container,
int width )

Minimum size of layout using reference width and variable height.

Implements Dragengine.Gui.Layout.

References addWidget().

Referenced by getMinimumSizeFor().

◆ getRightWidget()

Widget Dragengine.Gui.Layouts.BorderLayout.getRightWidget ( )

Widget in right area or null if empty.

Referenced by getBottomWidget().

◆ getTopWidget()

Widget Dragengine.Gui.Layouts.BorderLayout.getTopWidget ( )

Widget in top area or null if empty.

References getContentWidget().

Referenced by getBottomWidget().

◆ new() [1/2]

BorderLayout Dragengine.Gui.Layouts.BorderLayout.new ( )

Create layout with 0 gap.

References new().

Referenced by getMinimumSizeFor(), getMinimumSizeForHeight(), new(), and new().

◆ new() [2/2]

BorderLayout Dragengine.Gui.Layouts.BorderLayout.new ( int gap)

Create layout.

Parameters
gapGap in pixels between areas. Gap can be negative to overlap areas.

References new(), and setGap().

◆ removeWidget()

void Dragengine.Gui.Layouts.BorderLayout.removeWidget ( Widget widget)

Remove widget from layout.

Implements Dragengine.Gui.Layout.

References getBottomWidget().

Referenced by getMinimumSizeFor().

◆ setGap()

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().


The documentation for this class was generated from the following file: