Public Member Functions
GUI::Window Class Reference

An abstract base class providing common functionality and specifying the required interface for derived classes. More...

Inherits GUI::EventSet.

Inherited by GUI::ButtonBase, GUI::Combobox, GUI::DragContainer, GUI::Editbox, GUI::FrameWindow, GUI::GroupBox, GUI::GUISheet, GUI::ItemEntry, GUI::ItemListBase, GUI::Listbox, GUI::ListHeader, GUI::ListHeaderSegment, GUI::MultiColumnList, GUI::MultiLineEditbox, GUI::ProgressBar, GUI::ScrollablePane, GUI::Scrollbar, GUI::ScrolledContainer, GUI::Slider, GUI::Spinner, GUI::TabControl, GUI::Titlebar, GUI::Tooltip, and GUI::Tree.

List of all members.

Public Member Functions

string getType ()
 return a String object holding the type name for this Window.
string getName ()
 return a String object holding the name of this Window.
bool isDestroyedByParent ()
 returns whether or not this Window is set to be destroyed when its parent window is destroyed.
bool isAlwaysOnTop ()
 returns whether or not this Window is an always on top Window. Also known as a top-most window.
bool isDisabled (bool localOnly=false)
 return whether the Window is currently disabled
bool isVisible (bool localOnly=false)
 return true if the Window is currently visible.
bool isActive ()
 return true if this is the active Window. An active window is a window that may receive user inputs.
bool isClippedByParent ()
 return true if this Window is clipped so that its rendering will not pass outside of its parent Window area.
int getID ()
 return the ID code currently assigned to this Window by client code.
int getChildCount ()
 return the number of child Window objects currently attached to this Window.
bool isChild (string name)
 returns whether a Window with the specified name is currently attached to this Window as a child.
bool isChild (int ID)
 returns whether at least one window with the given ID code is attached to this Window as a child.
bool isChildRecursive (int ID)
 returns whether at least one window with the given ID code is attached to this Window or any of it's children as a child.
bool isChild (Window window)
 return true if the given Window is a child of this window.
Window getChild (string name)
 return a pointer to the child window with the specified name.
Window getChild (int ID)
 return a pointer to the first attached child window with the specified ID value.
Window getChildRecursive (string name)
 return a pointer to the first attached child window with the specified name. Children are traversed recursively.
Window getChildRecursive (int ID)
 return a pointer to the first attached child window with the specified ID value. Children are traversed recursively.
Window getChildAtIdx (int idx)
 return a pointer to the child window that is attached to 'this' at the given index.
Window getActiveChild ()
 return a pointer to the Window that currently has input focus starting with this Window.
bool isAncestor (string name)
 return true if the specified Window is some ancestor of this Window
bool isAncestor (int ID)
 return true if any Window with the given ID is some ancestor of this Window.
bool isAncestor (Window window)
 return true if the specified Window is some ancestor of this Window.
Font getFont ()
 return the active Font object for the Window.
string getText ()
 return the current text for the Window
bool inheritsAlpha ()
 return true if the Window inherits alpha from its parent(s).
float getAlpha ()
 return the current alpha value set for this Window
float getEffectiveAlpha ()
 return the effective alpha value that will be used when rendering this window, taking into account inheritance of parent window(s) alpha.
Rect getPixelRect ()
 return a Rect object describing the Window area in screen space.
Rect getInnerRect ()
 return a Rect object describing the clipped inner area for this window.
Rect getUnclippedPixelRect ()
 return a Rect object describing the Window area unclipped, in screen space.
Rect getUnclippedInnerRect ()
 Return a Rect object that describes, unclipped, the inner rectangle for this window. The inner rectangle is typically an area that excludes some frame or other rendering that should not be touched by subsequent rendering.
Window getCaptureWindow ()
 return the Window that currently has inputs captured.
bool isCapturedByThis ()
 return true if this Window has input captured.
bool isCapturedByAncestor ()
 return true if an ancestor window has captured inputs.
bool isCapturedByChild (void)
 return true if a child window has captured inputs.
bool isHit (Vector2 position)
 check if the given pixel position would hit this window.
Window getChildAtPosition (Vector2 position)
 return the child Window that is hit by the given pixel position
Window getTargetChildAtPosition (Vector2 position)
 return the child Window that is 'hit' by the given position, and is allowed to handle mouse events.
Window getParent ()
 return the parent of this Window.
Image getMouseCursor ()
 Return a pointer to the mouse cursor image to use when the mouse cursor is within this window's area.
bool restoresOldCapture (void)
 Return whether this window is set to restore old input capture when it loses input capture.
bool isZOrderingEnabled ()
 Return whether z-order changes are enabled or disabled for this Window.
bool wantsMultiClickEvents ()
 Return whether this window will receive multi-click events or multiple 'down' events instead.
bool isMouseAutoRepeatEnabled ()
 Return whether mouse button down event autorepeat is enabled for this window.
float getAutoRepeatDelay ()
 Return the current auto-repeat delay setting for this window.
float getAutoRepeatRate ()
 Return the current auto-repeat rate setting for this window.
bool distributesCapturedInputs ()
 Return whether the window wants inputs passed to its attached child windows when the window has inputs captured.
bool isUsingDefaultTooltip ()
 Return whether this Window is using the system default Tooltip for its Tooltip window.
Tooltip getTooltip ()
 Return a pointer to the Tooltip object used by this Window. The value returned may point to the system default Tooltip, a custom Window specific Tooltip, or be NULL.
string getTooltipType ()
 Return the custom tooltip type.
string getTooltipText ()
 Return the current tooltip text set for this Window.
bool inheritsTooltipText ()
 Return whether this window inherits Tooltip text from its parent when its own tooltip text is not set.
bool isRiseOnClickEnabled ()
 Return whether this window will rise to the top of the z-order when clicked with the left mouse button.
bool testClassName (string class_name)
 Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
int getVerticalAlignment ()
 Get the vertical alignment.
int getHorizontalAlignment ()
 Get the horizontal alignment.
string getLookNFeel ()
 Get the name of the LookNFeel assigned to this window.
bool getModalState ()
 Get whether or not this Window is the modal target.
string getUserString (string name)
 Returns a named user string.
bool isUserStringDefined (string name)
 Return whether a user string with the specified name exists.
Size getParentPixelSize ()
 Return the pixel size of the parent element. This always returns a valid object.
float getParentPixelWidth ()
 Return the pixel Width of the parent element. This always returns a valid number.
float getParentPixelHeight ()
 Return the pixel Height of the parent element. This always returns a valid number.
