Skip to content

DIWNE::Node

graphical representation od a box in the workspace node editor More...

#include "DIWNE/Node.h"

Inherits from DIWNE::DiwneObject, std::enable_shared_from_this< DiwneObject >

Inherited by WorkspaceNode

Public Functions

Name
Node(DIWNE::Diwne & diwne, DIWNE::ID id, std::string const labelDiwne ="DiwneNode")<br>Default constructor.
virtual~Node()<br>Default destructor.
virtual boolafterEndDiwne() override
virtual boolallowDrawing() override<br>Decision maker whether object should be drawn (not outside of window for example)
virtual boolbeforeBeginDiwne() override
virtual voidbegin() override
virtual boolbottomContent()
boolbottomContentDiwne()
virtual boolcontent() override
virtual voiddeleteAction()
voiddeleteActionDiwne()
template <typename T &gt; <br>booldrawNodeDiwne(DrawModeNodePosition nodePosMode =DrawModeNodePosition::OnItsPosition, DrawMode drawMode =DrawMode::Interacting)
virtual voidend() override
virtual DIWNE::DiwneActiongetDragActionType() const
virtual DIWNE::DiwneActiongetHoldActionType() const
DIWNE::ID constgetId() const
ImVec2getNodePositionDiwne() const
ImRectgetNodeRectDiwne() const
ImVec2getNodeRectSizeDiwne() const
virtual ImRectgetRectDiwne() const
boolgetRender() const
virtual DIWNE::DiwneActiongetTouchActionType() const
virtual boolleftContent()
boolleftContentDiwne()
virtual boolmiddleContent()
boolmiddleContentDiwne()
Node &operator=(const Node & other)<br>Assignment operator.
virtual boolprocessDrag() override
virtual boolprocessSelect() override
virtual boolprocessUnselect() override
virtual boolrightContent()
boolrightContentDiwne()
voidsetNodePositionDiwne(ImVec2 const & position)
voidsetRender(bool render)
virtual boolsetSelected(const bool selected) override
virtual booltopContent()
booltopContentDiwne()
voidtranslateNodePositionDiwne(ImVec2 const amount)
virtual voidupdateSizes() override

Public Attributes

Name
boolm_drawAnyway

Protected Attributes

Name
ImRectm_bottomRectDiwne
floatm_centerDummySpace <br>Rectangle of parts of node in diwne.
ImRectm_leftRectDiwne
ImRectm_middleRectDiwne
ImVec2m_nodePositionDiwne
DrawModeNodePositionm_nodePosMode
boolm_render <br>used to hide nodes in tutorial scenes (action "toggleNodeWorkspaceVisibility")
ImRectm_rightRectDiwne
boolm_toDelete <br>Set to true after node delete action.
ImRectm_topRectDiwne

Additional inherited members

Public Functions inherited from DIWNE::DiwneObject

