DIWNE::DiwneObject 
All objects in DIWNE are inherited from DiwneObjectDiwneObject covers the functionality common to all Objects in the node editor - such as selecting, dragging, hovering,...
#include "DIWNE/DiwneObject.h"
Inherits from std::enable_shared_from_this< DiwneObject >
Inherited by DIWNE::Diwne, DIWNE::Link, DIWNE::Node, DIWNE::Pin
Public Functions 
| 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() | 
| virtual void | popupContent()<br>Content of popup menu raise on this object. | 
| virtual bool | processDrag() | 
| 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() | 
| virtual bool | processSelect() | 
| bool | processSelectDiwne() | 
| virtual bool | processShowPopupDiwne() | 
| virtual bool | processUnhold() | 
| bool | processUnholdDiwne() | 
| virtual bool | processUnselect() | 
| 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 
| 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 DiwneObject 
DiwneObject(
    DIWNE::Diwne & diwne,
    DIWNE::ID id,
    std::string const labelDiwne
)DiwneObject(
    DIWNE::Diwne & diwne,
    DIWNE::ID id,
    std::string const labelDiwne
)Constructor.
Parameters:
- diwne is node editor object that this object belongs to
 - id used to identification
 - labelDiwne used to identification
 
function ~DiwneObject 
virtual ~DiwneObject() =defaultvirtual ~DiwneObject() =defaultfunction afterContent 
virtual bool afterContent()virtual bool afterContent()Reimplemented by: Workspace::Sequence::afterContent, Workspace::TransformationBase::afterContent, Workspace::WorkspaceDiwne::afterContent
is called as last inside object
function afterContentDiwne 
virtual bool afterContentDiwne()virtual bool afterContentDiwne()Reimplemented by: DIWNE::Diwne::afterContentDiwne
DIWNE wrapper
function afterEnd 
virtual bool afterEnd()virtual bool afterEnd()Reimplemented by: Workspace::WorkspaceDiwne::afterEnd
is called after closing object, sizes are updated already
function afterEndDiwne 
virtual bool afterEndDiwne()virtual bool afterEndDiwne()Reimplemented by: DIWNE::Diwne::afterEndDiwne, DIWNE::Node::afterEndDiwne
DIWNE wrapper
function allowDrawing 
virtual bool allowDrawing()virtual bool allowDrawing()Decision maker whether object should be drawn (not outside of window for example)
Return: draw object on its position?
Reimplemented by: DIWNE::Diwne::allowDrawing, DIWNE::Node::allowDrawing, Workspace::Sequence::allowDrawing, Workspace::TransformationBase::allowDrawing
function allowInteraction 
virtual bool allowInteraction()virtual bool allowInteraction()Decision maker whether object can interact (not include content elements)
Return: can this object interact?
function allowProcessDrag 
virtual bool allowProcessDrag()virtual bool allowProcessDrag()function allowProcessFocused 
virtual bool allowProcessFocused()virtual bool allowProcessFocused()Reimplemented by: DIWNE::Diwne::allowProcessFocused
function allowProcessFocusedForInteraction 
virtual bool allowProcessFocusedForInteraction()virtual bool allowProcessFocusedForInteraction()function allowProcessHold 
virtual bool allowProcessHold()virtual bool allowProcessHold()function allowProcessRaisePopup 
virtual bool allowProcessRaisePopup()virtual bool allowProcessRaisePopup()function allowProcessSelect 
virtual bool allowProcessSelect()virtual bool allowProcessSelect()function allowProcessUnhold 
virtual bool allowProcessUnhold()virtual bool allowProcessUnhold()function allowProcessUnselect 
virtual bool allowProcessUnselect()virtual bool allowProcessUnselect()function beforeBegin 
virtual bool beforeBegin()virtual bool beforeBegin()Reimplemented by: Workspace::TransformationBase::beforeBegin, Workspace::WorkspaceDiwne::beforeBegin
is called before begin of object drawing (but after allowDrawing() decision)
function beforeBeginDiwne 
virtual bool beforeBeginDiwne()virtual bool beforeBeginDiwne()Reimplemented by: DIWNE::Diwne::beforeBeginDiwne, DIWNE::Node::beforeBeginDiwne
DIWNE wrapper
function beforeContent 
virtual bool beforeContent()virtual bool beforeContent()Reimplemented by: Workspace::Node::beforeContent, Workspace::Operator::beforeContent, Workspace::Operator::beforeContent, Workspace::Sequence::beforeContent, Workspace::TransformationBase::beforeContent, Workspace::WorkspaceDiwne::beforeContent
is called first inside of object
function beforeContentDiwne 
virtual bool beforeContentDiwne()virtual bool beforeContentDiwne()DIWNE wrapper
function begin 
virtual void begin() =0virtual void begin() =0Reimplemented by: DIWNE::Link::begin, DIWNE::Diwne::begin, DIWNE::Node::begin, DIWNE::Pin::begin
begin of object
function bypassDragAction 
virtual bool bypassDragAction()virtual bool bypassDragAction()Reimplemented by: Workspace::WorkspaceDiwne::bypassDragAction
action used for dragging object
function bypassFocusAction 
virtual bool bypassFocusAction()virtual bool bypassFocusAction()Reimplemented by: DIWNE::Link::bypassFocusAction
action identified as focusing on object (and prevent underlying object from focusing)
function bypassFocusForInteractionAction 
virtual bool bypassFocusForInteractionAction()virtual bool bypassFocusForInteractionAction()Reimplemented by: DIWNE::Link::bypassFocusForInteractionAction, Workspace::CorePin::bypassFocusForInteractionAction, Workspace::Node::bypassFocusForInteractionAction
action identified as focusing on object for interacting with it
function bypassHoldAction 
virtual bool bypassHoldAction()virtual bool bypassHoldAction()Reimplemented by: Workspace::WorkspaceDiwne::bypassHoldAction
action used for holding object (check only if object is not held)
function bypassRaisePopupAction 
virtual bool bypassRaisePopupAction()virtual bool bypassRaisePopupAction()action used for raising popup menu
function bypassSelectAction 
virtual bool bypassSelectAction()virtual bool bypassSelectAction()action used for selecting object
function bypassTouchAction 
virtual bool bypassTouchAction()virtual bool bypassTouchAction()action used for touching object - not interact with it, just move it to front of other objects
function bypassUnholdAction 
virtual bool bypassUnholdAction()virtual bool bypassUnholdAction()Reimplemented by: Workspace::WorkspaceDiwne::bypassUnholdAction
action used for unholding object (check only if object is held)
function bypassUnselectAction 
virtual bool bypassUnselectAction()virtual bool bypassUnselectAction()action used for unselecting object
function content 
virtual bool content()virtual bool content()Reimplemented by: DIWNE::Link::content, DIWNE::Pin::content, DIWNE::Node::content, Workspace::CorePin::content, Workspace::CoreInPin::content, Workspace::CoreOutPin::content, Workspace::DataOutPin::content, Workspace::WorkspaceDiwne::content
content of object
function contentDiwne 
virtual bool contentDiwne()virtual bool contentDiwne()DIWNE wrapper
function drawDiwne 
virtual bool drawDiwne(
    DrawMode drawMode =DrawMode::Interacting
)virtual bool drawDiwne(
    DrawMode drawMode =DrawMode::Interacting
)Main function for drawing object and deal with interactions.
Parameters:
- drawMode allows interactions with object
 