bool isMousePassThroughEnabled ()
 Returns whether this window should ignore mouse event and pass them through to and other windows behind it. In effect making the window transparent to the mouse.
bool isDragDropTarget ()
 Returns whether this Window object will receive events generated by the drag and drop support in the system.
void rename (string new_name)
 Renames the window.
void setDestroyedByParent (bool setting)
 Set whether or not this Window will automatically be destroyed when its parent Window is destroyed.
void setAlwaysOnTop (bool setting)
 Set whether this window is always on top, or not.
void setEnabled (bool setting)
 Set whether this window is enabled or disabled. A disabled window normally can not be interacted with, and may have different rendering.
void enable (void)
 enable the Window to allow interaction.
void disable (void)
 disable the Window to prevent interaction.
void setVisible (bool setting)
 Set whether the Window is visible or hidden.
void show (void)
 show the Window.
void hide (void)
 hide the Window.
void activate (void)
 Activate the Window giving it input focus and bringing it to the top of all windows with the same always-on-top settig as this Window.
void deactivate (void)
 Deactivate the window. No further inputs will be received by the window until it is re-activated either programmatically or by the user interacting with the gui.
void setClippedByParent (bool setting)
 Set whether this Window will be clipped by its parent window(s).
void setID (int ID)
 Set the current ID for the Window.
void setText (string text)
 Set the current text string for the Window.
void insertText (string text, int position)
 Insert the text string text into the current text string for the Window object at the position specified by position.
void appendText (string text)
 Append the string text to the currect text string for the Window object.
void setFont (Font font)
 Set the font used by this Window.
void setFont (string name)
 Set the font used by this Window.
void addChildWindow (string name)
 Add the named Window as a child of this Window. If the Window name is already attached to a Window, it is detached before being added to this Window.
void addChildWindow (Window window)
 Add the specified Window as a child of this Window. If the Window window is already attached to a Window, it is detached before being added to this Window.
void removeChildWindow (string name)
 Remove the named Window from this windows child list.
void removeChildWindow (Window window)
 Remove the specified Window form this windows child list.
void removeChildWindow (int ID)
 Remove the first child Window with the specified ID. If there is more than one attached Window objects with the specified ID, only the fist one encountered will be removed.
void moveToFront ()
 Move the Window to the top of the z order.
void moveToBack ()
 Move the Window to the bottom of the Z order.
bool captureInput ()
 Captures input to this window.
void releaseInput ()
 Releases input capture from this Window. If this Window does not have inputs captured, nothing happens.
void setRestoreCapture (bool setting)
 Set whether this window will remember and restore the previous window that had inputs captured.
void setAlpha (float alpha)
 Set the current alpha value for this window.
void setInheritsAlpha (bool setting)
 Sets whether this Window will inherit alpha from its parent windows.
void requestRedraw (void)
 Signal the System object to redraw (at least) this Window on the next render cycle.
void setMouseCursor (string imageset, string image_name)
 Set the mouse cursor image to be used when the mouse enters this window.
void setZOrderingEnabled (bool setting)
 Set whether z-order changes are enabled or disabled for this Window.
void setWantsMultiClickEvents (bool setting)
 Set whether this window will receive multi-click events or multiple 'down' events instead.
void setMouseAutoRepeatEnabled (bool setting)
 Set whether mouse button down event autorepeat is enabled for this window.
void setAutoRepeatDelay (float delay)
 Set the current auto-repeat delay setting for this window.
void setAutoRepeatRate (float rate)
 Set the current auto-repeat rate setting for this window.
void setDistributesCapturedInputs (bool setting)
 Set whether the window wants inputs passed to its attached child windows when the window has inputs captured.
void notifyDragDropItemEnters (DragContainer item)
 Internal support method for drag & drop. You do not normally call this directly from client code. See the DragContainer class.
void notifyDragDropItemLeaves (DragContainer item)
 Internal support method for drag & drop. You do not normally call this directly from client code. See the DragContainer class.
void notifyDragDropItemDropped (DragContainer item)
 Internal support method for drag & drop. You do not normally call this directly from client code. See the DragContainer class.
void setTooltip (Tooltip tooltip)
 Set the custom Tooltip object for this Window. This value may be 0 to indicate that the Window should use the system default Tooltip object.
void setTooltipType (string tooltipType)
 Set the custom Tooltip to be used by this Window by specifying a Window type.
void setTooltipText (string tip)
 Set the tooltip text for this window.
void setInheritsTooltipText (bool setting)
 Set whether this window inherits Tooltip text from its parent when its own tooltip text is not set.
void setRiseOnClickEnabled (bool setting)
 Set whether this window will rise to the top of the z-order when clicked with the left mouse button.
void setVerticalAlignment (int alignment)
 Set the vertical alignment.
void setHorizontalAlignment (int alignment)
 Set the horizontal alignment.
void setLookNFeel (string look)
 Set the LookNFeel that shoule be used for this window.
void setModalState (bool state)
 Set the modal state for this Window.
void setUserString (string name, string value)
 Sets the value a named user string, creating it as required.
void setArea (UDim xpos, UDim ypos, UDim width, UDim height)
 Set the window area.
void setArea (UVector2 pos, UVector2 size)
 Set the window area.
void setArea (URect area)
 Set the window area.
void setPosition (UVector2 pos)
 Set the window's position.
void setXPosition (UDim x)
 Set the window's X position.
void setYPosition (UDim y)
 Set the window's Y position.
void setSize (UVector2 size)
 Set the window's size.
void setWidth (UDim width)
 Set the window's width.
void setHeight (UDim height)
 Set the window's height.
void setMaxSize (UVector2 size)
 Set the window's maximum size.
void setMinSize (UVector2 size)
 Set the window's minimum size.
URect getArea ()
 Return the windows area.
UVector2 getPosition ()
 Get the window's position.
UDim getXPosition ()
 Get the window's X position.
UDim getYPosition ()
 Get the window's Y position.
UVector2 getSize ()
 Get the window's size.
UDim getWidth ()
 Get the window's width.
UDim getHeight ()
 Get the window's height.
UVector2 getMaxSize ()
 Get the window's maximum size.
UVector2 getMinSize ()
 Get the window's minimum size.
void setMousePassThroughEnabled (bool setting)
 Sets whether this window should ignore mouse events and pass them through to any windows behind it. In effect making the window transparent to the mouse.
void setWindowRenderer (string name)
 Assign the WindowRenderer to specify the Look'N'Feel specification to be used.
string getWindowRendererName ()
 Get the factory name of the currently assigned WindowRenderer. (Look'N'Feel specification).
void setDragDropTarget (bool setting)
 Specifies whether this Window object will receive events generated by the drag and drop support in the system.
