载入中...
搜索中...
未找到
#include "ui/Widget.h"命名空间 | |
| namespace | eve |
| Build metadata (engine git commit, build time, third-party version). | |
| namespace | eve::ui |
函数 | |
| WidgetDesc | eve::ui::window (std::string title, std::vector< WidgetDesc > children={}, std::string id="root") |
| Top-level window widget with a title bar. | |
| WidgetDesc | eve::ui::text (std::string content, std::string id="") |
| Static text label. | |
| WidgetDesc | eve::ui::button (std::string label, std::string id="", std::function< void()> onClick={}) |
| Clickable button; fires onClick. | |
| WidgetDesc | eve::ui::icon (Icon value, std::string id="") |
| Semantic vector icon rendered from the bundled editor icon font. | |
| WidgetDesc | eve::ui::iconButton (Icon value, std::string label="", std::string id="", std::function< void()> onClick={}) |
| Button containing a semantic icon and optional visible label. | |
| WidgetDesc | eve::ui::group (std::vector< WidgetDesc > children={}, std::string id="") |
| Plain group container. | |
| WidgetDesc | eve::ui::sameLine (std::string id="") |
| Holds the next widget on the same line as the previous one. | |
| WidgetDesc | eve::ui::separator (std::string id="") |
| Horizontal separator line. | |
| WidgetDesc | eve::ui::checkbox (std::string label, bool checked=false, std::string id="", std::function< void(bool)> onToggle={}) |
| Checkbox with a label; fires onToggle. | |
| WidgetDesc | eve::ui::slider (std::string label, float value, float minV, float maxV, std::string id="", std::function< void(float)> onValue={}) |
| Horizontal slider; fires onValue. | |
| WidgetDesc | eve::ui::colorPalette (std::string label, float r, float g, float b, float a=1.f, std::string id="", std::function< void(float)> onValue={}) |
Color editor with a swatch grid (调色板). RGBA is stored in tint channels. valueText may list extra swatches as #rrggbb, #rrggbbaa, or r,g,b[,a] lines; empty uses the built-in palette. Changes fire the same value events as sliders (consumeChange / onValue). | |
| WidgetDesc | eve::ui::progress (float fraction, std::string id="", std::string overlay="") |
| Progress bar; fraction is clamped to [0,1]. | |
| WidgetDesc | eve::ui::combo (std::string label, std::vector< std::string > options, int selected, std::string id="", std::function< void(float)> onValue={}) |
| Combo. | |
| WidgetDesc | eve::ui::image (std::string id="", float width=0.f, float height=0.f, std::function< void()> onClick={}) |
| Image. | |
| WidgetDesc | eve::ui::imageButton (std::string id, float width, float height, std::function< void()> onClick={}) |
| Image button. | |
| WidgetDesc | eve::ui::viewport (std::string id="", float width=0.f, float height=0.f) |
| Viewport. | |
| WidgetDesc | eve::ui::inputText (std::string label, std::string value, std::string id="", std::function< void(const std::string &)> onChange={}) |
| Editable text field; fires onTextChange. | |
| WidgetDesc | eve::ui::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. | |
| WidgetDesc | eve::ui::toggleSwitch (std::string label, bool checked=false, std::string id="", std::function< void(bool)> onToggle={}) |
| Modern boolean toggle; fires onToggle when changed. | |
| WidgetDesc | eve::ui::badge (std::string label, std::string id="") |
| Compact status/category pill. Tint controls its background color. | |
| WidgetDesc | eve::ui::card (std::vector< WidgetDesc > children={}, std::string id="") |
| Bordered surface container with editor-friendly padding. | |
| WidgetDesc | eve::ui::ninePatchPanel (std::vector< WidgetDesc > children={}, std::string id="", uint64_t textureId=0) |
| Stretchable textured container with asset-defined content padding. | |
| WidgetDesc | eve::ui::sectionHeader (std::string label, std::string id="") |
| Non-collapsible editor section heading with an accent marker. | |
| WidgetDesc | eve::ui::menuBar (std::vector< WidgetDesc > children={}, std::string id="") |
| Window menu bar container. Must be a direct child of a Window. | |
| WidgetDesc | eve::ui::menu (std::string label, std::vector< WidgetDesc > children={}, std::string id="") |
| Popup menu container used inside a MenuBar or another Menu. | |
| WidgetDesc | eve::ui::menuItem (std::string label, std::string shortcut={}, std::string id="", std::function< void()> onClick={}, bool selected=false) |
| Selectable menu command with an optional shortcut hint. | |
| WidgetDesc | eve::ui::toolbar (std::vector< WidgetDesc > children={}, std::string id="") |
| Horizontal editor command strip; Spacer children absorb free width. | |
| WidgetDesc | eve::ui::toolbox (std::vector< WidgetDesc > children={}, std::string id="", float cellSize=0.f, int columns=0) |
| Wrapping grid of editor tools with uniform square cells. | |
| WidgetDesc | eve::ui::sidebar (std::vector< WidgetDesc > children={}, std::string id="", float width=0.f) |
| Vertical editor side panel. Width defaults to 240 logical pixels. | |
| WidgetDesc | eve::ui::statusBar (std::vector< WidgetDesc > children={}, std::string id="") |
| Compact horizontal status strip; Spacer children absorb free width. | |
| WidgetDesc | eve::ui::splitPane (FlexDirection direction, WidgetDesc first, WidgetDesc second, float ratio=0.25f, std::string id="", std::function< void(float)> onResize={}) |
| Two resizable panes separated by a drag handle. | |
| WidgetDesc | eve::ui::collapsingHeader (std::string label, std::vector< WidgetDesc > children={}, std::string id="", bool defaultOpen=true) |
| Collapsible header containing child widgets. | |
| WidgetDesc | eve::ui::child (std::string id, std::vector< WidgetDesc > children={}, float width=0.f, float height=120.f) |
| Scrollable child region with an explicit size. | |
| WidgetDesc | eve::ui::scrollList (std::string id, std::vector< WidgetDesc > children={}, float height=0.f, float itemHeight=0.f) |
| Scroll list. | |
| WidgetDesc | eve::ui::virtualList (std::string listId, const std::vector< std::string > &items, float height=200.f, float itemHeight=0.f) |
| Virtual list. | |
| WidgetDesc | eve::ui::flex (FlexDirection direction, std::vector< WidgetDesc > children={}, std::string id="") |
Elastic layout container (row/column). Prefer row / column shorthands. | |
| WidgetDesc | eve::ui::row (std::vector< WidgetDesc > children={}, std::string id="") |
| Horizontal elastic layout row. | |
| WidgetDesc | eve::ui::column (std::vector< WidgetDesc > children={}, std::string id="") |
| Vertical elastic layout column. | |
| WidgetDesc | eve::ui::grid (int columns, std::vector< WidgetDesc > children={}, std::string id="") |
| Fixed-column grid; children are placed in source order. | |
| WidgetDesc | eve::ui::spacer (std::string id="", float grow=1.f) |
| Flexible empty space; default flexGrow=1 so it absorbs free space in a Flex parent. | |
| WidgetDesc | eve::ui::when (bool cond, WidgetDesc child) |
Conditional: include child only when cond is true (empty group otherwise). | |
| WidgetDesc | eve::ui::whenElse (bool cond, WidgetDesc ifTrue, WidgetDesc ifFalse) |
| When else. | |
| WidgetDesc | eve::ui::list (std::string listId, const std::vector< std::string > &items, const std::function< WidgetDesc(const std::string &, int)> &itemFn) |
Expand a string list into a Group of item widgets. itemFn(label, index) builds each row; keys default to id. | |
| WidgetDesc | eve::ui::listButtons (std::string listId, const std::vector< std::string > &items) |
| Default list: one Button per item, id = listId + "/" + index. | |
| void | eve::ui::applyTree (UIHost *host, WidgetDesc root) |
| Full replace flatten. | |
| bool | eve::ui::applyTreeReconcile (UIHost *host, WidgetDesc root) |
| Patch by key/id when structure (type + child keys) matches; otherwise full replace. Returns true if a structural rebuild occurred. | |