载入中...
搜索中...
未找到
UI.cpp
浏览该文件的文档.
72 std::isfinite(node.fillInnerRadius) && node.fillInnerRadius >= 0.f && node.fillInnerRadius <= 1.f &&
80 if (SQ_FAILED(sq_getinstanceup(vm, 1, reinterpret_cast<SQUserPointer *>(&self), nullptr)) || !self) return nullptr;
101 if (n < 4 || n > 6) return sq_throwerror(vm, "UI.animateHostPos expects (x, y, durationMs [, ease [, delayMs]])");
108 self->animateHostPos(float(x), float(y), float(durationMs), optionalEase(vm, 5, n), optionalDelay(vm, 6, n));
115 if (n < 4 || n > 6) return sq_throwerror(vm, "UI.animateHostSize expects (w, h, durationMs [, ease [, delayMs]])");
122 self->animateHostSize(float(w), float(h), float(durationMs), optionalEase(vm, 5, n), optionalDelay(vm, 6, n));
130 return sq_throwerror(vm, "UI.animateHostOverlayAlpha expects (alpha, durationMs [, ease [, delayMs]])");
136 self->animateHostOverlayAlpha(float(alpha), float(durationMs), optionalEase(vm, 4, n), optionalDelay(vm, 5, n));
144 return sq_throwerror(vm, "UI.animateItemOpacity expects (id, opacity, durationMs [, ease [, delayMs]])");
151 return sq_throwerror(vm, "UI.animateItemOpacity expects (string id, float opacity, float durationMs)");
152 self->animateItemOpacity(id ? id : "", float(opacity), float(durationMs), optionalEase(vm, 5, n),
161 return sq_throwerror(vm, "UI.animateItemValue expects (id, value, durationMs [, ease [, delayMs]])");
168 return sq_throwerror(vm, "UI.animateItemValue expects (string id, float value, float durationMs)");
169 if (!std::isfinite(float(value)) || !std::isfinite(float(durationMs)) || !std::isfinite(optionalDelay(vm, 6, n)))
180 return sq_throwerror(vm, "UI.animateItemPos expects (id, x, y, durationMs [, ease [, delayMs]])");
185 if (SQ_FAILED(sq_getstring(vm, 2, &id)) || SQ_FAILED(sq_getfloat(vm, 3, &x)) || SQ_FAILED(sq_getfloat(vm, 4, &y)) ||
188 self->animateItemPos(id ? id : "", float(x), float(y), float(durationMs), optionalEase(vm, 6, n),
204 if (SQ_FAILED(sq_getstring(vm, 2, &id))) return sq_throwerror(vm, "UI.cancelItemTweens id must be a string");
209void addOptionalTweenFunc(ssq::Class &cls, const char *name, SQFUNCTION func, SQInteger minParams,
426UIHostHandle UI::findHostByOwner(uint32_t ownerId) const { return UISystem::findHostByOwner(ownerId); }
490UIHostHandle UI::remountAs(const std::string &name, WidgetDesc root) { return mountAs(name, std::move(root)); }
492eve::OptionalRef<UIHost> UI::resolveSelected() const noexcept { return UIHost::resolve(selected_); }
578void UI::beginPanelFrame(const std::string &title, const std::string &id) { pushOpen(panelFrame(title, {}, id)); }
580void UI::beginDockArea(const std::string ®ion, const std::string &id) { pushOpen(dockArea(region, {}, id)); }
594void UI::addTab(const std::string &label, const std::string &pageId, bool selected, const std::string &id) {
631 if (j == "spacearound" || j == "space-around" || j == "around") return FlexJustify::SpaceAround;
758void UI::addIconButton(const std::string &name, const std::string &label, const std::string &id) {
764void UI::addSameLine(const std::string &id) { currentParent().children.push_back(sameLine(id)); }
796void UI::addSkillSlot(const std::string &id, float size, uint64_t iconTexture, float cooldown, const std::string &key) {
816 if (currentParent().children.empty()) throw std::logic_error("UI fill options require a built item");
823 if (!std::isfinite(startDegrees) || !std::isfinite(innerRadius) || innerRadius < 0.f || innerRadius > 1.f)
824 throw std::invalid_argument("UI radial fill requires finite degrees and inner radius in [0,1]");
825 if (currentParent().children.empty()) throw std::logic_error("UI fill options require a built item");
887void UI::addInputText(const std::string &label, const std::string &value, const std::string &id) {
1174 window(host->get().getName().empty() ? "List" : host->get().getName(), {std::move(listNode)}, "root"));
1575void UI::animateHostPos(float x, float y, float durationMs, const std::string &ease, float delayMs) {
1580void UI::animateHostSize(float w, float h, float durationMs, const std::string &ease, float delayMs) {
1585void UI::animateHostOverlayAlpha(float alpha, float durationMs, const std::string &ease, float delayMs) {
1587 tweens_.animateHostOverlayAlpha(selected_, alpha, durationMs, ease, delayMs, uiTweenWallClockMs());
1634void UI::animateItemOpacity(const std::string &id, float opacity, float durationMs, const std::string &ease,
1638 tweens_.animateItemOpacity(selected_, id, opacity, durationMs, ease, delayMs, uiTweenWallClockMs())
1642void UI::animateItemValue(const std::string &id, float value, float durationMs, const std::string &ease,
1648 tweens_.animateItemValue(selected_, id, value, durationMs, ease, delayMs, uiTweenWallClockMs())
1652void UI::animateItemPos(const std::string &id, float x, float y, float durationMs, const std::string &ease,
1674std::string UI::setStyleClassColor(const std::string &name, const std::string &property, float r,
1679std::string UI::setStyleClassMetric(const std::string &name, const std::string &property, float x,
1843 node.set("type", typeIndex >= 0 && typeIndex < int(std::size(types)) ? types[typeIndex] : "text");
1883 n.focusMode == FocusMode::None ? "none" : (n.focusMode == FocusMode::Click ? "click" : "all"));
2034 filter == "ignore" ? MouseFilter::Ignore : (filter == "pass" ? MouseFilter::Pass : MouseFilter::Stop);
2036 node.focusMode = focus == "none" ? FocusMode::None : (focus == "click" ? FocusMode::Click : FocusMode::All);
2037 node.flexDirection = value.getString("flexDirection") == "column" ? FlexDirection::Column : FlexDirection::Row;
2073 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().canvas;
2082 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().hovered;
2089 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().active;
2096 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().mouseX;
2103 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().mouseY;
2110 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().dragDX;
2117 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().dragDY;
2124 if (auto state = UISystem::viewportState(host->get().getName(), id)) return state->get().wheel;
2208 if (s == "colorPalette" || s == "color-palette" || s == "color") return NodeType::ColorPalette;
2696 entry.set("readOnly", property_access::hasFlag(property.flags, property_access::PropertyFlag::ReadOnly));
2752 eve::Diagnostic::error(eve::DiagnosticCode::NotFound, "database panel is not open", {}, {}, "ui"));
3030 addOptionalTweenFunc(cls, "animateHostOverlayAlpha", sqAnimateHostOverlayAlpha, 3, _SC("xffsf"));
让脚本成为 IPhotoModeApplySink 的提供方(决定③的第一个落地插座)。
The single Squirrel projection for common Result, Status and Value.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
Owning, renderer-independent dynamic values.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Runtime * runtime()
Active runtime associated with the last expose() call, or nullptr. @ownership Borrowed; the embedding...
Definition ModuleRegistry.cpp:179
eve::Result< ResourcePin > pin(Resource *resource)
Keeps one cached resource alive across unload()/clear()/reload.
Definition Resource.cpp:311
void ignore(std::string_view reason={}) const noexcept
Explicitly discard this result after documenting the reason.
Definition Result.h:571
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static constexpr RuntimeHandle fromPacked(std::uint64_t value) noexcept
Reconstructs a handle from an explicit packed boundary value.
Definition RuntimeHandle.h:190
HSQUIRRELVM handle() const noexcept
Raw Squirrel VM handle; nullptr after shutdown.
Definition Runtime.cpp:522
void set(const std::string &key, Value value)
Insert or replace an object member.
Definition Value.cpp:238
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:15
static Document parse(const std::string &text, std::string *error=nullptr)
Parse.
Definition Json.cpp:623
Adapts one live Squirrel instance to the renderer-independent property model.
Definition ReflectedPropertyModel.h:25
Releases C++-owned Squirrel roots before Runtime destroys its VM.
Definition SquirrelOwnership.h:108
virtual void releaseSquirrelRoots() noexcept=0
Drops every C++-owned Squirrel root this listener still holds.
RAII keep-alive for one RuntimeObjectRegistry entry.
Definition RuntimeRegistry.h:209
T * get() const noexcept
Borrows the pinned object; valid until the pin is released.
Definition RuntimeRegistry.h:250
static ObjectRegistry & instance()
Returns the process-local singleton owned by the UI module.
Definition ObjectRegistry.cpp:45
static UIHostHandle createHost(const std::string &name="")
Creates an ECS-owned UI host.
Definition UIHost.cpp:49
static eve::OptionalRef< UIHost > resolve(UIHostHandle handle) noexcept
Resolves a UI host handle with ECS generation checking.
Definition UIHost.cpp:62
static void setBackend(UIBackend &backend)
Sets the borrowed backend used for the current UI/render lifetime.
Definition UISystem.cpp:1944
static void clearBackend() noexcept
Clears the backend association before the backend is shut down.
Definition UISystem.cpp:1945
static eve::OptionalRef< ViewportState > viewportState(const std::string &hostName, const std::string &nodeId)
Returns viewport state for a host/node key when it exists.
Definition UISystem.cpp:1985
static void enqueuePlatformFileDrop(const std::string &path)
Copies an OS file-drop path into UI-owned pending state.
Definition UISystem.cpp:1932
static std::string consumeChange()
Pop next change as "name/node"; empty if none.
Definition UISystem.cpp:2216
static UIHostHandle findHost(const std::string &name)
Lookup by Meta.name across the UIHost View.
Definition UISystem.cpp:1992
static eve::ResultRef< ViewportState > ensureViewport(const std::string &key, int w, int h)
Creates or refreshes offscreen state for a viewport key.
Definition UISystem.cpp:1952
static DragDropSupport dragDropSupport() noexcept
Returns retained drag-and-drop availability for this build target.
Definition UISystem.cpp:1923
static std::string consumeClick()
Pop next click as "name/node"; empty if none.
Definition UISystem.cpp:2198
static UIHostHandle findHostByOwner(uint32_t ownerId)
Find the first host with Meta.ownerId equal to ownerId, or null.
Definition UISystem.cpp:2004
static std::optional< UIDrop > consumeDrop()
Pops the oldest completed drop, or returns empty when none exists.
Definition UISystem.cpp:1937
bool inspectSelectClass(const std::string &name)
Selects a class in the inspector (creates its first instance).
Definition UI.cpp:2567
void addCombo(const std::string &label, const std::string &options, int selected, const std::string &id="")
Adds combo.
Definition UI.cpp:859
void setHostWorldAnchor(float x, float y, float z)
Projects the selected host from a 3D world point through the active Camera3D.
Definition UI.cpp:1486
void addSectionHeader(const std::string &label, const std::string &id="")
Adds a non-collapsible section heading.
Definition UI.cpp:904
void setItemTheme(const std::string &theme)
Overrides the last item's subtree theme: "inherit", "dark", or "light".
Definition UI.cpp:1048
void setItemDragSource(const std::string &payloadType, const std::string &payloadText)
Marks the most recently added item as a desktop drag source.
Definition UI.cpp:1011
bool setImageNinePatchFile(const std::string &id, const std::string &path)
Applies a .9.png texture and its parsed stretch metadata to an image.
Definition UI.cpp:1321
bool wantCaptureKeyboard() const
True when the UI wants to capture keyboard input this frame.
Definition UI.cpp:420
uint64_t registerTexture(graphics::Texture *tex)
Register an engine texture for UI drawing.
Definition UI.cpp:1261
std::string consumeClick()
Returns the id of the clicked widget since the last frame (or "").
Definition UI.cpp:1590
void setItemFlexShrink(float shrink)
Sets shrink weight on the most recently added flex item.
Definition UI.cpp:923
UIHostHandle mount(WidgetDesc root)
Mounts the tree as an auto-named host and selects it.
Definition UI.cpp:470
void addLink(const std::string &label, const std::string &target, const std::string &id)
Add clickable text; target is metadata and activation emits a click event.
Definition UI.cpp:873
void setThemeScope(const std::string &theme)
Overrides the current open container's inherited subtree theme.
Definition UI.cpp:1053
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.
Definition UI.cpp:1212
void animateHostOverlayAlpha(float alpha, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
Animate the selected host's overlay background alpha.
Definition UI.cpp:1585
void setImageTextureId(const std::string &id, uint64_t textureId)
Sets the image texture id.
Definition UI.cpp:1255
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).
Definition UI.cpp:1475
bool editorSelectPanel(const std::string &name)
Shows one docked panel ("inspector"/"database"; "" hides all).
Definition UI.cpp:2780
bool inspectPickScene()
Calls the pick handler and inspects the returned object.
Definition UI.cpp:2638
std::size_t getItemTweenCount() const
Number of pending item tweens (diagnostics / tests).
Definition UI.cpp:354
void dispatchEvents()
Dispatches queued widget callbacks (click/toggle/value/text).
Definition UI.cpp:356
void setItemFocusMode(const std::string &mode)
Sets the last item's focus mode: "none", "click", or "all".
Definition UI.cpp:1038
void bindOwner(uint32_t ownerId)
Binds the selected host to a UI/scene owner id.
Definition UI.cpp:435
void addText(const std::string &content, const std::string &id="")
Adds a text label to the current container.
Definition UI.cpp:738
void setImageCornerRadius(const std::string &id, float radius)
Sets the image corner radius.
Definition UI.cpp:1249
std::string getHostWorldState() const
Returns the selected host projection state as a stable lowercase name.
Definition UI.cpp:1526
void processEvent(const SDL_Event *event)
Feeds an SDL event into the UI backend (before window/game handling).
Definition UI.cpp:332
bool inspectOpen()
Opens the auto-generated inspector (scans reflected classes).
Definition UI.cpp:2550
std::string getDropSource() const
Returns the source as "host/node", or empty for an OS file.
Definition UI.cpp:1618
void clearHostHudCanvas()
Returns this host to existing pixel layout. @thread UI thread; no callbacks.
Definition UI.cpp:1446
void componentOnClick(uint64_t owner, const std::string &id, ssq::Function fn)
Internal UIComponent callback registration scoped to one component owner.
Definition UI.cpp:394
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).
Definition UI.cpp:1580
void setItemFlexBasis(float basis)
Sets its main-axis basis; negative restores automatic measurement.
Definition UI.cpp:928
bool sceneSetPickHandler(ssq::Function fn)
Registers the script callback for the scene panel Pick button. The callback (stored as eve....
Definition UI.cpp:2801
void addSpacer(const std::string &id="", float grow=1.f)
Flexible empty space inside Flex (default grow=1).
Definition UI.cpp:913
void addImage(const std::string &id="", float width=0.f, float height=0.f)
Adds image.
Definition UI.cpp:832
void setNavKeyboard(bool enabled)
Enables/disables keyboard navigation support.
Definition UI.cpp:1686
void unregisterTexture(uint64_t textureId)
Release a texture id previously returned by registerTexture().
Definition UI.cpp:1268
float getColorR(const std::string &id) const
ColorPalette / image tint channels; missing nodes return 0.
Definition UI.cpp:1286
void setHostWorldOverlap(bool enabled, int priority=0, float padding=4.f, float maxDisplacement=96.f)
Configures deterministic overlap avoidance for projected hosts.
Definition UI.cpp:1514
UIHostHandle findHostByOwner(uint32_t ownerId) const
Finds the host bound to an owner id, or null when absent.
Definition UI.cpp:426
void addIcon(const std::string &name, const std::string &id="")
Adds a semantic icon by name (for example "search" or "save").
Definition UI.cpp:752
void setLayoutOverflow(const std::string &overflow)
Sets overflow behavior: visible, clip, or scroll.
Definition UI.cpp:1120
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 a...
Definition UI.cpp:1167
UIHostHandle remountReconcile(WidgetDesc root)
Remount with key reconcile (props-only when structure matches).
Definition UI.cpp:484
void setHostSafeArea(float left, float top, float right, float bottom)
Sets nonnegative safe margins in display logical pixels. @thread UI thread; no callbacks.
Definition UI.cpp:1450
void setItemAspectRatio(float ratio)
Sets width/height ratio on the most recently added item.
Definition UI.cpp:939
void setItemFlexGrow(float grow)
Set flex item props on the most recently added child of the current open container....
Definition UI.cpp:917
void beginWindow(const std::string &title, const std::string &id="root")
Opens a window for the current build pass.
Definition UI.cpp:507
void setItemAccessibility(const std::string &role, const std::string &name, const std::string &description="")
Sets the last item's accessibility role, name and description.
Definition UI.cpp:1086
void setItemHelp(const std::string &help, const std::string &disabledReason)
Set the last control's help and disabled explanation.
Definition UI.cpp:882
bool remountBuildAs(const std::string &name)
Like mountBuildAs but reconciles by key when possible.
Definition UI.cpp:1154
eve::Result< void > dbUnregister(uint64_t id)
Removes an entry from the database grid using its packed handle.
Definition UI.cpp:2749
void beginFlex(const std::string &direction="row", const std::string &id="", float gap=-1.f)
Begin a Flex container.
Definition UI.cpp:697
void addInputText(const std::string &label, const std::string &value, const std::string &id="")
Adds an editable text field.
Definition UI.cpp:887
void setHostMovable(bool movable)
Allows or prevents user movement after the initial position.
Definition UI.cpp:1467
void tickTweens(double nowMs)
Advance pending UI tweens using an explicit clock (ms).
Definition UI.cpp:350
void addRadialFill(const std::string &id, float width, float height, float fraction)
Adds a solid radial sector/ring overlay. @thread UI thread; no callbacks.
Definition UI.cpp:800
void setItemSelected(bool selected)
Marks the most recently added button as the selected tool/action.
Definition UI.cpp:1033
bool editorOpen()
Opens the menu bar and docks the inspector + database panels.
Definition UI.cpp:2759
void addViewport(const std::string &id, float width=0.f, float height=0.f)
Adds viewport.
Definition UI.cpp:855
void addImageButton(const std::string &id, float width, float height)
Adds image button.
Definition UI.cpp:851
void addSkillSlot(const std::string &id, float size, uint64_t iconTexture, float cooldown, const std::string &key)
Adds a composed skill slot; click ID ends in /activate. @thread UI thread; caller owns icon registrat...
Definition UI.cpp:796
UIHostHandle findHost(const std::string &name) const
Finds a host by name, or null when absent.
Definition UI.cpp:424
void addSearchField(const std::string &hint, const std::string &value="", const std::string &id="")
Adds a compact search field.
Definition UI.cpp:891
void beginToolbox(const std::string &id="", float cellSize=0.f, int columns=0)
Opens a wrapping editor tool grid.
Definition UI.cpp:555
void beginGroup(const std::string &id="")
Opens a group container in the current build pass.
Definition UI.cpp:512
void cancelItemTweens(const std::string &id="")
Cancel pending item tweens on the selected host.
Definition UI.cpp:1664
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.
Definition UI.cpp:1674
void beginCollapsing(const std::string &label, const std::string &id="", bool open=true)
Opens a collapsible header.
Definition UI.cpp:516
bool setTheme(const std::string &name)
Named preset: "dark" / "light" (case-insensitive). Returns false if unknown.
Definition UI.cpp:1626
void setHostResizable(bool resizable)
Allows or prevents user resizing after the initial size.
Definition UI.cpp:1471
void beginTabContainer(const std::string &activePageId, const std::string &id="")
Opens a tabbed page stack; activePageId selects the visible page. Add pages with beginPanelFrame / be...
Definition UI.cpp:567
void setItemAbsolute(float anchorX, float anchorY, float x=0.f, float y=0.f)
Sets the item absolute.
Definition UI.cpp:995
UIHostHandle mountAs(const std::string &name, WidgetDesc root)
Creates/replaces a named host from a WidgetDesc tree and selects it.
Definition UI.cpp:455
void beginGrid(int columns, const std::string &id="", float columnGap=-1.f, float rowGap=-1.f)
Begins a fixed-column grid container.
Definition UI.cpp:707
bool select(const std::string &name)
Selects a named host; false when it does not exist.
Definition UI.cpp:428
void addIconButton(const std::string &name, const std::string &label="", const std::string &id="")
Adds a semantic icon button with an optional visible label.
Definition UI.cpp:758
std::string getAccessibilitySnapshot() const
JSON accessibility snapshot for semantically named nodes in the selected tree.
Definition UI.cpp:1731
std::string getDropType() const
Returns the payload type of the last successfully consumed drop.
Definition UI.cpp:1614
UIHostHandle remountAs(const std::string &name, WidgetDesc root)
Creates/replaces a named host (does not select it).
Definition UI.cpp:490
void animateItemValue(const std::string &id, float value, float durationMs, const std::string &ease="smoothstep", float delayMs=0.f)
Animate a normalized HUD fill on the selected host without rebuilding the tree.
Definition UI.cpp:1642
void setItemFillDirection(const std::string &direction, bool stretch)
Configures the last built fill: right/left/down/up; stretch retains complete UVs. @thread UI thread.
Definition UI.cpp:804
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.
Definition UI.cpp:1076
void beginColumn(const std::string &id="", float gap=-1.f)
Opens a column flex container.
Definition UI.cpp:705
void setItemSize(float width, float height)
Sets width/height on the most recently added child.
Definition UI.cpp:949
void setHostModal(bool modal)
Marks the host as a modal (blocks other hosts) / overlay.
Definition UI.cpp:1421
void addResourceBar(const std::string &id, float width, float height, float fraction)
Adds a composed resource bar with /value, /trail and /label child IDs. @thread UI thread.
Definition UI.cpp:792
void addCheckbox(const std::string &label, bool checked, const std::string &id="")
Adds a checkbox.
Definition UI.cpp:770
void beginAppFrame(const std::string &id="")
Opens a fixed editor frame body that hosts toolbar/dock/status children.
Definition UI.cpp:582
bool inspectRefresh()
Re-scans script classes; true when any class is reflected.
Definition UI.cpp:2561
bool dbSelectClass(const std::string &name)
Selects the class shown in the grid.
Definition UI.cpp:2727
void addTab(const std::string &label, const std::string &pageId, bool selected=false, const std::string &id="")
Adds a selectable tab label; pageId identifies the page to activate.
Definition UI.cpp:594
void beginBuild()
Imperative builder: open a new build pass (see beginWindow etc.).
Definition UI.cpp:494
void addSlider(const std::string &label, float value, float minV, float maxV, const std::string &id="")
Adds a slider.
Definition UI.cpp:774
void setFlexAlign(const std::string &align)
Set Flex container align/justify on the current open Flex (no-op otherwise).
Definition UI.cpp:1095
bool moveFocus(const std::string &direction)
Moves focus by "next", "previous", "left", "right", "up", or "down".
Definition UI.cpp:1401
void setItemTextInput(bool multiline, bool readOnly, const std::string &placeholder)
Configure the last control's plain-text editor options.
Definition UI.cpp:877
void addProgress(float fraction, const std::string &id="", const std::string &overlay="")
Adds a progress bar.
Definition UI.cpp:784
void addSwitch(const std::string &label, bool checked, const std::string &id="")
Adds a modern boolean switch.
Definition UI.cpp:896
uint64_t dbRegister(ssq::Object object, const std::string &label)
Registers a live script object in the database grid.
Definition UI.cpp:2733
std::string defineStyleClass(const std::string &name, const std::string &parent="")
Declares/replaces a named style class and returns a stable status string.
Definition UI.cpp:1630
void setHostWorldDistanceScale(bool enabled, float referenceDistance=10.f, float minScale=0.65f, float maxScale=1.25f)
Configures distance scaling.
Definition UI.cpp:1503
std::string dragDropSupport() const
Returns "supported" on desktop builds and "unsupported-platform" elsewhere.
Definition UI.cpp:1594
void setStyleScope(const std::string &name)
Applies a named style class to the current open container.
Definition UI.cpp:1062
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).
Definition UI.cpp:1652
std::string getFocusedId() const
Returns the focused control id, or an empty string.
Definition UI.cpp:1408
void setItemGridColumnSpan(int span)
Sets the grid-column span of the most recently added item.
Definition UI.cpp:944
void beginStatusBar(const std::string &id="")
Opens a compact horizontal status strip.
Definition UI.cpp:563
graphics::Canvas * viewportCanvas(const std::string &id)
Returns the offscreen render target of a selected-host Viewport widget.
Definition UI.cpp:2069
uint64_t dbCreateInstance()
Creates and registers an instance of the selected class.
Definition UI.cpp:2741
void setImageUv(const std::string &id, float u0, float v0, float u1, float v1)
Sets the image uv.
Definition UI.cpp:1227
ssq::Object propertySchema(ssq::Object instance)
Return the reflection-derived PropertySchema for a live script instance.
Definition UI.cpp:2679
void clearHostWorldAnchor()
Returns the selected host to ordinary screen-space placement.
Definition UI.cpp:1490
void addTextWrapped(const std::string &content, float width, const std::string &id="")
Adds text wrapped.
Definition UI.cpp:742
void setItemTooltip(const std::string &text)
Sets hover help on the most recently added item.
Definition UI.cpp:1005
void beginDockArea(const std::string ®ion, const std::string &id="")
Opens a named dock fill slot (region: left/right/top/bottom/center).
Definition UI.cpp:580
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.
Definition UI.cpp:526
void setText(const std::string &id, const std::string &text)
Widget state setters/getters on the current host (by node id).
Definition UI.cpp:1182
void addMenuItem(const std::string &label, const std::string &shortcut="", const std::string &id="")
Adds a selectable menu command.
Definition UI.cpp:908
void beginList(const std::string &id)
Opens a list container (rows added with addListItem).
Definition UI.cpp:514
void beginChild(const std::string &id, float width=0.f, float height=120.f)
Opens a sized child region.
Definition UI.cpp:520
void addBadge(const std::string &label, const std::string &id="")
Adds a compact status/category badge.
Definition UI.cpp:900
float getHostWorldScreenY() const
Returns the selected host's derived screen Y coordinate.
Definition UI.cpp:1545
bool requestFocus(const std::string &id)
Requests keyboard/gamepad focus for a mounted control.
Definition UI.cpp:1396
void setItemMouseFilter(const std::string &filter)
Sets the last item's pointer filter: "stop", "pass", or "ignore".
Definition UI.cpp:1043
void setHostHudCanvas(float referenceWidth, float referenceHeight, float userScale)
Enables fit-scaled design units on this screen host; positive finite dimensions/scale required....
Definition UI.cpp:1433
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.
Definition UI.cpp:836
void setImageNinePatch(const std::string &id, float l, float t, float r, float b)
Sets the image nine patch.
Definition UI.cpp:1238
void setEnabled(const std::string &id, bool enabled)
Enables or disables a mounted control.
Definition UI.cpp:1196
void setImageTint(const std::string &id, float r, float g, float b, float a=1.f)
Sets the image tint.
Definition UI.cpp:1216
void beginSplitPane(const std::string &direction="row", float ratio=0.25f, const std::string &id="")
Opens a two-child resizable split pane.
Definition UI.cpp:714
std::string getDropText() const
Returns the owning payload text of the last successfully consumed drop.
Definition UI.cpp:1616
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).
Definition UI.cpp:1575
void releaseSquirrelRoots() noexcept
Drops database-panel Squirrel roots while the Runtime VM is alive.
Definition UI.cpp:299
bool inspectObject(ssq::Object object)
Inspects a caller-provided live script instance.
Definition UI.cpp:2574
void beginToolbar(const std::string &id="")
Opens a horizontal editor command strip.
Definition UI.cpp:553
std::string consumeChange()
Returns the id of the changed widget since the last frame (or "").
Definition UI.cpp:1592
void beginPanelFrame(const std::string &title, const std::string &id="")
Opens a fixed titled panel frame (not a free-floating Window host).
Definition UI.cpp:578
bool inspectAddInstance()
Creates another instance of the selected inspector class.
Definition UI.cpp:2647
void setHostOverlayAlpha(float alpha)
Sets overlay opacity (0..1); zero also removes the host border and outer padding.
Definition UI.cpp:1463
void beginScrollList(const std::string &id="", float height=0.f, float itemHeight=0.f)
Begins scroll list.
Definition UI.cpp:598
void setHostWorldEdgePolicy(const std::string &policy, float safeMargin=8.f)
Configures off-screen handling and safe-edge margin.
Definition UI.cpp:1494
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 getCo...
Definition UI.cpp:779
void setValueText(const std::string &id, const std::string &value)
Sets the value text.
Definition UI.cpp:1208
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.
Definition UI.cpp:1679
std::size_t getHostTweenCount() const
Number of pending host tweens (diagnostics / tests).
Definition UI.cpp:352
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.
Definition UI.cpp:2543
std::string getDropOrigin() const
Returns "internal", "os-file", or an empty string.
Definition UI.cpp:1620
void beginRow(const std::string &id="", float gap=-1.f)
Opens a row flex container.
Definition UI.cpp:703
void componentClearHandlers(uint64_t owner)
Removes every callback owned by one UIComponent; idempotent on the UI thread.
Definition UI.cpp:409
void setFlexWrap(bool wrap)
Enables or disables line wrapping on the current Flex.
Definition UI.cpp:1114
bool wantCaptureMouse() const
True when the UI wants to capture mouse input this frame.
Definition UI.cpp:416
void addButton(const std::string &label, const std::string &id="")
Adds a button to the current container.
Definition UI.cpp:748
void beginMenu(const std::string &label, const std::string &id="")
Opens a popup menu.
Definition UI.cpp:549
void setItemRadialFill(float startDegrees, bool clockwise, float innerRadius)
Configures the last radial fill; degrees point right at zero, inner radius is [0,1]....
Definition UI.cpp:822
bool mountBuildAs(const std::string &name)
Finishes the build pass and mounts as a named host.
Definition UI.cpp:1145
bool inspectSetPickHandler(ssq::Function fn)
Registers the script callback used by the inspector Pick button. The callback is stored on the script...
Definition UI.cpp:2581
void setItemEnabled(bool enabled)
Enables or disables the most recently added item.
Definition UI.cpp:1028
void setFlexJustify(const std::string &justify)
Sets Flex container justify on the current open Flex.
Definition UI.cpp:1101
void beginSidebar(const std::string &id="", float width=0.f)
Opens a vertical editor side panel.
Definition UI.cpp:559
std::string consumeDrop()
Pops one drop and returns its target as "host/node", or an empty string.
Definition UI.cpp:1600
void setItemStyleClass(const std::string &name)
Applies a named style class to the most recently added item.
Definition UI.cpp:1057
void setHostInputTransparent(bool transparent)
Makes a display-only host ignore mouse and keyboard input. @thread UI thread; no callbacks.
Definition UI.cpp:1429
void addListItem(const std::string &label, const std::string &id="")
Append one list row button (call inside beginList).
Definition UI.cpp:1126
void setLayoutGaps(float columnGap, float rowGap)
Sets independent column and row gaps on the current Flex/Grid.
Definition UI.cpp:1107
void componentOnChange(uint64_t owner, const std::string &id, ssq::Function fn)
Internal UIComponent value callback registration scoped to one component owner.
Definition UI.cpp:401
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.
Definition UI.cpp:1634
void setItemTabIndex(int index)
Sets the last item's sequential focus order; negative excludes it.
Definition UI.cpp:1064
void setItemAlignSelf(const std::string &align)
Sets its cross-axis alignment: inherit, start, center, end, or stretch.
Definition UI.cpp:933
void setItemDropTarget(const std::string &acceptedType)
Marks the most recently added item as a desktop drop target.
Definition UI.cpp:1020
void setItemFocusOrder(const std::string &previous, const std::string &next)
Sets explicit previous and next focus neighbors on the last item.
Definition UI.cpp:1069
float getHostWorldScreenX() const
Returns the selected host's derived screen X coordinate.
Definition UI.cpp:1540
std::string getLayoutDiagnostics() const
JSON diagnostics for measured size and overflow of the selected retained tree.
Definition UI.cpp:1714
void addFilledImage(const std::string &id, float width, float height, float fraction)
Adds a linear filled image; layout keeps its complete rectangle. @thread UI thread; no callbacks.
Definition UI.cpp:788
void animateHostSize(UIHostHandle host, float w, float h, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate selected-host explicit window size.
Definition UiTween.cpp:212
void cancelItem(UIHostHandle host, const std::string &id={})
Cancel every pending item tween for host + id (empty id = all items).
Definition UiTween.cpp:374
std::size_t hostTweenCount() const noexcept
Number of pending host tweens (tests / diagnostics).
Definition UiTween.h:177
eve::Result< void > animateItemPos(UIHostHandle host, const std::string &id, float x, float y, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate one absolute node's placement offset.
Definition UiTween.cpp:330
void cancelHost(UIHostHandle host)
Cancel every pending host tween for host.
Definition UiTween.cpp:368
eve::Result< void > animateItemOpacity(UIHostHandle host, const std::string &id, float opacity, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate one node's transient opacity.
Definition UiTween.cpp:261
eve::Result< void > animateItemValue(UIHostHandle host, const std::string &id, float value, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate a normalized HUD value, replacing the previous value tween from its current sample.
Definition UiTween.cpp:294
void animateHostOverlayAlpha(UIHostHandle host, float alpha, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate selected-host overlay background alpha.
Definition UiTween.cpp:239
std::size_t itemTweenCount() const noexcept
Number of pending item tweens (tests / diagnostics).
Definition UiTween.h:180
void animateHostPos(UIHostHandle host, float x, float y, float durationMs, const std::string &ease, float delayMs, double nowMs)
Animate selected-host window position.
Definition UiTween.cpp:185
SDL2 desktop/mobile implementation of eve::window::Window.
Definition Window.h:16
char * encode(std::string format, const char *src, size_t srclen, size_t &dstlen, size_t linelen)
Encodes raw bytes (e.g. hex / base64) into a text buffer.
Definition DataModule.cpp:204
char * decode(std::string format, const char *src, size_t srclen, size_t &dstlen)
Decodes a text buffer (hex / base64) back into raw bytes.
Definition DataModule.cpp:213
Result< std::string > stringify(const eve::Value &value)
Serialize the canonical owning Value as deterministic compact JSON.
Definition Json.cpp:605
constexpr bool hasFlag(PropertyFlag value, PropertyFlag flag)
True when flag.
Definition PropertyAccess.h:62
PropertyKind
Semantic property kind used by renderer-independent presenters.
Definition PropertyAccess.h:21
SQRESULT callFunction(HSQUIRRELVM vm, const HSQOBJECT &fn, const Receiver &receiver, Args &&... args)
Call a script function, deriving sq_call's parameter count from the pushes.
Definition SquirrelBinding.h:212
SQRESULT callFunctionResult(HSQUIRRELVM vm, const HSQOBJECT &fn, const Receiver &receiver, Args &&... args)
callFunction() that keeps the return value on top for the caller to read.
Definition SquirrelBinding.h:240
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
std::string reportScriptCallFailure(HSQUIRRELVM vm, const char *what)
Report a failed engine-to-script call, consuming the VM's script error.
Definition SquirrelBinding.cpp:52
void injectUIComponentClass(ssq::Table &eveTable)
Definition UIComponentScript.cpp:286
Definition Component.cpp:7
WidgetDesc collapsingHeader(std::string label, std::vector< WidgetDesc > children, std::string id, bool defaultOpen)
Collapsible header containing child widgets.
Definition Widget.cpp:814
void exposePcgScreenshotSavedNoticeBindings(ssq::Table &t)
Register Pcg screenshot-notice bindings.
Definition PcgScreenshotSavedNotice.cpp:51
EVENGINE_API_WORLD void declareScriptPhotoModeApplySeam()
声明"`IPhotoModeApplySink` 可以由脚本提供"这条接缝。
Definition PcgPhotoModeApplySeam.cpp:126
StyleClassStatus defineStyleClass(const std::string &name, const std::string &parent)
Declares or replaces one sparse style class. @thread UI thread only. @reentrancy Does not invoke call...
Definition Theme.cpp:82
WidgetDesc menuItem(std::string label, std::string shortcut, std::string id, std::function< void()> onClick, bool selected)
Selectable menu command with an optional shortcut hint.
Definition Widget.cpp:642
void exposePcgPhotoModePanelsBindings(ssq::Table &t)
Register Pcg photo-mode panel bindings.
Definition PcgPhotoModePanels.cpp:11
void registerEditorHostCapabilities()
Registers editor host capabilities.
Definition EditorHostCapabilities.cpp:58
void exposePcgColorPreviewSyncBindings(ssq::Table &table)
Register Pcg color-preview bindings.
Definition PcgColorPreviewSync.cpp:27
@ OperatingSystemFile
void exposePcgPhotoModeSessionBindings(ssq::Table &table)
Register Pcg photo-mode session bindings.
Definition PcgPhotoModeSession.cpp:80
@ Supported
WidgetDesc badge(std::string label, std::string id)
Compact status/category pill. Tint controls its background color.
Definition Widget.cpp:581
WidgetDesc filledImage(std::string id, float width, float height, float fraction)
Linear filled image; value is a fraction, layout retains width/height at zero fill....
Definition Widget.cpp:466
void exposePcgTooltipBindings(ssq::Table &t)
Register Pcg tooltip bindings.
Definition PcgScreenshotSavedNotice.cpp:168
WidgetDesc checkbox(std::string label, bool checked, std::string id, std::function< void(bool)> onToggle)
Checkbox with a label; fires onToggle.
Definition Widget.cpp:387
@ None
WidgetDesc tabBar(std::vector< WidgetDesc > children, std::string id)
Horizontal strip of Tab children.
Definition Widget.cpp:728
const std::string & globalThemeName()
Current preset name: "dark", "light", or "custom".
Definition Theme.cpp:279
WidgetDesc combo(std::string label, std::vector< std::string > options, int selected, std::string id, std::function< void(float)> onValue)
Combo.
Definition Widget.cpp:439
WidgetDesc statusBar(std::vector< WidgetDesc > children, std::string id)
Compact horizontal status strip; Spacer children absorb free width.
Definition Widget.cpp:688
WidgetDesc slider(std::string label, float value, float minV, float maxV, std::string id, std::function< void(float)> onValue)
Horizontal slider; fires onValue.
Definition Widget.cpp:399
void exposePcgDraggableWindowBindings(ssq::Table &table)
Register Pcg draggable-window bindings.
Definition PcgDraggableWindow.cpp:56
WidgetDesc panelFrame(std::string title, std::vector< WidgetDesc > children, std::string id)
Fixed titled panel chrome for dock regions (not a free-floating Window host).
Definition Widget.cpp:767
@ NoWrap
@ Wrap
@ Column
void exposePcgPhotoModeValuesBindings(ssq::Table &t)
Register complete Pcg photo-mode value bindings.
Definition PcgPhotoModeValues.cpp:156
void clearStyleClasses()
Clears user-defined style classes. Intended for runtime/test teardown.
Definition Theme.cpp:160
@ Ignore
WidgetDesc imageButton(std::string id, float width, float height, std::function< void()> onClick)
Image button.
Definition Widget.cpp:512
WidgetDesc inputText(std::string label, std::string value, std::string id, std::function< void(const std::string &)> onChange)
Editable text field; fires onTextChange.
Definition Widget.cpp:533
bool setThemeByName(const std::string &name)
Apply a named preset ("dark" / "light"). Case-insensitive. Returns false if unknown.
Definition Theme.cpp:288
void setThemeUiScale(float scale)
Logical (point-space) UI scale. Default 1.0.
Definition Theme.cpp:301
WidgetDesc resourceBar(std::string id, float width, float height, float fraction)
Composes a display-only resource bar; child IDs are /background, /trail, /value and /label....
Definition Widget.cpp:481
void exposePcgLoadingScreenBindings(ssq::Table &table)
Register Pcg loading-screen bindings.
Definition PcgColorPreviewSync.cpp:214
WidgetDesc window(std::string title, std::vector< WidgetDesc > children, std::string id)
Top-level window widget with a title bar.
Definition Widget.cpp:326
bool parseNinePatch(const image::ImageData &source, NinePatchInfo &out, std::string *error)
Parse a raw, uncompiled Android .9.png image.
Definition NinePatch.cpp:55
void bindUIEventSinkOwner(UI *owner) noexcept
Bind the live UI module into the platform event sink. @ownership Borrowed; cleared when the UI module...
Definition EventSink.cpp:40
WidgetDesc spacer(std::string id, float grow)
Flexible empty space; default flexGrow=1 so it absorbs free space in a Flex parent.
Definition Widget.cpp:888
void exposePcgPhotoModeColorPickerBindings(ssq::Table &t)
Register Pcg photo-mode color-picker bindings.
Definition PcgColorPreviewSync.cpp:316
WidgetDesc child(std::string id, std::vector< WidgetDesc > children, float width, float height)
Scrollable child region with an explicit size.
Definition Widget.cpp:826
@ InputText
@ AppFrame
@ Group
@ Separator
@ DockArea
@ ImageButton
@ Flex
@ ScrollList
@ Card
@ Sidebar
@ Slider
@ NinePatchPanel
@ SameLine
@ RadialFill
@ Badge
@ Progress
@ Checkbox
@ Grid
@ Spacer
@ ColorPalette
@ Toolbox
@ Button
@ Viewport
@ TabBar
@ Link
@ SplitPane
@ Text
@ TabContainer
@ Child
@ MenuBar
@ FilledImage
@ Menu
@ Switch
@ Image
@ Window
@ MenuItem
@ SearchField
@ SectionHeader
@ Combo
@ PanelFrame
@ Toolbar
@ StatusBar
@ CollapsingHeader
FocusDirection
Logical focus movement understood by keyboard, gamepad and automation.
Definition UIHost.h:104
@ Previous
StyleClassStatus setStyleClassMetric(const std::string &name, const std::string &property, float x, float y)
Sets padding, rounding, or alpha on an existing style class.
Definition Theme.cpp:128
WidgetDesc toolbar(std::vector< WidgetDesc > children, std::string id)
Horizontal editor command strip; Spacer children absorb free width.
Definition Widget.cpp:655
WidgetDesc menu(std::string label, std::vector< WidgetDesc > children, std::string id)
Popup menu container used inside a MenuBar or another Menu.
Definition Widget.cpp:632
@ Click
@ None
WidgetDesc skillSlot(std::string id, float size, uint64_t iconTexture, float cooldown, std::string key)
Composes an interactive skill slot; /activate emits clicks, /cooldown is a solid radial overlay....
Definition Widget.cpp:497
@ Center
@ Start
@ SpaceAround
@ SpaceBetween
bool iconFromName(std::string_view name, Icon *out)
Resolves a semantic icon name; accepts kebab-case names case-insensitively.
Definition Icons.cpp:90
const char * styleClassStatusName(StyleClassStatus status)
Stable script-facing spelling of a mutation status.
Definition Theme.cpp:162
WidgetDesc colorPalette(std::string label, float r, float g, float b, float a, std::string id, std::function< void(float)> onValue)
Color editor with a swatch grid (调色板). RGBA is stored in tint channels. valueText may list extra swat...
Definition Widget.cpp:413
WidgetDesc ninePatchPanel(std::vector< WidgetDesc > children, std::string id, uint64_t textureId)
Stretchable textured container with asset-defined content padding.
Definition Widget.cpp:603
void exposeParentScalerBindings(ssq::Table &table)
Register ParentScaler value types and evaluator with the root script table.
Definition ParentScaler.cpp:37
void exposePcgPhotoModeRangesBindings(ssq::Table &t)
Register Pcg photo-mode range bindings.
Definition PcgPhotoModeRanges.cpp:73
WidgetDesc iconButton(Icon value, std::string label, std::string id, std::function< void()> onClick)
Button containing a semantic icon and optional visible label.
Definition Widget.cpp:357
std::unique_ptr< image::ImageData > stripNinePatchBorder(const image::ImageData &source)
Copy the drawable interior of a parsed .9.png without marker pixels.
Definition NinePatch.cpp:109
WidgetDesc grid(int columns, std::vector< WidgetDesc > children, std::string id)
Fixed-column grid; children are placed in source order.
Definition Widget.cpp:878
@ Light
@ Inherit
void exposePcgPhotoModeRuntimeUIBindings(ssq::Table &table)
Register Pcg photo-mode runtime UI bindings.
Definition PcgPhotoModeRuntimeUI.cpp:70
WidgetDesc listButtons(std::string listId, const std::vector< std::string > &items)
Default list: one Button per item, id = listId + "/" + index.
Definition Widget.cpp:919
EVENGINE_API_WORLD void withdrawScriptPhotoModeApplySeam()
撤回接缝与仍然在位的脚本适配器。
Definition PcgPhotoModeApplySeam.cpp:160
WidgetDesc searchField(std::string hint, std::string value, std::string id, std::function< void(const std::string &)> onChange)
Compact search field with placeholder text and a bundled search icon.
Definition Widget.cpp:557
WidgetDesc button(std::string label, std::string id, std::function< void()> onClick)
Clickable button; fires onClick.
Definition Widget.cpp:345
WidgetDesc flex(FlexDirection direction, std::vector< WidgetDesc > children, std::string id)
Elastic layout container (row/column). Prefer row / column shorthands.
Definition Widget.cpp:860
WidgetDesc toggleSwitch(std::string label, bool checked, std::string id, std::function< void(bool)> onToggle)
Modern boolean toggle; fires onToggle when changed.
Definition Widget.cpp:569
WidgetDesc sidebar(std::vector< WidgetDesc > children, std::string id, float width)
Vertical editor side panel. Width defaults to 240 logical pixels.
Definition Widget.cpp:678
double uiTweenWallClockMs()
Wall-clock milliseconds from steady_clock (presentation clock).
Definition UiTween.cpp:115
WidgetDesc card(std::vector< WidgetDesc > children, std::string id)
Bordered surface container with editor-friendly padding.
Definition Widget.cpp:594
@ Scroll
@ Visible
FillDirection
Direction of a linear image fill; geometry stays inside the original layout box.
Definition HudGeometry.h:11
@ BehindCamera
@ Crowded
@ OutsideViewport
@ Disabled
@ NoCamera
@ Visible
@ Center
@ Start
@ Stretch
std::unique_ptr< UIBackend > createImGuiBackend()
Default backend: Dear ImGui + SDL + Vulkan (see ui/imgui/).
Definition ImGuiBackend.cpp:167
WidgetDesc toolbox(std::vector< WidgetDesc > children, std::string id, float cellSize, int columns)
Wrapping grid of editor tools with uniform square cells.
Definition Widget.cpp:666
WidgetDesc tab(std::string label, std::string pageId, bool selected, std::string id, std::function< void()> onClick)
Selectable tab label.
Definition Widget.cpp:715
WidgetDesc scrollList(std::string id, std::vector< WidgetDesc > children, float height, float itemHeight)
Scroll list.
Definition Widget.cpp:837
WidgetDesc sectionHeader(std::string label, std::string id)
Non-collapsible editor section heading with an accent marker.
Definition Widget.cpp:614
void exposePcgControllerSelectionBindings(ssq::Table &t)
Register Pcg controller-selection bindings.
Definition PcgColorPreviewSync.cpp:75
@ Progress
@ Checkbox
@ ListItem
@ TextInput
@ MenuItem
WidgetDesc sameLine(std::string id)
Holds the next widget on the same line as the previous one.
Definition Widget.cpp:371
void registerUIAutomationCapabilities()
Registers ui automation capabilities.
Definition UIAutomationCapabilities.cpp:334
void exposePcgPhotoModeApplyPlanBindings(ssq::Table &t)
Register Pcg photo-mode application-plan bindings.
Definition PcgPhotoModeApplyPlan.cpp:137
StyleClassStatus setStyleClassColor(const std::string &name, const std::string &property, float r, float g, float b, float a)
Sets text/background/border/accent RGBA on an existing style class.
Definition Theme.cpp:99
WidgetDesc dockArea(std::string region, std::vector< WidgetDesc > children, std::string id)
Named dock fill slot; region name is stored in valueText (left/right/top/bottom/center)....
Definition Widget.cpp:780
WidgetDesc radialFill(std::string id, float width, float height, float fraction)
Solid radial cooldown overlay; supports sectors and rings (no texture sampling). @thread UI thread....
Definition Widget.cpp:475
WidgetDesc menuBar(std::vector< WidgetDesc > children, std::string id)
Window menu bar container. Must be a direct child of a Window.
Definition Widget.cpp:623
@ InvalidArgument
@ NotFound
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
One stable property description consumed by any UI shell.
Definition PropertyAccess.h:74
Retained UI widget node (arena tree). Conceptual counterpart of eve::scene::SceneNode; built declarat...
Definition UIHost.h:151
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
Definition Widget.h:15