Skip to content

Workspace::CoreNode

#include "GUI/Workspace/Nodes/Basic/CoreNode.h"

Inherits from Workspace::Node, IVisitable, DIWNE::Node, DIWNE::DiwneObject, std::enable_shared_from_this< DiwneObject >

Inherited by Workspace::CoreNodeWithPins, Workspace::TransformationBase

Public Functions

Name
CoreNode(DIWNE::Diwne & diwne, Ptr< Core::Node > nodebase)
~CoreNode() override
booldrawDataLabel()
voiddrawMenuDuplicate()
virtual voiddrawMenuLevelOfDetail() =0
voiddrawMenuSetEditable()
voiddrawMenuSetPrecision()
floatgetDataItemsWidth()
FloatPopupMode &getFloatPopupMode()
boolgetIsLabelBeingEdited()
LevelOfDetailgetLevelOfDetail()
Ptr< Core::Node > constgetNodebase() const
intgetNumberOfVisibleDecimal()
virtual intmaxLengthOfData() =0
virtual voidpopupContent() override<br>Content of popup menu raise on this object.
virtual boolprocessDrag() override
virtual boolprocessSelect() override
virtual boolprocessUnselect() override
voidsetFloatPopupMode(FloatPopupMode mode)
LevelOfDetailsetLevelOfDetail(LevelOfDetail levelOfDetail)
virtual voidsetNumberOfVisibleDecimal(int value)
virtual booltopContent() override
virtual floatupdateDataItemsWidth()
voiddrawMenuLevelOfDetail_builder(Ptr< CoreNode > node, std::vector< LevelOfDetail > const & levels_of_detail)

Protected Attributes

Name
floatm_dataItemsWidth
FloatPopupModem_floatPopupMode
floatm_headerMinWidth <br>Can be used to specify the minimum header width of the node.
boolm_isFirstDraw
boolm_isLabelBeingEdited
LevelOfDetailm_levelOfDetail
Ptr< Core::Node > constm_nodebase <br>reference to Core
intm_numberOfVisibleDecimal <br>number of decimal places used while display floats in the workspace

Additional inherited members

Public Functions inherited from Workspace::Node

Name
Node(DIWNE::Diwne & diwne, DIWNE::ID id, std::string const topLabel ="Header", std::string const middleLabel ="Content")
virtual~Node()<br>Default destructor.
virtual boolbeforeContent() override
virtual boolbottomContent() override
virtual boolbypassFocusForInteractionAction() override
virtual voiddeleteAction() override
virtual voiddrawMenuDelete()
boolgetDuplicateNode() const
std::stringgetMiddleLabel()
boolgetRemoveFromWorkspace() const
std::stringgetTopLabel()
virtual boolleftContent() override
virtual boolmiddleContent() override
virtual boolrightContent() override
voidsetDuplicateNode(bool value)
voidsetMiddleLabel(std::string label)
voidsetRemoveFromWorkspace(bool value)
voidsetTopLabel(std::string label)

Public Attributes inherited from Workspace::Node

Name
boolm_duplicateNode
boolm_removeFromWorkspaceWindow

Protected Attributes inherited from Workspace::Node

Name
std::stringm_middleLabel
std::stringm_topLabel

Public Functions inherited from IVisitable

Name
virtual voidaccept(NodeVisitor & visitor) =0

Public Functions inherited from DIWNE::Node

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 override
boolgetRender() const
virtual DIWNE::DiwneActiongetTouchActionType() const
virtual boolleftContent()
boolleftContentDiwne()
virtual boolmiddleContent()
boolmiddleContentDiwne()
Node &operator=(const Node & other)<br>Assignment operator.
virtual boolrightContent()
boolrightContentDiwne()
voidsetNodePositionDiwne(ImVec2 const & position)
voidsetRender(bool render)
virtual boolsetSelected(const bool selected) override
booltopContentDiwne()
voidtranslateNodePositionDiwne(ImVec2 const amount)
virtual voidupdateSizes() override

Public Attributes inherited from DIWNE::Node

Name
boolm_drawAnyway

Protected Attributes inherited from DIWNE::Node