- Public Member Functions inherited from GUI::EventSet
void addEvent (string name)
 Add a new Event to the EventSet with the given name.
void removeEvent (string name)
 Removes the Event with the given name. All connections to the event are disconnected.
void removeAllEvents ()
 Remove all Event objects from the EventSet.
bool isEventPresent (string name)
 Checks to see if an Event with the given name is present in the EventSet.
EventConnection subscribeEvent (string name, string subscriber_name)
 Subscribes the named Event to a scripted funtion.
void fireEvent (string name, EventArgs args, string eventNamespace="")
 Fires the named event passing the given EventArgs object.
bool isMuted ()
 Return whether the EventSet is muted or not.
void setMutedState (bool setting)
 Set the mute state for this EventSet.

Qualified Iterators

Property Property
 Can be used to iterate over the properties currently added to the PropertySet of this Window.

Additional Inherited Members

- Public Attributes inherited from GUI::EventSet
Event Event
 Can be used to iterate over the events currently added to the EventSet.

Detailed Description

An abstract base class providing common functionality and specifying the required interface for derived classes.

The Window base class is core UI object class that the the system knows about; for this reason, every other window, widget, or similar item within the system must be derived from Window.

The base class provides the common functionality required by all UI objects, and specifies the minimal interface required to be implemented by derived classes.


Member Function Documentation

string GUI::Window::getType ( )

return a String object holding the type name for this Window.

Returns:
String object holding the Window type.
string GUI::Window::getName ( )

return a String object holding the name of this Window.

Returns:
String object holding the unique Window name.
bool GUI::Window::isDestroyedByParent ( )

returns whether or not this Window is set to be destroyed when its parent window is destroyed.

Returns:
  • true if the Window will be destroyed when its parent is destroyed.
  • false if the Window will remain when its parent is destroyed.
bool GUI::Window::isAlwaysOnTop ( )

returns whether or not this Window is an always on top Window. Also known as a top-most window.

Returns:
  • true if this Window is always drawn on top of other normal windows.
  • false if the Window has normal z-order behaviour.
bool GUI::Window::isDisabled ( bool  localOnly = false)

return whether the Window is currently disabled

Parameters:
localOnlyStates whether to only return the state set for this window, and not to factor in inherited state from ancestor windows.
Returns:
  • true if the window is disabled.
  • false if the window is enabled.
bool GUI::Window::isVisible ( bool  localOnly = false)

return true if the Window is currently visible.

When true is returned from this function does not mean that the window is not completely obscured by other windows, just that the window will be processed when rendering, and is not explicitly marked as hidden.

Parameters:
localOnlyStates whether to only return the state set for this window, and not to factor in inherited state from ancestor windows.
Returns:
  • true if the window will be drawn.
  • false if the window is hidden and therefore ignored when rendering.
bool GUI::Window::isActive ( )

return true if this is the active Window. An active window is a window that may receive user inputs.

Mouse events are always sent to the window containing the mouse cursor regardless of what this function reports (unless a window has captured inputs). The active state mainly determines where send other, for example keyboard, inputs.

Returns:
  • true if the window is active and may be sent inputs by the system.
  • false if the window is inactive and will not be sent inputs.
bool GUI::Window::isClippedByParent ( )

return true if this Window is clipped so that its rendering will not pass outside of its parent Window area.

Returns:
  • true if the window will be clipped by its parent Window.
  • false if the windows rendering may pass outside its parents area
int GUI::Window::getID ( )

return the ID code currently assigned to this Window by client code.

Returns:
uint value equal to the currently assigned ID code for this Window.
int GUI::Window::getChildCount ( )

return the number of child Window objects currently attached to this Window.

Returns:
size_t value equal to the number of Window objects directly attached to this Window as children.
bool GUI::Window::isChild ( string  name)

returns whether a Window with the specified name is currently attached to this Window as a child.

Parameters:
nameString object containing the name of the Window to look for.
Returns:
  • true if a Window named name is currently attached to this Window.
  • false if no such child Window is attached.
bool GUI::Window::isChild ( int  ID)

returns whether at least one window with the given ID code is attached to this Window as a child.

Note:
ID codes are client assigned and may or may not be unique, and as such, the return from this function will only have meaning to the client code.
Parameters:
IDuint ID code to look for.
Returns:
  • true if at least one child window was found with the ID code ID
  • false if no child window was found with the ID code ID.
bool GUI::Window::isChildRecursive ( int  ID)

returns whether at least one window with the given ID code is attached to this Window or any of it's children as a child.

Note:
ID codes are client assigned and may or may not be unique, and as such, the return from this function will only have meaning to the client code.

WARNING! This function can be very expensive and should only be used when you have no other option available. If you decide to use it anyway, make sure the window hierarchy from the entry point is small.

Parameters:
IDuint ID code to look for.
Returns:
  • true if at least one child window was found with the ID code ID
  • false if no child window was found with the ID code ID.
bool GUI::Window::isChild ( Window  window)

return true if the given Window is a child of this window.

Parameters:
windowPointer to the Window object to look for.
Returns:
  • true if Window object window is attached to this window as a child.
  • false if Window object window is not a child of this Window.
Window GUI::Window::getChild ( string  name)

return a pointer to the child window with the specified name.

This function will throw an exception if no child object with the given name is attached. This decision was made (over returning NULL if no window was found) so that client code can assume that if the call returns it has a valid window pointer. We provide the isChild() functions for checking if a given window is attached.

Parameters:
nameString object holding the name of the child window for which a pointer is to be returned.
Returns:
Pointer to the Window object attached to this window that has the name name.
Exceptions:
UnknownObjectExceptionthrown if no window named name is attached to this Window.
Window GUI::Window::getChild ( int  ID)

return a pointer to the first attached child window with the specified ID value.

This function will throw an exception if no child object with the given ID is attached. This decision was made (over returning NULL if no window was found) so that client code can assume that if the call returns it has a valid window pointer. We provide the isChild() functions for checking if a given window is attached.

Parameters:
IDuint value specifying the ID code of the window to return a pointer to.
Returns:
Pointer to the (first) Window object attached to this window that has the ID code ID.
Exceptions:
UnknownObjectExceptionthrown if no window with the ID code ID is attached to this Window.
Window GUI::Window::getChildRecursive ( string  name)

return a pointer to the first attached child window with the specified name. Children are traversed recursively.

Contrary to the non recursive version of this function, this one will not throw an exception, but return 0 in case no child was found.

Note:
WARNING! This function can be very expensive and should only be used when you have no other option available. If you decide to use it anyway, make sure the window hierarchy from the entry point is small.
Parameters:
nameString object holding the name of the child window for which a pointer is to be returned.
Returns:
Pointer to the Window object attached to this window that has the name name.

