FrameSeparator

The FrameSeparator widget acts as a simple header for breaking up groups of widgets, and has the ability to expand or collapse and in turn show or hide its associated child widgets. The expand/collapsed state of the widget is saved between sessions in the saved variables.

Inherited Classes: None
Implements Constructor: No
Implements Initializer: Yes
XML Templates: PowaFrameSeparatorTemplate
Fields: Key, Children, State
Hooks: None
Scripts: OnMouseUp, OnEnter, OnLeave, OnShow

Methods

Init(self, text, key)


Description

Initializes a frame as a FrameSeparator widget. This frame must inherit the PowaFrameSeparatorTemplate XML template, or it may not function as intended.

Arguments

self
The frame to be initialized as a PowaFrameSeparatorTemplate.

text
The text string to be displayed as the header for this separator. This should be a localization key, and not an already localized string.

key
A unique identifier for the separator widget, this is used when storing the expand/collapsed status of the widget.

Returns

This function has no return values.

AddChild(self, frame)


Description

Adds a frame as a child of this separator widget, forcing it to show or hide as the state of this widget changes.

Arguments

self
The FrameSeparator widget to assign a child to.

frame
The frame to add to the separator as a child.

Returns

This function has no return values.

SetText(self, text)


Description

Updates the label text displayed on the widget. This should be a localization key and not an already localized string, as the conversion is done automatically.

Arguments

self
The FrameSeparator widget to change the text for.

text
The new text to display as the header for this widget.

Returns

This function has no return values.

ToggleExpand(self, state)


Description

Sets the expand/collapsed status to the given state, forcing elements to hide or show as needed.

Arguments

self
The FrameSeparator widget to update.

state
The new expand/collapsed status to be assigned to the widget.

Returns

This function has no return values.

UpdateColors(self, state)


Description

Internal function, used to update the colouring of the widget in response to mouse movement and expanding/collapsing.

Arguments

self
The FrameSeparator widget to update.

Returns

This function has no return values.

Known Issues

There are currently no known issues.

Future Features

There are currently no planned future features.

Last edited May 1, 2011 at 8:20 PM by dyates92, version 2

Comments

No comments yet.