Drag[en]gine Script Module DragonScript Script API  1.0
ScrollPanelLayout Class Reference

Arrange content widget using the position value of two scrollbars. More...

Inheritance diagram for ScrollPanelLayout:
Layout

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 getContent ()
 Content widget or null if not set. More...
 
int getGap ()
 Gap between areas in pixels. More...
 
ScrollBar getHorizontalScrollBar ()
 Horizontal scrollbar or null if not set. 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...
 
ScrollBar getVerticalScrollBar ()
 Vertical scrollbar or null if not set. More...
 
ScrollPanelLayout new ()
 Create layout with 0 gap. More...
 
ScrollPanelLayout 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...
 

Public Attributes

final int CONTENT = 1
 Content. More...
 
final int HORIZONTAL = 2
 Horizontal scrollbar. More...
 
final int VERTICAL = 3
 Vertical scrollbar. More...
 

Protected Member Functions

Point getBaseMinimumSize (Container container)
 Reference size independend minimum size. More...
 

Detailed Description

Arrange content widget using the position value of two scrollbars.

Instances of this layout can not be shared by multiple widgets.

Member Function Documentation

§ addWidget()

void 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 CONTENT, HORINZONTAL or VERTICAL.
Exceptions
EInvalidParamwidget is null.
EInvalidParamsettings is not CONTENT, HORINZONTAL or VERTICAL.
EInvalidParamarea is not empty.

Implements Layout.

§ doLayout()

void doLayout ( Container  container)

Layout widgets in container.

Implements Layout.

§ getBaseMinimumSize()

Point getBaseMinimumSize ( Container  container)
protected

Reference size independend minimum size.

§ getContent()

Widget getContent ( )

Content widget or null if not set.

§ getGap()

int getGap ( )

Gap between areas in pixels.

§ getHorizontalScrollBar()

ScrollBar getHorizontalScrollBar ( )

Horizontal scrollbar or null if not set.

§ getMinimumSize()

Point getMinimumSize ( Container  container)

Minimal size required for layout in container.

Implements Layout.

§ getMinimumSizeForHeight()

Point getMinimumSizeForHeight ( Container  container,
int  height 
)

Minimum size of layout using reference widget height and variable width.

Implements Layout.

§ getMinimumSizeForWidth()

Point getMinimumSizeForWidth ( Container  container,
int  width 
)

Minimum size of layout using reference width and variable height.

Implements Layout.

§ getVerticalScrollBar()

ScrollBar getVerticalScrollBar ( )

Vertical scrollbar or null if not set.

§ new() [1/2]

Create layout with 0 gap.

§ new() [2/2]

ScrollPanelLayout new ( int  gap)

Create layout.

Parameters
gapGap in pixels between areas.

§ removeWidget()

void removeWidget ( Widget  widget)

Remove widget from layout.

Implements Layout.

§ setGap()

void setGap ( int  gap)

Set gap between areas in pixels.

Member Data Documentation

§ CONTENT

final int CONTENT = 1

Content.

§ HORIZONTAL

final int HORIZONTAL = 2

Horizontal scrollbar.

§ VERTICAL

final int VERTICAL = 3

Vertical scrollbar.


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