载入中...
搜索中...
未找到
eve::ui::UI类 参考

Declarative UI module (eve.UI). 更多...

#include <UI.h>

类 eve::ui::UI 继承关系图:
eve::Module

Public 成员函数

 Module_REG (UI)
 
 UI ()
 Ui.
 
 ~UI () override
 Ui.
 
void releaseSquirrelRoots () noexcept
 Drops database-panel Squirrel roots while the Runtime VM is alive.
 
bool initBackend ()
 Creates the platform UI backend (ImGui); true on success.
 
void shutdownBackend ()
 Destroys the platform UI backend.
 
bool isBackendReady () const
 True once the backend exists.
 
void processEvent (const SDL_Event *event)
 Feeds an SDL event into the UI backend (before window/game handling).
 
void beginFrameAndRender ()
 Builds and presents the current frame's UI.
 
void dispatchEvents ()
 Dispatches queued widget callbacks (click/toggle/value/text).
 
bool wantCaptureMouse () const
 True when the UI wants to capture mouse input this frame.
 
bool wantCaptureKeyboard () const
 True when the UI wants to capture keyboard input this frame.
 
UIHostHandle mountAs (const std::string &name, WidgetDesc root)
 Creates/replaces a named host from a WidgetDesc tree and selects it.
 
UIHostHandle mount (WidgetDesc root)
 Mounts the tree as an auto-named host and selects it.
 
UIHostHandle remount (WidgetDesc root)
 Replaces the selected host's tree.
 
UIHostHandle remountReconcile (WidgetDesc root)
 Remount with key reconcile (props-only when structure matches).
 
UIHostHandle remountAs (const std::string &name, WidgetDesc root)
 Creates/replaces a named host (does not select it).
 
bool select (const std::string &name)
 Selects a named host; false when it does not exist.
 
UIHostHandle findHost (const std::string &name) const
 Finds a host by name, or null when absent.
 
UIHostHandle findHostByOwner (uint32_t ownerId) const
 Finds the host bound to an owner id, or null when absent.
 
UIHostHandle current () const noexcept
 Returns the currently selected host, or null.
 
void bindOwner (uint32_t ownerId)
 Binds the selected host to a UI/scene owner id.
 
void beginBuild ()
 Imperative builder: open a new build pass (see beginWindow etc.).
 
void beginWindow (const std::string &title, const std::string &id="root")
 Opens a window for the current build pass.
 
void beginGroup (const std::string &id="")
 Opens a group container in the current build pass.
 
void beginList (const std::string &id)
 Opens a list container (rows added with addListItem).
 
void beginCollapsing (const std::string &label, const std::string &id="", bool open=true)
 Opens a collapsible header.
 
void beginChild (const std::string &id, float width=0.f, float height=120.f)
 Opens a sized child region.
 
void beginCard (const std::string &id="")
 Opens a bordered card surface.
 
bool beginNinePatch (const std::string &path, const std::string &id="", float width=0.f, float height=0.f)
 Opens a stretchable .9.png panel; false means the asset is invalid.
 
void beginMenuBar (const std::string &id="")
 Opens a window menu bar.
 
void beginMenu (const std::string &label, const std::string &id="")
 Opens a popup menu.
 
void beginToolbar (const std::string &id="")
 Opens a horizontal editor command strip.
 
void beginToolbox (const std::string &id="", float cellSize=0.f, int columns=0)
 Opens a wrapping editor tool grid.
 
void beginSidebar (const std::string &id="", float width=0.f)
 Opens a vertical editor side panel.
 
void beginStatusBar (const std::string &id="")
 Opens a compact horizontal status strip.
 
void beginSplitPane (const std::string &direction="row", float ratio=0.25f, const std::string &id="")
 Opens a two-child resizable split pane.
 
void beginScrollList (const std::string &id="", float height=0.f, float itemHeight=0.f)
 Begins scroll list.
 
void beginFlex (const std::string &direction="row", const std::string &id="", float gap=-1.f)
 Begin a Flex container.
 
void beginRow (const std::string &id="", float gap=-1.f)
 Opens a row flex container.
 
void beginColumn (const std::string &id="", float gap=-1.f)
 Opens a column flex container.
 
void beginGrid (int columns, const std::string &id="", float columnGap=-1.f, float rowGap=-1.f)
 Begins a fixed-column grid container.
 
void end ()
 Closes the innermost open container.
 
void addText (const std::string &content, const std::string &id="")
 Adds a text label to the current container.
 
void addTextWrapped (const std::string &content, float width, const std::string &id="")
 Adds text wrapped.
 
void addButton (const std::string &label, const std::string &id="")
 Adds a button to the current container.
 
void addIcon (const std::string &name, const std::string &id="")
 Adds a semantic icon by name (for example "search" or "save").
 
void addIconButton (const std::string &name, const std::string &label="", const std::string &id="")
 Adds a semantic icon button with an optional visible label.
 
void addSameLine (const std::string &id="")
 Adds an inline-break spacer.
 
void addSeparator (const std::string &id="")
 Adds a separator line.
 
void addCheckbox (const std::string &label, bool checked, const std::string &id="")
 Adds a checkbox.
 
void addSlider (const std::string &label, float value, float minV, float maxV, const std::string &id="")
 Adds a slider.
 
void addColorPalette (const std::string &label, float r, float g, float b, float a=1.f, const std::string &id="")
 Adds a color palette (ColorEdit + swatch grid). RGBA is stored on the node tint; read back with getColorR/G/B/A.
 
void addProgress (float fraction, const std::string &id="", const std::string &overlay="")
 Adds a progress bar.
 
void addImage (const std::string &id="", float width=0.f, float height=0.f)
 Adds image.
 
bool addNinePatch (const std::string &path, const std::string &id="", float width=0.f, float height=0.f)
 Adds a .9.png image after removing its one-pixel marker frame.
 
void addImageButton (const std::string &id, float width, float height)
 Adds image button.
 
void addViewport (const std::string &id, float width=0.f, float height=0.f)
 Adds viewport.
 
void addCombo (const std::string &label, const std::string &options, int selected, const std::string &id="")
 Adds combo.
 
void addInputText (const std::string &label, const std::string &value, const std::string &id="")
 Adds an editable text field.
 
void addSearchField (const std::string &hint, const std::string &value="", const std::string &id="")
 Adds a compact search field.
 
void addSwitch (const std::string &label, bool checked, const std::string &id="")
 Adds a modern boolean switch.
 
void addBadge (const std::string &label, const std::string &id="")
 Adds a compact status/category badge.
 
void addSectionHeader (const std::string &label, const std::string &id="")
 Adds a non-collapsible section heading.
 
void addMenuItem (const std::string &label, const std::string &shortcut="", const std::string &id="")
 Adds a selectable menu command.
 
void addSpacer (const std::string &id="", float grow=1.f)
 Flexible empty space inside Flex (default grow=1).
 
void setItemFlexGrow (float grow)
 Set flex item props on the most recently added child of the current open container. No-op if there is no current child.
 
void setItemFlexShrink (float shrink)
 Sets shrink weight on the most recently added flex item.
 
void setItemFlexBasis (float basis)
 Sets its main-axis basis; negative restores automatic measurement.
 
void setItemAlignSelf (const std::string &align)
 Sets its cross-axis alignment: inherit, start, center, end, or stretch.
 
void setItemAspectRatio (float ratio)
 Sets width/height ratio on the most recently added item.
 
void setItemGridColumnSpan (int span)
 Sets the grid-column span of the most recently added item.
 
void setItemSize (float width, float height)
 Sets width/height on the most recently added child.
 
void setItemMargin (float l, float t, float r, float b)
 Sets the item margin.
 
void setItemPadding (float l, float t, float r, float b)
 Sets the item padding.
 
void setItemMinSize (float w, float h)
 Sets the item min size.
 
void setItemMaxSize (float w, float h)
 Sets the item max size.
 
void setItemPercent (float w, float h)
 Sets the item percent.
 
void setItemAbsolute (float anchorX, float anchorY, float x=0.f, float y=0.f)
 Sets the item absolute.
 
void setItemTooltip (const std::string &text)
 Sets hover help on the most recently added item.
 
void setItemDragSource (const std::string &payloadType, const std::string &payloadText)
 Marks the most recently added item as a desktop drag source.
 
void setItemDropTarget (const std::string &acceptedType)
 Marks the most recently added item as a desktop drop target.
 
void setItemEnabled (bool enabled)
 Enables or disables the most recently added item.
 
void setItemSelected (bool selected)
 Marks the most recently added button as the selected tool/action.
 
void setItemFocusMode (const std::string &mode)
 Sets the last item's focus mode: "none", "click", or "all".
 
void setItemMouseFilter (const std::string &filter)
 Sets the last item's pointer filter: "stop", "pass", or "ignore".
 
void setItemTheme (const std::string &theme)
 Overrides the last item's subtree theme: "inherit", "dark", or "light".
 
void setThemeScope (const std::string &theme)
 Overrides the current open container's inherited subtree theme.
 
void setItemStyleClass (const std::string &name)
 Applies a named style class to the most recently added item.
 
void setStyleScope (const std::string &name)
 Applies a named style class to the current open container.
 
void setItemTabIndex (int index)
 Sets the last item's sequential focus order; negative excludes it.
 
void setItemFocusOrder (const std::string &previous, const std::string &next)
 Sets explicit previous and next focus neighbors on the last item.
 
void setItemFocusNeighbors (const std::string &left, const std::string &right, const std::string &up, const std::string &down)
 Sets explicit directional focus neighbors on the last item.
 
void setItemAccessibility (const std::string &role, const std::string &name, const std::string &description="")
 Sets the last item's accessibility role, name and description.
 
void setFlexAlign (const std::string &align)
 Set Flex container align/justify on the current open Flex (no-op otherwise).
 
void setFlexJustify (const std::string &justify)
 Sets Flex container justify on the current open Flex.
 
void setLayoutGaps (float columnGap, float rowGap)
 Sets independent column and row gaps on the current Flex/Grid.
 
void setFlexWrap (bool wrap)
 Enables or disables line wrapping on the current Flex.
 
void setLayoutOverflow (const std::string &overflow)
 Sets overflow behavior: visible, clip, or scroll.
 
void addListItem (const std::string &label, const std::string &id="")
 Append one list row button (call inside beginList).
 
bool mountBuild ()
 Finishes the build pass and mounts the built tree.
 
bool mountBuildAs (const std::string &name)
 Finishes the build pass and mounts as a named host.
 
bool remountBuildAs (const std::string &name)
 Like mountBuildAs but reconciles by key when possible.
 
bool setListItems (const std::string &listId, const std::vector< std::string > &items)
 Replace children of a Group listId with buttons for each label (reconcile). Host must already exist and contain a group with that id.
 
void setText (const std::string &id, const std::string &text)
 Widget state setters/getters on the current host (by node id).
 