If no child is found with the name name, 0 is returned.

Window GUI::Window::getChildRecursive ( int  ID)

return a pointer to the first attached child window with the specified ID value. Children are traversed recursively.

Contrary to the non recursive version of this function, this one will not throw an exception, but return 0 in case no child was found.

Note:
WARNING! This function can be very expensive and should only be used when you have no other option available. If you decide to use it anyway, make sure the window hierarchy from the entry point is small.
Parameters:
IDuint value specifying the ID code of the window to return a pointer to.
Returns:
Pointer to the (first) Window object attached to this window that has the ID code ID. If no child is found with the ID code ID, 0 is returned.
Window GUI::Window::getChildAtIdx ( int  idx)

return a pointer to the child window that is attached to 'this' at the given index.

Parameters:
idxIndex of the child window whos pointer should be returned. This value is not bounds checked, client code should ensure that this is less than the value returned by getChildCount().
Returns:
Pointer to the child window currently attached at index position idx
Window GUI::Window::getActiveChild ( )

return a pointer to the Window that currently has input focus starting with this Window.

Returns:
Pointer to the window that is active (has input focus) starting at this window. The function will return 'this' if this Window is active and either no children are attached or if none of the attached children are active. Returns NULL if this Window (and therefore all children) are not active.
bool GUI::Window::isAncestor ( string  name)

return true if the specified Window is some ancestor of this Window

Parameters:
nameString object holding the name of the Window to check for.
Returns:
  • true if a Window named name is an ancestor (parent, or parent of parent, etc) of this Window.
  • false if a Window named name is in no way an ancestor of this window.
bool GUI::Window::isAncestor ( int  ID)

return true if any Window with the given ID is some ancestor of this Window.

Parameters:
IDuint value specifying the ID to look for.
Returns:
  • true if an ancestor (parent, or parent of parent, etc) was found with the ID code ID.
  • false if no ancestor window has the ID code ID.
bool GUI::Window::isAncestor ( Window  window)

return true if the specified Window is some ancestor of this Window.

Parameters:
windowPointer to the Window object to look for.
Returns:
  • true if window was found to be an ancestor (parent, or parent of parent, etc) of this Window.
  • false if window is not an ancestor of this window.
Font GUI::Window::getFont ( )

return the active Font object for the Window.

Returns:
Pointer to the Font being used by this Window. If the window has no assigned font, and useDefault is true, then the default system font is returned.
string GUI::Window::getText ( )

return the current text for the Window

Returns:
The String object that holds the current text for this Window.
bool GUI::Window::inheritsAlpha ( )

return true if the Window inherits alpha from its parent(s).

Returns:
  • true if the Window inherits alpha from its parent(s)
  • false if the alpha for this Window is independant from its parents.
float GUI::Window::getAlpha ( )

return the current alpha value set for this Window

Note:
The alpha value set for any given window may or may not be the final alpha value that is used when rendering. All window objects, by default, inherit alpha from thier parent window(s) - this will blend child windows, relatively, down the line of inheritance. This behaviour can be overridden via the setInheritsAlpha() method. To return the true alpha value that will be applied when rendering, use the getEffectiveAlpha() method.
Returns:
the currently set alpha value for this Window. The value returned Will be between 0.0f and 1.0f.
float GUI::Window::getEffectiveAlpha ( )

return the effective alpha value that will be used when rendering this window, taking into account inheritance of parent window(s) alpha.

Returns:
the effective alpha that will be applied to this Window when rendering. The value returned Will be between 0.0f and 1.0f.
Rect GUI::Window::getPixelRect ( )

return a Rect object describing the Window area in screen space.

Returns:
Rect object that describes the area covered by the Window. The values in the returned Rect are in screen pixels. The returned Rect is clipped as appropriate and depending upon the 'ClippedByParent' setting.
Note:
This has now been made virtual to ease some customisations that require more specialised clipping requirements.
Rect GUI::Window::getInnerRect ( )

return a Rect object describing the clipped inner area for this window.

Returns:
Rect object that describes, in appropriately clipped screen pixel co-ordinates, the window object's inner rect area.
Rect GUI::Window::getUnclippedPixelRect ( )

return a Rect object describing the Window area unclipped, in screen space.

Returns:
Rect object that describes the area covered by the Window. The values in the returned Rect are in screen pixels. The returned rect is fully unclipped.
Rect GUI::Window::getUnclippedInnerRect ( )

Return a Rect object that describes, unclipped, the inner rectangle for this window. The inner rectangle is typically an area that excludes some frame or other rendering that should not be touched by subsequent rendering.

Returns:
Rect object that describes, in unclipped screen pixel co-ordinates, the window object's inner rect area.
Window GUI::Window::getCaptureWindow ( )

return the Window that currently has inputs captured.

Returns:
Pointer to the Window object that currently has inputs captured, or NULL if no Window has captured input.
bool GUI::Window::isCapturedByThis ( )

return true if this Window has input captured.

Returns:
  • true if this Window has captured inputs.
  • false if some other Window, or no Window, has captured inputs.
bool GUI::Window::isCapturedByAncestor ( )

return true if an ancestor window has captured inputs.

Returns:
  • true if input is captured by a Window that is some ancestor (parent, parent of parent, etc) of this Window.
  • false if no ancestor of this window has captured input.
bool GUI::Window::isCapturedByChild ( void  )

return true if a child window has captured inputs.

Returns:
  • true if input is captured by a Window that is a child of this Window.
  • false if no child of this window has not captured input.
bool GUI::Window::isHit ( Vector2  position)

check if the given pixel position would hit this window.

Parameters:
positionVector2 object describing the position to check. The position describes a pixel offset from the top-left corner of the display.
Returns:
  • true if position hits this Window.
  • false if position does not hit this window.
Window GUI::Window::getChildAtPosition ( Vector2  position)

return the child Window that is hit by the given pixel position

Parameters:
positionVector2 object describing the position to check. The position describes a pixel offset from the top-left corner of the display.
Returns:
Pointer to the child Window that was hit according to the location position, or 0 if no child of this window was hit.
Window GUI::Window::getTargetChildAtPosition ( Vector2  position)

return the child Window that is 'hit' by the given position, and is allowed to handle mouse events.

Parameters:
positionVector2 object describing the position to check. The position describes a pixel offset from the top-left corner of the display.
Returns:
Pointer to the child Window that was hit according to the location position, or 0 if no child of this window was hit.
Window GUI::Window::getParent ( )

return the parent of this Window.

