0.4.1
Loading...
Searching...
No Matches
NAV::gui::NodeEditorApplication Class Reference

Application class providing all relevant GUI callbacks. More...

Public Types

enum  Colors : uint8_t {
  COLOR_GROUP_HEADER_TEXT ,
  COLOR_GROUP_HEADER_BG ,
  COLOR_GROUP_OUTER_BORDER
}
 Available color settings. More...
 

Public Member Functions

 NodeEditorApplication ()=delete
 Default constructor.
 
 NodeEditorApplication (const NodeEditorApplication &)=delete
 Copy constructor.
 
 NodeEditorApplication (NodeEditorApplication &&)=delete
 Move constructor.
 
void OnFrame (float deltaTime) override
 Called on every frame.
 
bool OnQuitRequest () override
 Called when the user request the application to close.
 
void OnStart () override
 Called when the application is started.
 
void OnStop () override
 Called when the application is stopped.
 
NodeEditorApplicationoperator= (const NodeEditorApplication &)=delete
 Copy assignment operator.
 
NodeEditorApplicationoperator= (NodeEditorApplication &&)=delete
 Move assignment operator.
 
void ShowClearNodesRequested ()
 Shows a PopupModel to clear the current flow.
 
void ShowLoadRequested ()
 Shows a PopupModel loading a new flow.
 
void ShowQuitRequested ()
 Shows a PopupModal asking the user if he wants to quit with unsaved changes.
 
void ShowSaveAsRequested ()
 Shows a PopupModel where the user can select a path to save his flow to.
 
 ~NodeEditorApplication () override=default
 Destructor.
 

Static Public Member Functions

static float defaultFontRatio ()
 Ratio to multiply for default GUI elements.
 
static float headerFontRatio ()
 Ratio to multiply for node header elements.
 
static float monoFontRatio ()
 Ratio to multiply for log output GUI elements.
 
static float panelFontRatio ()
 Ratio to multiply for GUI editor elements.
 
static void ShowRenameNodeRequest (Node *&renameNode)
 Shows a PopupModal where the user can rename the node.
 
static void ShowRenamePinRequest (Pin *&renamePin)
 Shows a PopupModal where the user can rename the pin.
 
static float windowFontRatio ()
 Ratio to multiply for GUI window elements.
 

Data Fields

int frameCountNavigate
 Frame counter to block the navigate to content function till nodes are correctly loaded.
 

Static Public Attributes

static bool _showQueueSizeOnPins
 Shows the queue size on the pins (every frame the queue mutex will be locked)
 
static float bottomViewHeight
 Height of the log viewer.
 
static bool hideFPS
 Hide FPS counter.
 
static bool hideLeftPane
 Hide left pane.
 
static ImPlotStyle imPlotReferenceStyle
 Default style of the ImPlot library to compare changes against.
 
static float leftPaneWidth
 Width of the left pane.
 
static std::vector< ImVec4 > m_colors
 Color settings.
 
static std::vector< const char * > m_colorsNames
 Color names.
 
static std::array< ImTextureID, 2 > m_InsLogo
 Pointer to the texture for the INS logo.
 
static std::array< ImTextureID, 2 > m_InstinctLogo
 Pointer to the texture for the instinct logo.
 
static ImTextureID m_RoseFigure
 Pointer to the texture for the rose figure (ImuSimulator node)
 
static ImTextureID m_SaveButtonImage
 Pointer to the texture for the save button.
 
static float menuBarHeight
 Height of the menu bar on top.
 
static float rightPaneWidth
 Width of the right pane.
 
static constexpr float SPLITTER_THICKNESS
 Thickness of the splitter between left and right pane.
 

Private Types

enum class  BottomViewTabItem : uint8_t {
  None ,
  LogOutput
}
 Tabs displayed in the bottom view. More...
 

Private Attributes

BottomViewTabItem bottomViewSelectedTab
 Selected Tab item in the bottom view.
 
GlobalActions globalAction
 Global action to execute.
 
ImTextureID m_HeaderBackground
 Pointer to the texture for the node headers.
 

Static Private Attributes

static constexpr float BOTTOM_VIEW_COLLAPSED_MIN_HEIGHT
 Minimal height of the bottom view if it is collapsed.
 
static constexpr float BOTTOM_VIEW_UNCOLLAPSED_MIN_HEIGHT
 Minimal height of the bottom view if it is not collapsed.
 

Friends

void windows::ShowFontSizeEditor (bool *show)
 Shows a window for choosing the font size.
 

Detailed Description

Application class providing all relevant GUI callbacks.

Definition at line 35 of file NodeEditorApplication.hpp.

Member Enumeration Documentation

◆ BottomViewTabItem

enum class NAV::gui::NodeEditorApplication::BottomViewTabItem : uint8_t
strongprivate

Tabs displayed in the bottom view.

Enumerator
None 

The cross item is selected.

LogOutput 

The log output item is selected.

Definition at line 158 of file NodeEditorApplication.hpp.

◆ Colors

Available color settings.

Enumerator
COLOR_GROUP_HEADER_TEXT 

Color of the group header text.

