IEditorTool adapter whose lifecycle and input callbacks are Squirrel closures. 更多...
#include <ScriptEditorTool.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ScriptEditorTool (std::string id, std::string label) | |
| Constructs a ScriptEditorTool. | |
| ~ScriptEditorTool () override | |
| Releases ScriptEditorTool resources. | |
| ScriptEditorTool (const ScriptEditorTool &)=delete | |
| ScriptEditorTool & | operator= (const ScriptEditorTool &)=delete |
| const ToolDescriptor & | descriptor () const override |
| Descriptor. | |
| void | setShortcut (const std::string &shortcut) |
| Set the shortcut shown by hosts. | |
| void | setActivateCallback (ssq::Object callback) |
| Set a closure invoked when the tool becomes active. | |
| void | setDeactivateCallback (ssq::Object callback) |
| Set a closure invoked when the tool becomes inactive. | |
| void | setPointerCallback (ssq::Object callback) |
| Set a closure invoked for normalized pointer input. | |
| void | setKeyCallback (ssq::Object callback) |
| Set a closure invoked for normalized key input. | |
| void | setUpdateCallback (ssq::Object callback) |
| Set a closure invoked every active frame with delta time. | |
| void | setCancelCallback (ssq::Object callback) |
| Set a closure invoked when the current gesture is cancelled. | |
| void | activate (EditorContext &context) override |
| Activate. | |
| void | deactivate (EditorContext &context) override |
| Deactivate. | |
| ToolResponse | pointerEvent (EditorContext &context, const EditorPointerEvent &event) override |
| Pointer event. | |
| ToolResponse | keyEvent (EditorContext &context, const EditorKeyEvent &event) override |
| Key event. | |
| void | update (EditorContext &context, float dt) override |
| Updates . | |
| void | cancel (EditorContext &context) override |
| Cancel. | |
Public 成员函数 继承自 eve::editor::IEditorTool | |
| virtual | ~IEditorTool ()=default |
| Releases IEditorTool resources. | |
| virtual void | drawOverlay (EditorContext &context, IEditorOverlay &overlay) |
| Emit renderer-independent feedback for the active viewport. | |
| virtual void | inspect (EditorContext &context, IEditorInspector &inspector) |
| Expose configurable settings through a host-provided inspector. | |
详细描述
IEditorTool adapter whose lifecycle and input callbacks are Squirrel closures.
Pointer/key callbacks return bit flags: 1 handled, 2 capture pointer, 4 release pointer. Missing callbacks behave like the default IEditorTool implementation.
在文件 ScriptEditorTool.h 第 17 行定义.
构造及析构函数说明
◆ ScriptEditorTool() [1/2]
| eve::editor::ScriptEditorTool::ScriptEditorTool | ( | std::string | id, |
| std::string | label | ||
| ) |
◆ ~ScriptEditorTool()
|
overridedefault |
Releases ScriptEditorTool resources.
◆ ScriptEditorTool() [2/2]
|
delete |
成员函数说明
◆ activate()
|
overridevirtual |
◆ cancel()
|
overridevirtual |
◆ deactivate()
|
overridevirtual |
◆ descriptor()
|
overridevirtual |
◆ keyEvent()
|
overridevirtual |
◆ operator=()
|
delete |
◆ pointerEvent()
|
overridevirtual |
Pointer event.
在文件 ScriptEditorTool.cpp 第 79 行定义.
引用了 eve::editor::EditorPointerEvent::alt, eve::editor::EditorPointerEvent::button, eve::editor::EditorPointerEvent::control, eve::editor::EditorPointerEvent::deltaX, eve::editor::EditorPointerEvent::deltaY, eve::editor::EditorPointerEvent::phase, eve::editor::EditorPointerEvent::pointerId, eve::editor::EditorPointerEvent::pressure, eve::editor::EditorPointerEvent::shift, eve::editor::EditorPointerEvent::x , 以及 eve::editor::EditorPointerEvent::y.
◆ setActivateCallback()
| void eve::editor::ScriptEditorTool::setActivateCallback | ( | ssq::Object | callback | ) |
Set a closure invoked when the tool becomes active.
在文件 ScriptEditorTool.cpp 第 67 行定义.
引用了 callback.
◆ setCancelCallback()
| void eve::editor::ScriptEditorTool::setCancelCallback | ( | ssq::Object | callback | ) |
Set a closure invoked when the current gesture is cancelled.
在文件 ScriptEditorTool.cpp 第 72 行定义.
引用了 callback.
◆ setDeactivateCallback()
| void eve::editor::ScriptEditorTool::setDeactivateCallback | ( | ssq::Object | callback | ) |
Set a closure invoked when the tool becomes inactive.
在文件 ScriptEditorTool.cpp 第 68 行定义.
引用了 callback.
◆ setKeyCallback()
| void eve::editor::ScriptEditorTool::setKeyCallback | ( | ssq::Object | callback | ) |
◆ setPointerCallback()
| void eve::editor::ScriptEditorTool::setPointerCallback | ( | ssq::Object | callback | ) |
Set a closure invoked for normalized pointer input.
在文件 ScriptEditorTool.cpp 第 69 行定义.
引用了 callback.
◆ setShortcut()
| void eve::editor::ScriptEditorTool::setShortcut | ( | const std::string & | shortcut | ) |
Set the shortcut shown by hosts.
在文件 ScriptEditorTool.cpp 第 66 行定义.
◆ setUpdateCallback()
| void eve::editor::ScriptEditorTool::setUpdateCallback | ( | ssq::Object | callback | ) |
Set a closure invoked every active frame with delta time.
在文件 ScriptEditorTool.cpp 第 71 行定义.
引用了 callback.
◆ update()
|
overridevirtual |
该类的文档由以下文件生成:
- src/modules/editor/ScriptEditorTool.h
- src/modules/editor/ScriptEditorTool.cpp
Public 成员函数 继承自