Returns:
Pointer to the Window object that is the parent of this Window. This value can be NULL, in which case the Window is a GUI sheet / root.
Image GUI::Window::getMouseCursor ( )

Return a pointer to the mouse cursor image to use when the mouse cursor is within this window's area.

Returns:
Pointer to the mouse cursor image that will be used when the mouse enters this window's area. May return NULL indicating no cursor will be drawn for this window.
bool GUI::Window::restoresOldCapture ( void  )

Return whether this window is set to restore old input capture when it loses input capture.

This is only really useful for certain sub-components for widget writers.

Returns:
  • true if the window will restore the previous capture window when it loses input capture.
  • false if the window will set the capture window to NULL when it loses input capture (this is the default behaviour).
bool GUI::Window::isZOrderingEnabled ( )

Return whether z-order changes are enabled or disabled for this Window.

Note:
This is distinguished from the is/setRiseOnClickEnabled setting in that if rise on click is disabled it only affects the users ability to affect the z order of the Window by clicking the mouse; is still possible to programatically alter the Window z-order by calling the moveToFront or moveToBack member functions. Whereas if z ordering is disabled the functions moveToFront and moveToBack are also precluded from affecting the Window z position.
Returns:
  • true if z-order changes are enabled for this window. moveToFront/moveToBack work normally as expected.
  • false: z-order changes are disabled for this window. moveToFront/moveToBack are ignored for this window.
bool GUI::Window::wantsMultiClickEvents ( )

Return whether this window will receive multi-click events or multiple 'down' events instead.

Returns:
  • true if the Window will receive double-click and triple-click events.
  • false if the Window will receive multiple mouse button down events instead of double/triple click events.
bool GUI::Window::isMouseAutoRepeatEnabled ( )

Return whether mouse button down event autorepeat is enabled for this window.

Returns:
  • true if autorepeat of mouse button down events is enabled for this window.
  • false if autorepeat of mouse button down events is not enabled for this window.
float GUI::Window::getAutoRepeatDelay ( )

Return the current auto-repeat delay setting for this window.

Returns:
float value indicating the delay, in seconds, defore the first repeat mouse button down event will be triggered when autorepeat is enabled.
float GUI::Window::getAutoRepeatRate ( )

Return the current auto-repeat rate setting for this window.

Returns:
float value indicating the rate, in seconds, at which repeat mouse button down events will be generated after the initial delay has expired.
bool GUI::Window::distributesCapturedInputs ( )

Return whether the window wants inputs passed to its attached child windows when the window has inputs captured.

Returns:
  • true if System should pass captured input events to child windows.
  • false if System should pass captured input events to this window only.
bool GUI::Window::isUsingDefaultTooltip ( )

Return whether this Window is using the system default Tooltip for its Tooltip window.

Returns:
  • true if the Window will use the system default tooltip.
  • false if the window has a custom Tooltip object.
Tooltip GUI::Window::getTooltip ( )

Return a pointer to the Tooltip object used by this Window. The value returned may point to the system default Tooltip, a custom Window specific Tooltip, or be NULL.

Returns:
Pointer to a Tooltip based object, or NULL.
string GUI::Window::getTooltipType ( )

Return the custom tooltip type.

Returns:
String object holding the current custom tooltip window type, or an empty string if no custom tooltip is set.
string GUI::Window::getTooltipText ( )

Return the current tooltip text set for this Window.

Returns:
String object holding the current tooltip text set for this window.
bool GUI::Window::inheritsTooltipText ( )

Return whether this window inherits Tooltip text from its parent when its own tooltip text is not set.

Returns:
  • true if the window inherits tooltip text from its parent when its own text is not set.
  • false if the window does not inherit tooltip text from its parent (and shows no tooltip when no text is set).
bool GUI::Window::isRiseOnClickEnabled ( )

Return whether this window will rise to the top of the z-order when clicked with the left mouse button.

Note:
This is distinguished from the is/setZOrderingEnabled setting in that if rise on click is disabled it only affects the users ability to affect the z order of the Window by clicking the mouse; is still possible to programatically alter the Window z-order by calling the moveToFront or moveToBack member functions. Whereas if z ordering is disabled the functions moveToFront and moveToBack are also precluded from affecting the Window z position.
Returns:
  • true if the window will come to the top of other windows when the left mouse button is pushed within its area.
  • false if the window does not change z-order position when the left mouse button is pushed within its area.
bool GUI::Window::testClassName ( string  class_name)

Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

Parameters:
class_nameThe class name that is to be checked.
Returns:
true if this window was inherited from class_name. false if not.
int GUI::Window::getVerticalAlignment ( )

Get the vertical alignment.

Returns the vertical alignment for the window. This setting affects how the windows position is interpreted relative to its parent.

Returns:
One of the VerticalAlignment enumerated values.
int GUI::Window::getHorizontalAlignment ( )

Get the horizontal alignment.

Returns the horizontal alignment for the window. This setting affects how the windows position is interpreted relative to its parent.

Returns:
One of the HorizontalAlignment enumerated values.
string GUI::Window::getLookNFeel ( )

Get the name of the LookNFeel assigned to this window.

Returns:
String object holding the name of the look assigned to this window. Returns the empty string if no look is assigned.
bool GUI::Window::getModalState ( )

Get whether or not this Window is the modal target.

Returns:
Returns true if this Window is the modal target, otherwise false.
string GUI::Window::getUserString ( string  name)

Returns a named user string.

Parameters:
nameString object holding the name of the string to be returned.
Returns:
String object holding the data stored for the requested user string.
Exceptions:
UnknownObjectExceptionthrown if a user string named name does not exist.
bool GUI::Window::isUserStringDefined ( string  name)

Return whether a user string with the specified name exists.

Parameters:
nameString object holding the name of the string to be checked.
Returns:
  • true if a user string named name exists.
  • false if no such user string exists.
Size GUI::Window::getParentPixelSize ( )

Return the pixel size of the parent element. This always returns a valid object.

Returns:
Size object that describes the pixel dimensions of this Window objects parent
float GUI::Window::getParentPixelWidth ( )

Return the pixel Width of the parent element. This always returns a valid number.

Returns:
float value that is equal to the pixel width of this Window objects parent
float GUI::Window::getParentPixelHeight ( )

Return the pixel Height of the parent element. This always returns a valid number.

Returns:
float value that is equal to the pixel height of this Window objects parent
bool GUI::Window::isMousePassThroughEnabled ( )

Returns whether this window should ignore mouse event and pass them through to and other windows behind it. In effect making the window transparent to the mouse.

Returns:
true if mouse pass through is enabled. false if mouse pass through is not enabled.
bool GUI::Window::isDragDropTarget ( )