Name
DiwneObject(DIWNE::Diwne & diwne, DIWNE::ID id, std::string const labelDiwne)<br>Constructor.
virtual~DiwneObject() =default
virtual boolafterContent()
virtual boolafterContentDiwne()
virtual boolafterEnd()
virtual boolallowInteraction()<br>Decision maker whether object can interact (not include content elements)
virtual boolallowProcessDrag()
virtual boolallowProcessFocused()
virtual boolallowProcessFocusedForInteraction()
virtual boolallowProcessHold()
virtual boolallowProcessRaisePopup()
virtual boolallowProcessSelect()
virtual boolallowProcessUnhold()
virtual boolallowProcessUnselect()
virtual boolbeforeBegin()
virtual boolbeforeContent()
virtual boolbeforeContentDiwne()
virtual boolbypassDragAction()
virtual boolbypassFocusAction()
virtual boolbypassFocusForInteractionAction()
virtual boolbypassHoldAction()
virtual boolbypassRaisePopupAction()
virtual boolbypassSelectAction()
virtual boolbypassTouchAction()
virtual boolbypassUnholdAction()
virtual boolbypassUnselectAction()
virtual boolcontentDiwne()
virtual booldrawDiwne(DrawMode drawMode =DrawMode::Interacting)<br>Main function for drawing object and deal with interactions.
virtual boolfinalize()
virtual boolfinalizeDiwne()
DIWNE::ID constgetIdDiwne() const
virtual boolgetSelectable()
virtual boolgetSelected() const<br>Getter of selection state.
virtual boolinitialize()
virtual boolinitializeDiwne()
virtual boolinteractionBeginInLastDraw()
virtual boolinteractionEndInLastDraw()
virtual voidpopupContent()<br>Content of popup menu raise on this object.
virtual boolprocessFocused()
virtual boolprocessFocusedForInteraction()
virtual boolprocessHold()
virtual boolprocessInteractions()
virtual boolprocessInteractionsAlways()
virtual boolprocessInteractionsDiwne()
virtual boolprocessObjectDrag()
virtual boolprocessObjectFocused()
virtual boolprocessObjectFocusedForInteraction()
virtual boolprocessObjectHold()
virtual boolprocessObjectSelect()
virtual boolprocessObjectUnhold()
virtual boolprocessObjectUnselect()
virtual boolprocessRaisePopupDiwne()
virtual boolprocessShowPopupDiwne()
virtual boolprocessUnhold()
virtual voidsetSelectable(bool const selectable)
voidshowTooltipLabel(std::string const & label, ImColor const && color)<br>Show a colored text for example for immediate hints.

Public Attributes inherited from DIWNE::DiwneObject

Name
DIWNE::Diwne &diwne
DrawModem_drawMode
boolm_focused
boolm_focusedForInteraction
DIWNE::ID constm_idDiwne
boolm_inner_interaction_happen
boolm_inner_interaction_happen_previous_draw
boolm_isActive
boolm_isDragged
boolm_isHeld
std::string constm_labelDiwne
std::string constm_popupIDDiwne
boolm_selectable
boolm_selected

Detailed Description

cpp
class DIWNE::Node;
class DIWNE::Node;

graphical representation od a box in the workspace node editor

Parts of the Node:


  • | Top |

  • |Left|Middle|Right| -> |L|M|R| == Center

  • | Bottom |

Public Functions Documentation

function Node

cpp
Node(
    DIWNE::Diwne & diwne,
    DIWNE::ID id,
    std::string const labelDiwne ="DiwneNode"
)
Node(
    DIWNE::Diwne & diwne,
    DIWNE::ID id,
    std::string const labelDiwne ="DiwneNode"
)

Default constructor.

function ~Node

cpp
virtual ~Node()
virtual ~Node()

Default destructor.

function afterEndDiwne

cpp
virtual bool afterEndDiwne() override
virtual bool afterEndDiwne() override

Reimplements: DIWNE::DiwneObject::afterEndDiwne

DIWNE wrapper

function allowDrawing

cpp
virtual bool allowDrawing() override
virtual bool allowDrawing() override

Decision maker whether object should be drawn (not outside of window for example)

Return: draw object on its position?

Reimplements: DIWNE::DiwneObject::allowDrawing

Reimplemented by: WorkspaceSequence::allowDrawing, WorkspaceTransformation::allowDrawing

function beforeBeginDiwne

cpp
virtual bool beforeBeginDiwne() override
virtual bool beforeBeginDiwne() override

Reimplements: DIWNE::DiwneObject::beforeBeginDiwne

DIWNE wrapper

function begin

cpp
virtual void begin() override
virtual void begin() override

Reimplements: DIWNE::DiwneObject::begin

begin of object

function bottomContent

cpp
virtual bool bottomContent()
virtual bool bottomContent()

Reimplemented by: WorkspaceNode::bottomContent

function bottomContentDiwne

cpp
bool bottomContentDiwne()
bool bottomContentDiwne()

function content

cpp
virtual bool content() override
virtual bool content() override

Reimplements: DIWNE::DiwneObject::content