Name
ImRectm_bottomRectDiwne
floatm_centerDummySpace <br>indent value to center the middle part
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 <br>Rectangle of parts of node in diwne, are computed every frame based on node content and m_nodePositionDiwne.

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 boolafterEndDiwne()
virtual boolallowDrawing()<br>Decision maker whether object should be drawn (not outside of window for example)
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 boolbeforeBeginDiwne()
virtual boolbeforeContent()
virtual boolbeforeContentDiwne()
virtual voidbegin() =0
virtual boolbypassDragAction()
virtual boolbypassFocusAction()
virtual boolbypassFocusForInteractionAction()
virtual boolbypassHoldAction()
virtual boolbypassRaisePopupAction()
virtual boolbypassSelectAction()
virtual boolbypassTouchAction()
virtual boolbypassUnholdAction()
virtual boolbypassUnselectAction()
virtual boolcontent()
virtual boolcontentDiwne()
virtual booldrawDiwne(DrawMode drawMode =DrawMode::Interacting)<br>Main function for drawing object and deal with interactions.
virtual voidend() =0
virtual boolfinalize()
virtual boolfinalizeDiwne()
virtual DIWNE::DiwneActiongetDragActionType() const =0
virtual DIWNE::DiwneActiongetHoldActionType() const =0
DIWNE::ID constgetIdDiwne() const
virtual ImRectgetRectDiwne() const =0
virtual boolgetSelectable()
virtual boolgetSelected() const<br>Getter of selection state.
virtual DIWNE::DiwneActiongetTouchActionType() const =0
virtual boolinitialize()
virtual boolinitializeDiwne()
virtual boolinteractionBeginInLastDraw()
virtual boolinteractionEndInLastDraw()
boolprocessDragDiwne()
virtual boolprocessFocused()
boolprocessFocusedDiwne()
virtual boolprocessFocusedForInteraction()
boolprocessFocusedForInteractionDiwne()
virtual boolprocessHold()
boolprocessHoldDiwne()
virtual boolprocessInteractions()
virtual boolprocessInteractionsAlways()
virtual boolprocessInteractionsDiwne()
virtual boolprocessRaisePopupDiwne()
boolprocessSelectDiwne()
virtual boolprocessShowPopupDiwne()
virtual boolprocessUnhold()
boolprocessUnholdDiwne()
boolprocessUnselectDiwne()
virtual voidsetSelectable(bool const selectable)
virtual boolsetSelected(bool const selected)
voidshowTooltipLabel(std::string const & label, ImColor const && color)<br>Show a colored text for example for immediate hints.
virtual voidupdateSizes()

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

Public Functions Documentation

function CoreNode

cpp
CoreNode(
    DIWNE::Diwne & diwne,
    Ptr< Core::Node > nodebase
)
CoreNode(
    DIWNE::Diwne & diwne,
    Ptr< Core::Node > nodebase
)

function ~CoreNode

cpp
~CoreNode() override
~CoreNode() override

function drawDataLabel

cpp
bool drawDataLabel()
bool drawDataLabel()

function drawMenuDuplicate

cpp
void drawMenuDuplicate()
void drawMenuDuplicate()

function drawMenuLevelOfDetail

cpp
virtual void drawMenuLevelOfDetail() =0
virtual void drawMenuLevelOfDetail() =0

Reimplemented by: Workspace::Camera::drawMenuLevelOfDetail, Workspace::Cycle::drawMenuLevelOfDetail, Workspace::Model::drawMenuLevelOfDetail, Workspace::Operator::drawMenuLevelOfDetail, Workspace::Operator::drawMenuLevelOfDetail, Workspace::Screen::drawMenuLevelOfDetail, Workspace::Sequence::drawMenuLevelOfDetail, Workspace::Transformation::drawMenuLevelOfDetail, Workspace::TransformationBase::drawMenuLevelOfDetail

function drawMenuSetEditable

cpp
void drawMenuSetEditable()
void drawMenuSetEditable()

function drawMenuSetPrecision

cpp
void drawMenuSetPrecision()
void drawMenuSetPrecision()

function getDataItemsWidth

cpp
float getDataItemsWidth()
float getDataItemsWidth()

function getFloatPopupMode

cpp
inline FloatPopupMode & getFloatPopupMode()
inline FloatPopupMode & getFloatPopupMode()

function getIsLabelBeingEdited

cpp
inline bool getIsLabelBeingEdited()
inline bool getIsLabelBeingEdited()

function getLevelOfDetail

cpp
LevelOfDetail getLevelOfDetail()
LevelOfDetail getLevelOfDetail()

function getNodebase

cpp
Ptr< Core::Node > const getNodebase() const
Ptr< Core::Node > const getNodebase() const