Returns whether this Window object will receive events generated by the drag and drop support in the system.

Returns:
  • true if the Window is enabled as a drag and drop target.
  • false if the window is not enabled as a drag and drop target.
void GUI::Window::rename ( string  new_name)

Renames the window.

Parameters:
new_nameString object holding the new name for the window.
Exceptions:
AlreadyExistsExceptionthrown if a Window named new_name already exists in the system.
void GUI::Window::setDestroyedByParent ( bool  setting)

Set whether or not this Window will automatically be destroyed when its parent Window is destroyed.

Parameters:
setting
  • true to have the Window auto-destroyed when its parent is destroyed (default behaviour)
  • false to have the Window remain after its parent is destroyed.
Returns:
Nothing
void GUI::Window::setAlwaysOnTop ( bool  setting)

Set whether this window is always on top, or not.

Parameters:
setting
  • true to have the Window appear on top of all other non always on top windows
  • false to allow the window to be covered by other normal windows.
Returns:
Nothing
void GUI::Window::setEnabled ( bool  setting)

Set whether this window is enabled or disabled. A disabled window normally can not be interacted with, and may have different rendering.

Parameters:
setting
Returns:
Nothing
void GUI::Window::enable ( void  )
inline

enable the Window to allow interaction.

Returns:
Nothing
void GUI::Window::disable ( void  )
inline

disable the Window to prevent interaction.

Returns:
Nothing
void GUI::Window::setVisible ( bool  setting)

Set whether the Window is visible or hidden.

Parameters:
setting
  • true to make the Window visible.
  • false to make the Window hidden.
Note:
Hiding the active window will cause that window to become deactivated. Showing a window does not, however, automatically cause that window to become the active window (call Window::activate after making the window visible to activate it).
Returns:
Nothing
void GUI::Window::show ( void  )
inline

show the Window.

Note:
Showing a window does not automatically activate the window. If you want the window to also become active you will need to call the Window::activate member also.
Returns:
Nothing
void GUI::Window::hide ( void  )
inline

hide the Window.

Note:
If the window is the active window, it will become deactivated as a result of being hidden.
Returns:
Nothing
void GUI::Window::activate ( void  )

Activate the Window giving it input focus and bringing it to the top of all windows with the same always-on-top settig as this Window.

Returns:
Nothing
void GUI::Window::deactivate ( void  )

Deactivate the window. No further inputs will be received by the window until it is re-activated either programmatically or by the user interacting with the gui.

Returns:
Nothing.
void GUI::Window::setClippedByParent ( bool  setting)

Set whether this Window will be clipped by its parent window(s).

Parameters:
setting
  • true to have the Window clipped so that rendering is constrained to within the area of its parent(s).
  • false to have rendering constrained to the screen only.
Returns:
Nothing
void GUI::Window::setID ( int  ID)

Set the current ID for the Window.

Parameters:
IDClient assigned ID code for this Window. The GUI system assigns no meaning to any IDs, they are a device purely for client code usage.
Returns:
Nothing
void GUI::Window::setText ( string  text)

Set the current text string for the Window.

Parameters:
textString object containing the text that is to be set as the Window text.
Returns:
Nothing
void GUI::Window::insertText ( string  text,
int  position 
)

Insert the text string text into the current text string for the Window object at the position specified by position.

Parameters:
textString object holding the text that is to be inserted into the Window object's current text string.
positionThe characted index position where the string text should be inserted.
void GUI::Window::appendText ( string  text)

Append the string text to the currect text string for the Window object.

Parameters:
textString object holding the text that is to be appended to the Window object's current text string.
void GUI::Window::setFont ( Font  font)

Set the font used by this Window.

Parameters:
fontPointer to the Font object to be used by this Window. If font is NULL, the default font will be used.
Returns:
Nothing
void GUI::Window::setFont ( string  name)

Set the font used by this Window.

Parameters:
nameString object holding the name of the Font object to be used by this Window. If name == "", the default font will be used.
Returns:
Nothing
Exceptions:
UnknownObjectExceptionthrown if the specified Font is unknown within the system.
void GUI::Window::addChildWindow ( string  name)

Add the named Window as a child of this Window. If the Window name is already attached to a Window, it is detached before being added to this Window.

Parameters:
nameString object holding the name of the Window to be added.
Returns:
Nothing.
Exceptions:
UnknownObjectExceptionthrown if no Window named name exists.
InvalidRequestExceptionthrown if Window name is an ancestor of this Window, to prevent cyclic Window structures.
void GUI::Window::addChildWindow ( Window  window)

Add the specified Window as a child of this Window. If the Window window is already attached to a Window, it is detached before being added to this Window.

Parameters:
windowPointer to the Window object to be added.
Returns:
Nothing
Exceptions:
InvalidRequestExceptionthrown if Window window is an ancestor of this Window, to prevent cyclic Window structures.
void GUI::Window::removeChildWindow ( string  name)

Remove the named Window from this windows child list.

Parameters:
nameString object holding the name of the Window to be removed. If the Window specified is not attached to this Window, nothing happens.
Returns:
Nothing.
void GUI::Window::removeChildWindow ( Window  window)

Remove the specified Window form this windows child list.

Parameters:
windowPointer to the Window object to be removed. If the window is not attached to this Window, then nothing happens.
Returns:
Nothing.
void GUI::Window::removeChildWindow ( int  ID)

Remove the first child Window with the specified ID. If there is more than one attached Window objects with the specified ID, only the fist one encountered will be removed.

Parameters:
IDID number assigned to the Window to be removed. If no Window with ID code ID is attached, nothing happens.
Returns:
Nothing.
void GUI::Window::moveToFront ( )

Move the Window to the top of the z order.

  • If the Window is a non always-on-top window it is moved the the top of all other non always-on-top sibling windows, and the process repeated for all ancestors.
  • If the Window is an always-on-top window it is moved to the of of all sibling Windows, and the process repeated for all ancestors.
Returns:
Nothing
void GUI::Window::moveToBack ( )

Move the Window to the bottom of the Z order.

  • If the window is non always-on-top the Window is sent to the very bottom of its sibling windows and the process repeated for all ancestors.
  • If the window is always-on-top, the Window is sent to the bottom of all sibling always-on-top windows and the process repeated for all ancestors.
Returns:
Nothing
bool GUI::Window::captureInput ( )

Captures input to this window.

Returns:
  • true if input was successfully captured to this window.
  • false if input could not be captured to this window (maybe because the window is not active).
void GUI::Window::releaseInput ( )

Releases input capture from this Window. If this Window does not have inputs captured, nothing happens.