content of object

function deleteAction

cpp
inline virtual void deleteAction()
inline virtual void deleteAction()

Reimplemented by: WorkspaceNode::deleteAction, WorkspaceTransformation::deleteAction

function deleteActionDiwne

cpp
void deleteActionDiwne()
void deleteActionDiwne()

function drawNodeDiwne

cpp
template <typename T >
inline bool drawNodeDiwne(
    DrawModeNodePosition nodePosMode =DrawModeNodePosition::OnItsPosition,
    DrawMode drawMode =DrawMode::Interacting
)
template <typename T >
inline bool drawNodeDiwne(
    DrawModeNodePosition nodePosMode =DrawModeNodePosition::OnItsPosition,
    DrawMode drawMode =DrawMode::Interacting
)

function end

cpp
virtual void end() override
virtual void end() override

Reimplements: DIWNE::DiwneObject::end

closing object

function getDragActionType

cpp
inline virtual DIWNE::DiwneAction getDragActionType() const
inline virtual DIWNE::DiwneAction getDragActionType() const

Reimplements: DIWNE::DiwneObject::getDragActionType

return which type of object/action this object is

function getHoldActionType

cpp
inline virtual DIWNE::DiwneAction getHoldActionType() const
inline virtual DIWNE::DiwneAction getHoldActionType() const

Reimplements: DIWNE::DiwneObject::getHoldActionType

return which type of object/action this object is

function getId

cpp
inline DIWNE::ID const getId() const
inline DIWNE::ID const getId() const

function getNodePositionDiwne

cpp
inline ImVec2 getNodePositionDiwne() const
inline ImVec2 getNodePositionDiwne() const

function getNodeRectDiwne

cpp
inline ImRect getNodeRectDiwne() const
inline ImRect getNodeRectDiwne() const

function getNodeRectSizeDiwne

cpp
inline ImVec2 getNodeRectSizeDiwne() const
inline ImVec2 getNodeRectSizeDiwne() const

function getRectDiwne

cpp
inline virtual ImRect getRectDiwne() const
inline virtual ImRect getRectDiwne() const

Reimplements: DIWNE::DiwneObject::getRectDiwne

return rectangle of object

function getRender

cpp
inline bool getRender() const
inline bool getRender() const

function getTouchActionType

cpp
inline virtual DIWNE::DiwneAction getTouchActionType() const
inline virtual DIWNE::DiwneAction getTouchActionType() const

Reimplements: DIWNE::DiwneObject::getTouchActionType

return which type of object/action this object is

function leftContent

cpp
virtual bool leftContent()
virtual bool leftContent()

Reimplemented by: WorkspaceCycle::leftContent, WorkspaceNode::leftContent, WorkspaceNodeWithCoreDataWithPins::leftContent, WorkspaceAngleAxisToQuat::leftContent

function leftContentDiwne

cpp
bool leftContentDiwne()
bool leftContentDiwne()

function middleContent

cpp
virtual bool middleContent()
virtual bool middleContent()

Reimplemented by: WorkspaceModel::middleContent, WorkspaceOperator::middleContent, WorkspaceOperator::middleContent, WorkspaceScreen::middleContent, WorkspaceSequence::middleContent, WorkspaceCamera::middleContent, WorkspaceCycle::middleContent, WorkspaceNode::middleContent, WorkspaceTransformation::middleContent

function middleContentDiwne

cpp
bool middleContentDiwne()
bool middleContentDiwne()

function operator=

cpp
Node & operator=(
    const Node & other
)
Node & operator=(
    const Node & other
)

Assignment operator.

Parameters:

  • other Object to assign from

Return: A reference to this

function processDrag

cpp
virtual bool processDrag() override
virtual bool processDrag() override

Reimplements: DIWNE::DiwneObject::processDrag

function processSelect

cpp
virtual bool processSelect() override
virtual bool processSelect() override

Reimplements: DIWNE::DiwneObject::processSelect

