0.2.0
Loading...
Searching...
No Matches
EnumCombo.hpp File Reference

Combo representing an enumeration. More...

Go to the source code of this file.

Functions

template<typename T >
bool NAV::gui::widgets::EnumCombo (const char *label, T &enumeration, size_t startIdx=0)
 Combo representing an enumeration.
 
template<typename T >
bool NAV::gui::widgets::EnumCombo (const char *label, T &enumeration1, T &enumeration2, const char *previewAppendix="")
 Combo representing two enumerations. Values will be displayed appended and set to the same value.
 

Detailed Description

Combo representing an enumeration.

Author
T. Topp (topp@.nosp@m.ins..nosp@m.uni-s.nosp@m.tutt.nosp@m.gart..nosp@m.de)
Date
2023-01-31

Function Documentation

◆ EnumCombo() [1/2]

template<typename T >
bool NAV::gui::widgets::EnumCombo ( const char * label,
T & enumeration,
size_t startIdx = 0 )

Combo representing an enumeration.

Template Parameters
TEnumeration Type
Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]enumerationReference to the enumeration variable to select
[in]startIdxStart Index in the enum (so skip first items)
Returns
True if the value changed
Attention
The Enum type needs a last element called 'COUNT'

◆ EnumCombo() [2/2]

template<typename T >
bool NAV::gui::widgets::EnumCombo ( const char * label,
T & enumeration1,
T & enumeration2,
const char * previewAppendix = "" )

Combo representing two enumerations. Values will be displayed appended and set to the same value.

Template Parameters
TEnumeration Type
Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]enumeration1Reference to the first enumeration variable to select
[in]enumeration2Reference to the second enumeration variable to set to the same value as the first one
[in]previewAppendixAdditional text to show in the combo preview
Returns
True if the value changed
Attention
The Enum type needs a last element called 'COUNT'