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

React-style UI component: implement build(), call setState / markDirty, then rebuild(). Mounts onto a named UIHost via mountAs / attach. 更多...

#include <Component.h>

Public 成员函数

virtual ~Component ()=default
 
virtual WidgetDesc build ()=0
 
void attach (UIHost *host)
 
void mountAs (const std::string &hostName)
 
UIHosthost () const
 
void rebuild (bool forceFull=false)
 Rebuild tree onto host (reconcile by key when possible).
 
void markDirty ()
 
bool isDirty () const
 
bool updateIfDirty ()
 If dirty, rebuild and clear flag. Returns true if rebuilt.
 

Protected 成员函数

void setState ()
 Subclasses call after mutating local state that affects build().
 

详细描述

React-style UI component: implement build(), call setState / markDirty, then rebuild(). Mounts onto a named UIHost via mountAs / attach.

在文件 Component.h15 行定义.

构造及析构函数说明

◆ ~Component()

virtual eve::ui::Component::~Component ( )
virtualdefault

成员函数说明

◆ attach()

void eve::ui::Component::attach ( UIHost host)

在文件 Component.cpp7 行定义.

引用了 host().

被这些函数引用 mountAs().

◆ build()

virtual WidgetDesc eve::ui::Component::build ( )
pure virtual

被这些函数引用 rebuild().

◆ host()

UIHost * eve::ui::Component::host ( ) const
inline

在文件 Component.h23 行定义.

被这些函数引用 attach().

◆ isDirty()

bool eve::ui::Component::isDirty ( ) const
inline

在文件 Component.h29 行定义.

◆ markDirty()

void eve::ui::Component::markDirty ( )
inline

在文件 Component.h28 行定义.

◆ mountAs()

void eve::ui::Component::mountAs ( const std::string &  hostName)

◆ rebuild()

void eve::ui::Component::rebuild ( bool  forceFull = false)

Rebuild tree onto host (reconcile by key when possible).

在文件 Component.cpp19 行定义.

引用了 build(), eve::ui::UIHost::setTree() , 以及 eve::ui::UIHost::setTreeReconcile().

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

◆ setState()

void eve::ui::Component::setState ( )
inlineprotected

Subclasses call after mutating local state that affects build().

在文件 Component.h36 行定义.

◆ updateIfDirty()

bool eve::ui::Component::updateIfDirty ( )

If dirty, rebuild and clear flag. Returns true if rebuilt.

在文件 Component.cpp27 行定义.

引用了 rebuild().


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