Workspace::CoreNode
#include "GUI/Workspace/Nodes/Basic/CoreNode.h"
Inherits from Workspace::Node, IVisitable, DIWNE::BasicNode, DIWNE::Node, DIWNE::DiwneObject, std::enable_shared_from_this< DiwneObject >
Inherited by Workspace::CoreNodeWithPins, Workspace::TransformationBase
Public Functions
Name | |
---|---|
CoreNode(DIWNE::NodeEditor & diwne, Ptr< Core::Node > nodebase) | |
~CoreNode() override | |
virtual bool | allowDrawing() override<br>Decide whether the object should be drawn (when outside the window for example) |
virtual void | begin(DIWNE::DrawInfo & context) override<br>First method to be called during object drawing. |
void | drawMenuDuplicate(DIWNE::DrawInfo & context) |
virtual void | drawMenuLevelOfDetail() =0 |
void | drawMenuSetEditable() |
void | drawMenuSetPrecision() |
void | drawTrackingBorder(bool active, bool interpolating, float progress) const |
void | drawTrackingCursor(ImRect rect, const Core::TrackedNodeData * t, bool inactiveOverlay, bool round) const |
void | duplicate(DIWNE::DrawInfo & context, bool multiDuplication) |
virtual void | endDiwne(DIWNE::DrawInfo & context) override |
float | getDataItemsWidth()<br>Returns the desired width of data items (ImGui number fields) |
FloatPopupMode & | getFloatPopupMode() |
const std::string & | getKeyword() const<br>Returns the string identifier of the core node type. |
LevelOfDetail | getLevelOfDetail() |
virtual int | getLODCount()<br>Number of levels this node cycles through. |
Ptr< Core::Node > | getNodebase() const<br>Returns the managed I3TCore node. |
int | getNumberOfVisibleDecimal() |
virtual void | onDestroy(bool logEvent) override<br>Gets called the moment the object is marked for deletion by destroy(). |
virtual void | onPopup() override |
virtual void | onReleased(bool justReleased, DIWNE::DrawInfo & context) override<br>Called when the object is not pressed. |
virtual void | onSelection(bool selected) override |
virtual void | popupContent(DIWNE::DrawInfo & context) override<br>Content of popup menu raised on this objec. |
void | queueUpdateDataItemsWidth()<br>This call requests the data items width to be recalculated on the next draw of ths node. |
void | setFloatPopupMode(FloatPopupMode mode) |
LevelOfDetail | setLevelOfDetail(LevelOfDetail levelOfDetail) |
virtual void | setNumberOfVisibleDecimal(int value) |
virtual LevelOfDetail | switchLevelOfDetail(LevelOfDetail oldLevel)<br>Switches to the next LOD level. |
virtual void | topContent(DIWNE::DrawInfo & context) override |
virtual void | topRightHeaderContent(DIWNE::DrawInfo & context)<br>Special method to fill contents between the node label and the top right menu button (if present) The method call must include a m_top.spring(1.0f); call somewhere in it. |
void | drawMenuLevelOfDetail_builder(Ptr< CoreNode > node, std::vector< LevelOfDetail > const & levels_of_detail) |
Protected Functions
Name | |
---|---|
virtual int | maxLengthOfData() =0<br>Calculates the largest number of characters/decimal places a data item has in this node. |
virtual float | updateDataItemsWidth()<br>Calculates the final desired pixel width of data items (floats inside vectors, matrices etc.). |
Public Attributes
Name | |
---|---|
constexpr char | CORE_NODE_FLAG |
bool | m_referenceSpaceSource <br>Indicates that this node is the source of a custom scene view reference space TODO: What if it's a source for multiple windows? Would be nice to keep track of that. |
Protected Attributes
Name | |
---|---|
float | m_dataItemsWidth |
bool | m_drawContextMenuButton |
FloatPopupMode | m_floatPopupMode |
bool | m_isFirstDraw |
bool | m_isLabelBeingEdited |
LevelOfDetail | m_levelOfDetail |
const Ptr< Core::Node > | m_nodebase <br>Reference to the I3TCore node @description Each WorkspaceGUI node represents a single I3TCore node. |
int | m_numberOfVisibleDecimal <br>number of decimal places used while display floats in the workspace |
bool | m_topBottomSpacingDefault <br>Whether this node has spacing between content and header / end. |
bool | m_updateDataItemsWidth |
Additional inherited members
Public Functions inherited from Workspace::Node
Name | |
---|---|
Node(DIWNE::NodeEditor & diwne, std::string label ="Header") | |
virtual bool | allowDragStart() const override<br>Determines whether a drag operation can start from this object. |
virtual void | drawMenuDelete() |
bool | getDuplicateNode() const |
void | setDuplicateNode(bool value) |
Public Attributes inherited from Workspace::Node
Name | |
---|---|
bool | m_duplicateNode |
Public Functions inherited from IVisitable
Name | |
---|---|
virtual void | accept(NodeVisitor & visitor) =0 |
Public Functions inherited from DIWNE::BasicNode
Name | |
---|---|
BasicNode(NodeEditor & editor, std::string label) | |
virtual void | bottomContent(DrawInfo & context) |
virtual void | centerContent(DrawInfo & context) |
virtual void | content(DrawInfo & context) override<br>Called after begin() during drawing. |
virtual void | drawBody() |
virtual void | drawHeader(ImDrawFlags corners =ImDrawFlags_RoundCornersTop) |
virtual void | end(DrawInfo & context) override<br>Called after content(). |
const std::string & | getTopLabel() const |
virtual void | leftContent(DrawInfo & context) |
virtual void | rightContent(DrawInfo & context) |
void | setTopLabel(const std::string & str) |
virtual void | translate(const ImVec2 & vec) override<br>Move the object's rect and any other associated positional data. |
virtual void | updateLayout(DrawInfo & context) override<br>Updates object's m_rect, m_displayRect and any other object size variables. |
Public Attributes inherited from DIWNE::BasicNode
Name | |
---|---|
DiwnePanel | m_center |
DiwnePanel | m_left |
DiwnePanel | m_middle |
DiwnePanel | m_right |
DiwnePanel | m_top |
Protected Attributes inherited from DIWNE::BasicNode
Name | |
---|---|
bool | m_bottomSpacing <br>Whether to add a gap between the node content and the end. |
float | m_contentSpacing <br>Gap between left, center and right panels (-1 for default item spacing). |
bool | m_headerSpacing <br>Whether to add a gap between the node header and its content. |
std::string | m_topLabel |
float | m_topLabelWidth <br>Top label width in DIWNE coordinates. |
float | m_topLabelWidthChange <br>Change of top label width since last frame, used to prevent layout flicker. |
Public Functions inherited from DIWNE::Node
Name | |
---|---|
Node(const Node & other) =delete | |
Node(NodeEditor & diwne, std::string labelDiwne ="DiwneNode") | |
virtual void | afterDraw(DrawInfo & context) override<br>Called last during drawing. |
virtual void | content(DrawInfo & context) override<br>Called after begin() during drawing. |
virtual void | drawSelectionIndicator(DrawInfo & context) |
virtual void | end(DrawInfo & context) override<br>Called after content(). |
bool | getFlag(char index) const<br>Get the node bit flag value at index. |
virtual void | onDrag(DrawInfo & context, bool dragStart, bool dragEnd) override<br>This method gets called when the object is being dragged. |
virtual void | onHover(DrawInfo & context) override<br>This method gets called when the object is hovered. |
Node & | operator=(const Node & other) =delete |
void | setFlag(char index, bool value)<br>Set the node bit flag value at index. |
virtual void | updateLayout(DrawInfo & context) override<br>Updates object's m_rect, m_displayRect and any other object size variables. |
bool | willBeRemovedFromContainer(const DiwneObject * container) |
Protected Functions inherited from DIWNE::Node
Name | |
---|---|
virtual void | afterDrawDiwne(DrawInfo & context) override<br>Updates layout, processes interactions and then calls the user afterDraw() method. |
virtual bool | processSelectDiwne(DrawInfo & context) override<br>Processes any interactions related to whether the object should be selected. |
virtual void | setInitialPositionDiwne() override<br>Internal helper for setting the object's initial position. |
Public Attributes inherited from DIWNE::Node
Name | |
---|---|
bool | m_forceDraw <br>Internal flag to force drawing of the node, used by pins (TODO: move to DiwneObject?) |
Protected Attributes inherited from DIWNE::Node
Name | |
---|---|
NodeFlag | m_flag <br>The node flag bit field. |
Public Functions inherited from DIWNE::DiwneObject
Name | |
---|---|
DiwneObject(DIWNE::NodeEditor & diwne, std::string labelDiwne) | |
virtual | ~DiwneObject() |
virtual void | afterDraw(DrawInfo & context)<br>Called last during drawing. |
virtual bool | allowDragStart() const<br>Determines whether a drag operation can start from this object. |
virtual bool | allowHover() const<br>Determines whether the object can be hovered. |
virtual bool | allowInteraction() const<br>Decide whether the object should react to user input in general. |
virtual bool | allowPopup() const<br>Determines whether a popup can be raised over the object. |
virtual bool | allowPress(const DrawInfo & context) const<br>Determines whether the object can be pressed. |
virtual bool | allowSelectOnClick(const DrawInfo & context) const<br>Determines whether the object can be selected by clicking it (eg. |
template <typename T =DiwneObject> <br>T * | as()<br>Returns a raw pointer to itself casted to a type. |
virtual void | content(DrawInfo & context) =0<br>Called after begin() during drawing. |
virtual void | destroy(bool logEvent =true)<br>Marks the object for lazy destruction/deallocation and removal from any containers (like the node editor). |
virtual void | draw(DrawMode drawMode =DrawMode_Interactive)<br>Generic draw method meant to be used by external code. |
virtual void | drawDiwne(DrawInfo & context, DrawMode drawMode =DrawMode_Interactive)<br>Internal draw method. |
DrawInfo | drawDiwneEx(DrawInfo & context, DrawMode drawMode =DrawMode_Interactive) |
virtual void | end(DrawInfo & context) =0<br>Called after content(). |
virtual void | finalize(DrawInfo & context)<br>The final method to be called, gets called every frame and doesn't do any drawing. |
ImRect | getDisplayRect() const<br>Object's bounds aligned to current viewport pixel boundaries. |
ID | getId() const |
DiwneObject * | getParentObject() const |
ImVec2 | getPosition() const<br>Returns the top left corner of the object's rect. |
virtual ImRect | getRect() const<br>Rectangle bounds of the object in DIWNE coordinates (editor canvas coordinates). |
bool | getSelectable() |
virtual bool | getSelected() const<br>Whether the object is selected or not. |
StyleOverride * | getStyleOverride() const |
virtual void | initialize(DrawInfo & context)<br>First method to be called every frame. |
bool | isAnyParentSelected() |
bool | isChildObject() const |
bool | isChildOfObject(DiwneObject * parent) |
bool | isDestroyed() const |
bool | isDragging(DrawInfo & context)<br>Is this object the source of an active dragging operation? |
bool | isFixed() const<br>Fixed objects are ones rendered at a position determined by some other object. |
bool | isRendered() const |
bool | isToBeBroughtToFront() |
virtual void | onDrag(DrawInfo & context, bool dragStart, bool dragEnd)<br>This method gets called when the object is being dragged. |
virtual void | onHover(DrawInfo & context)<br>This method gets called when the object is hovered. |
virtual void | onPressed(bool justPressed, DrawInfo & context)<br>Called when the object is pressed, meaning a key is pressed over it. |
void | openPopup()<br>Request to open the object's popup if possible. |
bool | operator!=(const DiwneObject & rhs) const |
bool | operator==(const DiwneObject & rhs) const |
virtual void | processInteractions(DrawInfo & context)<br>Method for reacting to user input after the object is fully drawn and its dimensions are known. |
void | setBringToFront(bool val)<br>Marks the object to be brought to front (be drawn first). |
void | setFixed(bool val) |
void | setForceDraw(bool val)<br>When true, makes the object automatically add the ForceDraw DrawMode flag. |
void | setParentObject(DiwneObject * parent) |
void | setPopupEnabled(bool val) |
void | setPosition(const ImVec2 & position)<br>Move the object's rect and any other associated positional data to the specified position. |
void | setRendered(bool val) |
void | setSelectable(bool selectable)<br>Whether the object can be selected. |
virtual bool | setSelected(bool selected)<br>Set the selection state of the object. |
void | setStyleOverride(StyleOverride * styleOverride)<br>Assign a StyleOverride object to this DiwneObject. |
void | setTooltip(const std::string & text) |
void | setTooltipEnabled(bool val) |
template <typename T =DiwneObject> <br>std::shared_ptr< T > | sharedPtr()<br>Returns a shared pointer to this object. |
void | showTooltip(const std::string & label, const ImColor && color, DrawInfo & context)<br>Immediately show a tooltip next to the mouse cursor with the specified text. |
void | showTooltip(const std::string & label, const std::string & desc, const ImColor && color, DrawInfo & context, float wrapWidth =35.f)<br>Immediately show a tooltip next to the mouse cursor with the specified text. |
void | stopDrag(DrawInfo & context)<br>End an active drag operation this object is a source of. |
virtual Style & | style() const<br>Get the style for this object. |
virtual void | tooltipContent(DrawInfo & context)<br>Content of the object's tooltip. |
virtual void | translate(const ImVec2 & vec)<br>Move the object's rect and any other associated positional data. |
virtual void | updateLayout(DrawInfo & context) =0<br>Updates object's m_rect, m_displayRect and any other object size variables. |
Protected Functions inherited from DIWNE::DiwneObject
Name | |
---|---|
virtual void | afterDrawDiwne(DrawInfo & context)<br>Updates layout, processes interactions and then calls the user afterDraw() method. |
virtual void | beginDiwne(DrawInfo & context) |
virtual void | finalizeDiwne(DrawInfo & context) |
virtual void | initializeDiwne(DrawInfo & context) |
virtual bool | isDraggedDiwne()<br>Is the object being dragged? (usually by mouse or some key combo) |
virtual bool | isHoveredDiwne()<br>Is the object being hovered? The default implementation mostly gets this information from ImGui::IsItemHovered() but the behavior can be changed or restricted. |
virtual bool | isJustPressedDiwne()<br>Determine whether a key/s of interest was/were just pressed. |
virtual bool | isPressedDiwne()<br>Determine whether a key/s of interest is/are pressed down over the object. |
virtual bool | popupShouldBeOpenedDiwne() const<br>Determine whether a popup should be opened, that is, by default, that right mouse button was pressed and isn't dragging. |
virtual void | processDragDiwne(DrawInfo & context) |
virtual void | processHoverDiwne(DrawInfo & context)<br>Processes whether the object is currently hovered. |
virtual void | processInteractionsDiwne(DrawInfo & context) |
virtual void | processPopupAndTooltipDiwne(DrawInfo & context)<br>Processes whether a popup should be opened over this object. |
virtual void | processPressAndReleaseDiwne(DrawInfo & context)<br>Processes whether the object is currently pressed (held) and further if it was just pressed or released. |
virtual bool | processSelectDiwne(DrawInfo & context)<br>Processes any interactions related to whether the object should be selected. |
virtual void | setInitialPositionDiwne()<br>Internal helper for setting the object's initial position. |
void | setSize(const ImVec2 & size) |
void | updateRectFromImGuiItem() |
Public Attributes inherited from DIWNE::DiwneObject
Name | |
---|---|
NodeEditor & | diwne <br>Reference to the NodeEditor instance (also named 'editor' in some classes) |
bool | m_deletable <br>Whether the object can be destroyed by the user. |
bool | m_destroy <br>Indicates the object is to be deleted (and deallocated) |
ImRect | m_displayRect <br>Rectangle bounds aligned with the last viewport. |
bool | m_draggable <br>Whether dragging of the object is allowed by default. |
DrawMode | m_drawMode <br>Read-only flag thats updated on each drawDiwne(). |
bool | m_drawnThisFrame <br>Read only flag indicating whether the object has been drawn this frame. |
bool | m_fixed <br>Whether the object can be moved by user operations. |
bool | m_forceHoverDiwne <br>Special flag that can be used to enforce hover state, used by pin drag assist. |
bool | m_hoverable <br>Whether hovering is enabled by default. |
bool | m_hovered <br>Is the object hovered (usually by the mouse or whatever isHoveredDiwne() tracks) |
bool | m_hoverRoot <br>Whether hovering this object should prevent other objects from hovering. |
ID | m_idDiwne <br>Unique numeric identifier of the object. |
bool | m_isDragged <br>Is the object dragged? Returns false immediately on drag end (unlike isDragging()). |
bool | m_isPressed <br>Is the object pressed down (held)? Requirement for dragging. |
bool | m_justHidden <br>Read only flag indicating that this object was drawn last frame, but not this one. |
bool | m_justPressed <br>Read only flag indicating the object was pressed this frame (eg. |
bool | m_justReleased <br>Read only flag indicating the object was released this frame (eg. |
std::string | m_labelDiwne <br>Unique string identifier, consists of <some string>:<m_idDiwne>. |
ImRect | m_rect <br>Rectangle bounds of the object in diwne coordinates. |
StyleOverride * | m_styleOverride <br>Style override to allow uniquely styled object types. |
Protected Attributes inherited from DIWNE::DiwneObject
Name | |
---|---|
unsigned long long | g_diwneIDCounter <br>Static unique ID generator, unique only for current application run. |
bool | m_bringToFront <br>Request the object's rendering order to be moved to the front above other objects. |
bool | m_forceDraw <br>Request the next draw of the object to have the ForceDraw DrawMode flag. |
bool | m_internalHover <br>Temporary storage for an internal ImGui::IsItemHovered() check Can be set in the end() method to determine if object is hovered if applicable. |
bool | m_openPopup <br>Request to open popup. |
bool | m_openTooltip <br>Request to open tooltip. |
DiwneObject * | m_parentObject <br>Sets the parent object of object, relevant in node container and hover hierarchy. |
bool | m_popupEnabled <br>Whether this object has popup enabled. |
std::string | m_popupLabelDiwne <br>ImGui popup identifier. |
bool | m_rendered <br>Whether the object should be drawn, this is a general flag that overrides behavior of the allowDrawing() method. |
bool | m_selectable <br>Should not be accessed directly. |
bool | m_selected <br>Should not be accessed directly. |
bool | m_tooltipEnabled <br>Whether this object has tooltip enabled. |
std::string | m_tooltipText |
Public Functions Documentation
function CoreNode
CoreNode(
DIWNE::NodeEditor & diwne,
Ptr< Core::Node > nodebase
)
CoreNode(
DIWNE::NodeEditor & diwne,
Ptr< Core::Node > nodebase
)
function ~CoreNode
~CoreNode() override
~CoreNode() override
function allowDrawing
virtual bool allowDrawing() override
virtual bool allowDrawing() override
Decide whether the object should be drawn (when outside the window for example)
Reimplements: DIWNE::DiwneObject::allowDrawing
Reimplemented by: Workspace::Sequence::allowDrawing, Workspace::TransformationBase::allowDrawing
function begin
virtual void begin(
DIWNE::DrawInfo & context
) override
virtual void begin(
DIWNE::DrawInfo & context
) override
First method to be called during object drawing.
Reimplements: DIWNE::BasicNode::begin
Reimplemented by: Workspace::CoreNodeWithPins::begin, Workspace::Cycle::begin, Workspace::Sequence::begin
Can be used to initialize drawing code.
function drawMenuDuplicate
void drawMenuDuplicate(
DIWNE::DrawInfo & context
)
void drawMenuDuplicate(
DIWNE::DrawInfo & context
)
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::ScriptingNode::drawMenuLevelOfDetail, Workspace::Sequence::drawMenuLevelOfDetail, Workspace::Transformation::drawMenuLevelOfDetail, Workspace::TransformationBase::drawMenuLevelOfDetail
function drawMenuSetEditable
void drawMenuSetEditable()
void drawMenuSetEditable()
function drawMenuSetPrecision
void drawMenuSetPrecision()
void drawMenuSetPrecision()
function drawTrackingBorder
void drawTrackingBorder(
bool active,
bool interpolating,
float progress
) const
void drawTrackingBorder(
bool active,
bool interpolating,
float progress
) const
function drawTrackingCursor
void drawTrackingCursor(
ImRect rect,
const Core::TrackedNodeData * t,
bool inactiveOverlay,
bool round
) const
void drawTrackingCursor(
ImRect rect,
const Core::TrackedNodeData * t,
bool inactiveOverlay,
bool round
) const
function duplicate
void duplicate(
DIWNE::DrawInfo & context,
bool multiDuplication
)
void duplicate(
DIWNE::DrawInfo & context,
bool multiDuplication
)
function endDiwne
virtual void endDiwne(
DIWNE::DrawInfo & context
) override
virtual void endDiwne(
DIWNE::DrawInfo & context
) override
Reimplements: DIWNE::DiwneObject::endDiwne
function getDataItemsWidth
float getDataItemsWidth()
float getDataItemsWidth()
Returns the desired width of data items (ImGui number fields)
function getFloatPopupMode
FloatPopupMode & getFloatPopupMode()
FloatPopupMode & getFloatPopupMode()
function getKeyword
const std::string & getKeyword() const
const std::string & getKeyword() const
Returns the string identifier of the core node type.
function getLevelOfDetail
LevelOfDetail getLevelOfDetail()
LevelOfDetail getLevelOfDetail()
function getLODCount
virtual int getLODCount()
virtual int getLODCount()
Number of levels this node cycles through.
Reimplemented by: Workspace::Transformation::getLODCount, Workspace::Camera::getLODCount, Workspace::Cycle::getLODCount, Workspace::Transformation::getLODCount, Workspace::TransformationBase::getLODCount
function getNodebase
Ptr< Core::Node > getNodebase() const
Ptr< Core::Node > getNodebase() const
Returns the managed I3TCore node.
function getNumberOfVisibleDecimal
int getNumberOfVisibleDecimal()
int getNumberOfVisibleDecimal()
function onDestroy
virtual void onDestroy(
bool logEvent
) override
virtual void onDestroy(
bool logEvent
) override
Gets called the moment the object is marked for deletion by destroy().
See: destroy()
Warning: It is possible that the onDestroy() callback is never called when destroy() wasn't properly called. DiwneObjects containing other DiwneObjects should always ensure to destroy their children in their onDestroy().
Reimplements: DIWNE::DiwneObject::onDestroy
Reimplemented by: Workspace::CoreNodeWithPins::onDestroy, Workspace::Sequence::onDestroy, Workspace::TransformationBase::onDestroy
It is called only once per object.
function onPopup
virtual void onPopup() override
virtual void onPopup() override
Reimplements: DIWNE::DiwneObject::onPopup
function onReleased
virtual void onReleased(
bool justReleased,
DIWNE::DrawInfo & context
) override
virtual void onReleased(
bool justReleased,
DIWNE::DrawInfo & context
) override
Called when the object is not pressed.
Parameters:
- justPressed True on the frame the object is released (becomes no longer pressed)
See: onPressed()
Reimplements: DIWNE::DiwneObject::onReleased
Every frame either this or the onPressed() method is called.
function onSelection
virtual void onSelection(
bool selected
) override
virtual void onSelection(
bool selected
) override
Reimplements: DIWNE::DiwneObject::onSelection
Reimplemented by: Workspace::Model::onSelection, Workspace::Screen::onSelection
function popupContent
virtual void popupContent(
DIWNE::DrawInfo & context
) override
virtual void popupContent(
DIWNE::DrawInfo & context
) override
Content of popup menu raised on this objec.
Reimplements: DIWNE::DiwneObject::popupContent
Reimplemented by: Workspace::Model::popupContent, Workspace::Screen::popupContent, Workspace::ScriptingNode::popupContent, Workspace::Sequence::popupContent, Workspace::TransformationBase::popupContent
function queueUpdateDataItemsWidth
void queueUpdateDataItemsWidth()
void queueUpdateDataItemsWidth()
This call requests the data items width to be recalculated on the next draw of ths node.
function setFloatPopupMode
void setFloatPopupMode(
FloatPopupMode mode
)
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 switchLevelOfDetail
virtual LevelOfDetail switchLevelOfDetail(
LevelOfDetail oldLevel
)
virtual LevelOfDetail switchLevelOfDetail(
LevelOfDetail oldLevel
)
Switches to the next LOD level.
Return: Thew new LOD level
Reimplemented by: Workspace::Camera::switchLevelOfDetail, Workspace::Cycle::switchLevelOfDetail, Workspace::TransformationBase::switchLevelOfDetail
function topContent
virtual void topContent(
DIWNE::DrawInfo & context
) override
virtual void topContent(
DIWNE::DrawInfo & context
) override
Reimplements: DIWNE::BasicNode::topContent
function topRightHeaderContent
virtual void topRightHeaderContent(
DIWNE::DrawInfo & context
)
virtual void topRightHeaderContent(
DIWNE::DrawInfo & context
)
Special method to fill contents between the node label and the top right menu button (if present) The method call must include a m_top.spring(1.0f);
call somewhere in it.
Reimplemented by: Workspace::Transformation::topRightHeaderContent, Workspace::Transformation::topRightHeaderContent, Workspace::Transformation::topRightHeaderContent, Workspace::Transformation::topRightHeaderContent, Workspace::Camera::topRightHeaderContent, Workspace::Transformation::topRightHeaderContent, Workspace::TransformationBase::topRightHeaderContent
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 Functions Documentation
function maxLengthOfData
virtual int maxLengthOfData() =0
virtual int maxLengthOfData() =0
Calculates the largest number of characters/decimal places a data item has in this node.
Reimplemented by: Workspace::Camera::maxLengthOfData, Workspace::Cycle::maxLengthOfData, Workspace::Model::maxLengthOfData, Workspace::Operator::maxLengthOfData, Workspace::Operator::maxLengthOfData, Workspace::Screen::maxLengthOfData, Workspace::ScriptingNode::maxLengthOfData, Workspace::Sequence::maxLengthOfData, Workspace::Transformation::maxLengthOfData, Workspace::TransformationBase::maxLengthOfData
This call will often be delegated to the pins of the node.
function updateDataItemsWidth
virtual float updateDataItemsWidth()
virtual float updateDataItemsWidth()
Calculates the final desired pixel width of data items (floats inside vectors, matrices etc.).
See: maxLengthOfData(), queueUpdateDataItemsWidth()
Note: Could it be called every frame? I don't know, someone profile it please -><-.
Calls maxLengthOfData() internally. Despite this method not being particularly time intensive it is NOT called every frame. A call to this method can be queued for the next frame via queueUpdateDataItemsWidth()
Public Attributes Documentation
variable CORE_NODE_FLAG
static constexpr char CORE_NODE_FLAG = 16;
static constexpr char CORE_NODE_FLAG = 16;
variable m_referenceSpaceSource
bool m_referenceSpaceSource {false};
bool m_referenceSpaceSource {false};
Indicates that this node is the source of a custom scene view reference space TODO: What if it's a source for multiple windows? Would be nice to keep track of that.
Protected Attributes Documentation
variable m_dataItemsWidth
float m_dataItemsWidth {32.f};
float m_dataItemsWidth {32.f};
variable m_drawContextMenuButton
bool m_drawContextMenuButton = false;
bool m_drawContextMenuButton = false;
variable m_floatPopupMode
FloatPopupMode m_floatPopupMode {FloatPopupMode::Value};
FloatPopupMode m_floatPopupMode {FloatPopupMode::Value};
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::Full};
LevelOfDetail m_levelOfDetail {LevelOfDetail::Full};
variable m_nodebase
const Ptr< Core::Node > m_nodebase;
const Ptr< Core::Node > m_nodebase;
Reference to the I3TCore node @description Each WorkspaceGUI node represents a single I3TCore node.
It also manages its lifetime and destruction. The UI and Core representations are not implicitly synced. Right now the idea is that any changes to the Core nodes is made through Workspace nodes, which sync the UI and Core state explicitly in the moments of immediate change + some continual asserts. Workspace is however not ready to react to external changes to the Core node graph and would result in sync fail.
variable m_numberOfVisibleDecimal
int m_numberOfVisibleDecimal;
int m_numberOfVisibleDecimal;
number of decimal places used while display floats in the workspace
variable m_topBottomSpacingDefault
bool m_topBottomSpacingDefault = true;
bool m_topBottomSpacingDefault = true;
Whether this node has spacing between content and header / end.
variable m_updateDataItemsWidth
bool m_updateDataItemsWidth {true};
bool m_updateDataItemsWidth {true};
Updated on 2025-05-31 at 12:55:30 +0000