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 | |
bool | drawDataLabel() |
void | drawMenuDuplicate() |
virtual void | drawMenuLevelOfDetail() =0 |
void | drawMenuSetEditable() |
void | drawMenuSetPrecision() |
float | getDataItemsWidth() |
FloatPopupMode & | getFloatPopupMode() |
bool | getIsLabelBeingEdited() |
LevelOfDetail | getLevelOfDetail() |
Ptr< Core::Node > const | getNodebase() const |
int | getNumberOfVisibleDecimal() |
virtual int | maxLengthOfData() =0 |
virtual void | popupContent() override<br>Content of popup menu raise on this object. |
virtual bool | processDrag() override |
virtual bool | processSelect() override |
virtual bool | processUnselect() override |
void | setFloatPopupMode(FloatPopupMode mode) |
LevelOfDetail | setLevelOfDetail(LevelOfDetail levelOfDetail) |
virtual void | setNumberOfVisibleDecimal(int value) |
virtual bool | topContent() override |
virtual float | updateDataItemsWidth() |
void | drawMenuLevelOfDetail_builder(Ptr< CoreNode > node, std::vector< LevelOfDetail > const & levels_of_detail) |
Protected Attributes
Name | |
---|---|
float | m_dataItemsWidth |
FloatPopupMode | m_floatPopupMode |
float | m_headerMinWidth <br>Can be used to specify the minimum header width of the node. |
bool | m_isFirstDraw |
bool | m_isLabelBeingEdited |
LevelOfDetail | m_levelOfDetail |
Ptr< Core::Node > const | m_nodebase <br>reference to Core |
int | m_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 bool | beforeContent() override |
virtual bool | bottomContent() override |
virtual bool | bypassFocusForInteractionAction() override |
virtual void | deleteAction() override |
virtual void | drawMenuDelete() |
bool | getDuplicateNode() const |
std::string | getMiddleLabel() |
bool | getRemoveFromWorkspace() const |
std::string | getTopLabel() |
virtual bool | leftContent() override |
virtual bool | middleContent() override |
virtual bool | rightContent() override |
void | setDuplicateNode(bool value) |
void | setMiddleLabel(std::string label) |
void | setRemoveFromWorkspace(bool value) |
void | setTopLabel(std::string label) |
Public Attributes inherited from Workspace::Node
Name | |
---|---|
bool | m_duplicateNode |
bool | m_removeFromWorkspaceWindow |
Protected Attributes inherited from Workspace::Node
Name | |
---|---|
std::string | m_middleLabel |
std::string | m_topLabel |
Public Functions inherited from IVisitable
Name | |
---|---|
virtual void | accept(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 bool | afterEndDiwne() override |
virtual bool | allowDrawing() override<br>Decision maker whether object should be drawn (not outside of window for example) |
virtual bool | beforeBeginDiwne() override |
virtual void | begin() override |
virtual bool | bottomContent() |
bool | bottomContentDiwne() |
virtual bool | content() override |
virtual void | deleteAction() |
void | deleteActionDiwne() |
template <typename T > <br>bool | drawNodeDiwne(DrawModeNodePosition nodePosMode =DrawModeNodePosition::OnItsPosition, DrawMode drawMode =DrawMode::Interacting) |
virtual void | end() override |
virtual DIWNE::DiwneAction | getDragActionType() const |
virtual DIWNE::DiwneAction | getHoldActionType() const |
DIWNE::ID const | getId() const |
ImVec2 | getNodePositionDiwne() const |
ImRect | getNodeRectDiwne() const |
ImVec2 | getNodeRectSizeDiwne() const |
virtual ImRect | getRectDiwne() const override |
bool | getRender() const |
virtual DIWNE::DiwneAction | getTouchActionType() const |
virtual bool | leftContent() |
bool | leftContentDiwne() |
virtual bool | middleContent() |
bool | middleContentDiwne() |
Node & | operator=(const Node & other)<br>Assignment operator. |
virtual bool | rightContent() |
bool | rightContentDiwne() |
void | setNodePositionDiwne(ImVec2 const & position) |
void | setRender(bool render) |
virtual bool | setSelected(const bool selected) override |
bool | topContentDiwne() |
void | translateNodePositionDiwne(ImVec2 const amount) |
virtual void | updateSizes() override |
Public Attributes inherited from DIWNE::Node
Name | |
---|---|
bool | m_drawAnyway |
Protected Attributes inherited from DIWNE::Node
Name | |
---|---|
ImRect | m_bottomRectDiwne |
float | m_centerDummySpace <br>indent value to center the middle part |
ImRect | m_leftRectDiwne |
ImRect | m_middleRectDiwne |
ImVec2 | m_nodePositionDiwne |
DrawModeNodePosition | m_nodePosMode |
bool | m_render <br>used to hide nodes in tutorial scenes (action "toggleNodeWorkspaceVisibility") |
ImRect | m_rightRectDiwne |
bool | m_toDelete <br>Set to true after node delete action. |
ImRect | m_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 bool | afterContent() |
virtual bool | afterContentDiwne() |
virtual bool | afterEnd() |
virtual bool | afterEndDiwne() |
virtual bool | allowDrawing()<br>Decision maker whether object should be drawn (not outside of window for example) |
virtual bool | allowInteraction()<br>Decision maker whether object can interact (not include content elements) |
virtual bool | allowProcessDrag() |
virtual bool | allowProcessFocused() |
virtual bool | allowProcessFocusedForInteraction() |
virtual bool | allowProcessHold() |
virtual bool | allowProcessRaisePopup() |
virtual bool | allowProcessSelect() |
virtual bool | allowProcessUnhold() |
virtual bool | allowProcessUnselect() |
virtual bool | beforeBegin() |
virtual bool | beforeBeginDiwne() |
virtual bool | beforeContent() |
virtual bool | beforeContentDiwne() |
virtual void | begin() =0 |
virtual bool | bypassDragAction() |
virtual bool | bypassFocusAction() |
virtual bool | bypassFocusForInteractionAction() |
virtual bool | bypassHoldAction() |
virtual bool | bypassRaisePopupAction() |
virtual bool | bypassSelectAction() |
virtual bool | bypassTouchAction() |
virtual bool | bypassUnholdAction() |
virtual bool | bypassUnselectAction() |
virtual bool | content() |
virtual bool | contentDiwne() |
virtual bool | drawDiwne(DrawMode drawMode =DrawMode::Interacting)<br>Main function for drawing object and deal with interactions. |
virtual void | end() =0 |
virtual bool | finalize() |
virtual bool | finalizeDiwne() |
virtual DIWNE::DiwneAction | getDragActionType() const =0 |
virtual DIWNE::DiwneAction | getHoldActionType() const =0 |
DIWNE::ID const | getIdDiwne() const |
virtual ImRect | getRectDiwne() const =0 |
virtual bool | getSelectable() |
virtual bool | getSelected() const<br>Getter of selection state. |
virtual DIWNE::DiwneAction | getTouchActionType() const =0 |
virtual bool | initialize() |
virtual bool | initializeDiwne() |
virtual bool | interactionBeginInLastDraw() |
virtual bool | interactionEndInLastDraw() |
bool | processDragDiwne() |
virtual bool | processFocused() |
bool | processFocusedDiwne() |
virtual bool | processFocusedForInteraction() |
bool | processFocusedForInteractionDiwne() |
virtual bool | processHold() |
bool | processHoldDiwne() |
virtual bool | processInteractions() |
virtual bool | processInteractionsAlways() |
virtual bool | processInteractionsDiwne() |
virtual bool | processRaisePopupDiwne() |
bool | processSelectDiwne() |
virtual bool | processShowPopupDiwne() |
virtual bool | processUnhold() |
bool | processUnholdDiwne() |
bool | processUnselectDiwne() |
virtual void | setSelectable(bool const selectable) |
virtual bool | setSelected(bool const selected) |
void | showTooltipLabel(std::string const & label, ImColor const && color)<br>Show a colored text for example for immediate hints. |
virtual void | updateSizes() |
Public Attributes inherited from DIWNE::DiwneObject
Name | |
---|---|
DIWNE::Diwne & | diwne |
DrawMode | m_drawMode |
bool | m_focused |
bool | m_focusedForInteraction |
DIWNE::ID const | m_idDiwne |
bool | m_inner_interaction_happen |
bool | m_inner_interaction_happen_previous_draw |
bool | m_isActive |
bool | m_isDragged |
bool | m_isHeld |
std::string const | m_labelDiwne |
std::string const | m_popupIDDiwne |
bool | m_selectable |
bool | m_selected |
Public Functions Documentation
function CoreNode
CoreNode(
DIWNE::Diwne & diwne,
Ptr< Core::Node > nodebase
)
CoreNode(
DIWNE::Diwne & diwne,
Ptr< Core::Node > nodebase
)
function ~CoreNode
~CoreNode() override
~CoreNode() override
function drawDataLabel
bool drawDataLabel()
bool drawDataLabel()
function drawMenuDuplicate
void drawMenuDuplicate()
void drawMenuDuplicate()
function drawMenuLevelOfDetail
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
void drawMenuSetEditable()
void drawMenuSetEditable()
function drawMenuSetPrecision
void drawMenuSetPrecision()
void drawMenuSetPrecision()
function getDataItemsWidth
float getDataItemsWidth()
float getDataItemsWidth()
function getFloatPopupMode
inline FloatPopupMode & getFloatPopupMode()
inline FloatPopupMode & getFloatPopupMode()
function getIsLabelBeingEdited
inline bool getIsLabelBeingEdited()
inline bool getIsLabelBeingEdited()
function getLevelOfDetail
LevelOfDetail getLevelOfDetail()
LevelOfDetail getLevelOfDetail()
function getNodebase
Ptr< Core::Node > const getNodebase() const
Ptr< Core::Node > const getNodebase() const
function getNumberOfVisibleDecimal
int getNumberOfVisibleDecimal()
int getNumberOfVisibleDecimal()
function maxLengthOfData
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
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
virtual bool processDrag() override
virtual bool processDrag() override
Reimplements: DIWNE::Node::processDrag
function processSelect
virtual bool processSelect() override
virtual bool processSelect() override
Reimplements: DIWNE::Node::processSelect
Reimplemented by: Workspace::Camera::processSelect, Workspace::Model::processSelect
function processUnselect
virtual bool processUnselect() override
virtual bool processUnselect() override
Reimplements: DIWNE::Node::processUnselect
Reimplemented by: Workspace::Camera::processUnselect, Workspace::Model::processUnselect
function setFloatPopupMode
inline void setFloatPopupMode(
FloatPopupMode mode
)
inline void setFloatPopupMode(
FloatPopupMode mode
)
function setLevelOfDetail
LevelOfDetail setLevelOfDetail(
LevelOfDetail levelOfDetail
)
LevelOfDetail setLevelOfDetail(
LevelOfDetail levelOfDetail
)
function setNumberOfVisibleDecimal
virtual void setNumberOfVisibleDecimal(
int value
)
virtual void setNumberOfVisibleDecimal(
int value
)
Reimplemented by: Workspace::Sequence::setNumberOfVisibleDecimal
function topContent
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
virtual float updateDataItemsWidth()
virtual float updateDataItemsWidth()
Reimplemented by: Workspace::Camera::updateDataItemsWidth
function drawMenuLevelOfDetail_builder
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
float m_dataItemsWidth;
float m_dataItemsWidth;
variable m_floatPopupMode
FloatPopupMode m_floatPopupMode;
FloatPopupMode m_floatPopupMode;
variable m_headerMinWidth
float m_headerMinWidth {0};
float m_headerMinWidth {0};
Can be used to specify the minimum header width of the node.
variable m_isFirstDraw
bool m_isFirstDraw = true;
bool m_isFirstDraw = true;
variable m_isLabelBeingEdited
bool m_isLabelBeingEdited = false;
bool m_isLabelBeingEdited = false;
variable m_levelOfDetail
LevelOfDetail m_levelOfDetail;
LevelOfDetail m_levelOfDetail;
variable m_nodebase
Ptr< Core::Node > const m_nodebase;
Ptr< Core::Node > const m_nodebase;
reference to Core
WorkspaceNodeWithCoreData is owner
variable m_numberOfVisibleDecimal
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