Drag[en]gine Script Module DragonScript  1.23
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. 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...
 

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.

◆ doLayout()

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

Layout widgets in container.

Implements Dragengine.Gui.Layout.

◆ getBottomWidget()

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

Widget in bottom area or null if empty.

◆ getContentWidget()

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

Widget in content area or null if empty.

◆ getGap()

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

Gap between areas in pixels.

◆ getLeftWidget()

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

Widget in left area or null if empty.

◆ getMinimumSize()

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

Minimal size required for layout in container.

Implements Dragengine.Gui.Layout.

◆ 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.

◆ 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.

◆ 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.

◆ getRightWidget()

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

Widget in right area or null if empty.

◆ getTopWidget()

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

Widget in top area or null if empty.

◆ new() [1/2]

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

Create layout with 0 gap.

◆ 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.

◆ removeWidget()

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

Remove widget from layout.

Implements Dragengine.Gui.Layout.

◆ setGap()

void Dragengine.Gui.Layouts.BorderLayout.setGap ( int  gap)

Set gap between areas in pixels.

Can be negative to overlap widgets.


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