Return: true if some interaction with object (or inner of this object) happen, false otherwise
Reimplemented by: Workspace::CoreInPin::drawDiwne
function end 
virtual void end() =0virtual void end() =0Reimplemented by: DIWNE::Link::end, DIWNE::Diwne::end, DIWNE::Node::end, DIWNE::Pin::end
closing object
function finalize 
virtual bool finalize()virtual bool finalize()Reimplemented by: Workspace::CoreNodeWithPins::finalize, Workspace::WorkspaceDiwne::finalize
is called every time in drawDiwne() do any finalization of your object here
function finalizeDiwne 
virtual bool finalizeDiwne()virtual bool finalizeDiwne()Reimplemented by: DIWNE::Diwne::finalizeDiwne
DIWNE wrapper
function getDragActionType 
virtual DIWNE::DiwneAction getDragActionType() const =0virtual DIWNE::DiwneAction getDragActionType() const =0Reimplemented by: DIWNE::Diwne::getDragActionType, DIWNE::Link::getDragActionType, DIWNE::Node::getDragActionType, DIWNE::Pin::getDragActionType
return which type of object/action this object is
function getHoldActionType 
virtual DIWNE::DiwneAction getHoldActionType() const =0virtual DIWNE::DiwneAction getHoldActionType() const =0Reimplemented by: DIWNE::Diwne::getHoldActionType, DIWNE::Link::getHoldActionType, DIWNE::Node::getHoldActionType, DIWNE::Pin::getHoldActionType
return which type of object/action this object is
function getIdDiwne 
inline DIWNE::ID const getIdDiwne() constinline DIWNE::ID const getIdDiwne() constfunction getRectDiwne 
virtual ImRect getRectDiwne() const =0virtual ImRect getRectDiwne() const =0Reimplemented by: DIWNE::Diwne::getRectDiwne, DIWNE::Link::getRectDiwne, DIWNE::Node::getRectDiwne, DIWNE::Pin::getRectDiwne
return rectangle of object
function getSelectable 
inline virtual bool getSelectable()inline virtual bool getSelectable()function getSelected 
inline virtual bool getSelected() constinline virtual bool getSelected() constGetter of selection state.
Return: Current selection state of the object.
function getTouchActionType 
virtual DIWNE::DiwneAction getTouchActionType() const =0virtual DIWNE::DiwneAction getTouchActionType() const =0Reimplemented by: DIWNE::Diwne::getTouchActionType, DIWNE::Link::getTouchActionType, DIWNE::Node::getTouchActionType, DIWNE::Pin::getTouchActionType
return which type of object/action this object is
function initialize 
virtual bool initialize()virtual bool initialize()Reimplemented by: DIWNE::Link::initialize
is called every time in drawDiwne() do any initialization of your object here
function initializeDiwne 
virtual bool initializeDiwne()virtual bool initializeDiwne()Reimplemented by: DIWNE::Link::initializeDiwne, DIWNE::Diwne::initializeDiwne
DIWNE wrapper
function interactionBeginInLastDraw 
inline virtual bool interactionBeginInLastDraw()inline virtual bool interactionBeginInLastDraw()function interactionEndInLastDraw 
inline virtual bool interactionEndInLastDraw()inline virtual bool interactionEndInLastDraw()function popupContent 
virtual void popupContent()virtual void popupContent()Content of popup menu raise on this object.
Reimplemented by: Workspace::CoreNode::popupContent, Workspace::CorePin::popupContent, Workspace::Node::popupContent, Workspace::Camera::popupContent, Workspace::Model::popupContent, Workspace::Screen::popupContent, Workspace::ScriptingNode::popupContent, Workspace::Sequence::popupContent, Workspace::TransformationBase::popupContent, Workspace::WorkspaceDiwne::popupContent
function processDrag 
virtual bool processDrag()virtual bool processDrag()Reimplemented by: DIWNE::Diwne::processDrag, DIWNE::Node::processDrag, DIWNE::Pin::processDrag, Workspace::CoreNode::processDrag, Workspace::CorePin::processDrag
function processDragDiwne 
bool processDragDiwne()bool processDragDiwne()function processFocused 
virtual bool processFocused()virtual bool processFocused()Reimplemented by: DIWNE::Link::processFocused
function processFocusedDiwne 
bool processFocusedDiwne()bool processFocusedDiwne()function processFocusedForInteraction 
virtual bool processFocusedForInteraction()virtual bool processFocusedForInteraction()Reimplemented by: DIWNE::Link::processFocusedForInteraction
function processFocusedForInteractionDiwne 
bool processFocusedForInteractionDiwne()bool processFocusedForInteractionDiwne()function processHold 
virtual bool processHold()virtual bool processHold()function processHoldDiwne 
bool processHoldDiwne()bool processHoldDiwne()function processInteractions 
virtual bool processInteractions()virtual bool processInteractions()Reimplemented by: DIWNE::Diwne::processInteractions, Workspace::CoreInPin::processInteractions
react to interactions with this object
function processInteractionsAlways 
virtual bool processInteractionsAlways()virtual bool processInteractionsAlways()Reimplemented by: DIWNE::Pin::processInteractionsAlways
processes that happen even in allowInteraction() return false, but object still has to be in DrawMode::Interaction
function processInteractionsDiwne 
virtual bool processInteractionsDiwne()virtual bool processInteractionsDiwne()Reimplemented by: DIWNE::Diwne::processInteractionsDiwne
DIWNE wrapper
function processRaisePopupDiwne 
virtual bool processRaisePopupDiwne()virtual bool processRaisePopupDiwne()processing raising popup menu
function processSelect 
virtual bool processSelect()virtual bool processSelect()Reimplemented by: DIWNE::Node::processSelect, Workspace::CoreNode::processSelect, Workspace::Camera::processSelect, Workspace::Model::processSelect
function processSelectDiwne 
bool processSelectDiwne()bool processSelectDiwne()function processShowPopupDiwne 
virtual bool processShowPopupDiwne()virtual bool processShowPopupDiwne()processing showing popup menu
function processUnhold 
virtual bool processUnhold()virtual bool processUnhold()function processUnholdDiwne 
bool processUnholdDiwne()bool processUnholdDiwne()function processUnselect 
virtual bool processUnselect()virtual bool processUnselect()Reimplemented by: DIWNE::Node::processUnselect, Workspace::CoreNode::processUnselect, Workspace::Camera::processUnselect, Workspace::Model::processUnselect
function processUnselectDiwne 
bool processUnselectDiwne()bool processUnselectDiwne()function setSelectable 
inline virtual void setSelectable(
    bool const selectable
)inline virtual void setSelectable(
    bool const selectable
)function setSelected 
inline virtual bool setSelected(
    bool const selected
)inline virtual bool setSelected(
    bool const selected
)Parameters:
- selected is the new requested state of the object
 