COLOR_GROUP_HEADER_BG 

Color of the group header background.

COLOR_GROUP_OUTER_BORDER 

Color of the group outer border.

Definition at line 136 of file NodeEditorApplication.hpp.

Constructor & Destructor Documentation

◆ NodeEditorApplication() [1/3]

NAV::gui::NodeEditorApplication::NodeEditorApplication ( )
delete

Default constructor.

◆ ~NodeEditorApplication()

NAV::gui::NodeEditorApplication::~NodeEditorApplication ( )
overridedefault

Destructor.

◆ NodeEditorApplication() [2/3]

NAV::gui::NodeEditorApplication::NodeEditorApplication ( const NodeEditorApplication & )
delete

Copy constructor.

◆ NodeEditorApplication() [3/3]

NAV::gui::NodeEditorApplication::NodeEditorApplication ( NodeEditorApplication && )
delete

Move constructor.

Member Function Documentation

◆ defaultFontRatio()

float NAV::gui::NodeEditorApplication::defaultFontRatio ( )
static

Ratio to multiply for default GUI elements.

Definition at line 1911 of file NodeEditorApplication.cpp.

◆ headerFontRatio()

float NAV::gui::NodeEditorApplication::headerFontRatio ( )
static

Ratio to multiply for node header elements.

Definition at line 1931 of file NodeEditorApplication.cpp.

◆ monoFontRatio()

float NAV::gui::NodeEditorApplication::monoFontRatio ( )
static

Ratio to multiply for log output GUI elements.

Definition at line 1926 of file NodeEditorApplication.cpp.

◆ OnFrame()

void NAV::gui::NodeEditorApplication::OnFrame ( float deltaTime)
override

Called on every frame.

Parameters
[in]deltaTimeTime since last frame

Definition at line 807 of file NodeEditorApplication.cpp.

◆ OnQuitRequest()

bool NAV::gui::NodeEditorApplication::OnQuitRequest ( )
override

Called when the user request the application to close.

Checks whether there are unsaved changes and then prompts the user to save them before quit

Returns
True if no unsaved changes

Definition at line 378 of file NodeEditorApplication.cpp.

◆ OnStart()

void NAV::gui::NodeEditorApplication::OnStart ( )
override

Called when the application is started.

Definition at line 77 of file NodeEditorApplication.cpp.

◆ OnStop()

void NAV::gui::NodeEditorApplication::OnStop ( )
override

Called when the application is stopped.

Definition at line 341 of file NodeEditorApplication.cpp.

◆ operator=() [1/2]

NodeEditorApplication & NAV::gui::NodeEditorApplication::operator= ( const NodeEditorApplication & )
delete

Copy assignment operator.

◆ operator=() [2/2]

NodeEditorApplication & NAV::gui::NodeEditorApplication::operator= ( NodeEditorApplication && )
delete

Move assignment operator.

◆ panelFontRatio()

float NAV::gui::NodeEditorApplication::panelFontRatio ( )
static

Ratio to multiply for GUI editor elements.

Definition at line 1921 of file NodeEditorApplication.cpp.

◆ ShowClearNodesRequested()

void NAV::gui::NodeEditorApplication::ShowClearNodesRequested ( )

Shows a PopupModel to clear the current flow.

Definition at line 489 of file NodeEditorApplication.cpp.

◆ ShowLoadRequested()

void NAV::gui::NodeEditorApplication::ShowLoadRequested ( )

Shows a PopupModel loading a new flow.

Definition at line 561 of file NodeEditorApplication.cpp.

◆ ShowQuitRequested()

void NAV::gui::NodeEditorApplication::ShowQuitRequested ( )

Shows a PopupModal asking the user if he wants to quit with unsaved changes.

Definition at line 391 of file NodeEditorApplication.cpp.

◆ ShowRenameNodeRequest()

void NAV::gui::NodeEditorApplication::ShowRenameNodeRequest ( Node *& renameNode)
static

Shows a PopupModal where the user can rename the node.

Parameters
[in,out]renameNodePointer to the node to rename. Pointer gets nulled when finished.

Definition at line 673 of file NodeEditorApplication.cpp.

◆ ShowRenamePinRequest()

void NAV::gui::NodeEditorApplication::ShowRenamePinRequest ( Pin *& renamePin)
static

Shows a PopupModal where the user can rename the pin.

Parameters
[in,out]renamePinPointer to the pin to rename. Pointer gets nulled when finished.

Definition at line 740 of file NodeEditorApplication.cpp.

◆ ShowSaveAsRequested()

void NAV::gui::NodeEditorApplication::ShowSaveAsRequested ( )

Shows a PopupModel where the user can select a path to save his flow to.

Definition at line 457 of file NodeEditorApplication.cpp.

◆ windowFontRatio()

float NAV::gui::NodeEditorApplication::windowFontRatio ( )
static

Ratio to multiply for GUI window elements.

Definition at line 1916 of file NodeEditorApplication.cpp.

Friends And Related Symbol Documentation

◆ windows::ShowFontSizeEditor

void windows::ShowFontSizeEditor ( bool * show)
friend