function getNumberOfVisibleDecimal

cpp
int getNumberOfVisibleDecimal()
int getNumberOfVisibleDecimal()

function maxLengthOfData

cpp
virtual int maxLengthOfData() =0
virtual int maxLengthOfData() =0

Reimplemented by: Workspace::Camera::maxLengthOfData, Workspace::Cycle::maxLengthOfData, Workspace::Model::maxLengthOfData, Workspace::Operator::maxLengthOfData, Workspace::Operator::maxLengthOfData, Workspace::Screen::maxLengthOfData, Workspace::Sequence::maxLengthOfData, Workspace::Transformation::maxLengthOfData, Workspace::TransformationBase::maxLengthOfData

function popupContent

cpp
virtual void popupContent() override
virtual void popupContent() override

Content of popup menu raise on this object.

Reimplements: Workspace::Node::popupContent

Reimplemented by: Workspace::Camera::popupContent, Workspace::Model::popupContent, Workspace::Screen::popupContent, Workspace::Sequence::popupContent, Workspace::TransformationBase::popupContent

function processDrag

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

Reimplements: DIWNE::Node::processDrag

function processSelect

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

Reimplements: DIWNE::Node::processSelect

Reimplemented by: Workspace::Camera::processSelect, Workspace::Model::processSelect

function processUnselect

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

Reimplements: DIWNE::Node::processUnselect

Reimplemented by: Workspace::Camera::processUnselect, Workspace::Model::processUnselect

function setFloatPopupMode

cpp
inline void setFloatPopupMode(
    FloatPopupMode mode
)
inline void setFloatPopupMode(
    FloatPopupMode mode
)

function setLevelOfDetail

cpp
LevelOfDetail setLevelOfDetail(
    LevelOfDetail levelOfDetail
)
LevelOfDetail setLevelOfDetail(
    LevelOfDetail levelOfDetail
)

function setNumberOfVisibleDecimal

cpp
virtual void setNumberOfVisibleDecimal(
    int value
)
virtual void setNumberOfVisibleDecimal(
    int value
)

Reimplemented by: Workspace::Sequence::setNumberOfVisibleDecimal

function topContent

cpp
virtual bool topContent() override
virtual bool topContent() override

Reimplements: Workspace::Node::topContent

Reimplemented by: Workspace::Camera::topContent, Workspace::Cycle::topContent, Workspace::Model::topContent, Workspace::Operator::topContent, Workspace::Operator::topContent, Workspace::Screen::topContent, Workspace::Sequence::topContent, Workspace::TransformationBase::topContent

function updateDataItemsWidth

cpp
virtual float updateDataItemsWidth()
virtual float updateDataItemsWidth()

Reimplemented by: Workspace::Camera::updateDataItemsWidth

function drawMenuLevelOfDetail_builder

cpp
static void drawMenuLevelOfDetail_builder(
    Ptr< CoreNode > node,
    std::vector< LevelOfDetail > const & levels_of_detail
)
static void drawMenuLevelOfDetail_builder(
    Ptr< CoreNode > node,
    std::vector< LevelOfDetail > const & levels_of_detail
)

Protected Attributes Documentation

variable m_dataItemsWidth

cpp
float m_dataItemsWidth;
float m_dataItemsWidth;

variable m_floatPopupMode

cpp
FloatPopupMode m_floatPopupMode;
FloatPopupMode m_floatPopupMode;

variable m_headerMinWidth

cpp
float m_headerMinWidth {0};
float m_headerMinWidth {0};

Can be used to specify the minimum header width of the node.

variable m_isFirstDraw

cpp
bool m_isFirstDraw = true;
bool m_isFirstDraw = true;

variable m_isLabelBeingEdited

cpp
bool m_isLabelBeingEdited = false;
bool m_isLabelBeingEdited = false;

variable m_levelOfDetail

cpp
LevelOfDetail m_levelOfDetail;
LevelOfDetail m_levelOfDetail;

variable m_nodebase

cpp
Ptr< Core::Node > const m_nodebase;
Ptr< Core::Node > const m_nodebase;

reference to Core

WorkspaceNodeWithCoreData is owner

variable m_numberOfVisibleDecimal

cpp
int m_numberOfVisibleDecimal;
int m_numberOfVisibleDecimal;

number of decimal places used while display floats in the workspace


Updated on 2024-11-06 at 20:16:53 +0000