DockableWindow

The DockableWindow provides basic window functionality and allows multiple DockableWindows to be joined together in one or more groups.

Summary
DockableWindowThe DockableWindow provides basic window functionality and allows multiple DockableWindows to be joined together in one or more groups.
Implementation Details
XML Definition
XML Tag
Required AttributesYou need to specify valid values for all of these elements to get the DockableWindow to create properly.
szTabDefThe name of a Button definition to use as the tab for the dockable window.
OnDockCalled when a window has been docked
OnUnDockCalled when a window has been undocked
OnPositionTabsCalled when a window’s tabs have been positioned
DockableWindowGetTabString()Returns the string that is shown on the tab button for the dockable window.
Functions
Functions
DockableWindowSetTabString()Sets the text displayed on the button
DockableWindowSetTabOffset()Set’s the Offset of the first tab from the left side of the window.
DockableWindowGetTabOffset()Returns the tab offset for the specified window.
DockableWindowDock()
DockableWindowUnDock()
DockableWindowGetRootName()Returns the string name of the root window of the dockable window group
DockableWindowSetTopWindow()
DockableWindowGetTopWindowName(dockableWindowName)Returns the string name of the top window of the dockable window group
DockableWindowGetChildName(dockableWindowName, index)Returns the string name of the child window of the dockable window group
DockableWindowSetOffsetOnRootDelete(windowName, x, y)Set’s the parent offset to use when the root window is deleted.
DockableWindowIsChildOf(rootWindowName, windowName)Returns true if the window is a child of the root window
DockableWindowSetMovable(dockableWindowName, bMovable)Returns the string name of the child window of the dockable window group
DockableWindowSetTabShowing()Sets if a dockable window’s tab should be shown (and drawn) on the screen.
DockableWindowSetAllTabsAlpha()Sets if a dockable window’s tab should be shown (and drawn) on the screen.
WindowGetTabShowing()Returns the current show state of the dockable window’s tab

Implementation Details

Creation

XML Definition

Summary
XML Tag
Required AttributesYou need to specify valid values for all of these elements to get the DockableWindow to create properly.
szTabDefThe name of a Button definition to use as the tab for the dockable window.
OnDockCalled when a window has been docked
OnUnDockCalled when a window has been undocked
OnPositionTabsCalled when a window’s tabs have been positioned
DockableWindowGetTabString()Returns the string that is shown on the tab button for the dockable window.

XML Tag

<DockableWindow>
....
</DockableWindow>

Required Attributes

You need to specify valid values for all of these elements to get the DockableWindow to create properly.

szTabDef

The name of a Button definition to use as the tab for the dockable window.  This button def must have a text component.

Expects

A string value, which is the name of a valid Button.

Default Value

  • ””

OnDock

Called when a window has been docked

Syntax

SomeWindowName.OnDock(RootWindowName, ChildWindowName)
RootWindowName(string) This is the name of the root window that the child is being docked to
ChildWindowName(string) This is the name of the child window that is being docked.

OnUnDock

Called when a window has been undocked

Syntax

SomeWindowName.OnUnDock(RootWindowName, ChildWindowName)
RootWindowName(string) This is the name of the root window that the child is being undocked from
ChildWindowName(string) This is the name of the child window that is being undocked.

OnPositionTabs

Called when a window’s tabs have been positioned

Syntax

SomeWindowName.OnPositionTabs(TabHeight)
TabHeight(number) This is the height offset taken up by the tabs

DockableWindowGetTabString()

Returns the string that is shown on the tab button for the dockable window.

Parameters

dockableWindowName(string) The name of the DockableWindow.

Returns

szTabString(string) The string associated with the tab button of the dockable window.

Example

local szTabString = DockableWindowGetTabString( dockableWindowName )

Functions

Summary
Functions
DockableWindowSetTabString()Sets the text displayed on the button
DockableWindowSetTabOffset()Set’s the Offset of the first tab from the left side of the window.
DockableWindowGetTabOffset()Returns the tab offset for the specified window.
DockableWindowDock()
DockableWindowUnDock()
DockableWindowGetRootName()Returns the string name of the root window of the dockable window group
DockableWindowSetTopWindow()
DockableWindowGetTopWindowName(dockableWindowName)Returns the string name of the top window of the dockable window group
DockableWindowGetChildName(dockableWindowName, index)Returns the string name of the child window of the dockable window group
DockableWindowSetOffsetOnRootDelete(windowName, x, y)Set’s the parent offset to use when the root window is deleted.
DockableWindowIsChildOf(rootWindowName, windowName)Returns true if the window is a child of the root window
DockableWindowSetMovable(dockableWindowName, bMovable)Returns the string name of the child window of the dockable window group
DockableWindowSetTabShowing()Sets if a dockable window’s tab should be shown (and drawn) on the screen.
DockableWindowSetAllTabsAlpha()Sets if a dockable window’s tab should be shown (and drawn) on the screen.
WindowGetTabShowing()Returns the current show state of the dockable window’s tab

Functions

DockableWindowSetTabString()

