Scene hierarchy panel (DevTools, MVVM). 更多...
#include <ScenePanel.h>
Public 成员函数 | |
| ScenePanel ()=default | |
| ~ScenePanel () | |
| ScenePanel (const ScenePanel &)=delete | |
| ScenePanel & | operator= (const ScenePanel &)=delete |
| void | open () |
| Mounts (or updates) the scene host on the UI ECS world. | |
| void | close () |
| Hides the scene host. | |
| bool | isOpen () const |
| True while the scene host is mounted and visible. | |
| UIHost * | host () const |
| The mounted host (nullptr until open()); for embedding/tests. | |
| void | refresh () |
| Re-queries the scene graph and rebuilds the tree. | |
| bool | selectNode (const std::string &id) |
| Selects a node by id; false when unknown or no scene module. | |
| const std::string & | selectedNode () const |
| Id of the selected node ("" when none). | |
| void | setPickHandler (std::function< void(const std::string &)> handler) |
| Registers the pick handler for the Pick button. | |
| WidgetDesc | build () |
| Declarative tree of the current scene state. | |
详细描述
Scene hierarchy panel (DevTools, MVVM).
Queries the optional scene module through the ISceneQuery capability (no direct scene dependency): renders a collapsible node tree, lets the user select a node and edit its transform / visibility, and offers a Pick button that hands the selected node id to a script-side handler (which maps it to a live script instance for the Inspector).
在文件 ScenePanel.h 第 27 行定义.
构造及析构函数说明
◆ ScenePanel() [1/2]
|
default |
◆ ~ScenePanel()
| eve::ui::ScenePanel::~ScenePanel | ( | ) |
在文件 ScenePanel.cpp 第 17 行定义.
引用了 eve::ui::UIHost::setTree() , 以及 eve::ui::window().
◆ ScenePanel() [2/2]
|
delete |
成员函数说明
◆ build()
| WidgetDesc eve::ui::ScenePanel::build | ( | ) |
Declarative tree of the current scene state.
在文件 ScenePanel.cpp 第 72 行定义.
引用了 eve::ISceneQuery::activeHost(), eve::ui::button(), eve::ui::checkbox(), children, eve::ISceneQuery::getNode(), eve::SceneNodeInfo::id, eve::ui::inputText(), n, eve::ISceneQuery::nodes(), eve::SceneNodeInfo::path, eve::cap::query(), refresh(), eve::ui::row(), eve::ui::separator(), eve::ui::spacer(), eve::ui::text(), v, eve::SceneNodeInfo::visible, eve::ui::window(), eve::SceneNodeInfo::x, eve::SceneNodeInfo::y , 以及 eve::SceneNodeInfo::z.
被这些函数引用 refresh().
◆ close()
| void eve::ui::ScenePanel::close | ( | ) |
◆ host()
|
inline |
The mounted host (nullptr until open()); for embedding/tests.
在文件 ScenePanel.h 第 41 行定义.
◆ isOpen()
| bool eve::ui::ScenePanel::isOpen | ( | ) | const |
True while the scene host is mounted and visible.
在文件 ScenePanel.cpp 第 32 行定义.
◆ open()
| void eve::ui::ScenePanel::open | ( | ) |
Mounts (or updates) the scene host on the UI ECS world.
在文件 ScenePanel.cpp 第 21 行定义.
引用了 eve::ui::UIHost::createHost(), refresh(), eve::ui::UIHost::setLayer() , 以及 eve::ui::UIHost::setVisible().
◆ operator=()
|
delete |
◆ refresh()
| void eve::ui::ScenePanel::refresh | ( | ) |
Re-queries the scene graph and rebuilds the tree.
在文件 ScenePanel.cpp 第 36 行定义.
引用了 build() , 以及 eve::ui::UIHost::setTree().
◆ selectedNode()
|
inline |
Id of the selected node ("" when none).
在文件 ScenePanel.h 第 48 行定义.
◆ selectNode()
| bool eve::ui::ScenePanel::selectNode | ( | const std::string & | id | ) |
Selects a node by id; false when unknown or no scene module.
在文件 ScenePanel.cpp 第 40 行定义.
引用了 eve::ISceneQuery::getNode(), id , 以及 eve::cap::query().
◆ setPickHandler()
| void eve::ui::ScenePanel::setPickHandler | ( | std::function< void(const std::string &)> | handler | ) |
Registers the pick handler for the Pick button.
- 参数
-
handler Receives the selected node id ("" = none).
在文件 ScenePanel.cpp 第 50 行定义.
该类的文档由以下文件生成:
- src/modules/ui/ScenePanel.h
- src/modules/ui/ScenePanel.cpp