Skip to content

Workspace::WorkspaceDiwne

#include "GUI/Workspace/WorkspaceDiwne.h"

Inherits from DIWNE::NodeEditor, DIWNE::DiwneObject, DIWNE::NodeContainer, std::enable_shared_from_this< DiwneObject >, DIWNE::INodeContainer

Public Functions

Name
WorkspaceDiwne(const char * label, DIWNE::SettingsDiwne * settingsDiwne)
~WorkspaceDiwne() override
voidaddMenu()
template <class T &gt; <br>autoaddNodeToPositionOfPopup()
virtual voidbegin(DIWNE::DrawInfo & context) override<br>First method to be called during object drawing.
virtual voidcontent(DIWNE::DrawInfo & context) override<br>Called after begin() during drawing.
voidcopySelectedNodes()
voidcutSelectedNodes()
voidduplicateSelectedNodes()
virtual voidend(DIWNE::DrawInfo & context) override<br>Called after content().
virtual voidfinalize(DIWNE::DrawInfo & context) override<br>The final method to be called, gets called every frame and doesn't do any drawing.
DIWNE::FilteredNodeRange< Camera >getAllCameras()
DIWNE::FilteredRecursiveNodeRange< CoreNode >getAllCoreNodes() const<br>Gets all I3TCore nodes.
DIWNE::FilteredNodeRange< Model >getAllInputFreeModel()
DIWNE::FilteredNodeRange< Sequence >getAllInputFreeSequence()
DIWNE::FilteredNodeRange< Model >getAllModels()
DIWNE::FilteredRecursiveNodeRange< ScriptingNode >getAllScriptingNodes()
DIWNE::FilteredRecursiveNodeRange< CoreNode >getAllSelectedCoreNodes() const<br>Gets all I3TCore nodes that are selected.
DIWNE::FilteredRecursiveNodeRange< CoreNode >getAllSelectedCoreNodesWithoutNesting() const
DIWNE::FilteredNodeRange< CoreNode >getCoreNodes() const
template <typename T &gt; <br>Result< Ptr< T >, Error >getNode(Core::ID id) const<br>O(N) where N is workspace nodes count.
ImRectgetOverNodesRectangleDiwne(std::vector< Ptr< DIWNE::Node > > nodes)
Core::MatrixTracker *getTracker() const
boolisTracking() const
boolisTrackingFromLeft() const
voidmanipulatorStartCheck3D()
virtual voidonDrag(DIWNE::DrawInfo & context, bool dragStart, bool dragEnd) override<br>This method gets called when the object is being dragged.
virtual voidonPopup() override
virtual voidonZoom() override
voidpasteSelectedNodes()
voidperformLazyDuplication()<br>Duplicates nodes marked for duplication using Workspace::Node::setDuplicateNode()
virtual voidpopupContent(DIWNE::DrawInfo & context) override<br>Content of popup menu raised on this objec.
virtual voidprocessInteractions(DIWNE::DrawInfo & context) override<br>Method for reacting to user input after the object is fully drawn and its dimensions are known.
voidprocessTrackingInput()
boolreplaceAndReplugNode(Ptr< CoreNodeWithPins > oldNode, Ptr< CoreNodeWithPins > newNode)<br>Replaces existing old node with a specified new node.
voidstartTracking(Sequence * sequence, bool trackFromLeft)
voidstopTracking()
voidtoggleSelectedNodesVisibility()
voidtrackingJaggedLeft()
voidtrackingJaggedRight()
voidtrackingModeSwitch()
voidtrackingSmoothLeft()
voidtrackingSmoothRight()
voidzoomToAll()
voidzoomToRectangle(ImRect const & rect)
voidzoomToSelected()

Public Attributes

Name
Memento *copiedNodes
ImDrawListSplitterm_channelSplitter
std::unordered_map< Core::ID, CoreNode * >m_coreIdMap <br>A map connecting Core node id's with equivalent gui nodes.
boolm_highlightTrackedModels
boolm_smoothTracking
ImVec2m_trackingCursorPos
boolm_updateDataItemsWidth <br>Indicates a change in zoom level this frame.
ViewportHighlightResolverm_viewportHighlightResolver
Vp::Entity *m_viewportLastSelectedEntity
boolm_viewportSelectionChanged
boolm_visualizeDepth