Sets the text displayed on the button

Parameters

dockableWindowName(string) The name of the dockable window.
text(wstring) The text string.

Returns

nilno return value

Notes

  • none

Example

DockableWindowSetTabString("ChatWindow", GetString( StringTables.Default.LABEL_ACCEPT ))

DockableWindowSetTabOffset()

Set’s the Offset of the first tab from the left side of the window.

Parameters

windowName(string) The name of the window.
offset(number) The offset to use on the tab.  May be any integer value.

Returns

nilno return value

Example

DockableWindowSetTabOffset( "ChatWindow", 10 )

DockableWindowGetTabOffset()

Returns the tab offset for the specified window.

Parameters

windowName(string) The name of the window.

Returns

offset(number) The tab offset value for the window.

Example

local offset = DockableWindowGetTabOffset( <SystemData.ActiveWindow.name> )

DockableWindowDock()

Parameters

dockableRootWindowName(string) The name of the DockableWindow that will be the root.
dockableChildWindowName(string) The name of the DockableWindow that will be docked to the root.

Returns

nilno return value

Example

DockableWindowDock( dockableRootWindowName, dockableChildWindowName )

DockableWindowUnDock()

Parameters

dockableRootWindowName(string) The name of the DockableWindow that is the root of the window group.
dockableChildWindowName(string) The name of the DockableWindow that will be unddocked from the root.

Returns

nilno return value

Example

DockableWindowUnDock( dockableRootWindowName, dockableChildWindowName )

DockableWindowGetRootName()

Returns the string name of the root window of the dockable window group

Parameters

dockableWindowName(string) The name of the DockableWindow who’s root we want the name of.

Returns

szRootName(string) the name of the root window.  If the window is the root the window name is returned.

Example

DockableWindowGetRootName( dockableWindowName )

DockableWindowSetTopWindow()

Parameters

rootWindowName(string) The name of the DockableWindow that is the root.
topWindowName(string) The name of the DockableWindow that will be set to the top.

Returns

nilno return value

Example

DockableWindowSetTopWindow( rootWindowName, topWindowName )

DockableWindowGetTopWindowName(dockableWindowName)

Returns the string name of the top window of the dockable window group

Parameters

dockableWindowName(string) The name of the DockableWindow whose top window we want the name of.

Returns

szTopName(string) the name of the top window.

Example

DockableWindowGetTopWindowName( dockableWindowName )

DockableWindowGetChildName(dockableWindowName, index)

Returns the string name of the child window of the dockable window group

Parameters

dockableWindowName(string) The name of the DockableWindow who’s child we want the name of.
index(number) The index of the child we want to access.  If this is greater than the number of children then we will return an empty string.

Returns

szChildName(string) the name of the child window.

Example

DockableWindowGetChildName( dockableWindowName, index )

DockableWindowSetOffsetOnRootDelete(windowName, x, y)

Set’s the parent offset to use when the root window is deleted.

Parameters

windowName(string) The name of the window.
x(number) The x offset to set the parent offset to when the root window is deleted.
y(number) The y offset to set the parent offset to when the root window is deleted.

Returns

nilno return value

Example

DockableWindowSetOffsetOnRootDelete( "ChatWindow", 10, 143 )

DockableWindowIsChildOf(rootWindowName, windowName)

Returns true if the window is a child of the root window

Parameters

RootWindowName(string) The name of the root window.
windowName(string) The name of the window to check for child status.

Returns

boolreturns true if the window is a child of the root window

Example

DockableWindowIsChildOf("ChatWindow", "CombatWindow")

DockableWindowSetMovable(dockableWindowName, bMovable)

Returns the string name of the child window of the dockable window group

Parameters

dockableWindowName(string) The name of the DockableWindow who’s child we want the name of.
bMovable(bool) True if it will now be movable and false if it will not

Returns

No return value

Example

DockableWindowSetMovable( dockableWindowName, bMovable )

DockableWindowSetTabShowing()

Sets if a dockable window’s tab should be shown (and drawn) on the screen.  When a window’s tab is not showing, it will not receive updates or mouse events.  Generic event handlers will still be processed.

Parameters

windowName(string) The name of the dockable window.
showing(boolean) Should the tab be drawn?

Returns

nilno return value

Example

DockableWindowSetTabShowing(dockableWindowName, bShow )

DockableWindowSetAllTabsAlpha()

Sets if a dockable window’s tab should be shown (and drawn) on the screen.  When a window’s tab is not showing, it will not receive updates or mouse events.  Generic event handlers will still be processed.

Parameters

alphaValue(number) The value to set all of the Tabs to.

Returns

nilno return value

Example

DockableWindowSetAllTabsAlpha( alphaValue )

WindowGetTabShowing()

Returns the current show state of the dockable window’s tab

Parameters

windowName(string) The name of the dockable window window.

Returns

shown(bool) true if the window is shown and false if it isn’t

Example

local bShown = DockableWindowGetTabShowing( "ChatWindow" )
The button element automates generic button functionality, such as swapping texture and font colors automatically according to mouse over and state.