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 Workspace::Node
Public Functions
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 | processDrag() override |
virtual bool | processSelect() override |
virtual bool | processUnselect() override |
virtual bool | rightContent() |
bool | rightContentDiwne() |
void | setNodePositionDiwne(ImVec2 const & position) |
void | setRender(bool render) |
virtual bool | setSelected(const bool selected) override |
virtual bool | topContent() |
bool | topContentDiwne() |
void | translateNodePositionDiwne(ImVec2 const amount) |
virtual void | updateSizes() override |
Public Attributes
Name | |
---|---|
bool | m_drawAnyway |
Protected Attributes
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. |
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 bool | afterContent() |
virtual bool | afterContentDiwne() |
virtual bool | afterEnd() |
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 | beforeContent() |
virtual bool | beforeContentDiwne() |
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 | contentDiwne() |
virtual bool | drawDiwne(DrawMode drawMode =DrawMode::Interacting)<br>Main function for drawing object and deal with interactions. |
virtual bool | finalize() |
virtual bool | finalizeDiwne() |
DIWNE::ID const | getIdDiwne() const |
virtual bool | getSelectable() |
virtual bool | getSelected() const<br>Getter of selection state. |
virtual bool | initialize() |
virtual bool | initializeDiwne() |
virtual bool | interactionBeginInLastDraw() |
virtual bool | interactionEndInLastDraw() |
virtual void | popupContent()<br>Content of popup menu raise on this object. |
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) |
void | showTooltipLabel(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 |
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 |
Detailed Description
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
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
virtual ~Node()
virtual ~Node()
Default destructor.
Reimplemented by: Workspace::Node::~Node
function afterEndDiwne
virtual bool afterEndDiwne() override
virtual bool afterEndDiwne() override
Reimplements: DIWNE::DiwneObject::afterEndDiwne
DIWNE wrapper
function allowDrawing
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: Workspace::Sequence::allowDrawing, Workspace::TransformationBase::allowDrawing
function beforeBeginDiwne
virtual bool beforeBeginDiwne() override
virtual bool beforeBeginDiwne() override
Reimplements: DIWNE::DiwneObject::beforeBeginDiwne
DIWNE wrapper
function begin
virtual void begin() override
virtual void begin() override
Reimplements: DIWNE::DiwneObject::begin
begin of object
function bottomContent
virtual bool bottomContent()
virtual bool bottomContent()
Reimplemented by: Workspace::Node::bottomContent
function bottomContentDiwne
bool bottomContentDiwne()
bool bottomContentDiwne()
function content
virtual bool content() override
virtual bool content() override
Reimplements: DIWNE::DiwneObject::content
content of object
function deleteAction
inline virtual void deleteAction()
inline virtual void deleteAction()
Reimplemented by: Workspace::Node::deleteAction, Workspace::TransformationBase::deleteAction
function deleteActionDiwne
void deleteActionDiwne()
void deleteActionDiwne()
function drawNodeDiwne
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
virtual void end() override
virtual void end() override
Reimplements: DIWNE::DiwneObject::end
closing object
function getDragActionType
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
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
inline DIWNE::ID const getId() const
inline DIWNE::ID const getId() const
function getNodePositionDiwne
inline ImVec2 getNodePositionDiwne() const
inline ImVec2 getNodePositionDiwne() const
function getNodeRectDiwne
inline ImRect getNodeRectDiwne() const
inline ImRect getNodeRectDiwne() const
function getNodeRectSizeDiwne
inline ImVec2 getNodeRectSizeDiwne() const
inline ImVec2 getNodeRectSizeDiwne() const
function getRectDiwne
inline virtual ImRect getRectDiwne() const override
inline virtual ImRect getRectDiwne() const override
Reimplements: DIWNE::DiwneObject::getRectDiwne
return rectangle of object
function getRender
inline bool getRender() const
inline bool getRender() const
function getTouchActionType
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
virtual bool leftContent()
virtual bool leftContent()
Reimplemented by: Workspace::CoreNodeWithPins::leftContent, Workspace::Node::leftContent, Workspace::Cycle::leftContent, Workspace::AngleAxisToQuatOperator::leftContent
function leftContentDiwne
bool leftContentDiwne()
bool leftContentDiwne()
function middleContent
virtual bool middleContent()
virtual bool middleContent()
Reimplemented by: Workspace::Node::middleContent, Workspace::Camera::middleContent, Workspace::Cycle::middleContent, Workspace::Model::middleContent, Workspace::Operator::middleContent, Workspace::Operator::middleContent, Workspace::Screen::middleContent, Workspace::Sequence::middleContent, Workspace::TransformationBase::middleContent
function middleContentDiwne
bool middleContentDiwne()
bool middleContentDiwne()
function operator=
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
virtual bool processDrag() override
virtual bool processDrag() override
Reimplements: DIWNE::DiwneObject::processDrag
function processSelect
virtual bool processSelect() override
virtual bool processSelect() override
Reimplements: DIWNE::DiwneObject::processSelect
function processUnselect
virtual bool processUnselect() override
virtual bool processUnselect() override
Reimplements: DIWNE::DiwneObject::processUnselect
function rightContent
virtual bool rightContent()
virtual bool rightContent()
Reimplemented by: Workspace::CoreNodeWithPins::rightContent, Workspace::Node::rightContent, Workspace::Cycle::rightContent
function rightContentDiwne
bool rightContentDiwne()
bool rightContentDiwne()
function setNodePositionDiwne
inline void setNodePositionDiwne(
ImVec2 const & position
)
inline void setNodePositionDiwne(
ImVec2 const & position
)
function setRender
inline void setRender(
bool render
)
inline void setRender(
bool render
)
function setSelected
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
virtual bool topContent()
virtual bool topContent()
Reimplemented by: Workspace::CoreNode::topContent, Workspace::Node::topContent, 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 topContentDiwne
bool topContentDiwne()
bool topContentDiwne()
function translateNodePositionDiwne
inline void translateNodePositionDiwne(
ImVec2 const amount
)
inline void translateNodePositionDiwne(
ImVec2 const amount
)
function updateSizes
virtual void updateSizes() override
virtual void updateSizes() override
Reimplements: DIWNE::DiwneObject::updateSizes
Reimplemented by: Workspace::TransformationBase::updateSizes
store object size and position after this frame
Public Attributes Documentation
variable m_drawAnyway
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
ImRect m_bottomRectDiwne;
ImRect m_bottomRectDiwne;
variable m_centerDummySpace
float m_centerDummySpace;
float m_centerDummySpace;
indent value to center the middle part
variable m_leftRectDiwne
ImRect m_leftRectDiwne;
ImRect m_leftRectDiwne;
variable m_middleRectDiwne
ImRect m_middleRectDiwne;
ImRect m_middleRectDiwne;
variable m_nodePositionDiwne
ImVec2 m_nodePositionDiwne;
ImVec2 m_nodePositionDiwne;
variable m_nodePosMode
DrawModeNodePosition m_nodePosMode;
DrawModeNodePosition m_nodePosMode;
variable m_render
bool m_render = true;
bool m_render = true;
used to hide nodes in tutorial scenes (action "toggleNodeWorkspaceVisibility")
variable m_rightRectDiwne
ImRect m_rightRectDiwne;
ImRect m_rightRectDiwne;
variable m_toDelete
bool m_toDelete;
bool m_toDelete;
Set to true after node delete action.
variable m_topRectDiwne
ImRect m_topRectDiwne;
ImRect m_topRectDiwne;
Rectangle of parts of node in diwne, are computed every frame based on node content and m_nodePositionDiwne.
Note that these rects are using "world" node editor coordinates, not scaled and translated screen ones.
Updated on 2025-01-07 at 13:40:44 +0000