void setTextWrap (const std::string &id, float width)
 Sets the text wrap.
 
void setVisible (const std::string &id, bool visible)
 Sets the visible.
 
void setEnabled (const std::string &id, bool enabled)
 Enables or disables a mounted control.
 
void setChecked (const std::string &id, bool checked)
 Sets the checked.
 
void setValue (const std::string &id, float value)
 Sets the value.
 
void setValueText (const std::string &id, const std::string &value)
 Sets the value text.
 
void setColor (const std::string &id, float r, float g, float b, float a=1.f)
 Sets RGBA on a ColorPalette (or image tint) node.
 
void setImageTint (const std::string &id, float r, float g, float b, float a=1.f)
 Sets the image tint.
 
void setImageUv (const std::string &id, float u0, float v0, float u1, float v1)
 Sets the image uv.
 
void setImageNinePatch (const std::string &id, float l, float t, float r, float b)
 Sets the image nine patch.
 
bool setImageNinePatchFile (const std::string &id, const std::string &path)
 Applies a .9.png texture and its parsed stretch metadata to an image.
 
void setImageCornerRadius (const std::string &id, float radius)
 Sets the image corner radius.
 
void setImageTextureId (const std::string &id, uint64_t textureId)
 Sets the image texture id.
 
uint64_t registerTexture (graphics::Texture *tex)
 Register an engine texture for UI drawing.
 
void unregisterTexture (uint64_t textureId)
 Release a texture id previously returned by registerTexture().
 
float getValue (const std::string &id) const
 Returns the value.
 
std::string getValueText (const std::string &id) const
 Returns the value text.
 
float getColorR (const std::string &id) const
 ColorPalette / image tint channels; missing nodes return 0.
 
float getColorG (const std::string &id) const
 Returns the color g.
 
float getColorB (const std::string &id) const
 Returns the color b.
 
float getColorA (const std::string &id) const
 Returns the color a.
 
bool getChecked (const std::string &id) const
 Returns the checked.
 
bool requestFocus (const std::string &id)
 Requests keyboard/gamepad focus for a mounted control.
 
bool moveFocus (const std::string &direction)
 Moves focus by "next", "previous", "left", "right", "up", or "down".
 
std::string getFocusedId () const
 Returns the focused control id, or an empty string.
 
void setHostVisible (bool visible)
 Host-level state.
 
void setHostLayer (int layer)
 Sets the host layer.
 
void setHostModal (bool modal)
 Marks the host as a modal (blocks other hosts) / overlay.
 
void setHostOverlay (bool overlay)
 Sets the host overlay.
 
void setHostOverlayAlpha (float alpha)
 Sets overlay opacity (0..1); zero also removes the host border and outer padding.
 
void setHostMovable (bool movable)
 Allows or prevents user movement after the initial position.
 
void setHostResizable (bool resizable)
 Allows or prevents user resizing after the initial size.
 
void setHostPos (float x, float y, float pivotX=0.f, float pivotY=0.f)
 Positions the host window with a pivot (0..1 each axis).
 
void setHostWorldAnchor (float x, float y, float z)
 Projects the selected host from a 3D world point through the active Camera3D.
 
void clearHostWorldAnchor ()
 Returns the selected host to ordinary screen-space placement.
 
void setHostWorldEdgePolicy (const std::string &policy, float safeMargin=8.f)
 Configures off-screen handling and safe-edge margin.
 
void setHostWorldDistanceScale (bool enabled, float referenceDistance=10.f, float minScale=0.65f, float maxScale=1.25f)
 Configures distance scaling.
 
void setHostWorldOverlap (bool enabled, int priority=0, float padding=4.f, float maxDisplacement=96.f)
 Configures deterministic overlap avoidance for projected hosts.
 
std::string getHostWorldState () const
 Returns the selected host projection state as a stable lowercase name.
 
float getHostWorldScreenX () const
 Returns the selected host's derived screen X coordinate.
 
float getHostWorldScreenY () const
 Returns the selected host's derived screen Y coordinate.
 
void setHostAnchor (float x, float y)
 Sets the host anchor.
 
void setHostSize (float w, float h)
 Sets the host size.
 
void setHostPercent (float w, float h)
 Sets the host percent.
 
