Declarative widget description (build once / on dirty → flatten into UIHost::Tree). 更多...
#include <Widget.h>
Public 成员函数 | |
| WidgetDesc & | withId (std::string v) |
| With id. | |
| WidgetDesc & | withKey (std::string v) |
| With key. | |
| WidgetDesc & | withText (std::string v) |
| With text. | |
| WidgetDesc & | withValueText (std::string v) |
| With value text. | |
| WidgetDesc & | withTooltip (std::string v) |
| With tooltip. | |
| WidgetDesc & | withVisible (bool v) |
| With visible. | |
| WidgetDesc & | withEnabled (bool v) |
| Sets whether the widget accepts interaction. | |
| WidgetDesc & | withFocusMode (FocusMode v) |
| Selects how the widget participates in keyboard focus navigation. | |
| WidgetDesc & | withMouseFilter (MouseFilter v) |
| Selects whether pointer input stops, passes through, or ignores this widget. | |
| WidgetDesc & | withTheme (ThemePreset v) |
| Overrides the built-in theme for this widget subtree. | |
| WidgetDesc & | withTabIndex (int v) |
| Sets the stable ordering hint used by sequential focus traversal. | |
| WidgetDesc & | withFocusOrder (std::string previous, std::string next) |
| Assigns explicit previous and next focus-neighbor widget identifiers. | |
| WidgetDesc & | withFocusNeighbors (std::string left, std::string right, std::string up, std::string down) |
| Assigns explicit directional focus-neighbor widget identifiers. | |
| WidgetDesc & | withAccessibility (AccessibilityRole role, std::string name, std::string description={}) |
| Supplies the semantic role and labels exposed to accessibility clients. | |
| WidgetDesc & | withDragSource (std::string payloadType, std::string payloadText) |
| Marks this widget as a desktop drag source with an owning text payload. | |
| WidgetDesc & | withDropTarget (std::string acceptedType) |
| Marks this widget as a desktop drop target for one type or "*". | |
| WidgetDesc & | withChecked (bool v) |
| With checked. | |
| WidgetDesc & | withOpen (bool v) |
| With open. | |
| WidgetDesc & | withValue (float v) |
| With value. | |
| WidgetDesc & | withRange (float lo, float hi) |
| With range. | |
| WidgetDesc & | withSize (float w, float h) |
| With size. | |
| WidgetDesc & | withMargin (float l, float t, float r, float b) |
| With margin. | |
| WidgetDesc & | withPadding (float l, float t, float r, float b) |
| With padding. | |
| WidgetDesc & | withMinSize (float w, float h) |
| With min size. | |
| WidgetDesc & | withMaxSize (float w, float h) |
| With max size. | |
| WidgetDesc & | withPercent (float w, float h) |
| With percent. | |
| WidgetDesc & | withStyleClass (std::string v) |
| Applies a named sparse style class resolved when the tree is built. | |
| WidgetDesc & | withAspectRatio (float ratio) |
| With aspect ratio. | |
| WidgetDesc & | withAbsolute (float ax, float ay, float x=0.f, float y=0.f) |
| With absolute. | |
| WidgetDesc & | withTint (float r, float g, float b, float a=1.f) |
| With tint. | |
| WidgetDesc & | withUv (float u0, float v0, float u1, float v1) |
| With uv. | |
| WidgetDesc & | withNinePatch (float l, float t, float r, float b) |
| With nine patch. | |
| WidgetDesc & | withCornerRadius (float radius) |
| With corner radius. | |
| WidgetDesc & | withWrap (float width) |
| With wrap. | |
| WidgetDesc & | withItemHeight (float height) |
| With item height. | |
| WidgetDesc & | withGap (float g) |
| With gap. | |
| WidgetDesc & | withGaps (float columns, float rows) |
| With gaps. | |
| WidgetDesc & | withFlexWrap (FlexWrap wrap) |
| With flex wrap. | |
| WidgetDesc & | withOverflow (OverflowMode mode) |
| With overflow. | |
| WidgetDesc & | withGridColumnSpan (int span) |
| With grid column span. | |
| WidgetDesc & | withFlexDirection (FlexDirection d) |
| With flex direction. | |
| WidgetDesc & | withAlign (FlexAlign a) |
| With align. | |
| WidgetDesc & | withJustify (FlexJustify j) |
| With justify. | |
| WidgetDesc & | withFlexGrow (float g) |
| With flex grow. | |
| WidgetDesc & | withFlexShrink (float shrink) |
| With flex shrink. | |
| WidgetDesc & | withFlexBasis (float basis) |
| With flex basis. | |
| WidgetDesc & | withAlignSelf (FlexAlign align) |
| With align self. | |
| WidgetDesc & | withClick (std::function< void()> fn) |
| With click. | |
| WidgetDesc & | withToggle (std::function< void(bool)> fn) |
| With toggle. | |
| WidgetDesc & | withValueFn (std::function< void(float)> fn) |
| With value fn. | |
| WidgetDesc & | withTextChange (std::function< void(const std::string &)> fn) |
| With text change. | |
| WidgetDesc & | child (WidgetDesc c) |
| Child. | |
| const std::string & | reconcileKey () const |
| Reconcile key. | |
Public 属性 | |
| NodeType | type = NodeType::Text |
| std::string | id |
| std::string | key |
| Reconciliation key; defaults to id when empty. | |
| std::string | text |
| std::string | valueText |
| std::string | tooltip |
| bool | visible = true |
| bool | enabled = true |
| bool | checked = false |
| bool | open = true |
| FocusMode | focusMode = FocusMode::All |
| MouseFilter | mouseFilter = MouseFilter::Stop |
| ThemePreset | themePreset = ThemePreset::Inherit |
| std::string | styleClass |
| int | tabIndex = 0 |
| std::string | focusNext |
| std::string | focusPrevious |
| std::string | focusLeft |
| std::string | focusRight |
| std::string | focusUp |
| std::string | focusDown |
| AccessibilityRole | accessibilityRole = AccessibilityRole::Auto |
| std::string | accessibilityName |
| std::string | accessibilityDescription |
| bool | dragSource = false |
| bool | dropTarget = false |
| std::string | dragPayloadType |
| std::string | dragPayloadText |
| std::string | acceptedDropType |
| float | value = 0.f |
| float | minValue = 0.f |
| float | maxValue = 1.f |
| float | sizeX = 0.f |
| float | sizeY = 0.f |
| float | marginL = 0.f |
| float | marginT = 0.f |
| float | marginR = 0.f |
| float | marginB = 0.f |
| float | paddingL = 0.f |
| float | paddingT = 0.f |
| float | paddingR = 0.f |
| float | paddingB = 0.f |
| float | minSizeX = 0.f |
| float | minSizeY = 0.f |
| float | maxSizeX = 0.f |
| float | maxSizeY = 0.f |
| float | percentW = 0.f |
| float | percentH = 0.f |
| float | aspectRatio = 0.f |
| float | anchorX = 0.f |
| float | anchorY = 0.f |
| float | posX = 0.f |
| float | posY = 0.f |
| bool | absolute = false |
| uint64_t | textureId = 0 |
| float | tintR = 1.f |
| float | tintG = 1.f |
| float | tintB = 1.f |
| float | tintA = 1.f |
| float | uv0x = 0.f |
| float | uv0y = 0.f |
| float | uv1x = 1.f |
| float | uv1y = 1.f |
| float | borderL = 0.f |
| float | borderT = 0.f |
| float | borderR = 0.f |
| float | borderB = 0.f |
| float | cornerRadius = 0.f |
| float | wrapWidth = 0.f |
| float | itemHeight = 0.f |
| FlexDirection | flexDirection = FlexDirection::Row |
| FlexAlign | alignItems = FlexAlign::Start |
| FlexJustify | justifyContent = FlexJustify::Start |
| float | gap = -1.f |
| float | flexGrow = 0.f |
| float | flexShrink = 1.f |
| float | flexBasis = -1.f |
| int | alignSelf = -1 |
| float | columnGap = -1.f |
| float | rowGap = -1.f |
| FlexWrap | flexWrap = FlexWrap::NoWrap |
| OverflowMode | overflow = OverflowMode::Visible |
| int | gridColumns = 1 |
| int | gridColumnSpan = 1 |
| std::function< void()> | onClick |
| Void. | |
| std::function< void(bool)> | onToggle |
| Void. | |
| std::function< void(float)> | onValue |
| Void. | |
| std::function< void(const std::string &)> | onTextChange |
| Void. | |
| std::vector< WidgetDesc > | children |
详细描述
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
成员函数说明
◆ child()
|
inline |
◆ reconcileKey()
|
inline |
◆ withAbsolute()
|
inline |
◆ withAccessibility()
|
inline |
Supplies the semantic role and labels exposed to accessibility clients.
被这些函数引用 eve::ui::buildPropertyField().
◆ withAlign()
|
inline |
◆ withAlignSelf()
|
inline |
◆ withAspectRatio()
|
inline |
◆ withChecked()
|
inline |
◆ withClick()
|
inline |
◆ withCornerRadius()
|
inline |
◆ withDragSource()
|
inline |
Marks this widget as a desktop drag source with an owning text payload.
引用了 dragPayloadText, dragPayloadType, dragSource, payloadText , 以及 payloadType.
◆ withDropTarget()
|
inline |
Marks this widget as a desktop drop target for one type or "*".
引用了 acceptedDropType , 以及 dropTarget.
◆ withEnabled()
|
inline |
◆ withFlexBasis()
|
inline |
◆ withFlexDirection()
|
inline |
◆ withFlexGrow()
|
inline |
◆ withFlexShrink()
|
inline |
◆ withFlexWrap()
|
inline |
◆ withFocusMode()
|
inline |
Selects how the widget participates in keyboard focus navigation.
被这些函数引用 eve::ui::buildPropertyField().
◆ withFocusNeighbors()
|
inline |
◆ withFocusOrder()
|
inline |
Assigns explicit previous and next focus-neighbor widget identifiers.
引用了 focusNext, focusPrevious , 以及 previous.
◆ withGap()
|
inline |
◆ withGaps()
|
inline |
◆ withGridColumnSpan()
|
inline |
◆ withId()
|
inline |
◆ withItemHeight()
|
inline |
◆ withJustify()
|
inline |
◆ withKey()
|
inline |
With key.
被这些函数引用 eve::ui::listButtons() , 以及 eve::ui::virtualList().
◆ withMargin()
|
inline |
◆ withMaxSize()
|
inline |
◆ withMinSize()
|
inline |
◆ withMouseFilter()
|
inline |
Selects whether pointer input stops, passes through, or ignores this widget.
引用了 mouseFilter , 以及 v.
被这些函数引用 eve::ui::buildPropertyField().
◆ withNinePatch()
|
inline |
◆ withOpen()
|
inline |
◆ withOverflow()
|
inline |
◆ withPadding()
|
inline |
◆ withPercent()
|
inline |
◆ withRange()
|
inline |
◆ withSize()
|
inline |
◆ withStyleClass()
|
inline |
Applies a named sparse style class resolved when the tree is built.
引用了 styleClass , 以及 v.
◆ withTabIndex()
|
inline |
◆ withText()
|
inline |
◆ withTextChange()
|
inline |
◆ withTheme()
|
inline |
Overrides the built-in theme for this widget subtree.
引用了 themePreset , 以及 v.
◆ withTint()
|
inline |
◆ withToggle()
|
inline |
◆ withTooltip()
|
inline |
◆ withUv()
|
inline |
◆ withValue()
|
inline |
◆ withValueFn()
|
inline |
◆ withValueText()
|
inline |
◆ withVisible()
|
inline |
◆ withWrap()
|
inline |
类成员变量说明
◆ absolute
| bool eve::ui::WidgetDesc::absolute = false |
被这些函数引用 eve::ui::measureNode() , 以及 withAbsolute().
◆ acceptedDropType
| std::string eve::ui::WidgetDesc::acceptedDropType |
被这些函数引用 withDropTarget().
◆ accessibilityDescription
◆ accessibilityName
◆ accessibilityRole
| AccessibilityRole eve::ui::WidgetDesc::accessibilityRole = AccessibilityRole::Auto |
◆ alignItems
| FlexAlign eve::ui::WidgetDesc::alignItems = FlexAlign::Start |
被这些函数引用 withAlign().
◆ alignSelf
| int eve::ui::WidgetDesc::alignSelf = -1 |
被这些函数引用 withAlignSelf().
◆ anchorX
| float eve::ui::WidgetDesc::anchorX = 0.f |
被这些函数引用 withAbsolute().
◆ anchorY
| float eve::ui::WidgetDesc::anchorY = 0.f |
被这些函数引用 withAbsolute().
◆ aspectRatio
| float eve::ui::WidgetDesc::aspectRatio = 0.f |
◆ borderB
| float eve::ui::WidgetDesc::borderB = 0.f |
被这些函数引用 withNinePatch().
◆ borderL
| float eve::ui::WidgetDesc::borderL = 0.f |
被这些函数引用 withNinePatch().
◆ borderR
| float eve::ui::WidgetDesc::borderR = 0.f |
被这些函数引用 withNinePatch().
◆ borderT
| float eve::ui::WidgetDesc::borderT = 0.f |
被这些函数引用 withNinePatch().
◆ checked
| bool eve::ui::WidgetDesc::checked = false |
◆ children
| std::vector<WidgetDesc> eve::ui::WidgetDesc::children |
被这些函数引用 eve::ui::UI::addBadge(), eve::ui::UI::addButton(), eve::ui::UI::addCheckbox(), eve::ui::UI::addColorPalette(), eve::ui::UI::addCombo(), eve::ui::UI::addIcon(), eve::ui::UI::addIconButton(), eve::ui::UI::addImage(), eve::ui::UI::addImageButton(), eve::ui::UI::addInputText(), eve::ui::UI::addMenuItem(), eve::ui::UI::addNinePatch(), eve::ui::UI::addProgress(), eve::ui::UI::addSameLine(), eve::ui::UI::addSearchField(), eve::ui::UI::addSectionHeader(), eve::ui::UI::addSeparator(), eve::ui::UI::addSlider(), eve::ui::UI::addSpacer(), eve::ui::UI::addSwitch(), eve::ui::UI::addText(), eve::ui::UI::addTextWrapped(), eve::ui::UI::addViewport(), child() , 以及 eve::ui::virtualList().
◆ columnGap
| float eve::ui::WidgetDesc::columnGap = -1.f |
被这些函数引用 eve::ui::UI::beginGrid() , 以及 withGaps().
◆ cornerRadius
| float eve::ui::WidgetDesc::cornerRadius = 0.f |
被这些函数引用 withCornerRadius().
◆ dragPayloadText
| std::string eve::ui::WidgetDesc::dragPayloadText |
被这些函数引用 withDragSource().
◆ dragPayloadType
| std::string eve::ui::WidgetDesc::dragPayloadType |
被这些函数引用 withDragSource().
◆ dragSource
| bool eve::ui::WidgetDesc::dragSource = false |
被这些函数引用 withDragSource().
◆ dropTarget
| bool eve::ui::WidgetDesc::dropTarget = false |
被这些函数引用 withDropTarget().
◆ enabled
| bool eve::ui::WidgetDesc::enabled = true |
被这些函数引用 withEnabled().
◆ flexBasis
| float eve::ui::WidgetDesc::flexBasis = -1.f |
被这些函数引用 withFlexBasis().
◆ flexDirection
| FlexDirection eve::ui::WidgetDesc::flexDirection = FlexDirection::Row |
被这些函数引用 eve::ui::measureNode() , 以及 withFlexDirection().
◆ flexGrow
| float eve::ui::WidgetDesc::flexGrow = 0.f |
被这些函数引用 withFlexGrow().
◆ flexShrink
| float eve::ui::WidgetDesc::flexShrink = 1.f |
被这些函数引用 withFlexShrink().
◆ flexWrap
| FlexWrap eve::ui::WidgetDesc::flexWrap = FlexWrap::NoWrap |
被这些函数引用 withFlexWrap().
◆ focusDown
| std::string eve::ui::WidgetDesc::focusDown |
被这些函数引用 withFocusNeighbors().
◆ focusLeft
| std::string eve::ui::WidgetDesc::focusLeft |
被这些函数引用 withFocusNeighbors().
◆ focusMode
| FocusMode eve::ui::WidgetDesc::focusMode = FocusMode::All |
被这些函数引用 withFocusMode().
◆ focusNext
| std::string eve::ui::WidgetDesc::focusNext |
被这些函数引用 withFocusOrder().
◆ focusPrevious
| std::string eve::ui::WidgetDesc::focusPrevious |
被这些函数引用 withFocusOrder().
◆ focusRight
| std::string eve::ui::WidgetDesc::focusRight |
被这些函数引用 withFocusNeighbors().
◆ focusUp
| std::string eve::ui::WidgetDesc::focusUp |
被这些函数引用 withFocusNeighbors().
◆ gap
| float eve::ui::WidgetDesc::gap = -1.f |
被这些函数引用 eve::ui::UI::beginFlex() , 以及 withGap().
◆ gridColumns
◆ gridColumnSpan
| int eve::ui::WidgetDesc::gridColumnSpan = 1 |
被这些函数引用 eve::ui::measureNode() , 以及 withGridColumnSpan().
◆ id
| std::string eve::ui::WidgetDesc::id |
被这些函数引用 eve::archspace::appendWallWithOpenings(), eve::procgen::road::detail::bakeTrafficControlPoints(), eve::procgen::ObjectBuildLayer::build(), eve::ik::Skeleton2D::createBone(), eve::ik::Skeleton3D::createBone(), eve::sceneloader::SceneLoader::inspect(), eve::ui::list(), eve::card::CardContainerAdapter::prepare(), reconcileKey(), eve::card::CardContainerAdapter::snapshot(), eve::rts::NavigationSystem::step() , 以及 eve::card::CardContainerAdapter::validateInsert().
◆ itemHeight
| float eve::ui::WidgetDesc::itemHeight = 0.f |
被这些函数引用 withItemHeight().
◆ justifyContent
| FlexJustify eve::ui::WidgetDesc::justifyContent = FlexJustify::Start |
被这些函数引用 withJustify().
◆ key
| std::string eve::ui::WidgetDesc::key |
Reconciliation key; defaults to id when empty.
被这些函数引用 eve::localization_editing::LocalizationDocument::addRow(), eve::ui::list(), reconcileKey() , 以及 withKey().
◆ marginB
| float eve::ui::WidgetDesc::marginB = 0.f |
被这些函数引用 eve::ui::measureNode() , 以及 withMargin().
◆ marginL
| float eve::ui::WidgetDesc::marginL = 0.f |
被这些函数引用 eve::ui::gridArrange(), eve::ui::measureNode() , 以及 withMargin().
◆ marginR
| float eve::ui::WidgetDesc::marginR = 0.f |
被这些函数引用 eve::ui::measureNode() , 以及 withMargin().
◆ marginT
| float eve::ui::WidgetDesc::marginT = 0.f |
被这些函数引用 eve::ui::measureNode() , 以及 withMargin().
◆ maxSizeX
| float eve::ui::WidgetDesc::maxSizeX = 0.f |
被这些函数引用 withMaxSize().
◆ maxSizeY
| float eve::ui::WidgetDesc::maxSizeY = 0.f |
被这些函数引用 withMaxSize().
◆ maxValue
| float eve::ui::WidgetDesc::maxValue = 1.f |
被这些函数引用 withRange().
◆ minSizeX
| float eve::ui::WidgetDesc::minSizeX = 0.f |
被这些函数引用 withMinSize().
◆ minSizeY
| float eve::ui::WidgetDesc::minSizeY = 0.f |
被这些函数引用 withMinSize().
◆ minValue
| float eve::ui::WidgetDesc::minValue = 0.f |
被这些函数引用 withRange().
◆ mouseFilter
| MouseFilter eve::ui::WidgetDesc::mouseFilter = MouseFilter::Stop |
被这些函数引用 withMouseFilter().
◆ onClick
| std::function<void()> eve::ui::WidgetDesc::onClick |
◆ onTextChange
| std::function<void(const std::string &)> eve::ui::WidgetDesc::onTextChange |
◆ onToggle
| std::function<void(bool)> eve::ui::WidgetDesc::onToggle |
◆ onValue
| std::function<void(float)> eve::ui::WidgetDesc::onValue |
◆ open
| bool eve::ui::WidgetDesc::open = true |
被这些函数引用 withOpen().
◆ overflow
| OverflowMode eve::ui::WidgetDesc::overflow = OverflowMode::Visible |
被这些函数引用 withOverflow().
◆ paddingB
| float eve::ui::WidgetDesc::paddingB = 0.f |
被这些函数引用 withPadding().
◆ paddingL
| float eve::ui::WidgetDesc::paddingL = 0.f |
被这些函数引用 eve::ui::measureNode() , 以及 withPadding().
◆ paddingR
| float eve::ui::WidgetDesc::paddingR = 0.f |
被这些函数引用 withPadding().
◆ paddingT
| float eve::ui::WidgetDesc::paddingT = 0.f |
被这些函数引用 eve::ui::measureNode() , 以及 withPadding().
◆ percentH
| float eve::ui::WidgetDesc::percentH = 0.f |
被这些函数引用 withPercent().
◆ percentW
| float eve::ui::WidgetDesc::percentW = 0.f |
被这些函数引用 withPercent().
◆ posX
| float eve::ui::WidgetDesc::posX = 0.f |
被这些函数引用 withAbsolute().
◆ posY
| float eve::ui::WidgetDesc::posY = 0.f |
被这些函数引用 withAbsolute().
◆ rowGap
| float eve::ui::WidgetDesc::rowGap = -1.f |
被这些函数引用 withGaps().
◆ sizeX
| float eve::ui::WidgetDesc::sizeX = 0.f |
被这些函数引用 eve::ui::UI::beginNinePatch() , 以及 withSize().
◆ sizeY
| float eve::ui::WidgetDesc::sizeY = 0.f |
被这些函数引用 withSize().
◆ styleClass
| std::string eve::ui::WidgetDesc::styleClass |
被这些函数引用 eve::ui::UI::setStyleScope() , 以及 withStyleClass().
◆ tabIndex
| int eve::ui::WidgetDesc::tabIndex = 0 |
被这些函数引用 withTabIndex().
◆ text
| std::string eve::ui::WidgetDesc::text |
◆ textureId
◆ themePreset
| ThemePreset eve::ui::WidgetDesc::themePreset = ThemePreset::Inherit |
被这些函数引用 eve::ui::UI::setThemeScope() , 以及 withTheme().
◆ tintA
| float eve::ui::WidgetDesc::tintA = 1.f |
被这些函数引用 withTint().
◆ tintB
| float eve::ui::WidgetDesc::tintB = 1.f |
被这些函数引用 withTint().
◆ tintG
| float eve::ui::WidgetDesc::tintG = 1.f |
被这些函数引用 withTint().
◆ tintR
| float eve::ui::WidgetDesc::tintR = 1.f |
被这些函数引用 withTint().
◆ tooltip
| std::string eve::ui::WidgetDesc::tooltip |
被这些函数引用 withTooltip().
◆ type
| NodeType eve::ui::WidgetDesc::type = NodeType::Text |
被这些函数引用 eve::ui::badge(), eve::ui::UI::beginSplitPane(), eve::ui::button(), eve::ui::card(), eve::ui::checkbox(), eve::ui::child(), eve::ui::collapsingHeader(), eve::ui::colorPalette(), eve::ui::combo(), eve::ui::flex(), eve::ui::grid(), eve::ui::group(), eve::ui::image(), eve::ui::imageButton(), eve::ui::inputText(), eve::ui::menu(), eve::ui::menuBar(), eve::ui::menuItem(), eve::ui::ninePatchPanel(), eve::ui::progress(), eve::ui::sameLine(), eve::ui::scrollList(), eve::ui::searchField(), eve::ui::sectionHeader(), eve::ui::separator(), eve::ui::sidebar(), eve::ui::slider(), eve::ui::spacer(), eve::ui::splitPane(), eve::ui::statusBar(), eve::ui::text(), eve::ui::toggleSwitch(), eve::ui::toolbar(), eve::ui::toolbox(), eve::card::CardContainerAdapter::validateInsert(), eve::ui::viewport() , 以及 eve::ui::window().
◆ uv0x
◆ uv0y
◆ uv1x
◆ uv1y
◆ value
| float eve::ui::WidgetDesc::value = 0.f |
◆ valueText
| std::string eve::ui::WidgetDesc::valueText |
被这些函数引用 withValueText().
◆ visible
| bool eve::ui::WidgetDesc::visible = true |
被这些函数引用 eve::ui::measureNode() , 以及 withVisible().
◆ wrapWidth
| float eve::ui::WidgetDesc::wrapWidth = 0.f |
被这些函数引用 withWrap().
该结构体的文档由以下文件生成:
- src/modules/ui/Widget.h