-
Pushes given disabled component state flag on stack (default: true, i.e. disabled). Pass false
to temporarily enable components.
-
Merges given theme settings with current theme and pushes result on theme stack.
IMPORTANT: Currently IMGUI only supports one font and ignores any font changes pushed on the theme stack.
-
Clears all shape layers and resets theme / disabled stacks.
Performs end-of-frame handling & component cache cleanup. Also removes cached state and resources of all unused components.
Removes current disabled flag from stack (unless only one theme left).
Removes current theme from stack (unless only one theme left).
Garbage collect unused component state / resources.
Returns true if left mouse button is pressed.
Marks given component ID as used and checks hash
to determine if the component's resource cache should be cleared. This hash value should be based on any values (e.g. layout info) which might invalidate cached resources.
-
-
Sets focusID
to given id
if the component can receive focus. Returns true if component is focused.
-
Attempts to retrieve cached resource for given component id
and resource hash
. If unsuccessful, calls resource ctor
function to create it, caches result and returns it.
-
-
-
Sets cursor property to given id
. This setting is cleared at the beginning of each frame (default value: "default").
-
Sets internal key state from given key event details.
-
Sets mouse position and current mouse button flags (i.e. MouseEvent.buttons
).
-
-
Stores / overrides given local state value for component id
in cache.
-
-
Merges given theme settings with DEFAULT_THEME and resets theme stack.
-
Attempts to retrieve cached component state for given id
. If unsuccessful, calls state ctor
function, caches result and returns it.
-
-
Attempts to switch focus to next, or if Shift is pressed, to previous component. This is meant be called ONLY from component key handlers.
Returns pixel width of given string based on current theme's font settings.
IMPORTANT: Currently only monospace fonts are supported.
-
Returns hiccup representation of all shapes/text primitives created by components in the current frame.
Applies component function with given disabled flag, then restores previous disabled state and returns component result.
-
-
Applies component function with given theme, then restores previous theme and returns component result.
-
-
Generated using TypeDoc
Prepares IMGUI for next frame:
hotID
,cursor
By default all components will emit draw shapes, however this can be disabled by passing
false
as argument. This is useful for use cases where the GUI is not updated at high frame rates and so would require two invocations per update cycle for immediate visual feedback: