Class

ve. Class

ve.Class: Classes that extend this are parsed by the reflection engine, with UIs treated as being a subset of state via ve.Component type declarations.

UIs can be opened via super.open(arg0_mode:"class"/"instance", arg1_options:Object), and closed using close(arg0_mode:"class"/"instance").

Instance:
  • .id=Class.generateRandomID(ve.Class)
  • .class_window: ve.Window - The class window any static components are bound to.
  • .instance_window: ve.Window - The instance window non-static components is bound to.
Methods:
  • close(arg0_mode:"class"/"instance")
  • draw(arg0_function:function(this:ve.Class), arg1_interval=0:number) - The draw function intended to make non-UI related draw calls to browser/process.
  • getState() | Object
  • isClosed(arg0_mode:"class"/"instance") | boolean - Whether the selected window is closed.
  • isOpen(arg0_mode:"class"/"instance") | boolean - Whether the selected window is open.
  • open(arg0_mode:"class"/"instance") - Opens the UI bound to the current ve.Class.
  • updateOwner() - Updates the .owner/.owners field attached to ve.Components.
Static Fields:
Source:

Members

instances :Array.<ve.Class>

Source:
Type:

Methods

close(arg0_mode)

Closes any open UI currently associated with ve.Class, either its class (static) or instance.

Source:
Parameters:
Name Type Description
arg0_mode string

Either 'class'/'instance'.

draw(arg0_function, arg1_intervalopt)

Draws the current element on the screen based on a constant loop that can be cleared by the process.

Source:
Parameters:
Name Type Attributes Default Description
arg0_function function | undefined
arg1_interval number <optional>
0

getState() → {Object}

Returns the values of all bound ve.Components as a destructured object.

Source:
Returns:
Type:
Object

isClosed(arg0_mode) → {boolean}

Whether the bound UI for the current mode is closed.

Source:
Parameters:
Name Type Description
arg0_mode string

Either 'class'/'instance'.

Returns:
Type:
boolean

isOpen(arg0_mode) → {boolean}

Whether the bound UI for the current mode is open.

Source:
Parameters:
Name Type Description
arg0_mode string

Either 'class'/'instance'.

Returns:
Type:
boolean

open(arg0_modeopt, arg1_optionsopt)

Opens the relevant ve.Window or other Feature responsible for containing either class or instance variables.

Source:
Parameters:
Name Type Attributes Default Description
arg0_mode string <optional>
"instance"

Whether the UI is bound to 'class'/'instance'. If 'class', it displays all static Vercengen fields.

arg1_options Object <optional>
Name Type Attributes Default Description
do_not_close_if_open boolean <optional>
false

Whether to close the Window already bound to class_window or instance_window

name string <optional>
type string <optional>
"window"

Either 'static'/'window'. 'static' by default if .anchor/.x/.y are specified.

anchor string <optional>
"top_left"

Either 'bottom_left'/'bottom_right'/'top_left'/'top_right'. If neither this nor .x/.y are defined, the UI is spawned at the cursor position.

height number | string <optional>
width number | string <optional>
x number | string <optional>
HTML.mouse_x

Mouse coordinates if undefined.

y number | string <optional>
HTML.mouse_y

Mouse coordinates if undefined.

updateOwner() → {Object}

Updates the .owner/.owners field(s) for any attached ve.Components to the current ve.Class.

Source:
Returns:
Type:
Object