Node¶
Class | orca.core
Base class for all UI engine nodes.
Overview¶
Properties¶
| Property | Type | Description |
|---|---|---|
Size |
SizeShorthand |
Sizing configuration of this element |
Margin |
Thickness |
External spacing around the element |
Padding |
Thickness |
Internal spacing between element border and content |
Border |
BorderShorthand |
Border definition along each axis |
Alignment |
AlignmentShorthand |
Alignment definition for each axis. |
Visible |
bool |
Whether this node is visible in the scene. |
QuickHide |
bool |
If true, node is quickly hidden without triggering full visibility transitions. |
VisibleAmountInParent |
float |
Specifies how much of the node is visible within its parent container. Value in range [0.0, 1.0]. |
Opacity |
float |
Opacity of the node, range [0.0 = transparent, 1.0 = fully opaque]. |
Tags |
string |
Tag collection for categorizing or querying nodes. |
DataContext |
DataObject |
Data context (used for data binding, similar to XAML's DataContext). |
Resources |
ResourceEntry |
Array of resources associated with this node. Can be aliases to objects or other resources. |
NumResources |
int |
Messages¶
Awake¶
Sent when the object is activated in the scene, before the first update cycle.
UpdateMatrix¶
Requests the node to recompute its transformation matrix from current transform properties.
| Field | Type | Description |
|---|---|---|
parent |
mat4 |
The parent matrix |
opacity |
float |
The opacity value |
force |
bool |
Indicates if the update is forced |
LoadView¶
Initializes the component's Lua view state.
| Field | Type | Description |
|---|---|---|
lua_state |
lua_State |
HitTest¶
Queries whether a screen-space point falls within the bounds of this node.
| Field | Type | Description |
|---|---|---|
x |
int |
X coordinate of the hit test point |
y |
int |
Y coordinate of the hit test point |
IsVisible¶
Queries whether the node is currently visible in the scene.
ViewDidLoad¶
Notifies the component that its view has finished loading.
KillFocus¶
Removes keyboard focus from this node.
SetFocus¶
Gives keyboard focus to this node.
GetSize¶
Queries the current layout size of this node.
MouseMessage¶
Base mouse event providing pointer position.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
LeftMouseDown¶
Fired when the left mouse button is pressed down over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
RightMouseDown¶
Fired when the right mouse button is pressed down over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
OtherMouseDown¶
Fired when a non-primary, non-secondary mouse button is pressed down over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
LeftMouseUp¶
Fired when the left mouse button is released over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
RightMouseUp¶
Fired when the right mouse button is released over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
OtherMouseUp¶
Fired when a non-primary, non-secondary mouse button is released over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
LeftMouseDragged¶
Fired continuously while the mouse moves with the left button held down.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
RightMouseDragged¶
Fired continuously while the mouse moves with the right button held down.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
OtherMouseDragged¶
Fired continuously while the mouse moves with a non-primary, non-secondary button held down.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
LeftDoubleClick¶
Fired when the left mouse button is double-clicked over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
RightDoubleClick¶
Fired when the right mouse button is double-clicked over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
OtherDoubleClick¶
Fired when a non-primary, non-secondary mouse button is double-clicked over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
MouseMoved¶
Fired when the mouse pointer moves over an object without any button held down.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
ScrollWheel¶
Fired when the scroll wheel is rotated while the pointer is over an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
DragDrop¶
Fired when a drag operation is completed and the dragged item is dropped onto an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
DragEnter¶
Fired when a dragged item enters the bounds of an object.
| Field | Type | Description |
|---|---|---|
x |
float |
Horizontal pointer position in local space |
y |
float |
Vertical pointer position in local space |
deltaX |
int |
Scroll wheel rotation amount along the X axis; positive values scroll right/forward |
deltaY |
int |
Scroll wheel rotation amount along the Y axis; positive values scroll up/forward |
button |
MouseButton |
The mouse button involved in this event |
clickCount |
int |
Number of consecutive clicks (1 for single click, 2 for double click) |
KeyMessage¶
Base keyboard event providing key information.
| Field | Type | Description |
|---|---|---|
keyCode |
int |
The key involved in this event |
character |
int |
The character produced by this key event |
modifiers |
int |
Active modifier keys during the event (bitmask of AX_MOD_* flags) |
text |
string |
The text produced by this key event as a UTF-8 string (empty for non-printable keys) |
modifiersString |
string |
Active modifier keys as a human-readable prefix string (e.g. "ctrl+shift+") |
hotKey |
string |
Combined modifier+key string for hotkey matching (e.g. "ctrl+alt+w") |
KeyDown¶
Fired when a keyboard key is pressed down.
| Field | Type | Description |
|---|---|---|
keyCode |
int |
The key involved in this event |
character |
int |
The character produced by this key event |
modifiers |
int |
Active modifier keys during the event (bitmask of AX_MOD_* flags) |
text |
string |
The text produced by this key event as a UTF-8 string (empty for non-printable keys) |
modifiersString |
string |
Active modifier keys as a human-readable prefix string (e.g. "ctrl+shift+") |
hotKey |
string |
Combined modifier+key string for hotkey matching (e.g. "ctrl+alt+w") |
KeyUp¶
Fired when a keyboard key is released.
| Field | Type | Description |
|---|---|---|
keyCode |
int |
The key involved in this event |
character |
int |
The character produced by this key event |
modifiers |
int |
Active modifier keys during the event (bitmask of AX_MOD_* flags) |
text |
string |
The text produced by this key event as a UTF-8 string (empty for non-printable keys) |
modifiersString |
string |
Active modifier keys as a human-readable prefix string (e.g. "ctrl+shift+") |
hotKey |
string |
Combined modifier+key string for hotkey matching (e.g. "ctrl+alt+w") |
TextInput¶
Fired when a printable character is entered via the keyboard, providing the resulting text.
| Field | Type | Description |
|---|---|---|
keyCode |
int |
The key involved in this event |
character |
int |
The character produced by this key event |
modifiers |
int |
Active modifier keys during the event (bitmask of AX_MOD_* flags) |
text |
string |
The text produced by this key event as a UTF-8 string (empty for non-printable keys) |
modifiersString |
string |
Active modifier keys as a human-readable prefix string (e.g. "ctrl+shift+") |
hotKey |
string |
Combined modifier+key string for hotkey matching (e.g. "ctrl+alt+w") |