Class OUI

java.lang.Object
org.lwjgl.nanovg.OUI

public class OUI extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Item states as returned by GetState.
    static final int
    Enum values:
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Event flags.
    static final int
    Event flags.
    static final int
    Event flags.
    static final int
    Event flags.
    static final int
    Event flags.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Event flags.
    static final int
    Item states as returned by GetState.
    static final int
    Container flags to pass to SetBox.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Container flags to pass to SetBox.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Container flags to pass to SetBox.
    static final int
    Item states as returned by GetState.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Item states as returned by GetState.
    static final int
    Container flags to pass to SetBox.
    static final int
    Event flags.
    static final int
    Event flags.
    static final int
    Container flags to pass to SetBox.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Container flags to pass to SetBox.
    static final int
    Container flags to pass to SetBox.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Container flags to pass to SetBox.
    static final int
    Event flags.
    static final int
    Container flags to pass to SetBox.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Enum values:
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Child layout flags to pass to SetLayout.
    static final int
    Container flags to pass to SetBox.
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    nuiAllocHandle(int item, int size)
    Unsafe version of: AllocHandle
    static int
    nuiContains(int item, int x, int y)
    Unsafe version of: Contains
    static void
    Unsafe version of: DestroyContext
    static int
    nuiGetButton(int button)
    Unsafe version of: GetButton
    static void
    nuiGetCursor(long __result)
    Unsafe version of: GetCursor
    static void
    nuiGetCursorDelta(long __result)
    Unsafe version of: GetCursorDelta
    static void
    nuiGetCursorStart(long __result)
    Unsafe version of: GetCursorStart
    static void
    nuiGetCursorStartDelta(long __result)
    Unsafe version of: GetCursorStartDelta
    static long
    Unsafe version of: GetHandler
    static void
    nuiGetRect(int item, long __result)
    Unsafe version of: GetRect
    static void
    nuiGetScroll(long __result)
    Unsafe version of: GetScroll
    static void
    nuiSetButton(int button, int mod, int enabled)
    Unsafe version of: SetButton
    static void
    nuiSetFrozen(int item, int enable)
    Unsafe version of: SetFrozen
    static void
    nuiSetHandler(long handler)
    Unsafe version of: SetHandler
    static void
    nuiSetKey(int key, int mod, int enabled)
    Unsafe version of: SetKey
    static void
    nuiSetMargins(int item, short l, short t, short r, short b)
    Unsafe version of: SetMargins
    static ByteBuffer
    uiAllocHandle(int item, int size)
    Allocates space for application-dependent context data and assign it as the handle to the item.
    static int
    uiAppend(int item, int sibling)
    Assigns an item to the same container as another item.
    static void
    Clears the item buffer.
    static void
    Resets the currently stored hot/active etc.
    static boolean
    uiContains(int item, int x, int y)
    Returns 1 if an items absolute rectangle contains a given coordinate, otherwise 0.
    static long
    uiCreateContext(int item_capacity, int buffer_capacity)
    Creates a new UI context; call MakeCurrent to make this context the current context.
    static void
    uiDestroyContext(long ctx)
    Releases the memory of an UI context created with CreateContext; if the context is the current context, the current context will be set to NULL.
    static void
    Layout all added items starting from the root item 0.
    static int
    uiFindItem(int item, int x, int y, int flags, int mask)
    Returns the topmost item containing absolute location (x,y), starting with item as parent, using a set of flags and masks as filter.
    static int
    uiFirstChild(int item)
    Returns the first child item of a container item.
    static void
    uiFocus(int item)
    Sets item as recipient of all keyboard events.
    static int
    Returns the total bytes that have been allocated by AllocHandle
    static int
    uiGetBox(int item)
    Returns the box model as set by SetBox.
    static boolean
    uiGetButton(int button)
    Returns the current state of an application dependent input button as set by SetButton.
    static int
    Returns the number of chained clicks; 1 is a single click, 2 is a double click, etc.
    static long
    Returns the currently selected context or NULL.
    static UIVec2
    uiGetCursor(UIVec2 __result)
    Returns the current cursor position in screen coordinates as set by SetCursor.
    static UIVec2
    Returns the offset of the cursor relative to the last call to Process.
    static UIVec2
    Returns the beginning point of a drag operation.
    static UIVec2
    Returns the offset of the cursor relative to the beginning point of a drag operation.
    static int
    uiGetEvents(int item)
    Returns the event flags for an item as passed to SetEvents
    static int
    uiGetFlags(int item)
    Returns the user-defined flags for an item as passed to SetFlags
    static int
    Returns the item that is currently focused or -1 for none.
    static long
    uiGetHandle(int item)
    Returns the application-dependent handle of the item as passed to SetHandle or AllocHandle.
    static UIHandler
    Returns the handler callback as passed to SetHandler
    static int
    uiGetHeight(int item)
    Return the height of the item as set by SetSize.
    static int
    Returns the item that is currently under the cursor or -1 for none.
    static int
    Returns the total number of allocated items
    static int
    When handling a KEY_DOWN/KEY_UP event: the key that triggered this event.
    static int
    Returns the number if items that have been allocated in the last frame.
    static int
    uiGetLayout(int item)
    Returns the anchoring behavior as set by SetLayout.
    static short
    uiGetMarginDown(int item)
    Returns the bottom margin of the item as set with SetMargins.
    static short
    uiGetMarginLeft(int item)
    Returns the left margin of the item as set with SetMargins.
    static short
    uiGetMarginRight(int item)
    Returns the right margin of the item as set with SetMargins.
    static short
    uiGetMarginTop(int item)
    Returns the top margin of the item as set with SetMargins.
    static int
    When handling a keyboard or mouse event: the active modifier keys.
    static UIRect
    uiGetRect(int item, UIRect __result)
    Returns the items layout rectangle in absolute coordinates.
    static UIVec2
    uiGetScroll(UIVec2 __result)
    Returns the currently accumulated scroll wheel offsets for this frame
    static int
    uiGetState(int item)
    Returns the current state of the item.
    static int
    uiGetWidth(int item)
    Returns the width of the item as set by SetSize.
    static int
    uiInsert(int item, int child)
    Assigns an item to a container.
    static int
    uiInsertBack(int item, int child)
    Inserts child into container item like Insert, but prepend it to the first child item, effectively putting it in the background.
    static int
    uiInsertFront(int item, int child)
    Same as Insert.
    static int
    Creates a new UI item and return the new item's ID.
    static void
    uiMakeCurrent(long ctx)
    Selects an UI context as the current context; a context must always be selected before using any of the other UI functions.
    static int
    uiNextSibling(int item)
    Returns an items next sibling in the list of the parent containers children.
    static void
    uiProcess(int timestamp)
    Updates the internal state according to the current cursor position and button states, and call all registered handlers.
    static int
    uiRecoverItem(int olditem)
    When BeginLayout is called, the most recently declared items are retained.
    static void
    uiRemapItem(int olditem, int newitem)
    In cases where it is important to recover old state over changes in the view, and the built-in remapping fails, the UI declaration can manually remap old items to new IDs in cases where e.g.
    static void
    uiSetBox(int item, int flags)
    Sets the box model behavior of the item to one or multiple UIboxFlags.
    static void
    uiSetButton(int button, int mod, boolean enabled)
    Sets a mouse or gamepad button as pressed/released button is in the range 0..63 and maps to an application defined input source.
    static void
    uiSetChar(int value)
    Sends a single character for text input; the character is usually in the unicode range, but can be application defined.
    static void
    uiSetCursor(int x, int y)
    Sets the current cursor position (usually belonging to a mouse) to the screen coordinates at (x,y).
    static void
    uiSetEvents(int item, int flags)
     
    static void
    uiSetFlags(int item, int flags)
     
    static void
    uiSetFrozen(int item, boolean enable)
    Sets an items state to frozen.
    static void
    uiSetHandle(int item, long handle)
    Sets the application-dependent handle of an item.
    static void
    Sets the global handler callback for interactive items.
    static void
    uiSetKey(int key, int mod, boolean enabled)
    Sets a key as down/up; the key can be any application defined keycode.
    static void
    uiSetLayout(int item, int flags)
    Sets the anchoring behavior of the item to one or multiple UIlayoutFlags.
    static void
    uiSetMargins(int item, int l, int t, int r, int b)
    Sets the left, top, right and bottom margins of an item.
    static void
    uiSetScroll(int x, int y)
    Accumulates scroll wheel offsets for the current frame.
    static void
    uiSetSize(int item, int w, int h)
    Sets the size of the item.
    static void
    Updates the current hot item; this only needs to be called if items are kept for more than one frame and EndLayout is not called.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UI_USERMASK

      public static final int UI_USERMASK
      Enum values:
      • USERMASK - these bits, starting at bit 24, can be safely assigned by the application, e.g. as item types, other event types, drop targets, etc.

        They can be set and queried using SetFlags and GetFlags.

      • ANY - a special mask passed to FindItem
      See Also:
    • UI_ANY

      public static final int UI_ANY
      Enum values:
      • USERMASK - these bits, starting at bit 24, can be safely assigned by the application, e.g. as item types, other event types, drop targets, etc.

        They can be set and queried using SetFlags and GetFlags.

      • ANY - a special mask passed to FindItem
      See Also:
    • UI_COLD

      public static final int UI_COLD
      Item states as returned by GetState. (UIitemState)
      Enum values:
      • COLD - the item is inactive
      • HOT - the item is inactive, but the cursor is hovering over this item
      • ACTIVE - the item is toggled, activated, focused (depends on item kind)
      • FROZEN - the item is unresponsive
      See Also:
    • UI_HOT

      public static final int UI_HOT
      Item states as returned by GetState. (UIitemState)
      Enum values:
      • COLD - the item is inactive
      • HOT - the item is inactive, but the cursor is hovering over this item
      • ACTIVE - the item is toggled, activated, focused (depends on item kind)
      • FROZEN - the item is unresponsive
      See Also:
    • UI_ACTIVE

      public static final int UI_ACTIVE
      Item states as returned by GetState. (UIitemState)
      Enum values:
      • COLD - the item is inactive
      • HOT - the item is inactive, but the cursor is hovering over this item
      • ACTIVE - the item is toggled, activated, focused (depends on item kind)
      • FROZEN - the item is unresponsive
      See Also:
    • UI_FROZEN

      public static final int UI_FROZEN
      Item states as returned by GetState. (UIitemState)
      Enum values:
      • COLD - the item is inactive
      • HOT - the item is inactive, but the cursor is hovering over this item
      • ACTIVE - the item is toggled, activated, focused (depends on item kind)
      • FROZEN - the item is unresponsive
      See Also:
    • UI_ROW

      public static final int UI_ROW
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_COLUMN

      public static final int UI_COLUMN
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_LAYOUT

      public static final int UI_LAYOUT
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_FLEX

      public static final int UI_FLEX
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_NOWRAP

      public static final int UI_NOWRAP
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_WRAP

      public static final int UI_WRAP
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_START

      public static final int UI_START
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_MIDDLE

      public static final int UI_MIDDLE
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_END

      public static final int UI_END
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_JUSTIFY

      public static final int UI_JUSTIFY
      Container flags to pass to SetBox. (UIboxFlags)
      Enum values:
      • ROW - left to right
      • COLUMN - top to bottom
      • LAYOUT - free layout
      • FLEX - flex model
      • NOWRAP - single-line
      • WRAP - multi-line, wrap left to right
      • START - justify-content (start, end, center, space-between) at start of row/column
      • MIDDLE - at center of row/column
      • END - at end of row/column
      • JUSTIFY - insert spacing to stretch across whole row/column
      See Also:
    • UI_LEFT

      public static final int UI_LEFT
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_TOP

      public static final int UI_TOP
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_RIGHT

      public static final int UI_RIGHT
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_DOWN

      public static final int UI_DOWN
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_HFILL

      public static final int UI_HFILL
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_VFILL

      public static final int UI_VFILL
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_HCENTER

      public static final int UI_HCENTER
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_VCENTER

      public static final int UI_VCENTER
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_CENTER

      public static final int UI_CENTER
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_FILL

      public static final int UI_FILL
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_BREAK

      public static final int UI_BREAK
      Child layout flags to pass to SetLayout. (UIlayoutFlags)
      Enum values:
      • LEFT - anchor to left item or left side of parent
      • TOP - anchor to top item or top side of parent
      • RIGHT - anchor to right item or right side of parent
      • DOWN - anchor to bottom item or bottom side of parent
      • HFILL - anchor to both left and right item or parent borders
      • VFILL - anchor to both top and bottom item or parent borders
      • HCENTER - center horizontally, with left margin as offset
      • VCENTER - center vertically, with top margin as offset
      • CENTER - center in both directions, with left/top margin as offset
      • FILL - anchor to all four directions
      • BREAK - when wrapping, put this element on a new line.

        Wrapping layout code auto-inserts UI_BREAK flags, drawing routines can read them with GetLayout.

      See Also:
    • UI_BUTTON0_DOWN

      public static final int UI_BUTTON0_DOWN
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_BUTTON0_UP

      public static final int UI_BUTTON0_UP
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_BUTTON0_HOT_UP

      public static final int UI_BUTTON0_HOT_UP
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_BUTTON0_CAPTURE

      public static final int UI_BUTTON0_CAPTURE
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_BUTTON2_DOWN

      public static final int UI_BUTTON2_DOWN
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_SCROLL

      public static final int UI_SCROLL
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_KEY_DOWN

      public static final int UI_KEY_DOWN
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_KEY_UP

      public static final int UI_KEY_UP
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
    • UI_CHAR

      public static final int UI_CHAR
      Event flags. (UIevent)
      Enum values:
      • BUTTON0_DOWN - on button 0 down
      • BUTTON0_UP - on button 0 up when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON0_HOT_UP - on button 0 up while item is hovered when this event has a handler, GetState will return ACTIVE when the cursor is hovering the items rectangle; this is the behavior expected for buttons
      • BUTTON0_CAPTURE - item is being captured (button 0 constantly pressed); when this event has a handler, GetState will return ACTIVE as long as button 0 is down
      • BUTTON2_DOWN - on button 2 down (right mouse button, usually triggers context menu)
      • SCROLL - item has received a scrollwheel event the accumulated wheel offset can be queried with GetScroll
      • KEY_DOWN - item is focused and has received a key-down event the respective key can be queried using GetKey and GetModifier
      • KEY_UP - item is focused and has received a key-up event the respective key can be queried using GetKey and GetModifier
      • CHAR - item is focused and has received a character event the respective character can be queried using GetKey
      See Also:
  • Method Details

    • uiCreateContext

      public static long uiCreateContext(int item_capacity, int buffer_capacity)
      Creates a new UI context; call MakeCurrent to make this context the current context.

      The context is managed by the client and must be released using DestroyContext.

      Parameters:
      item_capacity - the maximum number of items that can be declared. 4096 is a good starting value.
      buffer_capacity - the maximum total size of bytes that can be allocated using AllocHandle; you may pass 0 if you don't need to allocate handles. (1<<20) is a good starting value.
    • uiMakeCurrent

      public static void uiMakeCurrent(long ctx)
      Selects an UI context as the current context; a context must always be selected before using any of the other UI functions.
    • nuiDestroyContext

      public static void nuiDestroyContext(long ctx)
      Unsafe version of: DestroyContext
    • uiDestroyContext

      public static void uiDestroyContext(long ctx)
      Releases the memory of an UI context created with CreateContext; if the context is the current context, the current context will be set to NULL.
    • uiGetContext

      public static long uiGetContext()
      Returns the currently selected context or NULL.
    • uiSetCursor

      public static void uiSetCursor(int x, int y)
      Sets the current cursor position (usually belonging to a mouse) to the screen coordinates at (x,y).
    • nuiGetCursor

      public static void nuiGetCursor(long __result)
      Unsafe version of: GetCursor
    • uiGetCursor

      public static UIVec2 uiGetCursor(UIVec2 __result)
      Returns the current cursor position in screen coordinates as set by SetCursor.
    • nuiGetCursorDelta

      public static void nuiGetCursorDelta(long __result)
      Unsafe version of: GetCursorDelta
    • uiGetCursorDelta

      public static UIVec2 uiGetCursorDelta(UIVec2 __result)
      Returns the offset of the cursor relative to the last call to Process.
    • nuiGetCursorStart

      public static void nuiGetCursorStart(long __result)
      Unsafe version of: GetCursorStart
    • uiGetCursorStart

      public static UIVec2 uiGetCursorStart(UIVec2 __result)
      Returns the beginning point of a drag operation.
    • nuiGetCursorStartDelta

      public static void nuiGetCursorStartDelta(long __result)
      Unsafe version of: GetCursorStartDelta
    • uiGetCursorStartDelta

      public static UIVec2 uiGetCursorStartDelta(UIVec2 __result)
      Returns the offset of the cursor relative to the beginning point of a drag operation.
    • nuiSetButton

      public static void nuiSetButton(int button, int mod, int enabled)
      Unsafe version of: SetButton
    • uiSetButton

      public static void uiSetButton(int button, int mod, boolean enabled)
      Sets a mouse or gamepad button as pressed/released button is in the range 0..63 and maps to an application defined input source.
      Parameters:
      mod - an application defined set of flags for modifier keys
      enabled - is 1 for pressed, 0 for released
    • nuiGetButton

      public static int nuiGetButton(int button)
      Unsafe version of: GetButton
    • uiGetButton

      public static boolean uiGetButton(int button)
      Returns the current state of an application dependent input button as set by SetButton.
      Returns:
      1 if the button has been set to pressed, 0 for released
    • uiGetClicks

      public static int uiGetClicks()
      Returns the number of chained clicks; 1 is a single click, 2 is a double click, etc.
    • nuiSetKey

      public static void nuiSetKey(int key, int mod, int enabled)
      Unsafe version of: SetKey
    • uiSetKey

      public static void uiSetKey(int key, int mod, boolean enabled)
      Sets a key as down/up; the key can be any application defined keycode.

      All key events are being buffered until the next call to Process.

      Parameters:
      mod - an application defined set of flags for modifier keys
      enabled - 1 for key down, 0 for key up
    • uiSetChar

      public static void uiSetChar(int value)
      Sends a single character for text input; the character is usually in the unicode range, but can be application defined.

      All char events are being buffered until the next call to Process.

    • uiSetScroll

      public static void uiSetScroll(int x, int y)
      Accumulates scroll wheel offsets for the current frame.

      All offsets are being accumulated until the next call to Process.

    • nuiGetScroll

      public static void nuiGetScroll(long __result)
      Unsafe version of: GetScroll
    • uiGetScroll

      public static UIVec2 uiGetScroll(UIVec2 __result)
      Returns the currently accumulated scroll wheel offsets for this frame
    • uiBeginLayout

      public static void uiBeginLayout()
      Clears the item buffer.

      uiBeginLayout() should be called before the first UI declaration for this frame to avoid concatenation of the same UI multiple times. After the call, all previously declared item IDs are invalid, and all application dependent context data has been freed.

      uiBeginLayout() must be followed by EndLayout.

    • uiEndLayout

      public static void uiEndLayout()
      Layout all added items starting from the root item 0.

      After calling uiEndLayout(), no further modifications to the item tree should be done until the next call to BeginLayout. It is safe to immediately draw the items after a call to uiEndLayout().

      This is an O(N) operation for N = number of declared items.

    • uiUpdateHotItem

      public static void uiUpdateHotItem()
      Updates the current hot item; this only needs to be called if items are kept for more than one frame and EndLayout is not called.
    • uiProcess

      public static void uiProcess(int timestamp)
      Updates the internal state according to the current cursor position and button states, and call all registered handlers.

      No further modifications to the item tree should be done until the next call to BeginLayout. Items should be drawn before a call to uiProcess().

      This is an O(N) operation for N = number of declared items.

      Parameters:
      timestamp - the time in milliseconds relative to the last call to uiProcess() and is used to estimate the threshold for double-clicks after calling uiProcess().
    • uiClearState

      public static void uiClearState()
      Resets the currently stored hot/active etc. handles.

      This should be called when a re-declaration of the UI changes the item indices, to avoid state related glitches because item identities have changed.

    • uiItem

      public static int uiItem()
      Creates a new UI item and return the new item's ID.
    • nuiSetFrozen

      public static void nuiSetFrozen(int item, int enable)
      Unsafe version of: SetFrozen
    • uiSetFrozen

      public static void uiSetFrozen(int item, boolean enable)
      Sets an items state to frozen.

      The UI will not recurse into frozen items when searching for hot or active items; subsequently, frozen items and their child items will not cause mouse event notifications. The frozen state is not applied recursively; GetState will report COLD for child items. Upon encountering a frozen item, the drawing routine needs to handle rendering of child items appropriately.

    • uiSetHandle

      public static void uiSetHandle(int item, long handle)
      Sets the application-dependent handle of an item.
      Parameters:
      handle - an application defined 64-bit handle. If NULL, the item will not be interactive.
    • nuiAllocHandle

      public static long nuiAllocHandle(int item, int size)
      Unsafe version of: AllocHandle
    • uiAllocHandle

      @Nullable public static ByteBuffer uiAllocHandle(int item, int size)
      Allocates space for application-dependent context data and assign it as the handle to the item.

      The memory of the pointer is managed by the UI context and released upon the next call to BeginLayout.

    • nuiSetHandler

      public static void nuiSetHandler(long handler)
      Unsafe version of: SetHandler
    • uiSetHandler

      public static void uiSetHandler(UIHandlerI handler)
      Sets the global handler callback for interactive items.

      The handler will be called for each item whose event flags are set using SetEvents.

    • uiSetEvents

      public static void uiSetEvents(int item, int flags)
      Parameters:
      flags - designates for which events the handler should be called. One or more of:
      BUTTON0_DOWNBUTTON0_UPBUTTON0_HOT_UPBUTTON0_CAPTUREBUTTON2_DOWNSCROLLKEY_DOWNKEY_UP
      CHAR
    • uiSetFlags

      public static void uiSetFlags(int item, int flags)
      Parameters:
      flags - a user-defined set of flags defined by USERMASK
    • uiInsert

      public static int uiInsert(int item, int child)
      Assigns an item to a container.

      An item ID of 0 refers to the root item. The function searches for the last item and calls Append on it, which is an O(N) operation for N siblings. It is usually more efficient to call uiInsert() for the first child, then chain additional siblings using uiAppend().

      Returns:
      the child item ID if the container has already added items
    • uiAppend

      public static int uiAppend(int item, int sibling)
      Assigns an item to the same container as another item.
      Parameters:
      sibling - inserted after item
    • uiInsertBack

      public static int uiInsertBack(int item, int child)
      Inserts child into container item like Insert, but prepend it to the first child item, effectively putting it in the background.

      It is efficient to call uiInsertBack() repeatedly in cases where drawing or layout order doesn't matter.

    • uiInsertFront

      public static int uiInsertFront(int item, int child)
      Same as Insert.
    • uiSetSize

      public static void uiSetSize(int item, int w, int h)
      Sets the size of the item.

      A size of 0 indicates the dimension to be dynamic; if the size is set, the item can not expand beyond that size.

    • uiSetLayout

      public static void uiSetLayout(int item, int flags)
      Sets the anchoring behavior of the item to one or multiple UIlayoutFlags.
      Parameters:
      flags - one or more of:
      LEFTTOPRIGHTDOWNHFILLVFILLHCENTERVCENTERCENTERFILLBREAK
    • uiSetBox

      public static void uiSetBox(int item, int flags)
      Sets the box model behavior of the item to one or multiple UIboxFlags.
      Parameters:
      flags - one or more of:
      ROWCOLUMNLAYOUTFLEXNOWRAPWRAPSTARTMIDDLEENDJUSTIFY
    • nuiSetMargins

      public static void nuiSetMargins(int item, short l, short t, short r, short b)
      Unsafe version of: SetMargins
    • uiSetMargins

      public static void uiSetMargins(int item, int l, int t, int r, int b)
      Sets the left, top, right and bottom margins of an item.

      When the item is anchored to the parent or another item, the margin controls the distance from the neighboring element.

    • uiFocus

      public static void uiFocus(int item)
      Sets item as recipient of all keyboard events.
      Parameters:
      item - if -1, no item will be focused
    • uiFirstChild

      public static int uiFirstChild(int item)
      Returns the first child item of a container item.

      If the item is not a container or does not contain any items, -1 is returned.

      Parameters:
      item - if 0, the first child item of the root item will be returned
    • uiNextSibling

      public static int uiNextSibling(int item)
      Returns an items next sibling in the list of the parent containers children.

      If item is 0 or the item is the last child item, -1 will be returned.

    • uiGetItemCount

      public static int uiGetItemCount()
      Returns the total number of allocated items
    • uiGetAllocSize

      public static int uiGetAllocSize()
      Returns the total bytes that have been allocated by AllocHandle
    • uiGetState

      public static int uiGetState(int item)
      Returns the current state of the item.

      This state is only valid after a call to Process. The returned value is one of COLD, HOT, ACTIVE, FROZEN.

    • uiGetHandle

      public static long uiGetHandle(int item)
      Returns the application-dependent handle of the item as passed to SetHandle or AllocHandle.
    • uiGetHotItem

      public static int uiGetHotItem()
      Returns the item that is currently under the cursor or -1 for none.
    • uiGetFocusedItem

      public static int uiGetFocusedItem()
      Returns the item that is currently focused or -1 for none.
    • uiFindItem

      public static int uiFindItem(int item, int x, int y, int flags, int mask)
      Returns the topmost item containing absolute location (x,y), starting with item as parent, using a set of flags and masks as filter.

      If both flags and mask are ANY, the first topmost item is returned. If mask is ANY, the first topmost item matching any of flags is returned. otherwise the first item matching (item.flags & flags) == mask is returned. You may combine box, layout, event and user flags. Frozen items will always be ignored.

    • nuiGetHandler

      public static long nuiGetHandler()
      Unsafe version of: GetHandler
    • uiGetHandler

      @Nullable public static UIHandler uiGetHandler()
      Returns the handler callback as passed to SetHandler
    • uiGetEvents

      public static int uiGetEvents(int item)
      Returns the event flags for an item as passed to SetEvents
    • uiGetFlags

      public static int uiGetFlags(int item)
      Returns the user-defined flags for an item as passed to SetFlags
    • uiGetKey

      public static int uiGetKey()
      When handling a KEY_DOWN/KEY_UP event: the key that triggered this event.
    • uiGetModifier

      public static int uiGetModifier()
      When handling a keyboard or mouse event: the active modifier keys.
    • nuiGetRect

      public static void nuiGetRect(int item, long __result)
      Unsafe version of: GetRect
    • uiGetRect

      public static UIRect uiGetRect(int item, UIRect __result)
      Returns the items layout rectangle in absolute coordinates.

      If uiGetRect() is called before EndLayout, the values of the returned rectangle are undefined.

    • nuiContains

      public static int nuiContains(int item, int x, int y)
      Unsafe version of: Contains
    • uiContains

      public static boolean uiContains(int item, int x, int y)
      Returns 1 if an items absolute rectangle contains a given coordinate, otherwise 0.
    • uiGetWidth

      public static int uiGetWidth(int item)
      Returns the width of the item as set by SetSize.
    • uiGetHeight

      public static int uiGetHeight(int item)
      Return the height of the item as set by SetSize.
    • uiGetLayout

      public static int uiGetLayout(int item)
      Returns the anchoring behavior as set by SetLayout.
    • uiGetBox

      public static int uiGetBox(int item)
      Returns the box model as set by SetBox.
    • uiGetMarginLeft

      public static short uiGetMarginLeft(int item)
      Returns the left margin of the item as set with SetMargins.
    • uiGetMarginTop

      public static short uiGetMarginTop(int item)
      Returns the top margin of the item as set with SetMargins.
    • uiGetMarginRight

      public static short uiGetMarginRight(int item)
      Returns the right margin of the item as set with SetMargins.
    • uiGetMarginDown

      public static short uiGetMarginDown(int item)
      Returns the bottom margin of the item as set with SetMargins.
    • uiRecoverItem

      public static int uiRecoverItem(int olditem)
      When BeginLayout is called, the most recently declared items are retained. When EndLayout completes, it matches the old item hierarchy to the new one and attempts to map old items to new items as well as possible. When passed an item Id from the previous frame, uiRecoverItem() returns the item's new assumed Id, or -1 if the item could not be mapped. It is valid to pass -1 as item.
    • uiRemapItem

      public static void uiRemapItem(int olditem, int newitem)
      In cases where it is important to recover old state over changes in the view, and the built-in remapping fails, the UI declaration can manually remap old items to new IDs in cases where e.g. the previous item ID has been temporarily saved; uiRemapItem() would then be called after creating the new item using Item.
    • uiGetLastItemCount

      public static int uiGetLastItemCount()
      Returns the number if items that have been allocated in the last frame.