Declarative widget description (build once / on dirty → flatten into UIHost::Tree). 更多...
#include <Widget.h>
Public 成员函数 | |
| WidgetDesc & | withId (std::string v) |
| WidgetDesc & | withKey (std::string v) |
| WidgetDesc & | withText (std::string v) |
| WidgetDesc & | withValueText (std::string v) |
| WidgetDesc & | withVisible (bool v) |
| WidgetDesc & | withChecked (bool v) |
| WidgetDesc & | withOpen (bool v) |
| WidgetDesc & | withValue (float v) |
| WidgetDesc & | withRange (float lo, float hi) |
| WidgetDesc & | withSize (float w, float h) |
| WidgetDesc & | withMargin (float l, float t, float r, float b) |
| WidgetDesc & | withPadding (float l, float t, float r, float b) |
| WidgetDesc & | withMinSize (float w, float h) |
| WidgetDesc & | withMaxSize (float w, float h) |
| WidgetDesc & | withPercent (float w, float h) |
| WidgetDesc & | withAbsolute (float ax, float ay, float x=0.f, float y=0.f) |
| WidgetDesc & | withTint (float r, float g, float b, float a=1.f) |
| WidgetDesc & | withUv (float u0, float v0, float u1, float v1) |
| WidgetDesc & | withNinePatch (float l, float t, float r, float b) |
| WidgetDesc & | withCornerRadius (float radius) |
| WidgetDesc & | withWrap (float width) |
| WidgetDesc & | withItemHeight (float height) |
| WidgetDesc & | withGap (float g) |
| WidgetDesc & | withFlexDirection (FlexDirection d) |
| WidgetDesc & | withAlign (FlexAlign a) |
| WidgetDesc & | withJustify (FlexJustify j) |
| WidgetDesc & | withFlexGrow (float g) |
| WidgetDesc & | withClick (std::function< void()> fn) |
| WidgetDesc & | withToggle (std::function< void(bool)> fn) |
| WidgetDesc & | withValueFn (std::function< void(float)> fn) |
| WidgetDesc & | withTextChange (std::function< void(const std::string &)> fn) |
| WidgetDesc & | child (WidgetDesc c) |
| const std::string & | reconcileKey () const |
Public 属性 | |
| NodeType | type = NodeType::Text |
| std::string | id |
| std::string | key |
| Reconciliation key; defaults to id when empty. | |
| std::string | text |
| std::string | valueText |
| bool | visible = true |
| bool | checked = false |
| bool | open = true |
| 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 | 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 |
| std::function< void()> | onClick |
| std::function< void(bool)> | onToggle |
| std::function< void(float)> | onValue |
| std::function< void(const std::string &)> | onTextChange |
| std::vector< WidgetDesc > | children |
详细描述
Declarative widget description (build once / on dirty → flatten into UIHost::Tree).
成员函数说明
◆ child()
|
inline |
◆ reconcileKey()
|
inline |
◆ withAbsolute()
|
inline |
◆ withAlign()
|
inline |
引用了 a , 以及 alignItems.
◆ withChecked()
|
inline |
◆ withClick()
|
inline |
◆ withCornerRadius()
|
inline |
引用了 cornerRadius.
◆ withFlexDirection()
|
inline |
引用了 d , 以及 flexDirection.
◆ withFlexGrow()
|
inline |
◆ withGap()
|
inline |
◆ withId()
|
inline |
◆ withItemHeight()
|
inline |
引用了 height , 以及 itemHeight.
◆ withJustify()
|
inline |
引用了 justifyContent.
◆ withKey()
|
inline |
◆ withMargin()
|
inline |
◆ withMaxSize()
|
inline |
◆ withMinSize()
|
inline |
◆ withNinePatch()
|
inline |
◆ withOpen()
|
inline |
◆ withPadding()
|
inline |
◆ withPercent()
|
inline |
◆ withRange()
|
inline |
◆ withSize()
|
inline |
◆ withText()
|
inline |
◆ withTextChange()
|
inline |
引用了 fn , 以及 onTextChange.
◆ withTint()
|
inline |
◆ withToggle()
|
inline |
◆ withUv()
|
inline |
◆ withValue()
|
inline |
◆ withValueFn()
|
inline |
◆ withValueText()
|
inline |
◆ withVisible()
|
inline |
◆ withWrap()
|
inline |
类成员变量说明
◆ absolute
| bool eve::ui::WidgetDesc::absolute = false |
被这些函数引用 eve::ui::measureNode() , 以及 withAbsolute().
◆ alignItems
| FlexAlign eve::ui::WidgetDesc::alignItems = FlexAlign::Start |
被这些函数引用 withAlign().
◆ anchorX
| float eve::ui::WidgetDesc::anchorX = 0.f |
被这些函数引用 withAbsolute().
◆ anchorY
| float eve::ui::WidgetDesc::anchorY = 0.f |
被这些函数引用 withAbsolute().
◆ 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 |
被这些函数引用 withChecked().
◆ children
| std::vector<WidgetDesc> eve::ui::WidgetDesc::children |
被这些函数引用 eve::ui::UI::addButton(), eve::ui::UI::addCheckbox(), eve::ui::UI::addCombo(), eve::ui::UI::addImage(), eve::ui::UI::addImageButton(), eve::ui::UI::addInputText(), eve::ui::UI::addProgress(), eve::ui::UI::addSameLine(), eve::ui::UI::addSeparator(), eve::ui::UI::addSlider(), eve::ui::UI::addSpacer(), eve::ui::UI::addText(), eve::ui::UI::addTextWrapped(), eve::ui::UI::addViewport(), child() , 以及 eve::ui::virtualList().
◆ cornerRadius
| float eve::ui::WidgetDesc::cornerRadius = 0.f |
被这些函数引用 withCornerRadius().
◆ flexDirection
| FlexDirection eve::ui::WidgetDesc::flexDirection = FlexDirection::Row |
被这些函数引用 eve::ui::measureNode() , 以及 withFlexDirection().
◆ flexGrow
| float eve::ui::WidgetDesc::flexGrow = 0.f |
被这些函数引用 withFlexGrow().
◆ gap
| float eve::ui::WidgetDesc::gap = -1.f |
被这些函数引用 eve::ui::UI::beginFlex() , 以及 withGap().
◆ id
| std::string eve::ui::WidgetDesc::id |
◆ 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::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::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().
◆ onClick
| std::function<void()> eve::ui::WidgetDesc::onClick |
被这些函数引用 withClick().
◆ onTextChange
| std::function<void(const std::string &)> eve::ui::WidgetDesc::onTextChange |
被这些函数引用 withTextChange().
◆ onToggle
| std::function<void(bool)> eve::ui::WidgetDesc::onToggle |
被这些函数引用 withToggle().
◆ onValue
| std::function<void(float)> eve::ui::WidgetDesc::onValue |
被这些函数引用 withValueFn().
◆ open
| bool eve::ui::WidgetDesc::open = true |
被这些函数引用 withOpen().
◆ 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().
◆ sizeX
| float eve::ui::WidgetDesc::sizeX = 0.f |
被这些函数引用 withSize().
◆ sizeY
| float eve::ui::WidgetDesc::sizeY = 0.f |
被这些函数引用 withSize().
◆ text
| std::string eve::ui::WidgetDesc::text |
被这些函数引用 withText().
◆ textureId
◆ 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().
◆ type
| NodeType eve::ui::WidgetDesc::type = NodeType::Text |
被这些函数引用 eve::ui::button(), eve::ui::checkbox(), eve::ui::child(), eve::ui::collapsingHeader(), eve::ui::combo(), eve::ui::flex(), eve::ui::group(), eve::ui::image(), eve::ui::imageButton(), eve::ui::inputText(), eve::ui::progress(), eve::ui::sameLine(), eve::ui::scrollList(), eve::ui::separator(), eve::ui::slider(), eve::ui::spacer(), eve::ui::text(), eve::ui::viewport() , 以及 eve::ui::window().
◆ uv0x
◆ uv0y
◆ uv1x
◆ uv1y
◆ value
| float eve::ui::WidgetDesc::value = 0.f |
被这些函数引用 withValue().
◆ valueText
| std::string eve::ui::WidgetDesc::valueText |
被这些函数引用 withValueText().
◆ visible
| bool eve::ui::WidgetDesc::visible = true |
被这些函数引用 eve::ui::measureNode(), eve::ui::UIHost::setVisibleById() , 以及 withVisible().
◆ wrapWidth
| float eve::ui::WidgetDesc::wrapWidth = 0.f |
被这些函数引用 withWrap().
该结构体的文档由以下文件生成:
- src/modules/ui/Widget.h