Friends

Name
voidSequence::moveNodeToWorkspace(Ptr< CoreNode > node)

Additional inherited members

Public Functions inherited from DIWNE::NodeEditor

Name
NodeEditor(const char * label, SettingsDiwne * settingsDiwne)<br>Create a node editor instance.
~NodeEditor() override
voidaddLink(std::shared_ptr< Link > link)
voidaddNode(const std::shared_ptr< Node > & node)
voidaddNode(const std::shared_ptr< Node > & node, const ImVec2 position, bool shiftToLeftByNodeWidth =false)
virtual voidafterDraw(DrawInfo & context) override<br>Called last during drawing.
virtual boolallowZoom()
voidbringLastActiveNodeToFront()
voidbringMarkedNodesToFront()
Canvas &canvas() const<br>Get a reference to the canvas component of the node editor.
virtual voidclear()<br>Clear all nodes from the node editor.
template <class T ,typename... Args&gt; <br>autocreateLink(Args &&... args)<br>Create a new link of type T and add it to the node editor.
template <class T ,typename... Args&gt; <br>autocreateNode(const ImVec2 position =ImVec2(0, 0), Args &&... args)<br>Creates a new node in the node editor of the specified type.
template <class T &gt; <br>autocreateNode(const ImVec2 position =ImVec2(0, 0), bool shiftToLeftByNodeWidth =false)
voiddeleteSelectedNodes()
virtual voiddeselectAllNodes()
virtual voiddraw(DrawMode drawMode =DrawMode_Interactive) override<br>Generic draw method meant to be used by external code.
virtual RecursiveNodeRangegetAllNodesInnerIncluded() const
floatgetDpiScale() const
template <typename T =Node&gt; <br>std::shared_ptr< T >getLastActiveNode()
virtual NodeList &getNodeList() override<br>Get a reference to the underlying owning vector of all nodes in the node editor.
virtual NodeRangegetNodes() const override<br>Get a view of all nodes in the node editor which can be iterated over.
boolgetNodesSelectionChanged() const
const ImVec2 &getPopupPosition() const<br>Get position of the last popup in screen coordinates.
virtual FilteredNodeRangegetSelectedNodes() const
virtual FilteredRecursiveNodeRangegetSelectedNodesInnerIncluded() const
StyleOverride *getStyleOverride() const =delete
floatgetZoom() const
virtual voidinitializeDiwne(DrawInfo & context) override
NodeEditorInputAdapter &input() const<br>Get a reference to the node editors input adapter.
voidinvertSelection()
virtual boolisJustPressedDiwne() override<br>Determine whether a key/s of interest was/were just pressed.
virtual boolisPressedDiwne() override<br>Determine whether a key/s of interest is/are pressed down over the object.
virtual boolisZoomingDiwne()
virtual voidonDestroy(bool logEvent) override<br>Gets called the moment the object is marked for deletion by destroy().
virtual voidonReleased(bool justReleased, DrawInfo & context) override<br>Called when the object is not pressed.
virtual boolprocessPan()<br>Called by Canvas::setZoom() when the zoom level changes.
virtual boolprocessZoom()
voidpurgeAllNodes()<br>Erases objects marked for deletion or removal from the editor.
voidselectAllNodes(bool deselectIfAllAreSelected =false)<br>Selects all nodes.
voidsetDpiScale(float dpiScale)<br>Set the node editor's dpi scale. Updates dpi scale of its style as well.
template <class T ,typename... Args&gt; <br>voidsetInputAdapter(Args &&... args)
voidsetLastActiveNode(std::shared_ptr< Node > node)
voidsetNodesSelectionChanged(bool value)
voidsetPopupPosition(ImVec2 position)<br>Set position of the last popup in screen coordinates, used for placement of new nodes.
voidsetStyle(std::unique_ptr< StyleBase > && ptr)
voidsetStyleOverride(StyleOverride * styleOverride) =delete
voidsetZoom(float val)
voidshiftNodesToBegin(const NodeList & nodesToShift)
voidshiftNodesToEnd(const NodeList & nodesToShift)
virtual Style &style() const override<br>Get a reference to the editors style settings, which specify various colors and sizes much like ImStyle.
StyleBase &styleBase() const
virtual voidupdateLayout(DrawInfo & context) override<br>Updates object's m_rect, m_displayRect and any other object size variables.

