TorqueScript Reference
GuiMenuBarCtrl Class Reference

#include <guiMenuBarCtrl_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

String getAddItemRect ()
String getAddSubItemRect ()
void setArrowProfile (GuiControlProfile p)
void setBackgroundProfile (GuiControlProfile p)
void setMenuActive ("string menuName, bool isActive")
void setMenuContentProfile (GuiControlProfile p)
void setMenuItemProfile (GuiControlProfile p)
void setMenuProfile (GuiControlProfile p)
void setThumbProfile (GuiControlProfile p)
void setTrackProfile (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

◆ getAddItemRect()

String getAddItemRect ( )

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

Empty - "0 0 0 0" - unless the bar is inside the Gui being authored, which is the only time the "+" is drawn. A bar with no menus at all still reports one; that is what stops an emptied bar from being unrecoverable, now that the control palette does not offer a GuiMenuItemCtrl.

Returns
The rectangle the "+" occupies on screen.

◆ getAddSubItemRect()

String getAddSubItemRect ( )

Returns the bounds of the "+" row at the foot of the open dropdown, as "x y width height" in global coordinates.

Empty unless the bar is being authored AND one of its menus is selected - that is what decides which dropdown is showing. A menu with no commands in it at all still reports one; that row is the only way a command ever gets made.

Returns
The rectangle the dropdown's "+" occupies on screen.

◆ setArrowProfile()

void setArrowProfile ( GuiControlProfile p)

Sets the currently used ArrowProfile for the GuiControl

Parameters
pThe ArrowProfile is applied to the arrow buttons of the scrollbar if you turn them on.
Returns
No return value

◆ setBackgroundProfile()

void setBackgroundProfile ( GuiControlProfile p)

Sets the currently used BackgroundProfile for the GuiControl

Parameters
pThe BackgroundProfile applies to the the entire screen behind the open menu.
Returns
No return value

◆ setMenuActive()

void setMenuActive ( "string menuName,
bool isActive"  )

Sets a menu item to active or inactive based on a name.

Parameters
menuNameThe name of the menu that should be enabled or disabled. If multiple menu items have the same name they will all be enabled or disabled. Case sensative.
isActiveTrue if the menu should be enabled. False if it is disabled.
Returns
No return value.

◆ setMenuContentProfile()

void setMenuContentProfile ( GuiControlProfile p)

Sets the currently used MenuContentProfile for the GuiControl

Parameters
pThe MenuContentProfile is applied the menu box that opens.
Returns
No return value

◆ setMenuItemProfile()

void setMenuItemProfile ( GuiControlProfile p)

Sets the currently used MenuItemProfile for the GuiControl

Parameters
pThe MenuItemProfile is applied to each menu item.
Returns
No return value

◆ setMenuProfile()

void setMenuProfile ( GuiControlProfile p)

Sets the currently used MenuProfile for the GuiControl

Parameters
pThe MenuProfile is applied to each top level menu item.
Returns
No return value

◆ setThumbProfile()

void setThumbProfile ( GuiControlProfile p)

Sets the currently used ThumbProfile for the GuiControl

Parameters
pThe ThumbProfile is applied to the thumb of the scrollbar.
Returns
No return value

◆ setTrackProfile()

void setTrackProfile ( GuiControlProfile p)

Sets the currently used TrackProfile for the GuiControl

Parameters
pThe TrackProfile is applied to the track area used by the scroll thumb.
Returns
No return value