Public Member Functions
GUI::TabControl Class Reference

Base class for standard Tab Control widget. More...

Inherits GUI::Window.

List of all members.

Public Member Functions

int getTabCount ()
 Return number of tabs.
void setSelectedTab (string name)
 Set the selected tab by the name of the root window within it. Also ensures that the tab is made visible (tab pane is scrolled if required).

Exceptions:
InvalidRequestExceptionthrown if there's no tab named name.

void setSelectedTab (int ID)
 Set the selected tab by the ID of the root window within it. Also ensures that the tab is made visible (tab pane is scrolled if required).

Exceptions:
InvalidRequestExceptionthrown if index is out of range.

void setSelectedTabAtIndex (int index)
 Set the selected tab by the index position in the tab control. Also ensures that the tab is made visible (tab pane is scrolled if required).

Exceptions:
InvalidRequestExceptionthrown if index is out of range.

Window getTabContentsAtIndex (int index)
 Return the Window which is the first child of the tab at index position index.
Window getTabContents (string name)
 Return the Window which is the tab content with the given name.
Window getTabContents (int ID)
 Return the Window which is the tab content with the given ID.
bool isTabContentsSelected (Window wnd)
 Return whether the tab contents window is currently selected.
int getSelectedTabIndex ()
 Return the index of the currently selected tab.
UDim getTabHeight ()
 Return the height of the tabs.
UDim getTabTextPadding ()
 Return the amount of padding to add either side of the text in the tab.
void setTabHeight (UDim height)
 Set the height of the tabs.
void setTabTextPadding (UDim padding)
 Set the amount of padding to add either side of the text in the tab.
void addTab (Window wnd)
 Add a new tab to the tab control.
void removeTab (string name)
 Remove the named tab from the tab control.
void removeTab (int ID)
 Remove the tab with the given ID from the tab control.
- Public Member Functions inherited from GUI::Window
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.

Additional Inherited Members

- Public Attributes inherited from GUI::Window
Property Property
 Can be used to iterate over the properties currently added to the PropertySet of this Window.

Detailed Description

Base class for standard Tab Control widget.


Member Function Documentation

int GUI::TabControl::getTabCount ( )

Return number of tabs.

Returns:
the number of tabs currently present.
Window GUI::TabControl::getTabContentsAtIndex ( int  index)

Return the Window which is the first child of the tab at index position index.

Parameters:
indexZero based index of the item to be returned.
Returns:
Pointer to the Window at index position index in the tab control.
Exceptions:
InvalidRequestExceptionthrown if index is out of range.
Window GUI::TabControl::getTabContents ( string  name)

Return the Window which is the tab content with the given name.

Parameters:
nameName of the Window which was attached as a tab content.
Returns:
Pointer to the named Window in the tab control.
Exceptions:
InvalidRequestExceptionthrown if content is not found.
Window GUI::TabControl::getTabContents ( int  ID)

Return the Window which is the tab content with the given ID.

Parameters:
IDID of the Window which was attached as a tab content.
Returns:
Pointer to the Window with the given ID in the tab control.
Exceptions:
InvalidRequestExceptionthrown if content is not found.
bool GUI::TabControl::isTabContentsSelected ( Window  wnd)

Return whether the tab contents window is currently selected.

Parameters:
wndThe tab contents window to query.
Returns:
true if the tab is currently selected, false otherwise.
Exceptions:
InvalidRequestExceptionthrown if wnd is not a valid tab contents window.
int GUI::TabControl::getSelectedTabIndex ( )

Return the index of the currently selected tab.

Returns:
index of the currently selected tab.
void GUI::TabControl::addTab ( Window  wnd)

Add a new tab to the tab control.

The new tab will be added with the same text as the window passed in.
Parameters:
wndThe Window which will be placed in the content area of this new tab.
void GUI::TabControl::removeTab ( string  name)

Remove the named tab from the tab control.

The tab content will be destroyed.
void GUI::TabControl::removeTab ( int  ID)

Remove the tab with the given ID from the tab control.

The tab content will be destroyed.