Cursor Molecule
From oWiki
Contents |
Preference Dialog
Attributes
type
string ( r )
Type of this molecule, 'cursor'.
pref.enableWhen
string ( r, w )
Specifies the event that activates this molecule. Default is 'load'.
pref.disableWhen
string ( r, w )
Specifies the event that deactivates this molecule. Default is 'none'.
pref.cursor
string ( r, w )
Specifies the name of the system cursor (e.g. default, pointer, crosshair, etc.).
pref.cursorURL
string ( r, w )
Specifies the path to a custom cursor image.
pref.isCustomCursor
bool ( r, w )
Specifies whether to use the custom or system cursor.
pref.ox
int ( r, w )
Specifies the offset in x coordinate to the cursor hotspot.
pref.oy
int ( r, w )
Specifies the offset in y coordinate to the cursor hotspot.
Methods
setCursor(url, x, y)
url: string, the url of a web cursor image or the name of a system cursor.
x: int, hotspot offset in x direction.
y: int, hotspot offset in y direction.
| Set the cursor using an external URL or a name to a system cursor. If x and y are not null, use them to offset the cursor hotspot. (e.g. setCursor('pointer'); setCursor('http://www.example.com/cursor.png', 25, 25);). |
refresh()
| Force molecule to redraw with the current set of attributes. |
clone()
Return: a molecule
| Create a clone of this molecule. |
attach(droplet)
droplet: a droplet object (e.g. app.box.droplet)
| Attach this molecule to a droplet. |
detach()
| Remove this molecule from its droplet. |
deleteMod()
| Delete this molecule. |
serialize()
Return: string
| Serialize this molecule into its JSON representation. |