Protected Functions inherited from DIWNE::NodeEditor

Name
virtual boolisDraggedDiwne() override<br>Is the object being dragged? (usually by mouse or some key combo)
voidpurgeObjects()<br>Erases objects marked for deletion or removal from the editor.

Public Attributes inherited from DIWNE::NodeEditor

Name
InteractionStateinteractionState <br>State of multi-frame user operations.
std::vector< std::shared_ptr< Link > >m_links <br>List of links, nodes are stored in NodeContainer superclass.
boolm_takeSnap <br>Indicates that a state change has occurred, can be used for undo/redo systems.
SettingsDiwne *mp_settingsDiwne

Protected Attributes inherited from DIWNE::NodeEditor

Name
std::unique_ptr< Canvas >m_canvas
std::unique_ptr< NodeEditorInputAdapter >m_input
boolm_lastActiveNodeChanged
boolm_nodesSelectionChanged
ImVec2m_popupPosition <br>Position of the last popup in screen coordinates.
std::unique_ptr< StyleBase >m_style
std::weak_ptr< Node >mp_lastActiveNode <br>Last node that requested focus (had a logical update)

Public Functions inherited from DIWNE::DiwneObject

Name
DiwneObject(DIWNE::NodeEditor & diwne, std::string labelDiwne)
virtual~DiwneObject()
virtual voidafterDraw(DrawInfo & context)<br>Called last during drawing.
virtual boolallowDragStart() const<br>Determines whether a drag operation can start from this object.
virtual boolallowDrawing()<br>Decide whether the object should be drawn (when outside the window for example)
virtual boolallowHover() const<br>Determines whether the object can be hovered.
virtual boolallowInteraction() const<br>Decide whether the object should react to user input in general.
virtual boolallowPopup() const<br>Determines whether a popup can be raised over the object.
virtual boolallowPress(const DrawInfo & context) const<br>Determines whether the object can be pressed.
virtual boolallowSelectOnClick(const DrawInfo & context) const<br>Determines whether the object can be selected by clicking it (eg.
template <typename T =DiwneObject&gt; <br>T *as()<br>Returns a raw pointer to itself casted to a type.
virtual voiddestroy(bool logEvent =true)<br>Marks the object for lazy destruction/deallocation and removal from any containers (like the node editor).
virtual voiddraw(DrawMode drawMode =DrawMode_Interactive)<br>Generic draw method meant to be used by external code.
virtual voiddrawDiwne(DrawInfo & context, DrawMode drawMode =DrawMode_Interactive)<br>Internal draw method.
DrawInfodrawDiwneEx(DrawInfo & context, DrawMode drawMode =DrawMode_Interactive)
ImRectgetDisplayRect() const<br>Object's bounds aligned to current viewport pixel boundaries.
IDgetId() const
DiwneObject *getParentObject() const
ImVec2getPosition() const<br>Returns the top left corner of the object's rect.
virtual ImRectgetRect() const<br>Rectangle bounds of the object in DIWNE coordinates (editor canvas coordinates).
boolgetSelectable()
virtual boolgetSelected() const<br>Whether the object is selected or not.
StyleOverride *getStyleOverride() const
virtual voidinitialize(DrawInfo & context)<br>First method to be called every frame.
boolisAnyParentSelected()
boolisChildObject() const
boolisChildOfObject(DiwneObject * parent)
boolisDestroyed() const
boolisDragging(DrawInfo & context)<br>Is this object the source of an active dragging operation?
boolisFixed() const<br>Fixed objects are ones rendered at a position determined by some other object.
boolisRendered() const
boolisToBeBroughtToFront()
virtual voidonDestroy(bool logEvent)<br>Gets called the moment the object is marked for deletion by destroy().
virtual voidonHover(DrawInfo & context)<br>This method gets called when the object is hovered.
virtual voidonPressed(bool justPressed, DrawInfo & context)<br>Called when the object is pressed, meaning a key is pressed over it.
virtual voidonReleased(bool justReleased, DrawInfo & context)<br>Called when the object is not pressed.
virtual voidonSelection(bool selected)
voidopenPopup()<br>Request to open the object's popup if possible.
booloperator!=(const DiwneObject & rhs) const
booloperator==(const DiwneObject & rhs) const
voidsetBringToFront(bool val)<br>Marks the object to be brought to front (be drawn first).
voidsetFixed(bool val)
voidsetForceDraw(bool val)<br>When true, makes the object automatically add the ForceDraw DrawMode flag.
voidsetParentObject(DiwneObject * parent)
voidsetPopupEnabled(bool val)
voidsetPosition(const ImVec2 & position)<br>Move the object's rect and any other associated positional data to the specified position.
voidsetRendered(bool val)
voidsetSelectable(bool selectable)<br>Whether the object can be selected.
virtual boolsetSelected(bool selected)<br>Set the selection state of the object.
voidsetStyleOverride(StyleOverride * styleOverride)<br>Assign a StyleOverride object to this DiwneObject.
voidsetTooltip(const std::string & text)
voidsetTooltipEnabled(bool val)
template <typename T =DiwneObject&gt; <br>std::shared_ptr< T >sharedPtr()<br>Returns a shared pointer to this object.
voidshowTooltip(const std::string & label, const ImColor && color, DrawInfo & context)<br>Immediately show a tooltip next to the mouse cursor with the specified text.
voidshowTooltip(const std::string & label, const std::string & desc, const ImColor && color, DrawInfo & context, float wrapWidth =35.f)<br>Immediately show a tooltip next to the mouse cursor with the specified text.
voidstopDrag(DrawInfo & context)<br>End an active drag operation this object is a source of.
virtual Style &style() const<br>Get the style for this object.
virtual voidtooltipContent(DrawInfo & context)<br>Content of the object's tooltip.
virtual voidtranslate(const ImVec2 & vec)<br>Move the object's rect and any other associated positional data.
virtual voidupdateLayout(DrawInfo & context) =0<br>Updates object's m_rect, m_displayRect and any other object size variables.

Protected Functions inherited from DIWNE::DiwneObject

Name
virtual voidafterDrawDiwne(DrawInfo & context)<br>Updates layout, processes interactions and then calls the user afterDraw() method.
virtual voidbeginDiwne(DrawInfo & context)
virtual voidendDiwne(DrawInfo & context)
virtual voidfinalizeDiwne(DrawInfo & context)
virtual voidinitializeDiwne(DrawInfo & context)
virtual boolisDraggedDiwne()<br>Is the object being dragged? (usually by mouse or some key combo)
virtual boolisHoveredDiwne()<br>Is the object being hovered? The default implementation mostly gets this information from ImGui::IsItemHovered() but the behavior can be changed or restricted.
virtual boolisJustPressedDiwne()<br>Determine whether a key/s of interest was/were just pressed.
virtual boolisPressedDiwne()<br>Determine whether a key/s of interest is/are pressed down over the object.
virtual boolpopupShouldBeOpenedDiwne() const<br>Determine whether a popup should be opened, that is, by default, that right mouse button was pressed and isn't dragging.
virtual voidprocessDragDiwne(DrawInfo & context)
virtual voidprocessHoverDiwne(DrawInfo & context)<br>Processes whether the object is currently hovered.
virtual voidprocessInteractionsDiwne(DrawInfo & context)
virtual voidprocessPopupAndTooltipDiwne(DrawInfo & context)<br>Processes whether a popup should be opened over this object.
virtual voidprocessPressAndReleaseDiwne(DrawInfo & context)<br>Processes whether the object is currently pressed (held) and further if it was just pressed or released.
virtual boolprocessSelectDiwne(DrawInfo & context)<br>Processes any interactions related to whether the object should be selected.
virtual voidsetInitialPositionDiwne()<br>Internal helper for setting the object's initial position.
voidsetSize(const ImVec2 & size)
voidupdateRectFromImGuiItem()

Public Attributes inherited from DIWNE::DiwneObject

Name
NodeEditor &diwne <br>Reference to the NodeEditor instance (also named 'editor' in some classes)
boolm_deletable <br>Whether the object can be destroyed by the user.
boolm_destroy <br>Indicates the object is to be deleted (and deallocated)
ImRectm_displayRect <br>Rectangle bounds aligned with the last viewport.
boolm_draggable <br>Whether dragging of the object is allowed by default.
DrawModem_drawMode <br>Read-only flag thats updated on each drawDiwne().
boolm_drawnThisFrame <br>Read only flag indicating whether the object has been drawn this frame.
boolm_fixed <br>Whether the object can be moved by user operations.
boolm_forceHoverDiwne <br>Special flag that can be used to enforce hover state, used by pin drag assist.
boolm_hoverable <br>Whether hovering is enabled by default.
boolm_hovered <br>Is the object hovered (usually by the mouse or whatever isHoveredDiwne() tracks)
boolm_hoverRoot <br>Whether hovering this object should prevent other objects from hovering.
IDm_idDiwne <br>Unique numeric identifier of the object.
boolm_isDragged <br>Is the object dragged? Returns false immediately on drag end (unlike isDragging()).
boolm_isPressed <br>Is the object pressed down (held)? Requirement for dragging.
boolm_justHidden <br>Read only flag indicating that this object was drawn last frame, but not this one.
boolm_justPressed <br>Read only flag indicating the object was pressed this frame (eg.
boolm_justReleased <br>Read only flag indicating the object was released this frame (eg.
std::stringm_labelDiwne <br>Unique string identifier, consists of <some string>:<m_idDiwne>.
ImRectm_rect <br>Rectangle bounds of the object in diwne coordinates.
StyleOverride *m_styleOverride <br>Style override to allow uniquely styled object types.

Protected Attributes inherited from DIWNE::DiwneObject

Name
unsigned long longg_diwneIDCounter <br>Static unique ID generator, unique only for current application run.
boolm_bringToFront <br>Request the object's rendering order to be moved to the front above other objects.
boolm_forceDraw <br>Request the next draw of the object to have the ForceDraw DrawMode flag.
boolm_internalHover <br>Temporary storage for an internal ImGui::IsItemHovered() check Can be set in the end() method to determine if object is hovered if applicable.
boolm_openPopup <br>Request to open popup.
boolm_openTooltip <br>Request to open tooltip.
DiwneObject *m_parentObject <br>Sets the parent object of object, relevant in node container and hover hierarchy.
boolm_popupEnabled <br>Whether this object has popup enabled.
std::stringm_popupLabelDiwne <br>ImGui popup identifier.
boolm_rendered <br>Whether the object should be drawn, this is a general flag that overrides behavior of the allowDrawing() method.
boolm_selectable <br>Should not be accessed directly.
boolm_selected <br>Should not be accessed directly.
boolm_tooltipEnabled <br>Whether this object has tooltip enabled.
std::stringm_tooltipText

Public Functions inherited from DIWNE::NodeContainer

Name
NodeContainer(DiwneObject * owner)<br>Constructs the node container for a specific DiwneObject that it represents.
voidaddNode(const std::shared_ptr< Node > & node)<br>Adds a node to the end of the list (O(1)) The new node has this container set as its parent.
virtual voidaddNodeAt(const std::shared_ptr< Node > & node, int index)<br>Adds a node at a specified index.
virtual NodeList &getNodeList() override<br>Returns the underlying std::vector node list of the container.
virtual NodeRangegetNodes() const override<br>Returns a iterable range to the nodes of this container.
voidpurgeNodes()<br>Erases objects marked for deletion or removal from the container.
boolremoveNode(const std::shared_ptr< Node > & node)<br>Removes a node from the container.
virtual voidremoveNodeAt(int index)<br>Removes a node at a specified index from the container.
boolreplaceNode(const std::shared_ptr< Node > & oldNode, const std::shared_ptr< Node > & newNode)<br>Replaces an existing node with a new one.
virtual voidreplaceNodeAt(const std::shared_ptr< Node > & node, int index)<br>Replaces node at a specified index with a different one.

Protected Functions inherited from DIWNE::NodeContainer

Name
virtual voidonNodeAdd(Node * node, int index)<br>Called after a node is inserted into the container.
virtual voidonNodeRemove(std::shared_ptr< Node > node, int index)<br>Called after a node is removed from the container.

Protected Attributes inherited from DIWNE::NodeContainer

Name
NodeListm_nodes
DiwneObject *m_owner <br>Diwne object associated with this node container.

Public Functions inherited from DIWNE::INodeContainer

Name
virtual~INodeContainer() =default
virtual NodeList &getNodeList() =0
virtual NodeRangegetNodes() const =0

Public Functions Documentation

function WorkspaceDiwne

cpp
WorkspaceDiwne(
    const char * label,
    DIWNE::SettingsDiwne * settingsDiwne
)
WorkspaceDiwne(
    const char * label,
    DIWNE::SettingsDiwne * settingsDiwne
)

function ~WorkspaceDiwne

cpp
~WorkspaceDiwne() override
~WorkspaceDiwne() override

function addMenu

cpp
void addMenu()
void addMenu()

function addNodeToPositionOfPopup

cpp
template <class T >
inline auto addNodeToPositionOfPopup()
template <class T >
inline auto addNodeToPositionOfPopup()

function begin

cpp
virtual void begin(
    DIWNE::DrawInfo & context
) override
virtual void begin(
    DIWNE::DrawInfo & context
) override

First method to be called during object drawing.

Reimplements: DIWNE::NodeEditor::begin

Can be used to initialize drawing code.

function content

cpp
virtual void content(
    DIWNE::DrawInfo & context
) override
virtual void content(
    DIWNE::DrawInfo & context
) override

Called after begin() during drawing.

Reimplements: DIWNE::NodeEditor::content

Draws object content.

Todosee #111, wrongly computed m_takeSnap value.

function copySelectedNodes

cpp
void copySelectedNodes()
void copySelectedNodes()

function cutSelectedNodes

cpp
void cutSelectedNodes()
void cutSelectedNodes()

function duplicateSelectedNodes

cpp
void duplicateSelectedNodes()
void duplicateSelectedNodes()

function end

cpp
virtual void end(
    DIWNE::DrawInfo & context
) override
virtual void end(
    DIWNE::DrawInfo & context
) override

Called after content().

Reimplements: DIWNE::NodeEditor::end

Used to end content drawing.

function finalize

cpp
virtual void finalize(
    DIWNE::DrawInfo & context
) override
virtual void finalize(
    DIWNE::DrawInfo & context
) override

The final method to be called, gets called every frame and doesn't do any drawing.

Reimplements: DIWNE::DiwneObject::finalize

function getAllCameras

cpp
DIWNE::FilteredNodeRange< Camera > getAllCameras()
DIWNE::FilteredNodeRange< Camera > getAllCameras()

function getAllCoreNodes

cpp
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllCoreNodes() const
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllCoreNodes() const

Gets all I3TCore nodes.

function getAllInputFreeModel

cpp
DIWNE::FilteredNodeRange< Model > getAllInputFreeModel()
DIWNE::FilteredNodeRange< Model > getAllInputFreeModel()

function getAllInputFreeSequence

cpp
DIWNE::FilteredNodeRange< Sequence > getAllInputFreeSequence()
DIWNE::FilteredNodeRange< Sequence > getAllInputFreeSequence()

function getAllModels

cpp
DIWNE::FilteredNodeRange< Model > getAllModels()
DIWNE::FilteredNodeRange< Model > getAllModels()

function getAllScriptingNodes

cpp
DIWNE::FilteredRecursiveNodeRange< ScriptingNode > getAllScriptingNodes()
DIWNE::FilteredRecursiveNodeRange< ScriptingNode > getAllScriptingNodes()

function getAllSelectedCoreNodes

cpp
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllSelectedCoreNodes() const
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllSelectedCoreNodes() const

Gets all I3TCore nodes that are selected.

function getAllSelectedCoreNodesWithoutNesting

cpp
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllSelectedCoreNodesWithoutNesting() const
inline DIWNE::FilteredRecursiveNodeRange< CoreNode > getAllSelectedCoreNodesWithoutNesting() const

function getCoreNodes

cpp
inline DIWNE::FilteredNodeRange< CoreNode > getCoreNodes() const
inline DIWNE::FilteredNodeRange< CoreNode > getCoreNodes() const

function getNode

cpp
template <typename T >
inline Result< Ptr< T >, Error > getNode(
    Core::ID id
) const
template <typename T >
inline Result< Ptr< T >, Error > getNode(
    Core::ID id
) const

O(N) where N is workspace nodes count.

Parameters:

  • id

Template Parameters:

  • T

Return:

function getOverNodesRectangleDiwne

cpp
ImRect getOverNodesRectangleDiwne(
    std::vector< Ptr< DIWNE::Node > > nodes
)
ImRect getOverNodesRectangleDiwne(
    std::vector< Ptr< DIWNE::Node > > nodes
)

function getTracker

cpp
Core::MatrixTracker * getTracker() const
Core::MatrixTracker * getTracker() const

function isTracking

cpp
bool isTracking() const
bool isTracking() const

function isTrackingFromLeft

cpp
bool isTrackingFromLeft() const
bool isTrackingFromLeft() const

function manipulatorStartCheck3D

cpp
void manipulatorStartCheck3D()
void manipulatorStartCheck3D()

function onDrag

cpp
virtual void onDrag(
    DIWNE::DrawInfo & context,
    bool dragStart,
    bool dragEnd
) override
virtual void onDrag(
    DIWNE::DrawInfo & context,
    bool dragStart,
    bool dragEnd
) override

This method gets called when the object is being dragged.

Parameters:

  • dragStart The drag has just started this frame.
  • dragEnd The drag is ending this frame.

See: processDragDiwne(), processPressAndReleaseDiwne()

Reimplements: DIWNE::NodeEditor::onDrag

Drag begins when the object is pressed and isDraggedDiwne() returns true.

A call with dragStart true, should always be followed by a call with dragEnd true.

function onPopup

cpp
virtual void onPopup() override
virtual void onPopup() override

Reimplements: DIWNE::DiwneObject::onPopup

function onZoom

cpp
virtual void onZoom() override
virtual void onZoom() override

Reimplements: DIWNE::NodeEditor::onZoom

function pasteSelectedNodes

cpp
void pasteSelectedNodes()
void pasteSelectedNodes()

function performLazyDuplication

cpp
void performLazyDuplication()
void performLazyDuplication()

Duplicates nodes marked for duplication using Workspace::Node::setDuplicateNode()

function popupContent

cpp
virtual void popupContent(
    DIWNE::DrawInfo & context
) override
virtual void popupContent(
    DIWNE::DrawInfo & context
) override

Content of popup menu raised on this objec.

Reimplements: DIWNE::DiwneObject::popupContent

function processInteractions

cpp
virtual void processInteractions(
    DIWNE::DrawInfo & context
) override
virtual void processInteractions(
    DIWNE::DrawInfo & context
) override

Method for reacting to user input after the object is fully drawn and its dimensions are known.

Reimplements: DIWNE::NodeEditor::processInteractions

It is called after end() and updateLayout(), but before the afterDraw() lifecycle method. Internal interactions are processed right before.

function processTrackingInput

cpp
void processTrackingInput()
void processTrackingInput()

function replaceAndReplugNode

cpp
bool replaceAndReplugNode(
    Ptr< CoreNodeWithPins > oldNode,
    Ptr< CoreNodeWithPins > newNode
)
bool replaceAndReplugNode(
    Ptr< CoreNodeWithPins > oldNode,
    Ptr< CoreNodeWithPins > newNode
)

Replaces existing old node with a specified new node.

Return: True on complete sucess, false on failure or when some pins couldn't be reconnected.

Old node is destroyed and its link connections are replugged into the new node if possible. Attempts to reconnect input and output pins at corresponsing indices.

function startTracking

cpp
void startTracking(
    Sequence * sequence,
    bool trackFromLeft
)
void startTracking(
    Sequence * sequence,
    bool trackFromLeft
)

function stopTracking

cpp
void stopTracking()
void stopTracking()

function toggleSelectedNodesVisibility

cpp
void toggleSelectedNodesVisibility()
void toggleSelectedNodesVisibility()

function trackingJaggedLeft

cpp
void trackingJaggedLeft()
void trackingJaggedLeft()

function trackingJaggedRight

cpp
void trackingJaggedRight()
void trackingJaggedRight()

function trackingModeSwitch

cpp
void trackingModeSwitch()
void trackingModeSwitch()

function trackingSmoothLeft

cpp
void trackingSmoothLeft()
void trackingSmoothLeft()

function trackingSmoothRight

cpp
void trackingSmoothRight()
void trackingSmoothRight()

function zoomToAll

cpp
void zoomToAll()
void zoomToAll()

function zoomToRectangle

cpp
void zoomToRectangle(
    ImRect const & rect
)
void zoomToRectangle(
    ImRect const & rect
)

function zoomToSelected

cpp
void zoomToSelected()
void zoomToSelected()

Public Attributes Documentation

variable copiedNodes

cpp
Memento * copiedNodes = nullptr;
Memento * copiedNodes = nullptr;

variable m_channelSplitter

cpp
ImDrawListSplitter m_channelSplitter;
ImDrawListSplitter m_channelSplitter;

variable m_coreIdMap

cpp
std::unordered_map< Core::ID, CoreNode * > m_coreIdMap;
std::unordered_map< Core::ID, CoreNode * > m_coreIdMap;

A map connecting Core node id's with equivalent gui nodes.

Contains raw pointers as values so it can be populated in constructors.

variable m_highlightTrackedModels

cpp
bool m_highlightTrackedModels {true};
bool m_highlightTrackedModels {true};

variable m_smoothTracking

cpp
bool m_smoothTracking {true};
bool m_smoothTracking {true};

variable m_trackingCursorPos

cpp
ImVec2 m_trackingCursorPos;
ImVec2 m_trackingCursorPos;

variable m_updateDataItemsWidth

cpp
bool m_updateDataItemsWidth {false};
bool m_updateDataItemsWidth {false};

Indicates a change in zoom level this frame.

variable m_viewportHighlightResolver

cpp
ViewportHighlightResolver m_viewportHighlightResolver;
ViewportHighlightResolver m_viewportHighlightResolver;

variable m_viewportLastSelectedEntity

cpp
Vp::Entity * m_viewportLastSelectedEntity {nullptr};
Vp::Entity * m_viewportLastSelectedEntity {nullptr};

variable m_viewportSelectionChanged

cpp
bool m_viewportSelectionChanged {false};
bool m_viewportSelectionChanged {false};

variable m_visualizeDepth

cpp
bool m_visualizeDepth {false};
bool m_visualizeDepth {false};

Friends

friend Sequence::moveNodeToWorkspace

cpp
friend void Sequence::moveNodeToWorkspace(
    Ptr< CoreNode > node
);
friend void Sequence::moveNodeToWorkspace(
    Ptr< CoreNode > node
);

Updated on 2025-05-31 at 12:55:31 +0000