DIWNE::Diwne
The node editor object In ancestor of this object you will probably store your nodes (links, pins) It store inter-object interactions Every DiwneObject has reference to this object.
#include "DIWNE/diwne.h"
Inherits from DIWNE::DiwneObject, std::enable_shared_from_this< DiwneObject >
Inherited by Workspace::WorkspaceDiwne
Public Functions
Name | |
---|---|
Diwne(DIWNE::SettingsDiwne * settingsDiwne)<br>Default constructor. | |
virtual | ~Diwne()<br>Default destructor. |
void | AddBezierCurveDiwne(const ImVec2 & p1, const ImVec2 & p2, const ImVec2 & p3, const ImVec2 & p4, ImVec4 col, float thickness, int num_segments =0) const<br>Draw Bezier (not Bezier really) curve to window ImDrawList. |
void | AddRectDiwne(const ImVec2 & p_min, const ImVec2 & p_max, ImVec4 col, float rounding =0.0f, ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll, float thickness =1.0f) const<br>Draw rectangle to window ImDrawlist. |
void | AddRectFilledDiwne(const ImVec2 & p_min, const ImVec2 & p_max, ImVec4 col, float rounding =0.0f, ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll) const<br>Draw filled rectangle to window ImDrawlist. |
virtual bool | afterContentDiwne() override |
virtual bool | afterEndDiwne() override |
virtual bool | allowDrawing() override<br>Decision maker whether object should be drawn (not outside of window for example) |
virtual bool | allowProcessFocused() |
virtual bool | allowProcessSelectionRectangle() |
virtual bool | allowProcessZoom() |
bool | applyZoomScaling()<br>Modifies the current ImGuiStyle and Font depending on the current diwne zoom level. |
float | applyZoomScalingToFont(ImFont * font, ImFont * largeFont =nullptr)<br>Modifies the current Font depending on the current diwne zoom level. |
virtual bool | beforeBeginDiwne() override |
virtual void | begin() override |
bool | blockRaisePopup() |
virtual ImVec2 | bypassDiwneGetPopupNewPositionAction() |
virtual ImVec2 | bypassDiwneGetSelectionRectangleSize() |
virtual ImVec2 | bypassDiwneGetSelectionRectangleStartPosition() |
virtual bool | bypassDiwneSetPopupPositionAction() |
virtual ImVec2 | bypassGetMouseDelta() |
virtual ImVec2 | bypassGetMouseDragDelta0() |
virtual ImVec2 | bypassGetMouseDragDelta1() |
virtual ImVec2 | bypassGetMouseDragDelta2() |
virtual ImVec2 | bypassGetMousePos() |
virtual float | bypassGetMouseWheel() |
virtual float | bypassGetZoomDelta() |
virtual bool | bypassIsItemActive() |
virtual bool | bypassIsItemClicked0() |
virtual bool | bypassIsItemClicked1() |
virtual bool | bypassIsItemClicked2() |
virtual bool | bypassIsMouseClicked0() |
virtual bool | bypassIsMouseClicked1() |
virtual bool | bypassIsMouseClicked2() |
virtual bool | bypassIsMouseDown0() |
virtual bool | bypassIsMouseDown1() |
virtual bool | bypassIsMouseDown2() |
virtual bool | bypassIsMouseDragging0() |
virtual bool | bypassIsMouseDragging1() |
virtual bool | bypassIsMouseDragging2() |
virtual bool | bypassIsMouseReleased0() |
virtual bool | bypassIsMouseReleased1() |
virtual bool | bypassIsMouseReleased2() |
virtual ImVec2 | bypassMouseClickedPos0() |
virtual ImVec2 | bypassMouseClickedPos1() |
virtual ImVec2 | bypassMouseClickedPos2() |
virtual bool | bypassSelectionRectangleAction() |
virtual bool | bypassZoomAction() |
virtual void | clear()<br>Clear all nodes from the node editor. |
ImVec2 | diwne2screen(const ImVec2 & point) const |
ImVec2 | diwne2screen_noZoom(const ImVec2 & point) const |
ImVec2 | diwne2workArea(const ImVec2 & point) const |
ImVec2 | diwne2workArea_noZoom(const ImVec2 & point) const |
void | DrawIcon(DIWNE::IconType bgIconType, ImColor bgShapeColor, ImColor bgInnerColor, DIWNE::IconType fgIconType, ImColor fgShapeColor, ImColor fgInnerColor, ImVec2 size, ImVec4 padding, bool filled, ImVec2 thickness =ImVec2(1, 1), float rounding =0) const<br>Draw an Icon combined from two parts (foreground and background) to the window ImDrawList filled with a ShapeColor. |
void | DrawIconCircle(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const<br>Draw a circle icon. |
void | DrawIconCross(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float shapeThickness =2, float innerThickness =1) const |
void | DrawIconFastForward(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconGrabDownLeft(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconGrabDownRight(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconHyphen(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =3.0f) const |
void | DrawIconPause(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, ImVec2 thickness =ImVec2(1, 1), float rounding =0) const |
void | DrawIconRectangle(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, ImVec2 thickness =ImVec2(1, 1), float rounding =0) const |
void | DrawIconRewind(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconSkipBack(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconSkipBack2(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconSkipForward(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconSkipForward2(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconTriangleDownLeft(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconTriangleDownRight(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconTriangleLeft(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | DrawIconTriangleRight(ImDrawList * idl, ImColor shapeColor, ImColor innerColor, ImVec2 topLeft, ImVec2 bottomRight, bool filled, float thickness =1) const |
void | EmptyButton(ImVec2 size, ImColor color, float rounding)<br>Just the shape of the button, no interaction. |
virtual void | end() override |
bool | ensureZoomScaling(bool active)<br>Ensure that zoom scaling is active or not based on a passed parameter. |
virtual bool | finalizeDiwne() override |
DiwneAction | getDiwneAction() const |
DiwneAction | getDiwneActionActive() const |
DiwneAction | getDiwneActionPreviousFrame() const |
virtual DIWNE::DiwneAction | getDragActionType() const |
DIWNE::Link & | getHelperLink() |
virtual DIWNE::DiwneAction | getHoldActionType() const |
template <typename T > <br>std::shared_ptr< T > | getLastActiveNode() |
template <typename T > <br>std::shared_ptr< T > | getLastActivePin() |
bool | getNodesSelectionChanged() |
ImVec2 const & | getPopupPosition() const |
virtual ImRect | getRectDiwne() const override |
ImRect | getSelectionRectangleDiwne() |
virtual DIWNE::DiwneAction | getTouchActionType() const |
ImRect | getWorkAreaDiwne() const<br>Update position and size of work area on screen and on diwne. |
ImRect | getWorkAreaScreen() const |
float | getWorkAreaZoom() const |
bool | IconButton(DIWNE::IconType bgIconType, ImColor bgShapeColor, ImColor bgInnerColor, DIWNE::IconType fgIconType, ImColor fgShapeColor, ImColor fgInnerColor, ImVec2 size, ImVec4 padding, bool filled, std::string const id) const |
bool | IconButton(DIWNE::IconType bgIconType, ImColor bgShapeColor, ImColor bgInnerColor, ImVec2 size, ImVec4 padding, bool filled, std::string const id) const |
virtual bool | initializeDiwne() override |
virtual bool | processDiwneSelectionRectangle() |
virtual bool | processDiwneZoom() |
virtual bool | processDrag() override |
virtual bool | processInteractions() override |
virtual bool | processInteractionsDiwne() override |
virtual bool | processZoom() |
bool | restoreZoomScaling()<br>Restores the current ImGuiStyle and Font back to its state before applyZoomScaling() was last called. |
void | restoreZoomScalingToFont(ImFont * font, float originalScale) |
ImVec2 | screen2diwne(const ImVec2 & point) const |
ImVec2 | screen2diwne_noZoom(const ImVec2 & point) const |
ImVec2 | screen2workArea(const ImVec2 & point) const |
void | setDiwneAction(DiwneAction action) |
template <typename T > <br>void | setLastActiveNode(std::shared_ptr< T > node) |
template <typename T > <br>void | setLastActivePin(std::shared_ptr< T > pin) |
void | setNodesSelectionChanged(bool value) |
void | setPopupPosition(ImVec2 position) |
void | setWorkAreaDiwne(ImRect rect) |
virtual void | setWorkAreaZoom(float val =1) |
ImVec2 | transformFromDiwneToImGui(const ImVec2 & point) const |
ImVec4 | transformFromDiwneToImGui(const ImVec4 & point) const |
ImVec2 | transformFromImGuiToDiwne(const ImVec2 & point) const |
ImVec4 | transformFromImGuiToDiwne(const ImVec4 & point) const |
void | translateWorkAreaDiwne(ImVec2 const & distance) |
void | translateWorkAreaDiwneZoomed(ImVec2 const & distance) |
void | updateWorkAreaRectangles() |
ImVec2 | workArea2diwne(const ImVec2 & point) const |
ImVec2 | workArea2diwne_noZoom(const ImVec2 & point) const |
ImVec2 | workArea2screen(const ImVec2 & point) const |
Public Attributes
Name | |
---|---|
bool | m_allowUnselectingNodes <br>for example when holding ctrl nodes not going unselected when sleection rect get out of them |
bool | m_diwneDebug |
bool | m_objectFocused <br>only one object can be focused |
bool | m_popupDrawn <br>not draw popup two times |
bool | m_takeSnap |
bool | m_tooltipDrawn <br>not draw tooltip two times |
DIWNE::SettingsDiwne * | mp_settingsDiwne |
Protected Attributes
Name | |
---|---|
DiwneAction | m_diwneAction |
DiwneAction | m_diwneAction_previousFrame |
bool | m_drawing |
DIWNE::Link | m_helperLink |
bool | m_nodesSelectionChanged |
ImVec2 | m_popupPosition |
ImRect | m_selectionRectangeDiwne |
ImColor | m_selectionRectangeFullColor |
ImColor | m_selectionRectangeTouchColor |
ImDrawListSplitter | m_splitter <br>Every nodes should be draw to its own channel. |
ImRect | m_workAreaDiwne <br>Rectangle of work area on diwne. |
ImRect | m_workAreaScreen <br>Rectangle of work area on screen. |
float | m_workAreaZoom <br>Workspace zoom factor. |
float | m_zoomOriginalFontScale <br>For restore value after this window is done. |
ImGuiStyle | m_zoomOriginalStyle |
bool | m_zoomScalingApplied |
std::shared_ptr< DIWNE::Node > | mp_lastActiveNode |
std::shared_ptr< DIWNE::Pin > | mp_lastActivePin |
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 | afterEnd() |
virtual bool | allowInteraction()<br>Decision maker whether object can interact (not include content elements) |
virtual bool | allowProcessDrag() |
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 | content() |
virtual bool | contentDiwne() |
virtual bool | drawDiwne(DrawMode drawMode =DrawMode::Interacting)<br>Main function for drawing object and deal with interactions. |
virtual bool | finalize() |
DIWNE::ID const | getIdDiwne() const |
virtual bool | getSelectable() |
virtual bool | getSelected() const<br>Getter of selection state. |
virtual bool | initialize() |
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 | processInteractionsAlways() |
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 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 Diwne
Diwne(
DIWNE::SettingsDiwne * settingsDiwne
)
Diwne(
DIWNE::SettingsDiwne * settingsDiwne
)
Default constructor.
function ~Diwne
virtual ~Diwne()
virtual ~Diwne()
Default destructor.
function AddBezierCurveDiwne
void AddBezierCurveDiwne(
const ImVec2 & p1,
const ImVec2 & p2,
const ImVec2 & p3,
const ImVec2 & p4,
ImVec4 col,
float thickness,
int num_segments =0
) const
void AddBezierCurveDiwne(
const ImVec2 & p1,
const ImVec2 & p2,
const ImVec2 & p3,
const ImVec2 & p4,
ImVec4 col,
float thickness,
int num_segments =0
) const
Draw Bezier (not Bezier really) curve to window ImDrawList.
Parameters:
- p1 const ImVec2& start point in diwne coords
- p2 const ImVec2& start control point in diwne coords
- p3 const ImVec2& end control point in diwne coords
- p4 const ImVec2& end point in diwne coords
- col ImVec4
- thickness float
- 0 int num_segments with zero ImGui use some optimal? value
Return: void
function AddRectDiwne
void AddRectDiwne(
const ImVec2 & p_min,
const ImVec2 & p_max,
ImVec4 col,
float rounding =0.0f,
ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll,
float thickness =1.0f
) const
void AddRectDiwne(
const ImVec2 & p_min,
const ImVec2 & p_max,
ImVec4 col,
float rounding =0.0f,
ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll,
float thickness =1.0f
) const
Draw rectangle to window ImDrawlist.
See: AddRectFilledDiwne
function AddRectFilledDiwne
void AddRectFilledDiwne(
const ImVec2 & p_min,
const ImVec2 & p_max,
ImVec4 col,
float rounding =0.0f,
ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll
) const
void AddRectFilledDiwne(
const ImVec2 & p_min,
const ImVec2 & p_max,
ImVec4 col,
float rounding =0.0f,
ImDrawFlags rounding_corners =ImDrawFlags_RoundCornersAll
) const
Draw filled rectangle to window ImDrawlist.
\param p_min const ImVec2& in diwne coords
\param p_max const ImVec2& in diwne coords
\param col ImVec4
\param 0.0f float rounding
\param ImDrawFlags_RoundCornersAll ImDrawFlags rounding_corners
\return void
\param p_min const ImVec2& in diwne coords
\param p_max const ImVec2& in diwne coords
\param col ImVec4
\param 0.0f float rounding
\param ImDrawFlags_RoundCornersAll ImDrawFlags rounding_corners
\return void
function afterContentDiwne
virtual bool afterContentDiwne() override
virtual bool afterContentDiwne() override
Reimplements: DIWNE::DiwneObject::afterContentDiwne
DIWNE wrapper
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
function allowProcessFocused
virtual bool allowProcessFocused()
virtual bool allowProcessFocused()
Reimplements: DIWNE::DiwneObject::allowProcessFocused
function allowProcessSelectionRectangle
virtual bool allowProcessSelectionRectangle()
virtual bool allowProcessSelectionRectangle()
function allowProcessZoom
virtual bool allowProcessZoom()
virtual bool allowProcessZoom()
function applyZoomScaling
bool applyZoomScaling()
bool applyZoomScaling()
Modifies the current ImGuiStyle and Font depending on the current diwne zoom level.
Return: Whether zoom scaling was active before making this call
Todo
function applyZoomScalingToFont
float applyZoomScalingToFont(
ImFont * font,
ImFont * largeFont =nullptr
)
float applyZoomScalingToFont(
ImFont * font,
ImFont * largeFont =nullptr
)
Modifies the current Font depending on the current diwne zoom level.
Return: Whether zoom scaling was active before making this call
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 blockRaisePopup
bool blockRaisePopup()
bool blockRaisePopup()
sometimes we do not want to raise popup - here specify it ( now it is when selecting action run )
function bypassDiwneGetPopupNewPositionAction
virtual ImVec2 bypassDiwneGetPopupNewPositionAction()
virtual ImVec2 bypassDiwneGetPopupNewPositionAction()
function bypassDiwneGetSelectionRectangleSize
virtual ImVec2 bypassDiwneGetSelectionRectangleSize()
virtual ImVec2 bypassDiwneGetSelectionRectangleSize()
Reimplemented by: Workspace::WorkspaceDiwne::bypassDiwneGetSelectionRectangleSize
function bypassDiwneGetSelectionRectangleStartPosition
virtual ImVec2 bypassDiwneGetSelectionRectangleStartPosition()
virtual ImVec2 bypassDiwneGetSelectionRectangleStartPosition()
Reimplemented by: Workspace::WorkspaceDiwne::bypassDiwneGetSelectionRectangleStartPosition
function bypassDiwneSetPopupPositionAction
virtual bool bypassDiwneSetPopupPositionAction()
virtual bool bypassDiwneSetPopupPositionAction()
function bypassGetMouseDelta
virtual ImVec2 bypassGetMouseDelta()
virtual ImVec2 bypassGetMouseDelta()
function bypassGetMouseDragDelta0
virtual ImVec2 bypassGetMouseDragDelta0()
virtual ImVec2 bypassGetMouseDragDelta0()
function bypassGetMouseDragDelta1
virtual ImVec2 bypassGetMouseDragDelta1()
virtual ImVec2 bypassGetMouseDragDelta1()
function bypassGetMouseDragDelta2
virtual ImVec2 bypassGetMouseDragDelta2()
virtual ImVec2 bypassGetMouseDragDelta2()
function bypassGetMousePos
virtual ImVec2 bypassGetMousePos()
virtual ImVec2 bypassGetMousePos()
function bypassGetMouseWheel
virtual float bypassGetMouseWheel()
virtual float bypassGetMouseWheel()
function bypassGetZoomDelta
virtual float bypassGetZoomDelta()
virtual float bypassGetZoomDelta()
function bypassIsItemActive
virtual bool bypassIsItemActive()
virtual bool bypassIsItemActive()
function bypassIsItemClicked0
virtual bool bypassIsItemClicked0()
virtual bool bypassIsItemClicked0()
function bypassIsItemClicked1
virtual bool bypassIsItemClicked1()
virtual bool bypassIsItemClicked1()
function bypassIsItemClicked2
virtual bool bypassIsItemClicked2()
virtual bool bypassIsItemClicked2()
function bypassIsMouseClicked0
virtual bool bypassIsMouseClicked0()
virtual bool bypassIsMouseClicked0()
function bypassIsMouseClicked1
virtual bool bypassIsMouseClicked1()
virtual bool bypassIsMouseClicked1()
function bypassIsMouseClicked2
virtual bool bypassIsMouseClicked2()
virtual bool bypassIsMouseClicked2()
function bypassIsMouseDown0
virtual bool bypassIsMouseDown0()
virtual bool bypassIsMouseDown0()
function bypassIsMouseDown1
virtual bool bypassIsMouseDown1()
virtual bool bypassIsMouseDown1()
function bypassIsMouseDown2
virtual bool bypassIsMouseDown2()
virtual bool bypassIsMouseDown2()
function bypassIsMouseDragging0
virtual bool bypassIsMouseDragging0()
virtual bool bypassIsMouseDragging0()
function bypassIsMouseDragging1
virtual bool bypassIsMouseDragging1()
virtual bool bypassIsMouseDragging1()
function bypassIsMouseDragging2
virtual bool bypassIsMouseDragging2()
virtual bool bypassIsMouseDragging2()
function bypassIsMouseReleased0
virtual bool bypassIsMouseReleased0()
virtual bool bypassIsMouseReleased0()
function bypassIsMouseReleased1
virtual bool bypassIsMouseReleased1()
virtual bool bypassIsMouseReleased1()
function bypassIsMouseReleased2
virtual bool bypassIsMouseReleased2()
virtual bool bypassIsMouseReleased2()
function bypassMouseClickedPos0
virtual ImVec2 bypassMouseClickedPos0()
virtual ImVec2 bypassMouseClickedPos0()
function bypassMouseClickedPos1
virtual ImVec2 bypassMouseClickedPos1()
virtual ImVec2 bypassMouseClickedPos1()
function bypassMouseClickedPos2
virtual ImVec2 bypassMouseClickedPos2()
virtual ImVec2 bypassMouseClickedPos2()
function bypassSelectionRectangleAction
virtual bool bypassSelectionRectangleAction()
virtual bool bypassSelectionRectangleAction()
Reimplemented by: Workspace::WorkspaceDiwne::bypassSelectionRectangleAction
function bypassZoomAction
virtual bool bypassZoomAction()
virtual bool bypassZoomAction()
Reimplemented by: Workspace::WorkspaceDiwne::bypassZoomAction
function clear
virtual void clear()
virtual void clear()
Clear all nodes from the node editor.
Reimplemented by: Workspace::WorkspaceDiwne::clear
function diwne2screen
ImVec2 diwne2screen(
const ImVec2 & point
) const
ImVec2 diwne2screen(
const ImVec2 & point
) const
function diwne2screen_noZoom
ImVec2 diwne2screen_noZoom(
const ImVec2 & point
) const
ImVec2 diwne2screen_noZoom(
const ImVec2 & point
) const
function diwne2workArea
ImVec2 diwne2workArea(
const ImVec2 & point
) const
ImVec2 diwne2workArea(
const ImVec2 & point
) const
function diwne2workArea_noZoom
ImVec2 diwne2workArea_noZoom(
const ImVec2 & point
) const
ImVec2 diwne2workArea_noZoom(
const ImVec2 & point
) const
function DrawIcon
void DrawIcon(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
DIWNE::IconType fgIconType,
ImColor fgShapeColor,
ImColor fgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
void DrawIcon(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
DIWNE::IconType fgIconType,
ImColor fgShapeColor,
ImColor fgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
Draw an Icon combined from two parts (foreground and background) to the window ImDrawList filled with a ShapeColor.
Parameters:
bgIconType background shape (typically a Rectangle)
bgShapeColor color of the background shape (or a border color if not filled)
bgInnerColor color of the background shape interior if filled == false
fgIconType foreground shape (typically a Triangle or Cross)
fgShapeColor color of the foreground shape if filled == false
fgInnerColor color of foreground shape interior if filled == false
size of the icon in screen coordinates
padding of the fg shape (left, bottom, right, top)
filled means
true fill both shapes with their ShapeColor
false draw both shapes with a ShapeColor border and fill them with InnerColor
Return: void
When filled == true, both shapes have a border. Then, the border color is the ShapeColor and the shape is filled with the InnerColor
function DrawIconCircle
void DrawIconCircle(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconCircle(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
Draw a circle icon.
Parameters:
- idl ImDrawList* where to draw
- shapeColor color of the whole shape (border line if not filled)
- innerColor color of the inner part (middle) of shape
- topLeft position of the icon in screen coords
- bottomRight of the icon in screen coords
- filled false means use the InnerColor in the foreground Shape
- thickness of the border for zoomFactor = 1.0
function DrawIconCross
void DrawIconCross(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float shapeThickness =2,
float innerThickness =1
) const
void DrawIconCross(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float shapeThickness =2,
float innerThickness =1
) const
function DrawIconFastForward
void DrawIconFastForward(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconFastForward(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconGrabDownLeft
void DrawIconGrabDownLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconGrabDownLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconGrabDownRight
void DrawIconGrabDownRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconGrabDownRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconHyphen
void DrawIconHyphen(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =3.0f
) const
void DrawIconHyphen(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =3.0f
) const
function DrawIconPause
void DrawIconPause(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
void DrawIconPause(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
function DrawIconRectangle
void DrawIconRectangle(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
void DrawIconRectangle(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
ImVec2 thickness =ImVec2(1, 1),
float rounding =0
) const
function DrawIconRewind
void DrawIconRewind(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconRewind(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconSkipBack
void DrawIconSkipBack(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconSkipBack(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconSkipBack2
void DrawIconSkipBack2(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconSkipBack2(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconSkipForward
void DrawIconSkipForward(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconSkipForward(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconSkipForward2
void DrawIconSkipForward2(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconSkipForward2(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconTriangleDownLeft
void DrawIconTriangleDownLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconTriangleDownLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconTriangleDownRight
void DrawIconTriangleDownRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconTriangleDownRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconTriangleLeft
void DrawIconTriangleLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconTriangleLeft(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function DrawIconTriangleRight
void DrawIconTriangleRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
void DrawIconTriangleRight(
ImDrawList * idl,
ImColor shapeColor,
ImColor innerColor,
ImVec2 topLeft,
ImVec2 bottomRight,
bool filled,
float thickness =1
) const
function EmptyButton
void EmptyButton(
ImVec2 size,
ImColor color,
float rounding
)
void EmptyButton(
ImVec2 size,
ImColor color,
float rounding
)
Just the shape of the button, no interaction.
Parameters:
- size
- color
- rounding
function end
virtual void end() override
virtual void end() override
Reimplements: DIWNE::DiwneObject::end
closing object
function ensureZoomScaling
bool ensureZoomScaling(
bool active
)
bool ensureZoomScaling(
bool active
)
Ensure that zoom scaling is active or not based on a passed parameter.
Return: Whether zoom scaling was active before making this call, can be later passed to this method again to restore original state
function finalizeDiwne
virtual bool finalizeDiwne() override
virtual bool finalizeDiwne() override
Reimplements: DIWNE::DiwneObject::finalizeDiwne
DIWNE wrapper
function getDiwneAction
inline DiwneAction getDiwneAction() const
inline DiwneAction getDiwneAction() const
function getDiwneActionActive
DiwneAction getDiwneActionActive() const
DiwneAction getDiwneActionActive() const
function getDiwneActionPreviousFrame
inline DiwneAction getDiwneActionPreviousFrame() const
inline DiwneAction getDiwneActionPreviousFrame() const
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 getHelperLink
inline DIWNE::Link & getHelperLink()
inline DIWNE::Link & getHelperLink()
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 getLastActiveNode
template <typename T >
inline std::shared_ptr< T > getLastActiveNode()
template <typename T >
inline std::shared_ptr< T > getLastActiveNode()
function getLastActivePin
template <typename T >
inline std::shared_ptr< T > getLastActivePin()
template <typename T >
inline std::shared_ptr< T > getLastActivePin()
function getNodesSelectionChanged
inline bool getNodesSelectionChanged()
inline bool getNodesSelectionChanged()
function getPopupPosition
inline ImVec2 const & getPopupPosition() const
inline ImVec2 const & getPopupPosition() const
function getRectDiwne
inline virtual ImRect getRectDiwne() const override
inline virtual ImRect getRectDiwne() const override
Reimplements: DIWNE::DiwneObject::getRectDiwne
return rectangle of object
function getSelectionRectangleDiwne
ImRect getSelectionRectangleDiwne()
ImRect getSelectionRectangleDiwne()
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 getWorkAreaDiwne
inline ImRect getWorkAreaDiwne() const
inline ImRect getWorkAreaDiwne() const
Update position and size of work area on screen and on diwne.
function getWorkAreaScreen
inline ImRect getWorkAreaScreen() const
inline ImRect getWorkAreaScreen() const
function getWorkAreaZoom
inline float getWorkAreaZoom() const
inline float getWorkAreaZoom() const
function IconButton
bool IconButton(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
DIWNE::IconType fgIconType,
ImColor fgShapeColor,
ImColor fgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
std::string const id
) const
bool IconButton(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
DIWNE::IconType fgIconType,
ImColor fgShapeColor,
ImColor fgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
std::string const id
) const
See: DrawIcon()
Return: true if interaction with button happen, false otherwise
Add ImGui Button with icon on it
function IconButton
bool IconButton(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
std::string const id
) const
bool IconButton(
DIWNE::IconType bgIconType,
ImColor bgShapeColor,
ImColor bgInnerColor,
ImVec2 size,
ImVec4 padding,
bool filled,
std::string const id
) const
See: DrawIcon()
Return: true if interaction with button happen, false otherwise
Add ImGui Button with icon on it
function initializeDiwne
virtual bool initializeDiwne() override
virtual bool initializeDiwne() override
Reimplements: DIWNE::DiwneObject::initializeDiwne
DIWNE wrapper
function processDiwneSelectionRectangle
virtual bool processDiwneSelectionRectangle()
virtual bool processDiwneSelectionRectangle()
function processDiwneZoom
virtual bool processDiwneZoom()
virtual bool processDiwneZoom()
function processDrag
virtual bool processDrag() override
virtual bool processDrag() override
Reimplements: DIWNE::DiwneObject::processDrag
function processInteractions
virtual bool processInteractions() override
virtual bool processInteractions() override
Reimplements: DIWNE::DiwneObject::processInteractions
react to interactions with this object
function processInteractionsDiwne
virtual bool processInteractionsDiwne() override
virtual bool processInteractionsDiwne() override
Reimplements: DIWNE::DiwneObject::processInteractionsDiwne
DIWNE wrapper
function processZoom
virtual bool processZoom()
virtual bool processZoom()
Reimplemented by: Workspace::WorkspaceDiwne::processZoom
function restoreZoomScaling
bool restoreZoomScaling()
bool restoreZoomScaling()
Restores the current ImGuiStyle and Font back to its state before applyZoomScaling() was last called.
Return: Whether zoom scaling was active before making this call
function restoreZoomScalingToFont
void restoreZoomScalingToFont(
ImFont * font,
float originalScale
)
void restoreZoomScalingToFont(
ImFont * font,
float originalScale
)
function screen2diwne
ImVec2 screen2diwne(
const ImVec2 & point
) const
ImVec2 screen2diwne(
const ImVec2 & point
) const
function screen2diwne_noZoom
ImVec2 screen2diwne_noZoom(
const ImVec2 & point
) const
ImVec2 screen2diwne_noZoom(
const ImVec2 & point
) const
function screen2workArea
ImVec2 screen2workArea(
const ImVec2 & point
) const
ImVec2 screen2workArea(
const ImVec2 & point
) const
function setDiwneAction
inline void setDiwneAction(
DiwneAction action
)
inline void setDiwneAction(
DiwneAction action
)
function setLastActiveNode
template <typename T >
inline void setLastActiveNode(
std::shared_ptr< T > node
)
template <typename T >
inline void setLastActiveNode(
std::shared_ptr< T > node
)
function setLastActivePin
template <typename T >
inline void setLastActivePin(
std::shared_ptr< T > pin
)
template <typename T >
inline void setLastActivePin(
std::shared_ptr< T > pin
)
function setNodesSelectionChanged
inline void setNodesSelectionChanged(
bool value
)
inline void setNodesSelectionChanged(
bool value
)
function setPopupPosition
inline void setPopupPosition(
ImVec2 position
)
inline void setPopupPosition(
ImVec2 position
)
function setWorkAreaDiwne
inline void setWorkAreaDiwne(
ImRect rect
)
inline void setWorkAreaDiwne(
ImRect rect
)
function setWorkAreaZoom
virtual void setWorkAreaZoom(
float val =1
)
virtual void setWorkAreaZoom(
float val =1
)
Reimplemented by: Workspace::WorkspaceDiwne::setWorkAreaZoom
function transformFromDiwneToImGui
ImVec2 transformFromDiwneToImGui(
const ImVec2 & point
) const
ImVec2 transformFromDiwneToImGui(
const ImVec2 & point
) const
function transformFromDiwneToImGui
ImVec4 transformFromDiwneToImGui(
const ImVec4 & point
) const
ImVec4 transformFromDiwneToImGui(
const ImVec4 & point
) const
function transformFromImGuiToDiwne
ImVec2 transformFromImGuiToDiwne(
const ImVec2 & point
) const
ImVec2 transformFromImGuiToDiwne(
const ImVec2 & point
) const
function transformFromImGuiToDiwne
ImVec4 transformFromImGuiToDiwne(
const ImVec4 & point
) const
ImVec4 transformFromImGuiToDiwne(
const ImVec4 & point
) const
function translateWorkAreaDiwne
void translateWorkAreaDiwne(
ImVec2 const & distance
)
void translateWorkAreaDiwne(
ImVec2 const & distance
)
function translateWorkAreaDiwneZoomed
void translateWorkAreaDiwneZoomed(
ImVec2 const & distance
)
void translateWorkAreaDiwneZoomed(
ImVec2 const & distance
)
function updateWorkAreaRectangles
void updateWorkAreaRectangles()
void updateWorkAreaRectangles()
function workArea2diwne
ImVec2 workArea2diwne(
const ImVec2 & point
) const
ImVec2 workArea2diwne(
const ImVec2 & point
) const
function workArea2diwne_noZoom
ImVec2 workArea2diwne_noZoom(
const ImVec2 & point
) const
ImVec2 workArea2diwne_noZoom(
const ImVec2 & point
) const
function workArea2screen
ImVec2 workArea2screen(
const ImVec2 & point
) const
ImVec2 workArea2screen(
const ImVec2 & point
) const
Public Attributes Documentation
variable m_allowUnselectingNodes
bool m_allowUnselectingNodes;
bool m_allowUnselectingNodes;
for example when holding ctrl nodes not going unselected when sleection rect get out of them
variable m_diwneDebug
bool m_diwneDebug = false;
bool m_diwneDebug = false;
variable m_objectFocused
bool m_objectFocused;
bool m_objectFocused;
only one object can be focused
variable m_popupDrawn
bool m_popupDrawn;
bool m_popupDrawn;
not draw popup two times
Todo: maybe unused when every object is drawn just one time
variable m_takeSnap
bool m_takeSnap;
bool m_takeSnap;
variable m_tooltipDrawn
bool m_tooltipDrawn;
bool m_tooltipDrawn;
not draw tooltip two times
Todo: maybe unused when every object is drawn just one time
variable mp_settingsDiwne
DIWNE::SettingsDiwne * mp_settingsDiwne;
DIWNE::SettingsDiwne * mp_settingsDiwne;
Protected Attributes Documentation
variable m_diwneAction
DiwneAction m_diwneAction;
DiwneAction m_diwneAction;
variable m_diwneAction_previousFrame
DiwneAction m_diwneAction_previousFrame;
DiwneAction m_diwneAction_previousFrame;
variable m_drawing
bool m_drawing;
bool m_drawing;
< store whether ImGui window is ready to draw to it
variable m_helperLink
DIWNE::Link m_helperLink;
DIWNE::Link m_helperLink;
for showing link that is in process of creating
variable m_nodesSelectionChanged
bool m_nodesSelectionChanged;
bool m_nodesSelectionChanged;
variable m_popupPosition
ImVec2 m_popupPosition;
ImVec2 m_popupPosition;
variable m_selectionRectangeDiwne
ImRect m_selectionRectangeDiwne;
ImRect m_selectionRectangeDiwne;
variable m_selectionRectangeFullColor
ImColor m_selectionRectangeFullColor;
ImColor m_selectionRectangeFullColor;
variable m_selectionRectangeTouchColor
ImColor m_selectionRectangeTouchColor;
ImColor m_selectionRectangeTouchColor;
variable m_splitter
ImDrawListSplitter m_splitter;
ImDrawListSplitter m_splitter;
Every nodes should be draw to its own channel.
variable m_workAreaDiwne
ImRect m_workAreaDiwne;
ImRect m_workAreaDiwne;
Rectangle of work area on diwne.
- .Min is set by user, .Max is computed from m_workAreaScreen */
variable m_workAreaScreen
ImRect m_workAreaScreen;
ImRect m_workAreaScreen;
Rectangle of work area on screen.
variable m_workAreaZoom
float m_workAreaZoom;
float m_workAreaZoom;
Workspace zoom factor.
variable m_zoomOriginalFontScale
float m_zoomOriginalFontScale;
float m_zoomOriginalFontScale;
For restore value after this window is done.
variable m_zoomOriginalStyle
ImGuiStyle m_zoomOriginalStyle;
ImGuiStyle m_zoomOriginalStyle;
variable m_zoomScalingApplied
bool m_zoomScalingApplied = false;
bool m_zoomScalingApplied = false;
variable mp_lastActiveNode
std::shared_ptr< DIWNE::Node > mp_lastActiveNode;
std::shared_ptr< DIWNE::Node > mp_lastActiveNode;
variable mp_lastActivePin
std::shared_ptr< DIWNE::Pin > mp_lastActivePin;
std::shared_ptr< DIWNE::Pin > mp_lastActivePin;
Updated on 2024-11-06 at 20:16:54 +0000