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

Position Input GUI widgets. More...

Go to the source code of this file.

Classes

struct  NAV::gui::widgets::PositionWithFrame
 Position with Reference frame, used for GUI input. More...
 

Typedefs

using json
 json namespace
 

Enumerations

enum class  NAV::gui::widgets::PositionInputLayout {
  SINGLE_COLUMN ,
  SINGLE_ROW ,
  TWO_ROWS
}
 Layout options for the Position input. More...
 

Functions

void NAV::gui::widgets::from_json (const json &j, PositionWithFrame &position)
 Converts the provided json object.
 
void NAV::gui::widgets::from_json (const json &j, PositionWithFrame::ReferenceFrame &refFrame)
 Converts the provided json object.
 
bool NAV::gui::widgets::PositionInput (const char *str, PositionWithFrame &position, PositionInputLayout layout=PositionInputLayout::SINGLE_COLUMN, float itemWidth=140.0F)
 Inputs to edit an Position object.
 
void NAV::gui::widgets::to_json (json &j, const PositionWithFrame &position)
 Converts the provided Object into a json object.
 
void NAV::gui::widgets::to_json (json &j, const PositionWithFrame::ReferenceFrame &refFrame)
 Converts the provided Object into a json object.
 
const char * NAV::to_string (gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
 Converts the enum to a string.
 

Detailed Description

Position Input GUI widgets.

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

Enumeration Type Documentation

◆ PositionInputLayout

Layout options for the Position input.

Enumerator
SINGLE_COLUMN 

All elements in a single column.

SINGLE_ROW 

All elements in a single row.

TWO_ROWS 

2 rows

Function Documentation

◆ from_json() [1/2]

void NAV::gui::widgets::from_json ( const json & j,
PositionWithFrame & position )

Converts the provided json object.

Parameters
[in]jJson object with the time system
[out]positionObject to return

◆ from_json() [2/2]

void NAV::gui::widgets::from_json ( const json & j,
PositionWithFrame::ReferenceFrame & refFrame )

Converts the provided json object.

Parameters
[in]jJson object with the time system
[out]refFrameObject to return

◆ PositionInput()

bool NAV::gui::widgets::PositionInput ( const char * str,
PositionWithFrame & position,
PositionInputLayout layout = PositionInputLayout::SINGLE_COLUMN,
float itemWidth = 140.0F )

Inputs to edit an Position object.

Parameters
[in]strText to display near the Frame selection (Unique id for the ImGui elements)
[in,out]positionPosition and reference frame object to modify
[in]layoutLayout to use
[in]itemWidthWidth of the widget items
Returns
True if changes were made to the object

◆ to_json() [1/2]

void NAV::gui::widgets::to_json ( json & j,
const PositionWithFrame & position )

Converts the provided Object into a json object.

Parameters
[out]jReturn Json object
[in]positionObject to convert

◆ to_json() [2/2]

void NAV::gui::widgets::to_json ( json & j,
const PositionWithFrame::ReferenceFrame & refFrame )

Converts the provided Object into a json object.

Parameters
[out]jReturn Json object
[in]refFrameObject to convert

◆ to_string()

const char * NAV::to_string ( gui::widgets::PositionWithFrame::ReferenceFrame refFrame)

Converts the enum to a string.

Parameters
[in]refFrameEnum value to convert into text
Returns
String representation of the enum