Robowflex  v0.1
Making MoveIt Easy
robowflex::darts::CheckboxElement Class Reference

A checkbox element that modifies a boolean. More...

#include <gui.h>

+ Inheritance diagram for robowflex::darts::CheckboxElement:

Public Member Functions

 CheckboxElement (const std::string &text, bool &boolean)
 Constructor. More...
 
void render () const override
 Render method. Renders IMGUI contents. More...
 

Private Attributes

const std::string text
 Display text. More...
 
bool & boolean
 Associated boolean. More...
 

Detailed Description

A checkbox element that modifies a boolean.

Definition at line 268 of file gui.h.

Constructor & Destructor Documentation

◆ CheckboxElement()

CheckboxElement::CheckboxElement ( const std::string text,
bool &  boolean 
)

Constructor.

Parameters
[in]textText to display.
[in]booleanBoolean to modify.

Definition at line 267 of file gui.cpp.

267  : text(text), boolean(boolean)
268 {
269 }
bool & boolean
Associated boolean.
Definition: gui.h:280
const std::string text
Display text.
Definition: gui.h:279

Member Function Documentation

◆ render()

void CheckboxElement::render ( ) const
overridevirtual

Render method. Renders IMGUI contents.

Implements robowflex::darts::ImGuiElement.

Definition at line 271 of file gui.cpp.

272 {
273  ImGui::Checkbox(text.c_str(), &boolean);
274 }
T c_str(T... args)

Member Data Documentation

◆ boolean

bool& robowflex::darts::CheckboxElement::boolean
private

Associated boolean.

Definition at line 280 of file gui.h.

◆ text

const std::string robowflex::darts::CheckboxElement::text
private

Display text.

Definition at line 279 of file gui.h.


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