Reimplemented by: WorkspaceCamera::processSelect, WorkspaceNodeWithCoreData::processSelect, WorkspaceModel::processSelect

function processUnselect

cpp
virtual bool processUnselect() override
virtual bool processUnselect() override

Reimplements: DIWNE::DiwneObject::processUnselect

Reimplemented by: WorkspaceCamera::processUnselect, WorkspaceNodeWithCoreData::processUnselect, WorkspaceModel::processUnselect

function rightContent

cpp
virtual bool rightContent()
virtual bool rightContent()

Reimplemented by: WorkspaceCycle::rightContent, WorkspaceNode::rightContent, WorkspaceNodeWithCoreDataWithPins::rightContent

function rightContentDiwne

cpp
bool rightContentDiwne()
bool rightContentDiwne()

function setNodePositionDiwne

cpp
inline void setNodePositionDiwne(
    ImVec2 const & position
)
inline void setNodePositionDiwne(
    ImVec2 const & position
)

function setRender

cpp
inline void setRender(
    bool render
)
inline void setRender(
    bool render
)

function setSelected

cpp
virtual bool setSelected(
    const bool selected
) override
virtual bool setSelected(
    const bool selected
) override

Parameters:

  • selected is the new requested state of the object

Return: New state of selection

Reimplements: DIWNE::DiwneObject::setSelected

Setter of selection state

function topContent

cpp
virtual bool topContent()
virtual bool topContent()

Reimplemented by: WorkspaceModel::topContent, WorkspaceOperator::topContent, WorkspaceOperator::topContent, WorkspaceScreen::topContent, WorkspaceSequence::topContent, WorkspaceCamera::topContent, WorkspaceCycle::topContent, WorkspaceNode::topContent, WorkspaceNodeWithCoreData::topContent, WorkspaceTransformation::topContent

function topContentDiwne

cpp
bool topContentDiwne()
bool topContentDiwne()

function translateNodePositionDiwne

cpp
inline void translateNodePositionDiwne(
    ImVec2 const amount
)
inline void translateNodePositionDiwne(
    ImVec2 const amount
)

function updateSizes

cpp
virtual void updateSizes() override
virtual void updateSizes() override

Reimplements: DIWNE::DiwneObject::updateSizes

Reimplemented by: WorkspaceTransformation::updateSizes

store object size and position after this frame

Public Attributes Documentation

variable m_drawAnyway

cpp
bool m_drawAnyway;
bool m_drawAnyway;

you have to draw the node anyway. // (PF) was float!?!? For example in the first frame after you created it -> to obtain its real size

Protected Attributes Documentation

variable m_bottomRectDiwne

cpp
ImRect m_bottomRectDiwne;
ImRect m_bottomRectDiwne;

variable m_centerDummySpace

cpp
float m_centerDummySpace;
float m_centerDummySpace;

Rectangle of parts of node in diwne.

indent value to center the middle part

variable m_leftRectDiwne

cpp
ImRect m_leftRectDiwne;
ImRect m_leftRectDiwne;

variable m_middleRectDiwne

cpp
ImRect m_middleRectDiwne;
ImRect m_middleRectDiwne;

variable m_nodePositionDiwne

cpp
ImVec2 m_nodePositionDiwne;
ImVec2 m_nodePositionDiwne;

variable m_nodePosMode

cpp
DrawModeNodePosition m_nodePosMode;
DrawModeNodePosition m_nodePosMode;

variable m_render

cpp
bool m_render = true;
bool m_render = true;

used to hide nodes in tutorial scenes (action "toggleNodeWorkspaceVisibility")

variable m_rightRectDiwne

cpp
ImRect m_rightRectDiwne;
ImRect m_rightRectDiwne;

variable m_toDelete

cpp
bool m_toDelete;
bool m_toDelete;

Set to true after node delete action.

variable m_topRectDiwne

cpp
ImRect m_topRectDiwne;
ImRect m_topRectDiwne;

Updated on 2024-03-16 at 19:15:01 +0000