Shows a window for choosing the font size.

Parameters
[in,out]showFlag which indicates whether the window is shown

Field Documentation

◆ _showQueueSizeOnPins

bool NAV::gui::NodeEditorApplication::_showQueueSizeOnPins
inlinestatic

Shows the queue size on the pins (every frame the queue mutex will be locked)

Definition at line 99 of file NodeEditorApplication.hpp.

◆ BOTTOM_VIEW_COLLAPSED_MIN_HEIGHT

float NAV::gui::NodeEditorApplication::BOTTOM_VIEW_COLLAPSED_MIN_HEIGHT
staticconstexprprivate

Minimal height of the bottom view if it is collapsed.

Definition at line 38 of file NodeEditorApplication.hpp.

◆ BOTTOM_VIEW_UNCOLLAPSED_MIN_HEIGHT

float NAV::gui::NodeEditorApplication::BOTTOM_VIEW_UNCOLLAPSED_MIN_HEIGHT
staticconstexprprivate

Minimal height of the bottom view if it is not collapsed.

Definition at line 39 of file NodeEditorApplication.hpp.

◆ bottomViewHeight

float NAV::gui::NodeEditorApplication::bottomViewHeight
inlinestatic

Height of the log viewer.

Definition at line 122 of file NodeEditorApplication.hpp.

◆ bottomViewSelectedTab

BottomViewTabItem NAV::gui::NodeEditorApplication::bottomViewSelectedTab
private

Selected Tab item in the bottom view.

Definition at line 164 of file NodeEditorApplication.hpp.

◆ frameCountNavigate

int NAV::gui::NodeEditorApplication::frameCountNavigate

Frame counter to block the navigate to content function till nodes are correctly loaded.

Definition at line 96 of file NodeEditorApplication.hpp.

◆ globalAction

GlobalActions NAV::gui::NodeEditorApplication::globalAction
private

Global action to execute.

Definition at line 170 of file NodeEditorApplication.hpp.

◆ hideFPS

bool NAV::gui::NodeEditorApplication::hideFPS
inlinestatic

Hide FPS counter.

Definition at line 117 of file NodeEditorApplication.hpp.

◆ hideLeftPane

bool NAV::gui::NodeEditorApplication::hideLeftPane
inlinestatic

Hide left pane.

Definition at line 116 of file NodeEditorApplication.hpp.

◆ imPlotReferenceStyle

ImPlotStyle NAV::gui::NodeEditorApplication::imPlotReferenceStyle
inlinestatic

Default style of the ImPlot library to compare changes against.

Definition at line 114 of file NodeEditorApplication.hpp.

◆ leftPaneWidth

float NAV::gui::NodeEditorApplication::leftPaneWidth
inlinestatic

Width of the left pane.

Definition at line 118 of file NodeEditorApplication.hpp.

◆ m_colors

std::vector<ImVec4> NAV::gui::NodeEditorApplication::m_colors
inlinestatic

Color settings.

Definition at line 144 of file NodeEditorApplication.hpp.

◆ m_colorsNames

std::vector<const char*> NAV::gui::NodeEditorApplication::m_colorsNames
inlinestatic

Color names.

Definition at line 150 of file NodeEditorApplication.hpp.

◆ m_HeaderBackground

ImTextureID NAV::gui::NodeEditorApplication::m_HeaderBackground
private

Pointer to the texture for the node headers.

Definition at line 167 of file NodeEditorApplication.hpp.

◆ m_InsLogo

std::array<ImTextureID, 2> NAV::gui::NodeEditorApplication::m_InsLogo
inlinestatic

Pointer to the texture for the INS logo.

Definition at line 105 of file NodeEditorApplication.hpp.

◆ m_InstinctLogo

std::array<ImTextureID, 2> NAV::gui::NodeEditorApplication::m_InstinctLogo
inlinestatic

Pointer to the texture for the instinct logo.

Definition at line 102 of file NodeEditorApplication.hpp.

◆ m_RoseFigure

ImTextureID NAV::gui::NodeEditorApplication::m_RoseFigure
inlinestatic

Pointer to the texture for the rose figure (ImuSimulator node)

Definition at line 111 of file NodeEditorApplication.hpp.

◆ m_SaveButtonImage

ImTextureID NAV::gui::NodeEditorApplication::m_SaveButtonImage
inlinestatic

Pointer to the texture for the save button.

Definition at line 108 of file NodeEditorApplication.hpp.

◆ menuBarHeight

float NAV::gui::NodeEditorApplication::menuBarHeight
inlinestatic

Height of the menu bar on top.

Definition at line 120 of file NodeEditorApplication.hpp.

◆ rightPaneWidth

float NAV::gui::NodeEditorApplication::rightPaneWidth
inlinestatic

Width of the right pane.

Definition at line 119 of file NodeEditorApplication.hpp.

◆ SPLITTER_THICKNESS

float NAV::gui::NodeEditorApplication::SPLITTER_THICKNESS
staticconstexpr

Thickness of the splitter between left and right pane.

Definition at line 121 of file NodeEditorApplication.hpp.


The documentation for this class was generated from the following files: