TorqueScript Reference
GuiTabBookCtrl Class Reference

#include <guiTabBookCtrl_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

void addPage ()
String getAddPageTabRect ()
Integer getSelectedPage ()"
void selectPage (pageIndex)"
void selectPageName (pageName)"
void setTabProfile (GuiControlProfile p)
Public Member Functions inherited from GuiControl
void addGuiControl (int controlId)
void applySizing ()
Boolean canBeChildOf (GuiControl parent)
void childrenReordered ()
Integer findHitControl (int x, int y)
String getCenter ()
String getExtent (...)
String getGlobalCenter ()
String getGlobalPosition ()
String getMinExtent ()
Integer getParent ()
String getPosition ()
String getText ()
Boolean getTextExtend ()
Boolean getTextWrap ()
String getValue ()
Boolean isActive ()
Boolean isAwake ()
Boolean isGeometryEditable ()
Boolean isVisible ()
void makeFirstResponder (isFirst)
void performClick ()
Boolean pointInControl (int x, int y)
Boolean pullIntoView ()
Boolean rendersChildren ()
void reorderChild (child1, child2)
void resize (int x, int y, int w, int h)
void setActive (isActive)
void setCanSave (bool canSave)
void setCenter (int x, int y)
void setExtent (int width, int height)
void setFirstResponder ()
void setPosition (int x, int y)
void setPositionGlobal (int x, int y)
void setProfile (GuiControlProfile p)
void setText (text)
void setTextExtend (setting)
void setTextID (id)
void setTextWrap (setting)
void setValue (value)
void setVisible (isVisible)

Member Function Documentation

◆ addPage()

void addPage ( )

Appends an untitled page to the book.

The raw form: it names the page itself, puts it on GuiTabPageProfile and tells nobody. The Gui Editor does not use this - a page made there has to be themed, recorded for undo and announced to the Explorer tree, so the editor builds its own from GuiEditorBrain::newTabPage. This is for building a book from script or from C++, which is what GuiFrameSetCtrl does when it docks a window.

Returns
No return value

◆ getAddPageTabRect()

String getAddPageTabRect ( )

Returns the bounds of the editor-only "+" tab as "x y width height", in global coordinates.

Empty - "0 0 0 0" - unless the book is inside the Gui being authored, which is the only time the "+" is drawn. A book with no pages at all still reports one; that is what stops an emptied book from being unrecoverable.

Returns
The rectangle the "+" occupies on screen.

◆ getSelectedPage()

Integer getSelectedPage ( )

Returns the currently selected page index.

Returns
The index of the currently selected page.

◆ selectPage()

void selectPage ( pageIndex )

Selects the active tab by index.

Parameters
pageIndexThe zero-based index of the tab to make active.

◆ selectPageName()

void selectPageName ( pageName )

Selects the active tab by name.

Parameters
pageNameThe name that appears on the tab to make active.
Returns
No return value

◆ setTabProfile()

void setTabProfile ( GuiControlProfile p)

Sets the currently used TabProfile for the GuiControl

Parameters
pThe tabprofile you wish to set the control to use
Returns
No return value