Returns:
Nothing
void GUI::Window::setRestoreCapture ( bool  setting)

Set whether this window will remember and restore the previous window that had inputs captured.

Parameters:
setting
  • true: The window will remember and restore the previous capture window. The CaptureLost event is not fired on the previous window when this window steals input capture. When this window releases capture, the old capture window is silently restored.
  • false: Input capture works as normal, each window losing capture is signalled via CaptureLost, and upon the final release of capture, no previous setting is restored (this is the default behaviour).
Returns:
Nothing
void GUI::Window::setAlpha ( float  alpha)

Set the current alpha value for this window.

Note:
The alpha value set for any given window may or may not be the final alpha value that is used when rendering. All window objects, by default, inherit alpha from thier parent window(s) - this will blend child windows, relatively, down the line of inheritance. This behaviour can be overridden via the setInheritsAlpha() method. To return the true alpha value that will be applied when rendering, use the getEffectiveAlpha() method.
Parameters:
alphaThe new alpha value for the window. Value should be between 0.0f and 1.0f.
Returns:
Nothing
void GUI::Window::setInheritsAlpha ( bool  setting)

Sets whether this Window will inherit alpha from its parent windows.

Parameters:
setting
  • true if the Window should use inherited alpha.
  • false if the Window should have an independant alpha value.
Returns:
Nothing
void GUI::Window::requestRedraw ( void  )

Signal the System object to redraw (at least) this Window on the next render cycle.

Returns:
Nothing
void GUI::Window::setMouseCursor ( string  imageset,
string  image_name 
)

Set the mouse cursor image to be used when the mouse enters this window.

Parameters:
imagesetString object that contains the name of the Imageset that contains the image to be used.
image_nameString object that contains the name of the Image on imageset that is to be used.
Returns:
Nothing.
Exceptions:
UnknownObjectExceptionthrown if imageset is not known, or if imageset contains no Image named image_name.
void GUI::Window::setZOrderingEnabled ( bool  setting)

Set whether z-order changes are enabled or disabled for this Window.

Note:
This is distinguished from the is/setRiseOnClickEnabled setting in that if rise on click is disabled it only affects the users ability to affect the z order of the Window by clicking the mouse; is still possible to programatically alter the Window z-order by calling the moveToFront or moveToBack member functions. Whereas if z ordering is disabled the functions moveToFront and moveToBack are also precluded from affecting the Window z position.
Parameters:
setting
  • true if z-order changes are enabled for this window. moveToFront/moveToBack work normally as expected.
  • false: z-order changes are disabled for this window. moveToFront/moveToBack are ignored for this window.
Returns:
Nothing.
void GUI::Window::setWantsMultiClickEvents ( bool  setting)

Set whether this window will receive multi-click events or multiple 'down' events instead.

Parameters:
setting
  • true if the Window will receive double-click and triple-click events.
  • false if the Window will receive multiple mouse button down events instead of double/triple click events.
Returns:
Nothing.
void GUI::Window::setMouseAutoRepeatEnabled ( bool  setting)

Set whether mouse button down event autorepeat is enabled for this window.

Parameters:
setting
  • true to enable autorepeat of mouse button down events.
  • false to disable autorepeat of mouse button down events.
Returns:
Nothing.
void GUI::Window::setAutoRepeatDelay ( float  delay)

Set the current auto-repeat delay setting for this window.

Parameters:
delayfloat value indicating the delay, in seconds, defore the first repeat mouse button down event should be triggered when autorepeat is enabled.
Returns:
Nothing.
void GUI::Window::setAutoRepeatRate ( float  rate)

Set the current auto-repeat rate setting for this window.

Parameters:
ratefloat value indicating the rate, in seconds, at which repeat mouse button down events should be generated after the initial delay has expired.
Returns:
Nothing.
void GUI::Window::setDistributesCapturedInputs ( bool  setting)

Set whether the window wants inputs passed to its attached child windows when the window has inputs captured.

Parameters:
setting
  • true if System should pass captured input events to child windows.
  • false if System should pass captured input events to this window only.
void GUI::Window::setTooltip ( Tooltip  tooltip)

Set the custom Tooltip object for this Window. This value may be 0 to indicate that the Window should use the system default Tooltip object.

Parameters:
tooltipPointer to a valid Tooltip based object which should be used as the tooltip for this Window, or 0 to indicate that the Window should use the system default Tooltip object. Note that when passing a pointer to a Tooltip object, ownership of the Tooltip does not pass to this Window object.
Returns:
Nothing.
void GUI::Window::setTooltipType ( string  tooltipType)

Set the custom Tooltip to be used by this Window by specifying a Window type.

The Window will internally attempt to create an instance of the specified window type (which must be derived from the base Tooltip class). If the Tooltip creation fails, the error is logged and the Window will revert to using either the existing custom Tooltip or the system default Tooltip.

Parameters:
tooltipTypeString object holding the name of the Tooltip based Window type which should be used as the Tooltip for this Window.
Returns:
Nothing.
void GUI::Window::setTooltipText ( string  tip)

Set the tooltip text for this window.

Parameters:
tipString object holding the text to be displayed in the tooltip for this Window.
Returns:
Nothing.
void GUI::Window::setInheritsTooltipText ( bool  setting)

Set whether this window inherits Tooltip text from its parent when its own tooltip text is not set.

Parameters:
setting
  • true if the window should inherit tooltip text from its parent when its own text is not set.
  • false if the window should not inherit tooltip text from its parent (and so show no tooltip when no text is set).
Returns:
Nothing.
void GUI::Window::setRiseOnClickEnabled ( bool  setting)
inline

Set whether this window will rise to the top of the z-order when clicked with the left mouse button.

Note:
This is distinguished from the is/setZOrderingEnabled setting in that if rise on click is disabled it only affects the users ability to affect the z order of the Window by clicking the mouse; is still possible to programatically alter the Window z-order by calling the moveToFront or moveToBack member functions. Whereas if z ordering is disabled the functions moveToFront and moveToBack are also precluded from affecting the Window z position.
Parameters:
setting
  • true if the window should come to the top of other windows when the left mouse button is pushed within its area.
  • false if the window should not change z-order position when the left mouse button is pushed within its area.
Returns:
Nothing.
void GUI::Window::setVerticalAlignment ( int  alignment)

Set the vertical alignment.

Modifies the vertical alignment for the window. This setting affects how the windows position is interpreted relative to its parent.

Parameters:
alignmentOne of the VerticalAlignment enumerated values.
Returns:
Nothing.
void GUI::Window::setHorizontalAlignment ( int  alignment)

Set the horizontal alignment.