void animateHostPos (float x, float y, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
 Animate the selected host's window position (px).
 
void animateHostSize (float w, float h, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
 Animate the selected host's explicit window size (px).
 
void animateHostOverlayAlpha (float alpha, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
 Animate the selected host's overlay background alpha.
 
void animateItemOpacity (const std::string &id, float opacity, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
 Smoothly animates one retained node's transient opacity without rebuilding its tree.
 
void animateItemPos (const std::string &id, float x, float y, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
 Animate one node's absolute placement offset (marks the node absolute).
 
void cancelHostTweens ()
 Cancel pending host-level tweens on the selected host.
 
void cancelItemTweens (const std::string &id="")
 Cancel pending item tweens on the selected host.
 
void cancelAllTweens ()
 Cancel every pending tween on the selected host.
 
void tickTweens (double nowMs)
 Advance pending UI tweens using an explicit clock (ms).
 
std::size_t getHostTweenCount () const
 Number of pending host tweens (diagnostics / tests).
 
std::size_t getItemTweenCount () const
 Number of pending item tweens (diagnostics / tests).
 
std::string consumeClick ()
 Returns the id of the clicked widget since the last frame (or "").
 
std::string consumeChange ()
 Returns the id of the changed widget since the last frame (or "").
 
std::string dragDropSupport () const
 Returns "supported" on desktop builds and "unsupported-platform" elsewhere.
 
std::string consumeDrop ()
 Pops one drop and returns its target as "host/node", or an empty string.
 
std::string getDropType () const
 Returns the payload type of the last successfully consumed drop.
 
std::string getDropText () const
 Returns the owning payload text of the last successfully consumed drop.
 
std::string getDropSource () const
 Returns the source as "host/node", or empty for an OS file.
 
std::string getDropOrigin () const
 Returns "internal", "os-file", or an empty string.
 
void onClick (const std::string &id, ssq::Function fn)
 On click.
 
void onChange (const std::string &id, ssq::Function fn)
 On change.
 
void componentOnClick (uint64_t owner, const std::string &id, ssq::Function fn)
 Internal UIComponent callback registration scoped to one component owner.
 
void componentOnChange (uint64_t owner, const std::string &id, ssq::Function fn)
 Internal UIComponent value callback registration scoped to one component owner.
 
void componentClearHandlers (uint64_t owner)
 Removes every callback owned by one UIComponent; idempotent on the UI thread.
 
void setThemeDark ()
 Applies the dark/light built-in theme.
 
void setThemeLight ()
 Sets the theme light.
 
bool setTheme (const std::string &name)
 Named preset: "dark" / "light" (case-insensitive). Returns false if unknown.
 
std::string getTheme () const
 Name of the active theme.
 
std::string defineStyleClass (const std::string &name, const std::string &parent="")
 Declares/replaces a named style class and returns a stable status string.
 
std::string setStyleClassColor (const std::string &name, const std::string &property, float r, float g, float b, float a=1.f)
 Sets a named class color token and returns a stable status string.
 
std::string setStyleClassMetric (const std::string &name, const std::string &property, float x, float y=0.f)
 Sets a named class metric token and returns a stable status string.
 
void clearStyleClasses ()
 Clears all named style classes.
 
void setNavKeyboard (bool enabled)
 Enables/disables keyboard navigation support.
 
void setNavGamepad (bool enabled)
 Sets the nav gamepad.
 
void setScale (float scale)
 Global UI scale factor (default 1).
 
float getScale () const
 Current UI scale factor.
 
std::string getStats () const
 Returns the stats.
 
std::string getLayoutDiagnostics () const
 JSON diagnostics for measured size and overflow of the selected retained tree.
 
std::string getAccessibilitySnapshot () const
 JSON accessibility snapshot for semantically named nodes in the selected tree.
 
std::string saveTreeJson () const
 Saves tree json.
 
bool loadTreeJson (const std::string &json)
 Loads tree json.
 
graphics::Canvas * viewportCanvas (const std::string &id)
 Returns the offscreen render target of a selected-host Viewport widget.
 
bool viewportHovered (const std::string &id)
 Viewport hovered.
 
bool viewportActive (const std::string &id)
 Viewport active.
 
float viewportMouseX (const std::string &id)
 Viewport mouse x.
 
float viewportMouseY (const std::string &id)
 Viewport mouse y.
 
float viewportDragDX (const std::string &id)
 Viewport drag dx.
 
float viewportDragDY (const std::string &id)
 Viewport drag dy.
 
float viewportWheel (const std::string &id)
 Viewport wheel.
 
void mountSimple (const std::string &title, const std::string &labelText, const std::string &buttonText)
 One-shot convenience: a window with a label and a button.
 
bool inspectOpen ()
 Opens the auto-generated inspector (scans reflected classes).
 
void inspectClose ()
 Closes the inspector panel.
 
bool inspectRefresh ()
 Re-scans script classes; true when any class is reflected.
 
bool inspectSelectClass (const std::string &name)
 Selects a class in the inspector (creates its first instance).
 
bool inspectObject (ssq::Object object)
 Inspects a caller-provided live script instance.
 
bool inspectSetPickHandler (ssq::Function fn)
 Registers the script callback used by the inspector Pick button. The callback is stored on the script side (eve._inspectorPickHandler) and must return a live script instance (or null).
 
bool inspectPickScene ()
 Calls the pick handler and inspects the returned object.
 
bool inspectAddInstance ()
 Creates another instance of the selected inspector class.
 
ssq::Object propertySchema (ssq::Object instance)
 Return the reflection-derived PropertySchema for a live script instance.
 
bool dbOpen ()
 Opens the database panel (class menu + editable instance grid).
 
void dbClose ()
 Closes the database panel.
 
bool dbRefresh ()
 Re-scans reflected classes; true when any class exists.
 
bool dbSelectClass (const std::string &name)
 Selects the class shown in the grid.
 
uint64_t dbRegister (ssq::Object object, const std::string &label)
 Registers a live script object in the database grid.
 
uint64_t dbCreateInstance ()
 Creates and registers an instance of the selected class.
 
eve::Result< void > dbUnregister (uint64_t id)
 Removes an entry from the database grid using its packed handle.
 
bool editorOpen ()
 Opens the menu bar and docks the inspector + database panels.
 
void editorClose ()
 Closes the editor shell (and its docked panels).
 
bool editorSelectPanel (const std::string &name)
 Shows one docked panel ("inspector"/"database"; "" hides all).
 
bool sceneOpen ()
 Opens the scene panel (tree + selected node properties).
 
void sceneClose ()
 Closes the scene panel.
 
bool sceneSelectNode (const std::string &id)
 Selects a scene node by id.
 
bool sceneSetPickHandler (ssq::Function fn)
 Registers the script callback for the scene panel Pick button. The callback (stored as eve._scenePickHandler) receives the node id and typically maps it to a script instance, then calls ui.inspectObject().
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

Declarative UI module (eve.UI).

ECS: named UIHost panels. Builder + Component.build (C++/script) + list/when/theme.

在文件 UI.h 第 41 行定义.

构造及析构函数说明

◆ UI()

◆ ~UI()

eve::ui::UI::~UI ( )
override

Ui.

在文件 UI.cpp 第 536 行定义.

引用了 eve::ui::bindUIEventSinkOwner() , 以及 shutdownBackend().

成员函数说明

◆ addBadge()

void eve::ui::UI::addBadge ( const std::string &  label,
const std::string &  id = "" 
)

Adds a compact status/category badge.

在文件 UI.cpp 第 1050 行定义.

引用了 eve::ui::badge(), eve::ui::WidgetDesc::children , 以及 label.

◆ addButton()

void eve::ui::UI::addButton ( const std::string &  label,
const std::string &  id = "" 
)

Adds a button to the current container.

在文件 UI.cpp 第 956 行定义.

引用了 eve::ui::button(), eve::ui::WidgetDesc::children , 以及 label.

◆ addCheckbox()

void eve::ui::UI::addCheckbox ( const std::string &  label,
bool  checked,
const std::string &  id = "" 
)

Adds a checkbox.

在文件 UI.cpp 第 978 行定义.

引用了 eve::ui::checkbox(), eve::ui::WidgetDesc::children , 以及 label.

◆ addColorPalette()

void eve::ui::UI::addColorPalette ( const std::string &  label,
float  r,
float  g,
float  b,
float  a = 1.f,
const std::string &  id = "" 
)

Adds a color palette (ColorEdit + swatch grid). RGBA is stored on the node tint; read back with getColorR/G/B/A.

在文件 UI.cpp 第 987 行定义.

引用了 a, b, eve::ui::WidgetDesc::children, eve::ui::colorPalette(), g, label , 以及 r.

◆ addCombo()

void eve::ui::UI::addCombo ( const std::string &  label,
const std::string &  options,
int  selected,
const std::string &  id = "" 
)

Adds combo.

Dropdown; options separated by '
', selected = initial index.

在文件 UI.cpp 第 1023 行定义.

引用了 eve::ui::WidgetDesc::children, eve::ui::combo(), end(), label, options , 以及 start.

◆ addIcon()

void eve::ui::UI::addIcon ( const std::string &  name,
const std::string &  id = "" 
)

Adds a semantic icon by name (for example "search" or "save").

在文件 UI.cpp 第 960 行定义.

引用了 eve::ui::WidgetDesc::children, icon, eve::ui::iconFromName(), name, eve::ui::None , 以及 value.

◆ addIconButton()

void eve::ui::UI::addIconButton ( const std::string &  name,
const std::string &  label = "",
const std::string &  id = "" 
)

Adds a semantic icon button with an optional visible label.

在文件 UI.cpp 第 966 行定义.

引用了 eve::ui::WidgetDesc::children, eve::ui::iconButton(), eve::ui::iconFromName(), label, name, eve::ui::None , 以及 value.

◆ addImage()

void eve::ui::UI::addImage ( const std::string &  id = "",
float  width = 0.f,
float  height = 0.f 
)

Adds image.

Colored / textured image; size 0 = default (32px or flex-assigned).

在文件 UI.cpp 第 996 行定义.

引用了 eve::ui::WidgetDesc::children, height, image , 以及 width.

◆ addImageButton()

void eve::ui::UI::addImageButton ( const std::string &  id,
float  width,
float  height 
)

Adds image button.

Clickable image button (click routes through consumeClick / callbacks).

在文件 UI.cpp 第 1015 行定义.

引用了 eve::ui::WidgetDesc::children, height, eve::ui::imageButton() , 以及 width.

◆ addInputText()

void eve::ui::UI::addInputText ( const std::string &  label,
const std::string &  value,
const std::string &  id = "" 
)

Adds an editable text field.

在文件 UI.cpp 第 1037 行定义.

引用了 eve::ui::WidgetDesc::children, eve::ui::inputText(), label , 以及 value.

◆ addListItem()

void eve::ui::UI::addListItem ( const std::string &  label,
const std::string &  id = "" 
)

Append one list row button (call inside beginList).

在文件 UI.cpp 第 1276 行定义.

引用了 eve::ui::button(), id, itemId, label , 以及 parent.

◆ addMenuItem()

void eve::ui::UI::addMenuItem ( const std::string &  label,
const std::string &  shortcut = "",
const std::string &  id = "" 
)

Adds a selectable menu command.

在文件 UI.cpp 第 1058 行定义.

引用了 eve::ui::WidgetDesc::children, label , 以及 eve::ui::menuItem().

◆ addNinePatch()

bool eve::ui::UI::addNinePatch ( const std::string &  path,
const std::string &  id = "",
float  width = 0.f,
float  height = 0.f 
)

Adds a .9.png image after removing its one-pixel marker frame.

在文件 UI.cpp 第 1000 行定义.

引用了 eve::ui::WidgetDesc::children, d, height, image, path , 以及 width.

◆ addProgress()

void eve::ui::UI::addProgress ( float  fraction,
const std::string &  id = "",
const std::string &  overlay = "" 
)

Adds a progress bar.

在文件 UI.cpp 第 992 行定义.

引用了 eve::ui::WidgetDesc::children , 以及 eve::ui::progress().

◆ addSameLine()

void eve::ui::UI::addSameLine ( const std::string &  id = "")

Adds an inline-break spacer.

在文件 UI.cpp 第 972 行定义.

引用了 eve::ui::WidgetDesc::children , 以及 eve::ui::sameLine().

◆ addSearchField()

void eve::ui::UI::addSearchField ( const std::string &  hint,
const std::string &  value = "",
const std::string &  id = "" 
)

Adds a compact search field.

在文件 UI.cpp 第 1041 行定义.

引用了 eve::ui::WidgetDesc::children, eve::ui::searchField() , 以及 value.

◆ addSectionHeader()

void eve::ui::UI::addSectionHeader ( const std::string &  label,
const std::string &  id = "" 
)

Adds a non-collapsible section heading.

在文件 UI.cpp 第 1054 行定义.

引用了 eve::ui::WidgetDesc::children, label , 以及 eve::ui::sectionHeader().

◆ addSeparator()

void eve::ui::UI::addSeparator ( const std::string &  id = "")

Adds a separator line.

在文件 UI.cpp 第 974 行定义.

引用了 eve::ui::WidgetDesc::children , 以及 eve::ui::separator().

◆ addSlider()

void eve::ui::UI::addSlider ( const std::string &  label,
float  value,
float  minV,
float  maxV,
const std::string &  id = "" 
)

Adds a slider.

在文件 UI.cpp 第 982 行定义.

引用了 eve::ui::WidgetDesc::children, label, eve::ui::slider() , 以及 value.

◆ addSpacer()

void eve::ui::UI::addSpacer ( const std::string &  id = "",
float  grow = 1.f 
)

Flexible empty space inside Flex (default grow=1).

在文件 UI.cpp 第 1063 行定义.

引用了 eve::ui::WidgetDesc::children , 以及 eve::ui::spacer().

◆ addSwitch()

void eve::ui::UI::addSwitch ( const std::string &  label,
bool  checked,
const std::string &  id = "" 
)

Adds a modern boolean switch.

在文件 UI.cpp 第 1046 行定义.

引用了 eve::ui::WidgetDesc::children, label , 以及 eve::ui::toggleSwitch().

◆ addText()

void eve::ui::UI::addText ( const std::string &  content,
const std::string &  id = "" 
)

Adds a text label to the current container.

在文件 UI.cpp 第 946 行定义.

引用了 eve::ui::WidgetDesc::children , 以及 text.

◆ addTextWrapped()

void eve::ui::UI::addTextWrapped ( const std::string &  content,
float  width,
const std::string &  id = "" 
)

Adds text wrapped.

Text with an explicit wrap width (0 = no wrap).

在文件 UI.cpp 第 950 行定义.

引用了 eve::ui::WidgetDesc::children, d, text , 以及 width.

◆ addViewport()

void eve::ui::UI::addViewport ( const std::string &  id,
float  width = 0.f,
float  height = 0.f 
)

Adds viewport.

Embedded viewport widget (see viewportCanvas / viewport* input getters).

在文件 UI.cpp 第 1019 行定义.

引用了 eve::ui::WidgetDesc::children, height, eve::ui::viewport() , 以及 width.

◆ animateHostOverlayAlpha()

void eve::ui::UI::animateHostOverlayAlpha ( float  alpha,
float  durationMs,
const std::string &  ease = "smoothstep",
float  delayMs = 0.f 
)

Animate the selected host's overlay background alpha.

参数
alphaTarget alpha clamped to [0,1].
durationMsDuration; <=0 jumps immediately (after delay).
easeEase kind (default "smoothstep").
delayMsDelay before the first sample moves.

在文件 UI.cpp 第 1701 行定义.

引用了 eve::ui::UiTweenDriver::animateHostOverlayAlpha() , 以及 eve::ui::uiTweenWallClockMs().

◆ animateHostPos()

void eve::ui::UI::animateHostPos ( float  x,
float  y,
float  durationMs,
const std::string &  ease = "smoothstep",
float  delayMs = 0.f 
)

Animate the selected host's window position (px).

参数
xTarget posX in pixels.
yTarget posY in pixels.
durationMsDuration; <=0 jumps immediately (after delay).
easeEase kind (default "smoothstep"; see evaluateUiEase).
delayMsDelay before the first sample moves.
注解
Retrigger replaces any prior pos tween on the same host. Driven by the presentation clock inside beginFrameAndRender() / tickTweens().

在文件 UI.cpp 第 1691 行定义.

引用了 eve::ui::UiTweenDriver::animateHostPos(), eve::ui::uiTweenWallClockMs(), x , 以及 y.

◆ animateHostSize()

void eve::ui::UI::animateHostSize ( float  w,
float  h,
float  durationMs,
const std::string &  ease = "smoothstep",
float  delayMs = 0.f 
)

Animate the selected host's explicit window size (px).

参数
wTarget width.
hTarget height.
durationMsDuration; <=0 jumps immediately (after delay).
easeEase kind (default "smoothstep").
delayMsDelay before the first sample moves.

在文件 UI.cpp 第 1696 行定义.

引用了 eve::ui::UiTweenDriver::animateHostSize(), h, eve::ui::uiTweenWallClockMs() , 以及 w.

◆ animateItemOpacity()

void eve::ui::UI::animateItemOpacity ( const std::string &  id,
float  opacity,
float  durationMs,
const std::string &  ease = "smoothstep",
float  delayMs = 0.f 
)

Smoothly animates one retained node's transient opacity without rebuilding its tree.

参数
idNode id on the selected host.
opacityTarget opacity clamped to [0,1].
durationMsDuration; <=0 jumps immediately (after delay).
easeEase kind (default "smoothstep").
delayMsDelay before the first sample moves.

在文件 UI.cpp 第 1750 行定义.

引用了 eve::ui::UiTweenDriver::animateItemOpacity(), eve::Result< void >::ignore(), opacity , 以及 eve::ui::uiTweenWallClockMs().

◆ animateItemPos()

void eve::ui::UI::animateItemPos ( const std::string &  id,
float  x,
float  y,
float  durationMs,
const std::string &  ease = "smoothstep",
float  delayMs = 0.f 
)

Animate one node's absolute placement offset (marks the node absolute).

参数
idNode id on the selected host.
xTarget posX.
yTarget posY.
durationMsDuration; <=0 jumps immediately (after delay).
easeEase kind (default "smoothstep").
delayMsDelay before the first sample moves.

在文件 UI.cpp 第 1758 行定义.

引用了 eve::ui::UiTweenDriver::animateItemPos(), eve::Result< void >::ignore(), eve::ui::uiTweenWallClockMs(), x , 以及 y.

◆ beginBuild()

void eve::ui::UI::beginBuild ( )

Imperative builder: open a new build pass (see beginWindow etc.).

在文件 UI.cpp 第 736 行定义.

被这些函数引用 beginWindow().

◆ beginCard()

void eve::ui::UI::beginCard ( const std::string &  id = "")

Opens a bordered card surface.

在文件 UI.cpp 第 766 行定义.

引用了 eve::ui::card() , 以及 id.

◆ beginChild()

void eve::ui::UI::beginChild ( const std::string &  id,
float  width = 0.f,
float  height = 120.f 
)

Opens a sized child region.

在文件 UI.cpp 第 762 行定义.

引用了 eve::ui::child(), height , 以及 width.

◆ beginCollapsing()

void eve::ui::UI::beginCollapsing ( const std::string &  label,
const std::string &  id = "",
bool  open = true 
)

Opens a collapsible header.

在文件 UI.cpp 第 758 行定义.

引用了 eve::ui::collapsingHeader(), id , 以及 label.

◆ beginColumn()

void eve::ui::UI::beginColumn ( const std::string &  id = "",
float  gap = -1.f 
)

Opens a column flex container.

在文件 UI.cpp 第 913 行定义.

引用了 beginFlex() , 以及 gap.

◆ beginFlex()

void eve::ui::UI::beginFlex ( const std::string &  direction = "row",
const std::string &  id = "",
float  gap = -1.f 
)

Begin a Flex container.

参数
direction"row" / "column" (case-insensitive; default row)
idstable node id
gapspacing between children; <0 uses theme ItemSpacing

在文件 UI.cpp 第 905 行定义.

引用了 d, direction, eve::ui::flex(), gap, eve::ui::WidgetDesc::gap , 以及 id.

被这些函数引用 beginColumn() , 以及 beginRow().

◆ beginFrameAndRender()

void eve::ui::UI::beginFrameAndRender ( )

Builds and presents the current frame's UI.

在文件 UI.cpp 第 581 行定义.

引用了 initBackend(), isBackendReady(), eve::ui::UISystem::render(), tickTweens() , 以及 eve::ui::uiTweenWallClockMs().

◆ beginGrid()

void eve::ui::UI::beginGrid ( int  columns,
const std::string &  id = "",
float  columnGap = -1.f,
float  rowGap = -1.f 
)

Begins a fixed-column grid container.

在文件 UI.cpp 第 915 行定义.

引用了 eve::ui::WidgetDesc::columnGap, columns, d, eve::ui::grid() , 以及 id.

◆ beginGroup()

void eve::ui::UI::beginGroup ( const std::string &  id = "")

Opens a group container in the current build pass.

在文件 UI.cpp 第 754 行定义.

引用了 group , 以及 id.

◆ beginList()

void eve::ui::UI::beginList ( const std::string &  id)

Opens a list container (rows added with addListItem).

在文件 UI.cpp 第 756 行定义.

引用了 group , 以及 id.

◆ beginMenu()

void eve::ui::UI::beginMenu ( const std::string &  label,
const std::string &  id = "" 
)

Opens a popup menu.

在文件 UI.cpp 第 791 行定义.

引用了 id, label , 以及 eve::ui::menu().

◆ beginMenuBar()

void eve::ui::UI::beginMenuBar ( const std::string &  id = "")

Opens a window menu bar.

在文件 UI.cpp 第 789 行定义.

引用了 id , 以及 eve::ui::menuBar().

◆ beginNinePatch()

bool eve::ui::UI::beginNinePatch ( const std::string &  path,
const std::string &  id = "",
float  width = 0.f,
float  height = 0.f 
)

Opens a stretchable .9.png panel; false means the asset is invalid.

在文件 UI.cpp 第 768 行定义.

引用了 d, height, id, eve::ui::ninePatchPanel(), path, eve::ui::WidgetDesc::sizeX , 以及 width.

◆ beginRow()

void eve::ui::UI::beginRow ( const std::string &  id = "",
float  gap = -1.f 
)

Opens a row flex container.

在文件 UI.cpp 第 911 行定义.

引用了 beginFlex() , 以及 gap.

◆ beginScrollList()

void eve::ui::UI::beginScrollList ( const std::string &  id = "",
float  height = 0.f,
float  itemHeight = 0.f 
)

Begins scroll list.

Virtualized scroll list; rows are the children added before end().

在文件 UI.cpp 第 807 行定义.

引用了 height , 以及 eve::ui::scrollList().

◆ beginSidebar()

void eve::ui::UI::beginSidebar ( const std::string &  id = "",
float  width = 0.f 
)

Opens a vertical editor side panel.

在文件 UI.cpp 第 801 行定义.

引用了 id, eve::ui::sidebar() , 以及 width.

◆ beginSplitPane()

void eve::ui::UI::beginSplitPane ( const std::string &  direction = "row",
float  ratio = 0.25f,
const std::string &  id = "" 
)

Opens a two-child resizable split pane.

在文件 UI.cpp 第 922 行定义.

引用了 d, direction, id, eve::ui::SplitPane , 以及 eve::ui::WidgetDesc::type.

◆ beginStatusBar()

void eve::ui::UI::beginStatusBar ( const std::string &  id = "")

Opens a compact horizontal status strip.

在文件 UI.cpp 第 805 行定义.

引用了 id , 以及 eve::ui::statusBar().

◆ beginToolbar()

void eve::ui::UI::beginToolbar ( const std::string &  id = "")

Opens a horizontal editor command strip.

在文件 UI.cpp 第 795 行定义.

引用了 id , 以及 eve::ui::toolbar().

◆ beginToolbox()

void eve::ui::UI::beginToolbox ( const std::string &  id = "",
float  cellSize = 0.f,
int  columns = 0 
)

Opens a wrapping editor tool grid.

在文件 UI.cpp 第 797 行定义.

引用了 columns, id , 以及 eve::ui::toolbox().

◆ beginWindow()

void eve::ui::UI::beginWindow ( const std::string &  title,
const std::string &  id = "root" 
)

Opens a window for the current build pass.

在文件 UI.cpp 第 749 行定义.

引用了 beginBuild(), id, title , 以及 eve::ui::window().

◆ bindOwner()

void eve::ui::UI::bindOwner ( uint32_t  ownerId)

Binds the selected host to a UI/scene owner id.

在文件 UI.cpp 第 677 行定义.

引用了 host.

◆ cancelAllTweens()

void eve::ui::UI::cancelAllTweens ( )

Cancel every pending tween on the selected host.

在文件 UI.cpp 第 1775 行定义.

引用了 eve::ui::UiTweenDriver::cancelAll().

◆ cancelHostTweens()

void eve::ui::UI::cancelHostTweens ( )

Cancel pending host-level tweens on the selected host.

在文件 UI.cpp 第 1765 行定义.

引用了 eve::ui::UiTweenDriver::cancelHost().

◆ cancelItemTweens()

void eve::ui::UI::cancelItemTweens ( const std::string &  id = "")

Cancel pending item tweens on the selected host.

参数
idNode id; empty cancels every item tween on the host.

在文件 UI.cpp 第 1770 行定义.

引用了 eve::ui::UiTweenDriver::cancelItem().

◆ clearHostWorldAnchor()

void eve::ui::UI::clearHostWorldAnchor ( )

Returns the selected host to ordinary screen-space placement.

在文件 UI.cpp 第 1606 行定义.

引用了 host.

◆ clearStyleClasses()

void eve::ui::UI::clearStyleClasses ( )

Clears all named style classes.

在文件 UI.cpp 第 1790 行定义.

引用了 eve::ui::clearStyleClasses().

◆ componentClearHandlers()

void eve::ui::UI::componentClearHandlers ( uint64_t  owner)

Removes every callback owned by one UIComponent; idempotent on the UI thread.

在文件 UI.cpp 第 651 行定义.

引用了 handler.

◆ componentOnChange()

void eve::ui::UI::componentOnChange ( uint64_t  owner,
const std::string &  id,
ssq::Function  fn 
)

Internal UIComponent value callback registration scoped to one component owner.

在文件 UI.cpp 第 643 行定义.

引用了 fn, host , 以及 kind.

◆ componentOnClick()

void eve::ui::UI::componentOnClick ( uint64_t  owner,
const std::string &  id,
ssq::Function  fn 
)

Internal UIComponent callback registration scoped to one component owner.

在文件 UI.cpp 第 636 行定义.

引用了 fn , 以及 host.

◆ consumeChange()

std::string eve::ui::UI::consumeChange ( )

Returns the id of the changed widget since the last frame (or "").

在文件 UI.cpp 第 1708 行定义.

引用了 eve::ui::UISystem::consumeChange().

◆ consumeClick()

std::string eve::ui::UI::consumeClick ( )

Returns the id of the clicked widget since the last frame (or "").

在文件 UI.cpp 第 1706 行定义.

引用了 eve::ui::UISystem::consumeClick().

◆ consumeDrop()

std::string eve::ui::UI::consumeDrop ( )

Pops one drop and returns its target as "host/node", or an empty string.

在文件 UI.cpp 第 1716 行定义.

引用了 eve::ui::UISystem::consumeDrop() , 以及 eve::ui::OperatingSystemFile.

◆ current()

UIHostHandle eve::ui::UI::current ( ) const
inlinenoexcept

Returns the currently selected host, or null.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI owns the host; callers must not delete it. @lifetime Valid until selection/host removal or UI module teardown. @thread Call on the UI thread. @reentrancy The accessor invokes no callbacks and is invalid across selection mutation.

Returns the generation-qualified selected host handle, or empty.

在文件 UI.h 第 149 行定义.

◆ dbClose()

void eve::ui::UI::dbClose ( )

Closes the database panel.

在文件 UI.cpp 第 2604 行定义.

◆ dbCreateInstance()

uint64_t eve::ui::UI::dbCreateInstance ( )

Creates and registers an instance of the selected class.

返回
Explicit packed process-local ObjectHandle, or 0 on failure.

在文件 UI.cpp 第 2628 行定义.

◆ dbOpen()

bool eve::ui::UI::dbOpen ( )

Opens the database panel (class menu + editable instance grid).

在文件 UI.cpp 第 2598 行定义.

◆ dbRefresh()

bool eve::ui::UI::dbRefresh ( )

Re-scans reflected classes; true when any class exists.

在文件 UI.cpp 第 2608 行定义.

◆ dbRegister()

uint64_t eve::ui::UI::dbRegister ( ssq::Object  object,
const std::string &  label 
)

Registers a live script object in the database grid.

参数
objectLive script instance.
labelOptional display label ("" = auto "Class #n").
返回
Explicit packed process-local ObjectHandle, or 0 on failure.
备注
This integer is a Squirrel compatibility projection. C++ code should use ui::ObjectHandle from ObjectRegistry directly; it is not a persistent ID.

在文件 UI.cpp 第 2620 行定义.

引用了 label.

◆ dbSelectClass()

bool eve::ui::UI::dbSelectClass ( const std::string &  name)

Selects the class shown in the grid.

在文件 UI.cpp 第 2614 行定义.

引用了 name.

◆ dbUnregister()

eve::Result< void > eve::ui::UI::dbUnregister ( uint64_t  id)

Removes an entry from the database grid using its packed handle.

参数
idProcess-local generation-qualified ObjectHandle packed for the Squirrel-facing API.
返回
Applied on success, or a structured failure when the panel is unavailable or the handle is invalid/stale. @thread Call on the UI thread.

在文件 UI.cpp 第 2636 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::RuntimeHandle< UiObjectHandleTag >::fromPacked(), handle, eve::NotFound , 以及 eve::Result< T >::success().

◆ defineStyleClass()

std::string eve::ui::UI::defineStyleClass ( const std::string &  name,
const std::string &  parent = "" 
)

Declares/replaces a named style class and returns a stable status string.

在文件 UI.cpp 第 1746 行定义.

引用了 eve::ui::defineStyleClass(), name, parent , 以及 eve::ui::styleClassStatusName().

◆ dispatchEvents()

void eve::ui::UI::dispatchEvents ( )

Dispatches queued widget callbacks (click/toggle/value/text).

在文件 UI.cpp 第 598 行定义.

引用了 eve::ui::UISystem::dispatchEvents(), events, eve::ui::UISystem::pendingEvents() , 以及 eve::ui::UIHost::resolve().

◆ dragDropSupport()

std::string eve::ui::UI::dragDropSupport ( ) const

Returns "supported" on desktop builds and "unsupported-platform" elsewhere.

在文件 UI.cpp 第 1710 行定义.

引用了 eve::ui::UISystem::dragDropSupport() , 以及 eve::ui::Supported.

◆ editorClose()

void eve::ui::UI::editorClose ( )

Closes the editor shell (and its docked panels).

在文件 UI.cpp 第 2663 行定义.

◆ editorOpen()

bool eve::ui::UI::editorOpen ( )

Opens the menu bar and docks the inspector + database panels.

在文件 UI.cpp 第 2646 行定义.

引用了 nodeId.

◆ editorSelectPanel()

bool eve::ui::UI::editorSelectPanel ( const std::string &  name)

Shows one docked panel ("inspector"/"database"; "" hides all).

在文件 UI.cpp 第 2667 行定义.

引用了 name.

◆ end()

void eve::ui::UI::end ( )

Closes the innermost open container.

在文件 UI.cpp 第 934 行定义.

被这些函数引用 addCombo().

◆ findHost()

UIHostHandle eve::ui::UI::findHost ( const std::string &  name) const

Finds a host by name, or null when absent.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown. @thread Call on the UI thread. @reentrancy The lookup invokes no callbacks and is invalid across host mutation.

在文件 UI.cpp 第 666 行定义.

引用了 eve::ui::UISystem::findHost() , 以及 name.

被这些函数引用 mountAs(), remountBuildAs() , 以及 select().

◆ findHostByOwner()

UIHostHandle eve::ui::UI::findHostByOwner ( uint32_t  ownerId) const

Finds the host bound to an owner id, or null when absent.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown. @thread Call on the UI thread. @reentrancy The lookup invokes no callbacks and is invalid across host mutation.

在文件 UI.cpp 第 668 行定义.

引用了 eve::ui::UISystem::findHostByOwner().

◆ getAccessibilitySnapshot()

std::string eve::ui::UI::getAccessibilitySnapshot ( ) const

JSON accessibility snapshot for semantically named nodes in the selected tree.

在文件 UI.cpp 第 1837 行定义.

引用了 eve::ui::Auto, first, host , 以及 node.

◆ getChecked()

bool eve::ui::UI::getChecked ( const std::string &  id) const

Returns the checked.

在文件 UI.cpp 第 1464 行定义.

引用了 host , 以及 n.

◆ getColorA()

float eve::ui::UI::getColorA ( const std::string &  id) const

Returns the color a.

在文件 UI.cpp 第 1457 行定义.

引用了 host , 以及 n.

◆ getColorB()

float eve::ui::UI::getColorB ( const std::string &  id) const

Returns the color b.

在文件 UI.cpp 第 1450 行定义.

引用了 host , 以及 n.

◆ getColorG()

float eve::ui::UI::getColorG ( const std::string &  id) const

Returns the color g.

在文件 UI.cpp 第 1443 行定义.

引用了 host , 以及 n.

◆ getColorR()

float eve::ui::UI::getColorR ( const std::string &  id) const

ColorPalette / image tint channels; missing nodes return 0.

在文件 UI.cpp 第 1436 行定义.

引用了 host , 以及 n.

◆ getDropOrigin()

std::string eve::ui::UI::getDropOrigin ( ) const

Returns "internal", "os-file", or an empty string.

在文件 UI.cpp 第 1736 行定义.

◆ getDropSource()

std::string eve::ui::UI::getDropSource ( ) const

Returns the source as "host/node", or empty for an OS file.

在文件 UI.cpp 第 1734 行定义.

◆ getDropText()

std::string eve::ui::UI::getDropText ( ) const

Returns the owning payload text of the last successfully consumed drop.

在文件 UI.cpp 第 1732 行定义.

◆ getDropType()

std::string eve::ui::UI::getDropType ( ) const

Returns the payload type of the last successfully consumed drop.

在文件 UI.cpp 第 1730 行定义.

◆ getFocusedId()

std::string eve::ui::UI::getFocusedId ( ) const

Returns the focused control id, or an empty string.

在文件 UI.cpp 第 1558 行定义.

引用了 host.

◆ getHostTweenCount()

std::size_t eve::ui::UI::getHostTweenCount ( ) const

Number of pending host tweens (diagnostics / tests).

在文件 UI.cpp 第 594 行定义.

引用了 eve::ui::UiTweenDriver::hostTweenCount().

◆ getHostWorldScreenX()

float eve::ui::UI::getHostWorldScreenX ( ) const

Returns the selected host's derived screen X coordinate.

返回
Screen X in pixels.

在文件 UI.cpp 第 1656 行定义.

引用了 host.

◆ getHostWorldScreenY()

float eve::ui::UI::getHostWorldScreenY ( ) const

Returns the selected host's derived screen Y coordinate.

返回
Screen Y in pixels.

在文件 UI.cpp 第 1661 行定义.

引用了 host.

◆ getHostWorldState()

std::string eve::ui::UI::getHostWorldState ( ) const

Returns the selected host projection state as a stable lowercase name.

返回
State name.

在文件 UI.cpp 第 1642 行定义.

引用了 eve::ui::BehindCamera, eve::ui::Crowded, eve::ui::Disabled, host, eve::ui::NoCamera, eve::ui::OutsideViewport , 以及 eve::ui::Visible.

◆ getItemTweenCount()

std::size_t eve::ui::UI::getItemTweenCount ( ) const

Number of pending item tweens (diagnostics / tests).

在文件 UI.cpp 第 596 行定义.

引用了 eve::ui::UiTweenDriver::itemTweenCount().

◆ getLayoutDiagnostics()

std::string eve::ui::UI::getLayoutDiagnostics ( ) const

JSON diagnostics for measured size and overflow of the selected retained tree.

在文件 UI.cpp 第 1820 行定义.

引用了 first, host , 以及 node.

◆ getScale()

float eve::ui::UI::getScale ( ) const

Current UI scale factor.

在文件 UI.cpp 第 1808 行定义.

被这些函数引用 setScale().

◆ getStats()

std::string eve::ui::UI::getStats ( ) const

Returns the stats.

"hosts=.. nodes=.. measureMs=.. walkMs=.." from the last render frame.

在文件 UI.cpp 第 1812 行定义.

引用了 s , 以及 eve::ui::UISystem::stats().

◆ getTheme()

std::string eve::ui::UI::getTheme ( ) const

Name of the active theme.

在文件 UI.cpp 第 1744 行定义.

引用了 eve::ui::globalThemeName().

◆ getValue()

float eve::ui::UI::getValue ( const std::string &  id) const

Returns the value.

在文件 UI.cpp 第 1422 行定义.

引用了 host , 以及 n.

◆ getValueText()

std::string eve::ui::UI::getValueText ( const std::string &  id) const

Returns the value text.

在文件 UI.cpp 第 1429 行定义.

引用了 host , 以及 n.

◆ initBackend()

bool eve::ui::UI::initBackend ( )

Creates the platform UI backend (ImGui); true on success.

在文件 UI.cpp 第 552 行定义.

引用了 eve::ui::createImGuiBackend(), ok , 以及 eve::ui::UISystem::setBackend().

被这些函数引用 beginFrameAndRender(), registerTexture() , 以及 setScale().

◆ inspectAddInstance()

bool eve::ui::UI::inspectAddInstance ( )

Creates another instance of the selected inspector class.

在文件 UI.cpp 第 2534 行定义.

◆ inspectClose()

void eve::ui::UI::inspectClose ( )

Closes the inspector panel.

在文件 UI.cpp 第 2447 行定义.

◆ inspectObject()

bool eve::ui::UI::inspectObject ( ssq::Object  object)

Inspects a caller-provided live script instance.

在文件 UI.cpp 第 2464 行定义.

◆ inspectOpen()

bool eve::ui::UI::inspectOpen ( )

Opens the auto-generated inspector (scans reflected classes).

在文件 UI.cpp 第 2440 行定义.

◆ inspectPickScene()

bool eve::ui::UI::inspectPickScene ( )

Calls the pick handler and inspects the returned object.

在文件 UI.cpp 第 2525 行定义.

◆ inspectRefresh()

bool eve::ui::UI::inspectRefresh ( )

Re-scans script classes; true when any class is reflected.

在文件 UI.cpp 第 2451 行定义.

◆ inspectSelectClass()

bool eve::ui::UI::inspectSelectClass ( const std::string &  name)

Selects a class in the inspector (creates its first instance).

在文件 UI.cpp 第 2457 行定义.

引用了 name.

◆ inspectSetPickHandler()

bool eve::ui::UI::inspectSetPickHandler ( ssq::Function  fn)

Registers the script callback used by the inspector Pick button. The callback is stored on the script side (eve._inspectorPickHandler) and must return a live script instance (or null).

在文件 UI.cpp 第 2471 行定义.

引用了 fn, eve::Runtime::handle(), eve::ModuleManager::runtime() , 以及 top.

◆ isBackendReady()

bool eve::ui::UI::isBackendReady ( ) const

True once the backend exists.

在文件 UI.cpp 第 550 行定义.

被这些函数引用 beginFrameAndRender(), registerTexture() , 以及 setScale().

◆ loadTreeJson()

bool eve::ui::UI::loadTreeJson ( const std::string &  json)

Loads tree json.

Replace the selected host's tree from JSON produced by saveTreeJson().

在文件 UI.cpp 第 1875 行定义.

引用了 host , 以及 root.

◆ Module_REG()

eve::ui::UI::Module_REG ( UI  )

◆ mount()

UIHostHandle eve::ui::UI::mount ( WidgetDesc  root)

Mounts the tree as an auto-named host and selects it.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown; retain the generation handle across frames. @thread Call on the UI thread. @reentrancy The operation may rebuild widgets but does not invoke external callbacks before returning.

在文件 UI.cpp 第 712 行定义.

引用了 host, mountAs() , 以及 root.

◆ mountAs()

UIHostHandle eve::ui::UI::mountAs ( const std::string &  name,
WidgetDesc  root 
)

Creates/replaces a named host from a WidgetDesc tree and selects it.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown; retain the generation handle across frames. @thread Call on the UI thread. @reentrancy The operation may rebuild widgets but does not invoke external callbacks before returning.

在文件 UI.cpp 第 697 行定义.

引用了 eve::ui::UIHost::createHost(), findHost(), handle, host, name, eve::ui::UIHost::resolve() , 以及 root.

被这些函数引用 mount(), mountBuildAs(), mountSimple() , 以及 remountAs().

◆ mountBuild()

bool eve::ui::UI::mountBuild ( )

Finishes the build pass and mounts the built tree.

在文件 UI.cpp 第 1286 行定义.

引用了 handle, remount() , 以及 eve::ui::UIHost::resolve().

◆ mountBuildAs()

bool eve::ui::UI::mountBuildAs ( const std::string &  name)

Finishes the build pass and mounts as a named host.

在文件 UI.cpp 第 1295 行定义.

引用了 handle, mountAs(), name , 以及 eve::ui::UIHost::resolve().

◆ mountSimple()

void eve::ui::UI::mountSimple ( const std::string &  title,
const std::string &  labelText,
const std::string &  buttonText 
)

One-shot convenience: a window with a label and a button.

在文件 UI.cpp 第 2433 行定义.

引用了 eve::ui::button(), handle, mountAs(), eve::ui::UIHost::resolve(), text, title , 以及 eve::ui::window().

◆ moveFocus()

bool eve::ui::UI::moveFocus ( const std::string &  direction)

Moves focus by "next", "previous", "left", "right", "up", or "down".

在文件 UI.cpp 第 1551 行定义.

引用了 direction, host , 以及 eve::ui::Next.

◆ onChange()

void eve::ui::UI::onChange ( const std::string &  id,
ssq::Function  fn 
)

On change.

在文件 UI.cpp 第 628 行定义.

引用了 fn, host , 以及 kind.

◆ onClick()

void eve::ui::UI::onClick ( const std::string &  id,
ssq::Function  fn 
)

On click.

Script-side event callbacks (P0-3): register a closure on a node id of the selected host. onClick registers a callback for a node; onChange registers a value callback whose kind is toggle, value or text. Handlers run inside dispatchEvents after C++ callbacks and before poll queues.

在文件 UI.cpp 第 622 行定义.

引用了 fn , 以及 host.

◆ processEvent()

void eve::ui::UI::processEvent ( const SDL_Event *  event)

Feeds an SDL event into the UI backend (before window/game handling).

在文件 UI.cpp 第 574 行定义.

引用了 eve::ui::UISystem::dragDropSupport(), eve::ui::UISystem::enqueuePlatformFileDrop() , 以及 eve::ui::Supported.

◆ propertySchema()

ssq::Object eve::ui::UI::propertySchema ( ssq::Object  instance)

Return the reflection-derived PropertySchema for a live script instance.

The schema is built by ReflectedPropertyModel (attributes → kinds/flags) and projected as a Squirrel table { typeId, version, properties = [ { path, kind, displayName, description, category, readOnly, choices, min, max, step, units, presenterHint }, ... ] }. Scripts use this to inspect or drive custom UI; the authoritative editable view remains ui.inspectObject / PropertyView.

在文件 UI.cpp 第 2566 行定义.

引用了 choices, eve::property_access::hasFlag(), model, properties, eve::property_access::ReadOnly, eve::ModuleManager::runtime() , 以及 vm.

◆ registerTexture()

uint64_t eve::ui::UI::registerTexture ( graphics::Texture *  tex)

Register an engine texture for UI drawing.

参数
texLive engine texture retained by the caller until unregisterTexture().
返回
Opaque backend-neutral id, or zero on failure.

在文件 UI.cpp 第 1411 行定义.

引用了 initBackend() , 以及 isBackendReady().

◆ releaseSquirrelRoots()

void eve::ui::UI::releaseSquirrelRoots ( )
noexcept

Drops database-panel Squirrel roots while the Runtime VM is alive.

备注
Invoked from Runtime shutdown via ISquirrelRootReleaser.

在文件 UI.cpp 第 541 行定义.

引用了 eve::ui::ObjectRegistry::clearAll(), eve::ui::ObjectRegistry::instance() , 以及 eve::ModuleManager::runtime().

被这些函数引用 shutdownBackend().

◆ remount()

UIHostHandle eve::ui::UI::remount ( WidgetDesc  root)

Replaces the selected host's tree.

返回
Borrowed nullable selected host, or null when no host is selected. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown. @thread Call on the UI thread. @reentrancy Tree callbacks are not invoked while the returned pointer is being acquired.

在文件 UI.cpp 第 720 行定义.

引用了 handle, host, eve::ui::UIHost::resolve() , 以及 root.

被这些函数引用 mountBuild().

◆ remountAs()

UIHostHandle eve::ui::UI::remountAs ( const std::string &  name,
WidgetDesc  root 
)

Creates/replaces a named host (does not select it).

返回
Borrowed nullable host owned by the UI ECS world. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown. @thread Call on the UI thread. @reentrancy The operation does not invoke external callbacks before returning.

在文件 UI.cpp 第 732 行定义.

引用了 mountAs(), name , 以及 root.

◆ remountBuildAs()

bool eve::ui::UI::remountBuildAs ( const std::string &  name)

Like mountBuildAs but reconciles by key when possible.

在文件 UI.cpp 第 1304 行定义.

引用了 eve::ui::UIHost::createHost(), findHost(), h, host, name , 以及 eve::ui::UIHost::resolve().

◆ remountReconcile()

UIHostHandle eve::ui::UI::remountReconcile ( WidgetDesc  root)

Remount with key reconcile (props-only when structure matches).

返回
Borrowed nullable selected host, or null when no host is selected. @ownership UI/ECS owns the host; callers must not delete it. @lifetime Valid until host removal or UI module teardown. @thread Call on the UI thread. @reentrancy Reconciliation callbacks are completed before the pointer is returned.

在文件 UI.cpp 第 726 行定义.

引用了 handle, host, eve::ui::UIHost::resolve() , 以及 root.

◆ requestFocus()

bool eve::ui::UI::requestFocus ( const std::string &  id)

Requests keyboard/gamepad focus for a mounted control.

在文件 UI.cpp 第 1546 行定义.

引用了 host.

◆ saveTreeJson()

std::string eve::ui::UI::saveTreeJson ( ) const

Saves tree json.

Serialize the selected host's tree to JSON (UI asset pipeline).

在文件 UI.cpp 第 1861 行定义.

引用了 host, root , 以及 t.

◆ sceneClose()

void eve::ui::UI::sceneClose ( )

Closes the scene panel.

在文件 UI.cpp 第 2680 行定义.

◆ sceneOpen()

bool eve::ui::UI::sceneOpen ( )

Opens the scene panel (tree + selected node properties).

在文件 UI.cpp 第 2671 行定义.

引用了 nodeId.

◆ sceneSelectNode()

bool eve::ui::UI::sceneSelectNode ( const std::string &  id)

Selects a scene node by id.

在文件 UI.cpp 第 2684 行定义.

◆ sceneSetPickHandler()

bool eve::ui::UI::sceneSetPickHandler ( ssq::Function  fn)

Registers the script callback for the scene panel Pick button. The callback (stored as eve._scenePickHandler) receives the node id and typically maps it to a script instance, then calls ui.inspectObject().

在文件 UI.cpp 第 2688 行定义.

引用了 fn, eve::Runtime::handle(), eve::ModuleManager::runtime() , 以及 top.

◆ select()

bool eve::ui::UI::select ( const std::string &  name)

Selects a named host; false when it does not exist.

在文件 UI.cpp 第 670 行定义.

引用了 findHost(), h, name , 以及 eve::ui::UIHost::resolve().

◆ setChecked()

void eve::ui::UI::setChecked ( const std::string &  id,
bool  checked 
)

Sets the checked.

在文件 UI.cpp 第 1350 行定义.

引用了 host.

◆ setColor()

void eve::ui::UI::setColor ( const std::string &  id,
float  r,
float  g,
float  b,
float  a = 1.f 
)

Sets RGBA on a ColorPalette (or image tint) node.

在文件 UI.cpp 第 1362 行定义.

引用了 a, b, g, r , 以及 setImageTint().

◆ setEnabled()

void eve::ui::UI::setEnabled ( const std::string &  id,
bool  enabled 
)

Enables or disables a mounted control.

在文件 UI.cpp 第 1346 行定义.

引用了 enabled , 以及 host.

◆ setFlexAlign()

void eve::ui::UI::setFlexAlign ( const std::string &  align)

Set Flex container align/justify on the current open Flex (no-op otherwise).

Set Flex container align/justify on the current open Flex (no-op otherwise).

在文件 UI.cpp 第 1245 行定义.

引用了 eve::ui::Flex , 以及 parent.

◆ setFlexJustify()

void eve::ui::UI::setFlexJustify ( const std::string &  justify)

Sets Flex container justify on the current open Flex.

在文件 UI.cpp 第 1251 行定义.

引用了 eve::ui::Flex , 以及 parent.

◆ setFlexWrap()

void eve::ui::UI::setFlexWrap ( bool  wrap)

Enables or disables line wrapping on the current Flex.

在文件 UI.cpp 第 1264 行定义.

引用了 eve::ui::Flex, eve::ui::NoWrap, parent , 以及 eve::ui::Wrap.

◆ setHostAnchor()

void eve::ui::UI::setHostAnchor ( float  x,
float  y 
)

Sets the host anchor.

Host anchor in display (0..1); offsets come from setHostPos.

在文件 UI.cpp 第 1666 行定义.

引用了 host, m, x , 以及 y.

◆ setHostLayer()

void eve::ui::UI::setHostLayer ( int  layer)

Sets the host layer.

在文件 UI.cpp 第 1567 行定义.

引用了 host , 以及 layer.

◆ setHostModal()

void eve::ui::UI::setHostModal ( bool  modal)

Marks the host as a modal (blocks other hosts) / overlay.

在文件 UI.cpp 第 1571 行定义.

引用了 host.

◆ setHostMovable()

void eve::ui::UI::setHostMovable ( bool  movable)

Allows or prevents user movement after the initial position.

在文件 UI.cpp 第 1583 行定义.

引用了 host.

◆ setHostOverlay()

void eve::ui::UI::setHostOverlay ( bool  overlay)

Sets the host overlay.

在文件 UI.cpp 第 1575 行定义.

引用了 host.

◆ setHostOverlayAlpha()

void eve::ui::UI::setHostOverlayAlpha ( float  alpha)

Sets overlay opacity (0..1); zero also removes the host border and outer padding.

在文件 UI.cpp 第 1579 行定义.

引用了 host.

◆ setHostPercent()

void eve::ui::UI::setHostPercent ( float  w,
float  h 
)

Sets the host percent.

Host window size as a fraction of the display (0..1).

在文件 UI.cpp 第 1683 行定义.

引用了 h, host, m , 以及 w.

◆ setHostPos()

void eve::ui::UI::setHostPos ( float  x,
float  y,
float  pivotX = 0.f,
float  pivotY = 0.f 
)

Positions the host window with a pivot (0..1 each axis).

在文件 UI.cpp 第 1591 行定义.

引用了 host, m, x , 以及 y.

◆ setHostResizable()

void eve::ui::UI::setHostResizable ( bool  resizable)

Allows or prevents user resizing after the initial size.

在文件 UI.cpp 第 1587 行定义.

引用了 host , 以及 resizable.

◆ setHostSize()

void eve::ui::UI::setHostSize ( float  w,
float  h 
)

Sets the host size.

Explicit host window size (px).

在文件 UI.cpp 第 1674 行定义.

引用了 h, host, m , 以及 w.

◆ setHostVisible()

void eve::ui::UI::setHostVisible ( bool  visible)

Host-level state.

在文件 UI.cpp 第 1563 行定义.

引用了 host , 以及 visible.

◆ setHostWorldAnchor()

void eve::ui::UI::setHostWorldAnchor ( float  x,
float  y,
float  z 
)

Projects the selected host from a 3D world point through the active Camera3D.

参数
xWorld X coordinate.
yWorld Y coordinate.
zWorld Z coordinate.

在文件 UI.cpp 第 1602 行定义.

引用了 host, x, y , 以及 z.

◆ setHostWorldDistanceScale()

void eve::ui::UI::setHostWorldDistanceScale ( bool  enabled,
float  referenceDistance = 10.f,
float  minScale = 0.65f,
float  maxScale = 1.25f 
)

Configures distance scaling.

参数
enabledWhether distance scaling is active.
referenceDistanceDistance producing scale 1; must be positive.
minScaleLower scale bound.
maxScaleUpper scale bound.

在文件 UI.cpp 第 1619 行定义.

引用了 anchor, enabled , 以及 host.

◆ setHostWorldEdgePolicy()

void eve::ui::UI::setHostWorldEdgePolicy ( const std::string &  policy,
float  safeMargin = 8.f 
)

Configures off-screen handling and safe-edge margin.

参数
policyEither "hide" or "clamp".
safeMarginMinimum distance from the viewport edge in pixels.

在文件 UI.cpp 第 1610 行定义.

引用了 anchor, eve::ui::Clamp, eve::ui::Hide , 以及 host.

◆ setHostWorldOverlap()

void eve::ui::UI::setHostWorldOverlap ( bool  enabled,
int  priority = 0,
float  padding = 4.f,
float  maxDisplacement = 96.f 
)

Configures deterministic overlap avoidance for projected hosts.

参数
enabledWhether this host may be displaced to avoid overlap.
priorityHigher values claim space first.
paddingExtra separation around the measured host rectangle.
maxDisplacementMaximum vertical displacement in pixels.

在文件 UI.cpp 第 1630 行定义.

引用了 eve::ui::Allow, anchor, eve::ui::Avoid, enabled, host , 以及 priority.

◆ setImageCornerRadius()

void eve::ui::UI::setImageCornerRadius ( const std::string &  id,
float  radius 
)

Sets the image corner radius.

在文件 UI.cpp 第 1399 行定义.

引用了 host, n , 以及 radius.

◆ setImageNinePatch()

void eve::ui::UI::setImageNinePatch ( const std::string &  id,
float  l,
float  t,
float  r,
float  b 
)

Sets the image nine patch.

在文件 UI.cpp 第 1388 行定义.

引用了 b, host, n, r , 以及 t.

◆ setImageNinePatchFile()

bool eve::ui::UI::setImageNinePatchFile ( const std::string &  id,
const std::string &  path 
)

Applies a .9.png texture and its parsed stretch metadata to an image.

在文件 UI.cpp 第 1471 行定义.

引用了 host, eve::ui::Image, eve::ui::ImageButton, n, eve::ui::NinePatchPanel , 以及 path.

◆ setImageTextureId()

void eve::ui::UI::setImageTextureId ( const std::string &  id,
uint64_t  textureId 
)

Sets the image texture id.

Bind a texture id from registerTexture() to an Image/ImageButton node.

在文件 UI.cpp 第 1405 行定义.

引用了 host , 以及 n.

◆ setImageTint()

void eve::ui::UI::setImageTint ( const std::string &  id,
float  r,
float  g,
float  b,
float  a = 1.f 
)

Sets the image tint.

在文件 UI.cpp 第 1366 行定义.

引用了 a, b, g, host, n , 以及 r.

被这些函数引用 setColor().

◆ setImageUv()

void eve::ui::UI::setImageUv ( const std::string &  id,
float  u0,
float  v0,
float  u1,
float  v1 
)

Sets the image uv.

在文件 UI.cpp 第 1377 行定义.

引用了 host , 以及 n.

◆ setItemAbsolute()

void eve::ui::UI::setItemAbsolute ( float  anchorX,
float  anchorY,
float  x = 0.f,
float  y = 0.f 
)

Sets the item absolute.

Place the most recently added child absolutely inside the current Flex.

在文件 UI.cpp 第 1145 行定义.

引用了 parent, x , 以及 y.

◆ setItemAccessibility()

void eve::ui::UI::setItemAccessibility ( const std::string &  role,
const std::string &  name,
const std::string &  description = "" 
)

Sets the last item's accessibility role, name and description.

在文件 UI.cpp 第 1236 行定义.

引用了 description, name , 以及 parent.

◆ setItemAlignSelf()

void eve::ui::UI::setItemAlignSelf ( const std::string &  align)

Sets its cross-axis alignment: inherit, start, center, end, or stretch.

在文件 UI.cpp 第 1083 行定义.

引用了 parent.

◆ setItemAspectRatio()

void eve::ui::UI::setItemAspectRatio ( float  ratio)

Sets width/height ratio on the most recently added item.

在文件 UI.cpp 第 1089 行定义.

引用了 parent.

◆ setItemDragSource()

void eve::ui::UI::setItemDragSource ( const std::string &  payloadType,
const std::string &  payloadText 
)

Marks the most recently added item as a desktop drag source.

参数
payloadTypeStable application-defined type; "file" is reserved for OS files.
payloadTextOwning UTF-8 payload copied into retained state.

在文件 UI.cpp 第 1161 行定义.

引用了 parent, payloadText , 以及 payloadType.

◆ setItemDropTarget()

void eve::ui::UI::setItemDropTarget ( const std::string &  acceptedType)

Marks the most recently added item as a desktop drop target.

参数
acceptedTypeExact payload type or "*" for any type.

在文件 UI.cpp 第 1170 行定义.

引用了 parent.

◆ setItemEnabled()

void eve::ui::UI::setItemEnabled ( bool  enabled)

Enables or disables the most recently added item.

在文件 UI.cpp 第 1178 行定义.

引用了 enabled , 以及 parent.

◆ setItemFlexBasis()

void eve::ui::UI::setItemFlexBasis ( float  basis)

Sets its main-axis basis; negative restores automatic measurement.

在文件 UI.cpp 第 1078 行定义.

引用了 parent.

◆ setItemFlexGrow()

void eve::ui::UI::setItemFlexGrow ( float  grow)

Set flex item props on the most recently added child of the current open container. No-op if there is no current child.

在文件 UI.cpp 第 1067 行定义.

引用了 parent.

◆ setItemFlexShrink()

void eve::ui::UI::setItemFlexShrink ( float  shrink)

Sets shrink weight on the most recently added flex item.

在文件 UI.cpp 第 1073 行定义.

引用了 parent.

◆ setItemFocusMode()

void eve::ui::UI::setItemFocusMode ( const std::string &  mode)

Sets the last item's focus mode: "none", "click", or "all".

在文件 UI.cpp 第 1188 行定义.

引用了 parent.

◆ setItemFocusNeighbors()

void eve::ui::UI::setItemFocusNeighbors ( const std::string &  left,
const std::string &  right,
const std::string &  up,
const std::string &  down 
)

Sets explicit directional focus neighbors on the last item.

在文件 UI.cpp 第 1226 行定义.

引用了 left, parent, right , 以及 up.

◆ setItemFocusOrder()

void eve::ui::UI::setItemFocusOrder ( const std::string &  previous,
const std::string &  next 
)

Sets explicit previous and next focus neighbors on the last item.

在文件 UI.cpp 第 1219 行定义.

引用了 parent , 以及 previous.

◆ setItemGridColumnSpan()

void eve::ui::UI::setItemGridColumnSpan ( int  span)

Sets the grid-column span of the most recently added item.

在文件 UI.cpp 第 1094 行定义.

引用了 parent.

◆ setItemMargin()

void eve::ui::UI::setItemMargin ( float  l,
float  t,
float  r,
float  b 
)

Sets the item margin.

Layout box model on the most recently added child (no-op if none).

在文件 UI.cpp 第 1106 行定义.

引用了 b, parent, r , 以及 t.

◆ setItemMaxSize()

void eve::ui::UI::setItemMaxSize ( float  w,
float  h 
)

Sets the item max size.

在文件 UI.cpp 第 1131 行定义.

引用了 h, parent , 以及 w.

◆ setItemMinSize()

void eve::ui::UI::setItemMinSize ( float  w,
float  h 
)

Sets the item min size.

在文件 UI.cpp 第 1124 行定义.

引用了 h, parent , 以及 w.

◆ setItemMouseFilter()

void eve::ui::UI::setItemMouseFilter ( const std::string &  filter)

Sets the last item's pointer filter: "stop", "pass", or "ignore".

在文件 UI.cpp 第 1193 行定义.

引用了 filter , 以及 parent.

◆ setItemPadding()

void eve::ui::UI::setItemPadding ( float  l,
float  t,
float  r,
float  b 
)

Sets the item padding.

在文件 UI.cpp 第 1115 行定义.

引用了 b, parent, r , 以及 t.

◆ setItemPercent()

void eve::ui::UI::setItemPercent ( float  w,
float  h 
)

Sets the item percent.

在文件 UI.cpp 第 1138 行定义.

引用了 h, parent , 以及 w.

◆ setItemSelected()

void eve::ui::UI::setItemSelected ( bool  selected)

Marks the most recently added button as the selected tool/action.

参数
selectedSelected state.

在文件 UI.cpp 第 1183 行定义.

引用了 parent.

◆ setItemSize()

void eve::ui::UI::setItemSize ( float  width,
float  height 
)

Sets width/height on the most recently added child.

在文件 UI.cpp 第 1099 行定义.

引用了 height, parent , 以及 width.

◆ setItemStyleClass()

void eve::ui::UI::setItemStyleClass ( const std::string &  name)

Applies a named style class to the most recently added item.

在文件 UI.cpp 第 1207 行定义.

引用了 name , 以及 parent.

◆ setItemTabIndex()

void eve::ui::UI::setItemTabIndex ( int  index)

Sets the last item's sequential focus order; negative excludes it.

在文件 UI.cpp 第 1214 行定义.

引用了 index , 以及 parent.

◆ setItemTheme()

void eve::ui::UI::setItemTheme ( const std::string &  theme)

Overrides the last item's subtree theme: "inherit", "dark", or "light".

在文件 UI.cpp 第 1198 行定义.

引用了 parent , 以及 theme.

◆ setItemTooltip()

void eve::ui::UI::setItemTooltip ( const std::string &  text)

Sets hover help on the most recently added item.

在文件 UI.cpp 第 1155 行定义.

引用了 parent , 以及 text.

◆ setLayoutGaps()

void eve::ui::UI::setLayoutGaps ( float  columnGap,
float  rowGap 
)

Sets independent column and row gaps on the current Flex/Grid.

在文件 UI.cpp 第 1257 行定义.

引用了 eve::ui::Flex, eve::ui::Grid , 以及 parent.

◆ setLayoutOverflow()

void eve::ui::UI::setLayoutOverflow ( const std::string &  overflow)

Sets overflow behavior: visible, clip, or scroll.

在文件 UI.cpp 第 1270 行定义.

引用了 eve::ui::Flex, eve::ui::Grid , 以及 parent.

◆ setListItems()

bool eve::ui::UI::setListItems ( const std::string &  listId,
const std::vector< std::string > &  items 
)

Replace children of a Group listId with buttons for each label (reconcile). Host must already exist and contain a group with that id.

在文件 UI.cpp 第 1317 行定义.

引用了 eve::ui::Group, host, eve::ui::listButtons() , 以及 eve::ui::window().

◆ setNavGamepad()

void eve::ui::UI::setNavGamepad ( bool  enabled)

Sets the nav gamepad.

在文件 UI.cpp 第 1796 行定义.

引用了 enabled, eve::ui::globalTheme() , 以及 eve::ui::Theme::navEnableGamepad.

◆ setNavKeyboard()

void eve::ui::UI::setNavKeyboard ( bool  enabled)

Enables/disables keyboard navigation support.

在文件 UI.cpp 第 1792 行定义.

引用了 enabled, eve::ui::globalTheme() , 以及 eve::ui::Theme::navEnableKeyboard.

◆ setScale()

void eve::ui::UI::setScale ( float  scale)

Global UI scale factor (default 1).

在文件 UI.cpp 第 1800 行定义.

引用了 getScale(), initBackend(), isBackendReady(), scale , 以及 eve::ui::setThemeUiScale().

◆ setStyleClassColor()

std::string eve::ui::UI::setStyleClassColor ( const std::string &  name,
const std::string &  property,
float  r,
float  g,
float  b,
float  a = 1.f 
)

Sets a named class color token and returns a stable status string.

在文件 UI.cpp 第 1780 行定义.

引用了 a, b, g, name, r, eve::ui::setStyleClassColor() , 以及 eve::ui::styleClassStatusName().

◆ setStyleClassMetric()

std::string eve::ui::UI::setStyleClassMetric ( const std::string &  name,
const std::string &  property,
float  x,
float  y = 0.f 
)

Sets a named class metric token and returns a stable status string.

在文件 UI.cpp 第 1785 行定义.

引用了 name, eve::ui::setStyleClassMetric(), eve::ui::styleClassStatusName(), x , 以及 y.

◆ setStyleScope()

void eve::ui::UI::setStyleScope ( const std::string &  name)

Applies a named style class to the current open container.

在文件 UI.cpp 第 1212 行定义.

引用了 name , 以及 eve::ui::WidgetDesc::styleClass.

◆ setText()

void eve::ui::UI::setText ( const std::string &  id,
const std::string &  text 
)

Widget state setters/getters on the current host (by node id).

在文件 UI.cpp 第 1332 行定义.

引用了 host , 以及 text.

◆ setTextWrap()

void eve::ui::UI::setTextWrap ( const std::string &  id,
float  width 
)

Sets the text wrap.

在文件 UI.cpp 第 1336 行定义.

引用了 host, n , 以及 width.

◆ setTheme()

bool eve::ui::UI::setTheme ( const std::string &  name)

Named preset: "dark" / "light" (case-insensitive). Returns false if unknown.

在文件 UI.cpp 第 1742 行定义.

引用了 name , 以及 eve::ui::setThemeByName().

◆ setThemeDark()

void eve::ui::UI::setThemeDark ( )

Applies the dark/light built-in theme.

在文件 UI.cpp 第 1738 行定义.

引用了 eve::ui::setThemeByName().

◆ setThemeLight()

void eve::ui::UI::setThemeLight ( )

Sets the theme light.

在文件 UI.cpp 第 1740 行定义.

引用了 eve::ui::setThemeByName().

◆ setThemeScope()

void eve::ui::UI::setThemeScope ( const std::string &  theme)

Overrides the current open container's inherited subtree theme.

在文件 UI.cpp 第 1203 行定义.

引用了 theme , 以及 eve::ui::WidgetDesc::themePreset.

◆ setValue()

void eve::ui::UI::setValue ( const std::string &  id,
float  value 
)

Sets the value.

在文件 UI.cpp 第 1354 行定义.

引用了 host , 以及 value.

◆ setValueText()

void eve::ui::UI::setValueText ( const std::string &  id,
const std::string &  value 
)

Sets the value text.

在文件 UI.cpp 第 1358 行定义.

引用了 host , 以及 value.

◆ setVisible()

void eve::ui::UI::setVisible ( const std::string &  id,
bool  visible 
)

Sets the visible.

在文件 UI.cpp 第 1342 行定义.

引用了 host , 以及 visible.

◆ shutdownBackend()

void eve::ui::UI::shutdownBackend ( )

Destroys the platform UI backend.

在文件 UI.cpp 第 567 行定义.

引用了 eve::ui::UISystem::clearBackend() , 以及 releaseSquirrelRoots().

被这些函数引用 ~UI().

◆ tickTweens()

void eve::ui::UI::tickTweens ( double  nowMs)

Advance pending UI tweens using an explicit clock (ms).

参数
nowMsMonotonic presentation clock in milliseconds.
注解
beginFrameAndRender() calls this with the wall clock; tests inject time here.

在文件 UI.cpp 第 592 行定义.

引用了 eve::ui::UiTweenDriver::tick().

被这些函数引用 beginFrameAndRender().

◆ unregisterTexture()

void eve::ui::UI::unregisterTexture ( uint64_t  textureId)

Release a texture id previously returned by registerTexture().

参数
textureIdOpaque backend-neutral texture id; zero is ignored.

在文件 UI.cpp 第 1418 行定义.

◆ viewportActive()

bool eve::ui::UI::viewportActive ( const std::string &  id)

Viewport active.

在文件 UI.cpp 第 2041 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportCanvas()

graphics::Canvas * eve::ui::UI::viewportCanvas ( const std::string &  id)

Returns the offscreen render target of a selected-host Viewport widget.

返回
Borrowed nullable Canvas owned by Graphics; null precedes layout or when the id is absent. @ownership Graphics owns the canvas; UI only registers and presents it. @lifetime Valid until viewport recreation, graphics reset, or the next mutation that replaces the target; copy no pointer across frames. @thread Call on the render/UI thread. @reentrancy The query invokes no callbacks; do not destroy or replace the target re-entrantly.

在文件 UI.cpp 第 2024 行定义.

引用了 eve::ui::UISystem::ensureViewport(), host, id, key, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportDragDX()

float eve::ui::UI::viewportDragDX ( const std::string &  id)

Viewport drag dx.

在文件 UI.cpp 第 2062 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportDragDY()

float eve::ui::UI::viewportDragDY ( const std::string &  id)

Viewport drag dy.

在文件 UI.cpp 第 2069 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportHovered()

bool eve::ui::UI::viewportHovered ( const std::string &  id)

Viewport hovered.

在文件 UI.cpp 第 2034 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportMouseX()

float eve::ui::UI::viewportMouseX ( const std::string &  id)

Viewport mouse x.

在文件 UI.cpp 第 2048 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportMouseY()

float eve::ui::UI::viewportMouseY ( const std::string &  id)

Viewport mouse y.

在文件 UI.cpp 第 2055 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ viewportWheel()

float eve::ui::UI::viewportWheel ( const std::string &  id)

Viewport wheel.

在文件 UI.cpp 第 2076 行定义.

引用了 host, state , 以及 eve::ui::UISystem::viewportState().

◆ wantCaptureKeyboard()

bool eve::ui::UI::wantCaptureKeyboard ( ) const

True when the UI wants to capture keyboard input this frame.

在文件 UI.cpp 第 662 行定义.

◆ wantCaptureMouse()

bool eve::ui::UI::wantCaptureMouse ( ) const

True when the UI wants to capture mouse input this frame.

在文件 UI.cpp 第 658 行定义.


该类的文档由以下文件生成: