WindowΒΆ

class Window

The base class for all UI windows

Hierarchy

Children classes : class CheckList , class DropCheck , class DropList , class EditBox , class Quad , class Text , class TextButton , class TitleWindow , class Tree , class TreeEx , class ZoomableView

Members

Methods:

nil addtracker ( table tracker ) Add a tracker to this window. A tracker receives notification when the tracked window is invalidated or destroyed. A tracker may implement onTrackedDestroyed and onTrackedInvalidated to get notifications on such events
nil destroy ( ) Destroy the window and all its children windows
nil disable ( ) Disable the window
nil enable ( ) Enable the window
nil getchild ( string|number name ) Get a child window
Window container getcontainer ( ) Get the main container of a window
nil geth ( ) Get the window height
string path getnodepath ( ) Returns the edited node path (is nil if the method is not supported)
nil getparent ( string|nil parentclass ) Get the first parent window of given class (immediate parent if no class is provided)
nil getroot ( ) Return the root window of this window
nil getw ( ) Get the window width
nil getx ( ) Get the window X coordinate in the parent space
nil gety ( ) Get the window Y coordinate in the parent space
nil hide ( ) Hide the window
nil removetracker ( table tracker ) Remove a tracker of this window.
nil setcolor ( ui.color color ) Change the window color, see also ui.color function
nil setfocus ( ) Set the focus to the window
nil seth ( number h , number parentmul , number childadd , number childmul ) Set the window height
nil setnodepath ( string path )
nil settitle ( string name ) Change the window title
nil settopmost ( ) Set the window as top most in children order
nil setw ( number w , number parentmul , number childadd , number childmul ) Set the window width
nil setx ( number x , number parentpivot , number pivot ) Set the X window placement
nil sety ( number y , number parentpivot , number pivot ) Set the Y window placement
nil show ( ) Show the window

Documentation

nil addtracker ( table tracker )

Add a tracker to this window. A tracker receives notification when the tracked window is invalidated or destroyed. A tracker may implement onTrackedDestroyed and onTrackedInvalidated to get notifications on such events

Arguments:

  • tracker The tracker that listens to notifications.


nil destroy ( )

Destroy the window and all its children windows


nil disable ( )

Disable the window


nil enable ( )

Enable the window


nil getchild ( string|number name )

Get a child window

Arguments:

  • name The child window name


Window container getcontainer ( )

Get the main container of a window

Return:

  • container the container window


nil geth ( )

Get the window height


string path getnodepath ( )

Returns the edited node path (is nil if the method is not supported)

Return:

  • path The path to the edited node


nil getparent ( string|nil parentclass )

Get the first parent window of given class (immediate parent if no class is provided)

Arguments:

  • parentclass An optionnal parent class


nil getroot ( )

Return the root window of this window


nil getw ( )

Get the window width


nil getx ( )

Get the window X coordinate in the parent space


nil gety ( )

Get the window Y coordinate in the parent space


nil hide ( )

Hide the window


nil removetracker ( table tracker )

Remove a tracker of this window.

Arguments:

  • tracker The tracker to remove.


nil setcolor ( ui.color color )

Change the window color, see also ui.color function

Arguments:

  • color the color to set


nil setfocus ( )

Set the focus to the window


nil seth ( number h , number parentmul , number childadd , number childmul )

Set the window height

Arguments:

  • h The absolute height of the window
  • parentmul The parent window height factor
  • childadd The height added to the heighest child
  • childmul The heighest child height factor


nil setnodepath ( string path )

Arguments:

  • path The path of the node to edit


nil settitle ( string name )

Change the window title

Arguments:

  • name The new window title


nil settopmost ( )

Set the window as top most in children order


nil setw ( number w , number parentmul , number childadd , number childmul )

Set the window width

Arguments:

  • w The absolute width of the window
  • parentmul The parent window width factor
  • childadd The width added to the largest child
  • childmul The largest child width factor


nil setx ( number x , number parentpivot , number pivot )

Set the X window placement

Arguments:

  • x The x coordinate of the window in pixels, relative to the parent
  • parentpivot The pivot position in parent window, in 0..1 range
  • pivot The pivot position in window, in 0..1 range


nil sety ( number y , number parentpivot , number pivot )

Set the Y window placement

Arguments:

  • y The y coordinate of the window in pixels, relative to the parent
  • parentpivot The pivot position in parent window, in 0..1 range
  • pivot The pivot position in window, in 0..1 range


nil show ( )

Show the window