User Tools

Site Tools


DzDynamicDividerWgt

A divider bar that handles resize events and toggling automatically.

More...

Inherits :

Enumerations

Properties

Constructors

DAZ Script
DzDynamicDividerWgt ( DzWidget parent )
DzDynamicDividerWgt ( DzWidget parent, DzWidget firstChild, DzWidget secondChild )

Methods

DAZ Script
voidmoveDivider ( Number distance )
voidsetDividerBar ( DividerOrientation orientation, BarStyle barStyle )
voidsetFirstWidget ( DzWidget first )
voidsetPreferredWidgetExtent ( WidgetType widget, Number extent )
voidsetSecondWidget ( DzWidget second )
voidsetToggleState ( Boolean minimized )
voidswapFirstAndSecondWidgets ()
voidtoggleWidget ()

Detailed Description

A Dynamic Divider takes two DzWidget objects and places a divider bar between them. It handles resize events, as well as toggling of the divider bar if toggling is enabled.

For complex arrangements you can nest instances of this class by specifying them as one of the widgets via setFirstWidget( DzWidget ) or setSecondWidget( DzWidget )

See Also:

Enumerations


: BarStyle

TODO: Add description.

  • BSFull - Use the thick divider bar.
  • BSSemi - Use the medium sized divider bar.
  • BSThin - Use the thin divider bar.

—–

: DividerOrientation

TODO: Add description.

  • DOHorizontal - Represents a horizontal divider bar (widgets are top and bottom).
  • DOVertical - Represents a vertical divider bar (widgets are left and right).

—–

: ResizeType

TODO: Add description.

  • RTStretchFirst - Stretch the left (or top) widget when resizing.
  • RTStretchSecond - Stretch the right (or bottom) widget when resizing.
  • RTStretchBoth - Stretch both widgets equally when resizing.

—–

: WidgetType

TODO: Add description.

  • WTLeftOrTop - References the widget to the left of the divider if the orientation is vertical or the widget to the top of the divider if the orientation is horizontal.
  • WTRightOrBottom - References the widget to the right of the divider if the orientation is vertical or the widget to the bottom of the divider if the orientation is horizontal.
  • WTBoth - References both widgets of the divider bar.
  • WTNone - References neither widget of the divider bar.

Properties


Number : actualDividerPercent

Holds the actual position of the divider bar as a percentage in decimal format (0.5 = 50%).


DividerOrientation : dividerOrientation

Holds the orientation of the divider bar.


BarStyle : dividerType

Holds the type of divider bar used.


Number : margin

Holds the margin surrounding this object.


Boolean : minimized

Holds whether the divider bar is currently minimized.


Boolean : moveDisabled

Holds whether the divider bar can be moved by dragging.


Number : preferredDividerPercent

Holds the preferred position of the divider bar as a percentage in decimal format (0.5 = 50%).


WidgetType : preferredWidget

Holds the preferred widget type.


Number : preferredWidgetExtent

Holds the preferred extent of the widget. This value is only used if the value of DzDynamicDividerWgt::preferredWidget is not DzDividerBar::WTNone.


Number : spacing

Holds the spacing between the widgets and the divider bar.


WidgetType : toggleDirection

Holds the direction the toggle bar will be minimized when clicked.


Boolean : toggleEnabled

Holds whether the divider bar can be minimized when clicked.

Constructors


DzDynamicDividerWgt( DzWidget parent )

Instantiates DzDynamicDividerWgt.

Parameter(s):

  • parent - The parent of this object (should not be undefined).

Attention:

  • : This constructor creates an instance of this object in an undefined state until both setFirstWidget( DzWidget ) and setSecondWidget( DzWidget ) are called.

DzDynamicDividerWgt( DzWidget parent, DzWidget firstChild, DzWidget secondChild )

Instantiates DzDynamicDividerWgt.

Parameter(s):

  • parent - The parent of this object (should not be undefined).
  • firstChild - The left (or top) widget (should not be undefined).
  • secondChild - The right (or bottom) widget (should not be undefined).

Methods


void : moveDivider( Number distance )

Moves the divider distance pixels from the current location. If the new location will cause the divider to be displayed in an invalid location (based on minimum size requirements of the widgets), it will be moved and displayed as close as possible to the desired location.

Parameter(s):

  • distance - The distance in pixels from the current location.

void : setDividerBar( DividerOrientation orientation, BarStyle barStyle )

Sets the divider bar to be used for this object

Parameter(s):

  • orientation - The orientation of the divider bar.
  • type - The type of divider bar to be used.

void : setFirstWidget( DzWidget first )

Sets the left (or top) widget, depending on the orientation.

Parameter(s):

  • first - The widget to be used in the left (or top) position. (should not be undefined)

void : setPreferredWidgetExtent( WidgetType widget, Number extent )

Sets the preferred extent (width or height depending on orientation) for the specified widget. If this extent cannot be used (usually due to minimum size constraints) then the divider will be positioned as close as possible to the preferred extent.

Parameter(s):

  • widget - The widget that should be sized. Values other than WTLeftOrTop or WTRightOrBottom will cause this method to have no effect.
  • extent - The extent to be set for the widget.

Since:

  • 4.9.0.33

void : setSecondWidget( DzWidget second )

Sets the right (or bottom) widget, depending on the orientation.

Parameter(s):

  • second - The widget to be used in the right (or bottom) position. (should not be undefined)

void : setToggleState( Boolean minimized )

Toggles the widget to the specified minimized state, if needed.

Parameter(s):

  • minimized - Whether the divider should be minimized or not.

Since:

  • 4.9.0.33

void : swapFirstAndSecondWidgets()

Swaps the left (or top) and right (or bottom) widget.

Since:

  • 4.9.0.33

void : toggleWidget()

Toggles the widget in the direction specified by toggleDirection. If toggling is disabled, this method has no effect. If either the first or second widget is undefined, this method will also have no effect.