Return: New state of selection
Reimplemented by: DIWNE::Node::setSelected
Setter of selection state
function showTooltipLabel 
void showTooltipLabel(
    std::string const & label,
    ImColor const && color
)void showTooltipLabel(
    std::string const & label,
    ImColor const && color
)Show a colored text for example for immediate hints.
Parameters:
- label is the text to show
 - color is the color of the tooltip
 
function updateSizes 
virtual void updateSizes()virtual void updateSizes()Reimplemented by: DIWNE::Node::updateSizes, DIWNE::Pin::updateSizes, Workspace::TransformationBase::updateSizes
store object size and position after this frame
Public Attributes Documentation 
variable diwne 
DIWNE::Diwne & diwne;DIWNE::Diwne & diwne;Every object have access to Diwne - is used for share information if needed
variable m_drawMode 
DrawMode m_drawMode;DrawMode m_drawMode;See: enum DrawMode
variable m_focused 
bool m_focused;bool m_focused;Is object focused anywhere (and for example can not be¨focus other underlying object)
variable m_focusedForInteraction 
bool m_focusedForInteraction;bool m_focusedForInteraction;Is object focus on area that allow interaction with object
variable m_idDiwne 
DIWNE::ID const m_idDiwne;DIWNE::ID const m_idDiwne;Used for creating ImGui id/labels
variable m_inner_interaction_happen 
bool m_inner_interaction_happen;bool m_inner_interaction_happen;variable m_inner_interaction_happen_previous_draw 
bool m_inner_interaction_happen_previous_draw;bool m_inner_interaction_happen_previous_draw;If some interaction happen with inner elements (DragFloat, Button, ...) it block interaction with this object
variable m_isActive 
bool m_isActive;bool m_isActive;Something happen with object
variable m_isDragged 
bool m_isDragged;bool m_isDragged;Is object dragged
variable m_isHeld 
bool m_isHeld;bool m_isHeld;Is object held. When dragged it is still held.
variable m_labelDiwne 
std::string const m_labelDiwne;std::string const m_labelDiwne;Used for identifying object and creating ImGui id/labels
variable m_popupIDDiwne 
std::string const m_popupIDDiwne;std::string const m_popupIDDiwne;Used for identifying what element raise popup
variable m_selectable 
bool m_selectable;bool m_selectable;variable m_selected 
bool m_selected;bool m_selected;Is object selected
Updated on 2025-09-07 at 16:13:51 +0000