Modifies the horizontal alignment for the window. This setting affects how the windows position is interpreted relative to its parent.

Parameters:
alignmentOne of the HorizontalAlignment enumerated values.
Returns:
Nothing.
void GUI::Window::setLookNFeel ( string  look)

Set the LookNFeel that shoule be used for this window.

Parameters:
lookString object holding the name of the look to be assigned to the window.
Returns:
Nothing.
Exceptions:
UnknownObjectExceptionthrown if the look'n'feel specified by look does not exist.
Note:
Once a look'n'feel has been assigned it is locked - as in cannot be changed.
void GUI::Window::setModalState ( bool  state)

Set the modal state for this Window.

Parameters:
stateBoolean value defining if this Window should be the modal target.
  • true if this Window should be activated and set as the modal target.
  • false if the modal target should be cleared if this Window is currently the modal target.
Returns:
Nothing.
void GUI::Window::setUserString ( string  name,
string  value 
)

Sets the value a named user string, creating it as required.

Parameters:
nameString object holding the name of the string to be returned.
valueString object holding the value to be assigned to the user string.
Returns:
Nothing.
void GUI::Window::setArea ( UDim  xpos,
UDim  ypos,
UDim  width,
UDim  height 
)

Set the window area.

Sets the area occupied by this window. The defined area is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
xposUDim describing the new x co-ordinate (left edge) of the window area.
yposUDim describing the new y co-ordinate (top-edge) of the window area.
widthUDim describing the new width of the window area.
heightUDim describing the new height of the window area.
void GUI::Window::setArea ( UVector2  pos,
UVector2  size 
)

Set the window area.

Sets the area occupied by this window. The defined area is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
posUVector2 describing the new position (top-left corner) of the window area.
sizeUVector2 describing the new size of the window area.
void GUI::Window::setArea ( URect  area)

Set the window area.

Sets the area occupied by this window. The defined area is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
areaURect describing the new area rectangle of the window area.
void GUI::Window::setPosition ( UVector2  pos)

Set the window's position.

Sets the position of the area occupied by this window. The position is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
posUVector2 describing the new position (top-left corner) of the window area.
void GUI::Window::setXPosition ( UDim  x)

Set the window's X position.

Sets the x position (left edge) of the area occupied by this window. The position is offset from the left edge of this windows parent window or from the left edge of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
xUDim describing the new x position of the window area.
void GUI::Window::setYPosition ( UDim  y)

Set the window's Y position.

Sets the y position (top edge) of the area occupied by this window. The position is offset from the top edge of this windows parent window or from the top edge of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
yUDim describing the new y position of the window area.
void GUI::Window::setSize ( UVector2  size)

Set the window's size.

Sets the size of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
sizeUVector2 describing the new size of the window area.
void GUI::Window::setWidth ( UDim  width)

Set the window's width.

Sets the width of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
widthUDim describing the new width of the window area.
void GUI::Window::setHeight ( UDim  height)

Set the window's height.

Sets the height of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
heightUDim describing the new height of the window area.
void GUI::Window::setMaxSize ( UVector2  size)

Set the window's maximum size.

Sets the maximum size that this windows area may occupy (whether size changes occur by user interaction, general system operation, or by direct setting by client code).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
sizeUVector2 describing the new maximum size of the window area.
void GUI::Window::setMinSize ( UVector2  size)

Set the window's minimum size.

Sets the minimum size that this windows area may occupy (whether size changes occur by user interaction, general system operation, or by direct setting by client code).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Parameters:
sizeUVector2 describing the new minimum size of the window area.
URect GUI::Window::getArea ( )

Return the windows area.

Returns the area occupied by this window. The defined area is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
URect describing the rectangle of the window area.
UVector2 GUI::Window::getPosition ( )

Get the window's position.

Gets the position of the area occupied by this window. The position is offset from the top-left corner of this windows parent window or from the top-left corner of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UVector2 describing the position (top-left corner) of the window area.
UDim GUI::Window::getXPosition ( )

Get the window's X position.

Gets the x position (left edge) of the area occupied by this window. The position is offset from the left edge of this windows parent window or from the left edge of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UDim describing the x position of the window area.
UDim GUI::Window::getYPosition ( )

Get the window's Y position.

Gets the y position (top edge) of the area occupied by this window. The position is offset from the top edge of this windows parent window or from the top edge of the display if this window has no parent (i.e. it is the root window).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UDim describing the y position of the window area.
UVector2 GUI::Window::getSize ( )

Get the window's size.

Gets the size of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UVector2 describing the size of the window area.
UDim GUI::Window::getWidth ( )

Get the window's width.

Gets the width of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UDim describing the width of the window area.
UDim GUI::Window::getHeight ( )

Get the window's height.

Gets the height of the area occupied by this window.

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UDim describing the height of the window area.
UVector2 GUI::Window::getMaxSize ( )

Get the window's maximum size.

Gets the maximum size that this windows area may occupy (whether size changes occur by user interaction, general system operation, or by direct setting by client code).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UVector2 describing the maximum size of the window area.
UVector2 GUI::Window::getMinSize ( )

Get the window's minimum size.

Gets the minimum size that this windows area may occupy (whether size changes occur by user interaction, general system operation, or by direct setting by client code).

Note:
This method makes use of "Unified Dimensions". These contain both parent relative and absolute pixel components, which are used in determining the final value used.
Returns:
UVector2 describing the minimum size of the window area.
void GUI::Window::setMousePassThroughEnabled ( bool  setting)
inline

Sets whether this window should ignore mouse events and pass them through to any windows behind it. In effect making the window transparent to the mouse.

Parameters:
settingtrue if mouse pass through is enabled. false if mouse pass through is not enabled.
void GUI::Window::setWindowRenderer ( string  name)

Assign the WindowRenderer to specify the Look'N'Feel specification to be used.

Parameters:
nameThe factory name of the WindowRenderer to use.
Note:
Once a window renderer has been assigned it is locked - as in cannot be changed.
string GUI::Window::getWindowRendererName ( )

Get the factory name of the currently assigned WindowRenderer. (Look'N'Feel specification).

Returns:
The factory name of the currently assigned WindowRenderer. If no WindowRenderer is assigned an empty string is returned.
void GUI::Window::setDragDropTarget ( bool  setting)

Specifies whether this Window object will receive events generated by the drag and drop support in the system.

Parameters:
setting
  • true to enable the Window as a drag and drop target.
  • false to disable the Window as a drag and drop target.

Member Data Documentation

Property GUI::Window::Property

Can be used to iterate over the properties currently added to the PropertySet of this Window.

for each Property prop in window {
trace(prop.getName());
}