TorqueScript Reference
GuiEditorCursorCtrl Class Reference

#include <guiEditorCursorCtrl_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

String getEffectiveHotSpot ()
String getImageExtent ()
Integer getMaxZoom ()
Integer getZoom ()
void setZoom (zoom)
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

◆ getEffectiveHotSpot()

String getEffectiveHotSpot ( )

Gets the pixel of the art the pointer actually lands on: the renderOffset anchor floored to a pixel, plus the hotSpot nudge. This is the number a readout should show, because neither field alone answers "where does it point".

Returns
The pixel as "x y", or "0 0" when there is no art.

◆ getImageExtent()

String getImageExtent ( )

Gets the size of the cursor art, or "0 0" when there is none to show.

Returns
The image size as "width height".

◆ getMaxZoom()

Integer getMaxZoom ( )

Gets the largest magnification this art fits the pane at. Zooming in stops here, so a pane can grey out its "+" instead of offering a zoom that would do nothing.

Returns
The maximum magnification factor.

◆ getZoom()

Integer getZoom ( )

Gets the current magnification, which is always the one being drawn: a zoom too big for the pane is clamped rather than pretended at.

Returns
The magnification factor.

◆ setZoom()

void setZoom ( zoom )

Sets the magnification, clamped to 1..16.

Parameters
zoomThe magnification factor.
Returns
No return value.