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

Scene hierarchy panel (DevTools, MVVM). 更多...

#include <ScenePanel.h>

Public 成员函数

 ScenePanel ()=default
 Scene panel.
 
 ~ScenePanel ()
 Scene panel.
 
 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.
 
UIHostHandle host () const noexcept
 Returns the mounted scene host handle, or an empty handle until open().
 
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]

eve::ui::ScenePanel::ScenePanel ( )
default

Scene panel.

◆ ~ScenePanel()

eve::ui::ScenePanel::~ScenePanel ( )

Scene panel.

在文件 ScenePanel.cpp 第 17 行定义.

引用了 host(), eve::ui::UIHost::resolve() , 以及 eve::ui::window().

◆ ScenePanel() [2/2]

eve::ui::ScenePanel::ScenePanel ( const ScenePanel &  )
delete

成员函数说明

◆ build()

WidgetDesc eve::ui::ScenePanel::build ( )

Declarative tree of the current scene state.

在文件 ScenePanel.cpp 第 78 行定义.

引用了 eve::ui::button(), eve::ui::checkbox(), children, eve::SceneNodeInfo::id, info, eve::ui::inputText(), n, node, nodes, refresh(), eve::ui::row(), scene, eve::ui::separator(), eve::ui::spacer(), t, text, v , 以及 eve::ui::window().

被这些函数引用 refresh().

◆ close()

void eve::ui::ScenePanel::close ( )

Hides the scene host.

在文件 ScenePanel.cpp 第 33 行定义.

引用了 host() , 以及 eve::ui::UIHost::resolve().

◆ host()

UIHostHandle eve::ui::ScenePanel::host ( ) const
inlinenoexcept

Returns the mounted scene host handle, or an empty handle until open().

在文件 ScenePanel.h 第 43 行定义.

被这些函数引用 close(), isOpen(), open(), refresh() , 以及 ~ScenePanel().

◆ isOpen()

bool eve::ui::ScenePanel::isOpen ( ) const

True while the scene host is mounted and visible.

在文件 ScenePanel.cpp 第 37 行定义.

引用了 host() , 以及 eve::ui::UIHost::resolve().

◆ open()

void eve::ui::ScenePanel::open ( )

Mounts (or updates) the scene host on the UI ECS world.

在文件 ScenePanel.cpp 第 21 行定义.

引用了 eve::ui::UIHost::createHost(), host(), refresh() , 以及 eve::ui::UIHost::resolve().

◆ operator=()

ScenePanel & eve::ui::ScenePanel::operator= ( const ScenePanel &  )
delete

◆ refresh()

void eve::ui::ScenePanel::refresh ( )

Re-queries the scene graph and rebuilds the tree.

在文件 ScenePanel.cpp 第 42 行定义.

引用了 build(), host() , 以及 eve::ui::UIHost::resolve().

被这些函数引用 build() , 以及 open().

◆ selectedNode()

const std::string & eve::ui::ScenePanel::selectedNode ( ) const
inline

Id of the selected node ("" when none).

在文件 ScenePanel.h 第 50 行定义.

◆ selectNode()

bool eve::ui::ScenePanel::selectNode ( const std::string &  id)

Selects a node by id; false when unknown or no scene module.

在文件 ScenePanel.cpp 第 46 行定义.

引用了 id, info , 以及 scene.

◆ setPickHandler()

void eve::ui::ScenePanel::setPickHandler ( std::function< void(const std::string &)>  handler)

Registers the pick handler for the Pick button.

参数
handlerReceives the selected node id ("" = none).

在文件 ScenePanel.cpp 第 56 行定义.

引用了 handler.


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