Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
Stg::Option Class Reference

#include <option.hh>

Public Member Functions

void createMenuItem (Fl_Menu_Bar *menu, std::string path)
 
void invert ()
 
bool isEnabled () const
 
void Load (Worldfile *wf, int section)
 
void menuCallback (Fl_Callback *cb, Fl_Widget *w)
 
const std::string name () const
 
 operator bool ()
 
bool operator< (const Option &rhs) const
 
 Option (const std::string &n, const std::string &tok, const std::string &key, bool v, World *world)
 
void Save (Worldfile *wf, int section)
 
void set (bool val)
 
bool val () const
 

Static Public Member Functions

static void toggleCb (Fl_Widget *w, void *p)
 

Public Attributes

std::string htname
 

Private Attributes

World_world
 
Fl_Menu_ * menu
 
Fl_Callback * menuCb
 
Fl_Widget * menuCbWidget
 
int menuIndex
 
std::string optName
 
std::string shortcut
 
bool value
 
std::string wf_token
 

Friends

bool compare (const Option *lhs, const Option *rhs)
 

Detailed Description

option.hh Class that encapsulates a boolean and pairs it with a string description Used to pass settings between the GUI and the drawing classes

Author: Jeremy Asher, Richard Vaughan SVN: $Id$

Definition at line 19 of file option.hh.

Constructor & Destructor Documentation

◆ Option()

Option::Option ( const std::string &  n,
const std::string &  tok,
const std::string &  key,
bool  v,
World world 
)

Definition at line 8 of file option.cc.

Member Function Documentation

◆ createMenuItem()

void Option::createMenuItem ( Fl_Menu_Bar *  menu,
std::string  path 
)

Definition at line 48 of file option.cc.

◆ invert()

void Stg::Option::invert ( )
inline

Definition at line 48 of file option.hh.

◆ isEnabled()

bool Stg::Option::isEnabled ( ) const
inline

Definition at line 39 of file option.hh.

◆ Load()

void Option::Load ( Worldfile wf,
int  section 
)

Definition at line 22 of file option.cc.

◆ menuCallback()

void Option::menuCallback ( Fl_Callback *  cb,
Fl_Widget *  w 
)

Definition at line 42 of file option.cc.

◆ name()

const std::string Stg::Option::name ( ) const
inline

Definition at line 38 of file option.hh.

◆ operator bool()

Stg::Option::operator bool ( )
inline

Definition at line 41 of file option.hh.

◆ operator<()

bool Stg::Option::operator< ( const Option rhs) const
inline

Definition at line 42 of file option.hh.

◆ Save()

void Option::Save ( Worldfile wf,
int  section 
)

Definition at line 28 of file option.cc.

◆ set()

void Option::set ( bool  val)

Definition at line 57 of file option.cc.

◆ toggleCb()

void Option::toggleCb ( Fl_Widget *  w,
void *  p 
)
static

Definition at line 33 of file option.cc.

◆ val()

bool Stg::Option::val ( ) const
inline

Definition at line 40 of file option.hh.

Friends And Related Function Documentation

◆ compare

bool compare ( const Option lhs,
const Option rhs 
)
friend

Member Data Documentation

◆ _world

World* Stg::Option::_world
private

Definition at line 32 of file option.hh.

◆ htname

std::string Stg::Option::htname

Definition at line 62 of file option.hh.

◆ menu

Fl_Menu_* Stg::Option::menu
private

Definition at line 28 of file option.hh.

◆ menuCb

Fl_Callback* Stg::Option::menuCb
private

Definition at line 30 of file option.hh.

◆ menuCbWidget

Fl_Widget* Stg::Option::menuCbWidget
private

Definition at line 31 of file option.hh.

◆ menuIndex

int Stg::Option::menuIndex
private

Definition at line 29 of file option.hh.

◆ optName

std::string Stg::Option::optName
private

Definition at line 23 of file option.hh.

◆ shortcut

std::string Stg::Option::shortcut
private

Definition at line 27 of file option.hh.

◆ value

bool Stg::Option::value
private

Definition at line 24 of file option.hh.

◆ wf_token

std::string Stg::Option::wf_token
private

worldfile entry string for loading and saving this value

Definition at line 26 of file option.hh.


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


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Feb 28 2022 23:48:56