WorkspaceModule
Object managing the I3T workspace node editor. More...
#include "GUI/Workspace/WorkspaceModule.h"
Inherits from Module, IStateful
Public Functions
Name | |
---|---|
WorkspaceModule() | |
virtual void | appendScene(const Memento & memento, Scene * scene) override<br>Called on scene append. |
virtual void | clearGlobal() override<br>Set the global state to some default empty state. |
virtual void | clearScene(bool newScene) override<br>Set the scene state to some default empty state. |
Workspace::WorkspaceDiwne & | getNodeEditor() |
virtual void | loadGlobal(const Memento & memento) override<br>Load global state from a memento. |
virtual void | loadScene(const Memento & memento, Scene * scene) override<br>Called on scene load, undo and redo. |
virtual Memento | saveGlobal() override<br>Save shared global state. |
virtual Memento | saveScene(Scene * scene) override<br>Save state for the current scene. |
template <typename T > <br>auto | addNodeToNodeEditor(ImVec2 const position =ImVec2(0, 0))<br>This function takes snapshot of current state. |
template <typename T > <br>auto | addNodeToNodeEditorNoSave(ImVec2 const position =ImVec2(0, 0)) |
bool | connectNodes(Ptr< Workspace::CoreNode > lhs, Ptr< Workspace::CoreNode > rhs, int lhsPin, int rhsPin) |
bool | connectNodesNoSave(Ptr< Workspace::CoreNode > lhs, Ptr< Workspace::CoreNode > rhs, int lhsPin, int rhsPin) |
Public Attributes
Name | |
---|---|
bool | g_createNodesOnInit |
Ptr< Workspace::WorkspaceDiwne > | g_editor |
int | g_pinStyle |
int | g_pinStyleModelMatrix |
int | g_pinStyleMul |
int | g_pinStylePulse |
int | g_pinStyleScreen |
WorkspaceSettings | g_settings |
Additional inherited members
Public Functions inherited from Module
Name | |
---|---|
Module() =default | |
virtual | ~Module() =default |
virtual void | onBeforeFrame() |
virtual void | onBeginFrame() |
virtual void | onClose() |
virtual void | onEndFrame() |
virtual void | onInit() |
virtual void | onUpdate(double deltaSeconds) |
Friends inherited from Module
Name | |
---|---|
class | Application |
Public Functions inherited from IStateful
Name | |
---|---|
virtual | ~IStateful() |
Memento | emptyMemento()<br>Create an empty memento (rapidjson::Document) |
Detailed Description
class WorkspaceModule;
class WorkspaceModule;
Object managing the I3T workspace node editor.
Separate from the WorkspaceWindow which merely offers a view upon it.
Public Functions Documentation
function WorkspaceModule
WorkspaceModule()
WorkspaceModule()
function appendScene
virtual void appendScene(
const Memento & memento,
Scene * scene
) override
virtual void appendScene(
const Memento & memento,
Scene * scene
) override
Called on scene append.
Parameters:
- scene The current scene
- memento Scene state to appended
Reimplements: IStateful::appendScene
function clearGlobal
virtual void clearGlobal() override
virtual void clearGlobal() override
Set the global state to some default empty state.
Reimplements: IStateful::clearGlobal
function clearScene
virtual void clearScene(
bool newScene
) override
virtual void clearScene(
bool newScene
) override
Set the scene state to some default empty state.
Parameters:
- newScene Whether to perform basic new scene initialization.
Reimplements: IStateful::clearScene
function getNodeEditor
Workspace::WorkspaceDiwne & getNodeEditor()
Workspace::WorkspaceDiwne & getNodeEditor()
function loadGlobal
virtual void loadGlobal(
const Memento & memento
) override
virtual void loadGlobal(
const Memento & memento
) override
Load global state from a memento.
Parameters:
- memento New global state
Reimplements: IStateful::loadGlobal
function loadScene
virtual void loadScene(
const Memento & memento,
Scene * scene
) override
virtual void loadScene(
const Memento & memento,
Scene * scene
) override
Called on scene load, undo and redo.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
- memento New scene state
Reimplements: IStateful::loadScene
function saveGlobal
virtual Memento saveGlobal() override
virtual Memento saveGlobal() override
Save shared global state.
Reimplements: IStateful::saveGlobal
function saveScene
virtual Memento saveScene(
Scene * scene
) override
virtual Memento saveScene(
Scene * scene
) override
Save state for the current scene.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
Reimplements: IStateful::saveScene
The scene parameter should contain a scene object for full filesystem saves and nullptr for quick undo/redo operations.
function addNodeToNodeEditor
template <typename T >
static inline auto addNodeToNodeEditor(
ImVec2 const position =ImVec2(0, 0)
)
template <typename T >
static inline auto addNodeToNodeEditor(
ImVec2 const position =ImVec2(0, 0)
)
This function takes snapshot of current state.
function addNodeToNodeEditorNoSave
template <typename T >
static inline auto addNodeToNodeEditorNoSave(
ImVec2 const position =ImVec2(0, 0)
)
template <typename T >
static inline auto addNodeToNodeEditorNoSave(
ImVec2 const position =ImVec2(0, 0)
)
function connectNodes
static bool connectNodes(
Ptr< Workspace::CoreNode > lhs,
Ptr< Workspace::CoreNode > rhs,
int lhsPin,
int rhsPin
)
static bool connectNodes(
Ptr< Workspace::CoreNode > lhs,
Ptr< Workspace::CoreNode > rhs,
int lhsPin,
int rhsPin
)
function connectNodesNoSave
static bool connectNodesNoSave(
Ptr< Workspace::CoreNode > lhs,
Ptr< Workspace::CoreNode > rhs,
int lhsPin,
int rhsPin
)
static bool connectNodesNoSave(
Ptr< Workspace::CoreNode > lhs,
Ptr< Workspace::CoreNode > rhs,
int lhsPin,
int rhsPin
)
Public Attributes Documentation
variable g_createNodesOnInit
static bool g_createNodesOnInit = true;
static bool g_createNodesOnInit = true;
variable g_editor
static Ptr< Workspace::WorkspaceDiwne > g_editor;
static Ptr< Workspace::WorkspaceDiwne > g_editor;
variable g_pinStyle
static int g_pinStyle = 1;
static int g_pinStyle = 1;
variable g_pinStyleModelMatrix
static int g_pinStyleModelMatrix = 2;
static int g_pinStyleModelMatrix = 2;
variable g_pinStyleMul
static int g_pinStyleMul = 0;
static int g_pinStyleMul = 0;
variable g_pinStylePulse
static int g_pinStylePulse = 0;
static int g_pinStylePulse = 0;
variable g_pinStyleScreen
static int g_pinStyleScreen = 0;
static int g_pinStyleScreen = 0;
variable g_settings
static WorkspaceSettings g_settings;
static WorkspaceSettings g_settings;
Updated on 2025-05-31 at 12:55:30 +0000