TorqueScript Reference
Public Member Functions | List of all members
GuiCanvas Class Reference

#include <guiCanvas_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

void cursorOff ()
 
void cursorOn ()
 
String getBackgroundColor (...)
 
Integer getContent ()
 
String getCursorPos ()
 
Integer getMouseControl ()
 
Boolean getUseBackgroundColor (...)
 
void hideCursor ()
 
Boolean isCursorOn ()
 
void popDialog (handle)
 
void popLayer (layer)
 
void pushDialog (handle[, layer])
 
void renderFront (bool enable)
 
void repaint ()
 
void reset ()
 
void resetCursor ()
 
void setBackgroundColor (float red, float green, float blue, [float alpha=1.0])
 
void setContent (handle)
 
void setCursor (cursorHandle)
 
void setCursorPos ()
 
void setDoubleClickDelay ()
 
void setDoubleClickMoveBuffer ()
 
void setUseBackgroundColor (...)
 
void showCursor ()
 
- Public Member Functions inherited from GuiControl
void addGuiControl (int controlId)
 
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 isVisible ()
 
void makeFirstResponder (isFirst)
 
void performClick ()
 
Boolean pointInControl (int x, int y)
 
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

◆ cursorOff()

void cursorOff ( )

Use the cursorOff method to disable the cursor.

Returns
No return value

◆ cursorOn()

void cursorOn ( )

Use the cursorOn method to enable the cursor.

Returns
No return value

◆ getBackgroundColor()

String getBackgroundColor (   ...)

Gets the background color for the canvas.

Returns
(float red / float green / float blue / float alpha) The background color for the canvas.

◆ getContent()

Integer getContent ( )

Use the getContent method to get the ID of the control which is being used as the current canvas content.

Returns
Returns the ID of the current canvas content (a control), or 0 meaning the canvas is empty

◆ getCursorPos()

String getCursorPos ( )

Use the getCursorPos method to retrieve the current position of the mouse pointer.

Returns
Returns a vector containing the ???x y??? coordinates of the cursor in the canvas

◆ getMouseControl()

Integer getMouseControl ( )

Gets the gui control under the mouse.

◆ getUseBackgroundColor()

Boolean getUseBackgroundColor (   ...)

Gets whether the canvas background color is in use or not.

Returns
Whether the canvas background color is in use or not.

◆ hideCursor()

void hideCursor ( )

◆ isCursorOn()

Boolean isCursorOn ( )

◆ popDialog()

void popDialog ( handle  )

Use the popDialog method to remove a currently showing dialog. If no handle is provided, the top most dialog is popped.

Parameters
handleThe ID or a previously pushed dialog.
Returns
No return value.
See also
pushDialog, popLayer

◆ popLayer()

void popLayer ( layer  )

Use the popLayer method to remove (close) all dialogs in the specified canvas ???layer???.

Parameters
layerA integer value in the range [ 0 , inf ) specifying the canvas layer to clear.
Returns
No return value.
See also
pushDialog, popDialog

◆ pushDialog()

void pushDialog ( handle  [, layer])

Use the pushDialog method to open a dialog on a specific canvas layer, or in the same layer the last openned dialog. Newly placed dialogs placed in a layer with another dialog(s) will overlap the prior dialog(s).

Parameters
handleThe numeric ID or name of the dialog to be opened.
layerA integer value in the range [ 0 , inf ) specifying the canvas layer to place the dialog in.
Returns
No return value

◆ renderFront()

void renderFront ( bool  enable)

◆ repaint()

void repaint ( )

Use the repaint method to force the canvas to redraw all elements.

Returns
No return value

◆ reset()

void reset ( )

Use the reset method to reset the current canvas update region.

Returns
No return value

◆ resetCursor()

void resetCursor ( )

Returns the cursor to the system default.

Returns
No return value

◆ setBackgroundColor()

void setBackgroundColor ( float  red,
float  green,
float  blue 
)

Sets the background color for the canvas.

Parameters
redThe red value.
greenThe green value.
blueThe blue value.
alphaThe alpha value.
Returns
No return Value.

◆ setContent()

void setContent ( handle  )

Use the setContent method to set the control identified by handle as the current canvas content.

Parameters
handleThe numeric ID or name of the control to be made the canvas contents.
Returns
No return value

◆ setCursor()

void setCursor ( cursorHandle  )

Use the setCursor method to select the current cursor.

Parameters
cursorHandleThe ID of a previously defined GuiCursor object.
Returns
No return value

◆ setCursorPos()

void setCursorPos ( )

Use the setCursorPos method to set the position of the cursor in the cavas.

Parameters
positionAn \x y\ position vector specifying the new location of the cursor.
Returns
No return value

◆ setDoubleClickDelay()

void setDoubleClickDelay ( )

◆ setDoubleClickMoveBuffer()

void setDoubleClickMoveBuffer ( )

◆ setUseBackgroundColor()

void setUseBackgroundColor (   ...)

Sets whether to use the canvas background color or not.

Parameters
useBackgroundColorWhether to use the canvas background color or not.
Returns
No return value.

◆ showCursor()

void showCursor ( )