Class: Screen

rat.ui. Screen

new Screen(shapeType)

Parameters:
Name Type Description
shapeType ?
Source:

Extends

Members

place

Inherited From:
Source:
To Do:
  • replace with standard position tracker object... (pos + rot)

Methods

activate()

Activate this screen if is is not already active
Source:

applyRecursively(func, arg)

Parameters:
Name Type Description
func ?
arg ?
Inherited From:
Source:

clampScroll(offsetopt)

// clamp scroll offset to keep from scrolling past edges of actual content, // based on contentSize being correct. // todo allow optional passing in a potential value, and clamp that instead of my current value.
Parameters:
Name Type Attributes Description
offset Object <optional>
Inherited From:
Source:

deactivate()

Deactivate this screen if is is not already deactivated
Source:

findSubElementByID(id, recursiveopt)

Parameters:
Name Type Attributes Description
id ?
recursive boolean <optional>
Inherited From:
Source:

fireCustomTrigger(triggerName, triggerArgs)

Parameters:
Name Type Description
triggerName string
triggerArgs ?
Inherited From:
Source:

getGlobalPos(xopt, yopt)

// get global coordinates from local coordinates relative to me. Compare with getGlobalContentPos below. // this involves processing the chain from parent to parent, to the top level. // But we do that locally, instead of recursively, to avoid extra function calls and overhead.
Parameters:
Name Type Attributes Description
x number <optional>
y number <optional>
Inherited From:
Source:

getSubElement(index)

Parameters:
Name Type Description
index ?
Inherited From:
Source:

scrollToCenter(offsetopt)

scroll this point to center
Parameters:
Name Type Attributes Description
offset Object <optional>
Inherited From:
Source:

scrollToCenterContent(offsetopt)

Scroll to center my content automatically
Parameters:
Name Type Attributes Description
offset Object <optional>
Inherited From:
Source:

setBounds(x, yopt, wopt, hopt)

Set the position and size of this element
Parameters:
Name Type Attributes Description
x number | Object
y number <optional>
w number <optional>
h number <optional>
Inherited From:
Source:

setCallback(callback, userInfoopt)

set function to call when triggered (see Trigger code) callback is called with (element, userInfo) args callback is expected to return a flag indicating if the event was handled. if you return false, we keep looking for other ways the event can be handled. so, generally you probably want to return true.
Parameters:
Name Type Attributes Description
callback function
userInfo * <optional>
Inherited From:
Source:

setCallbackInfo(userInfo)

Set the data provided with the callbacks
Parameters:
Name Type Description
userInfo ?
Inherited From:
Source:

setFlag()

Set (or clear) a flag in this element's flags structure works for setting multiple flags, too.
Inherited From:
Source:

setFlagsChangedCallback(callback, userInfoopt)

set function to call when flags change, e.g. when element is highlighted callback is called with (oldflags, userInfo) args (and using element as 'this')
Parameters:
Name Type Attributes Description
callback function
userInfo * <optional>
Inherited From:
Source:

setFrame(frameWidth, frameColoropt, frameOutset)

Set the frame on this element
Parameters:
Name Type Attributes Description
frameWidth number how wide is the frame
frameColor Object <optional>
frameOutset ?
Inherited From:
Source:

setOverlay()

Set if this screen is currently an overlay screen
Source:

setToolTip(toolTip, screen, placement, offsetopt, fromMouseopt)

Set this element as our current tooltip. could be anything - textbox, image, whatever. For an easier text-only function, use setTextToolTip
Parameters:
Name Type Attributes Description
toolTip Object
screen Object
placement string
offset Object <optional>
fromMouse boolean <optional>
Inherited From:
Source: