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 ( const std::string &  n,
const std::string &  tok,
const std::string &  key,
bool  v,
World world 
)

Definition at line 9 of file option.cc.

Member Function Documentation

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

Definition at line 58 of file option.cc.

void Stg::Option::invert ( )
inline

Definition at line 51 of file option.hh.

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

Definition at line 42 of file option.hh.

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

Definition at line 33 of file option.cc.

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

Definition at line 53 of file option.cc.

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

Definition at line 41 of file option.hh.

Stg::Option::operator bool ( )
inline

Definition at line 44 of file option.hh.

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

Definition at line 45 of file option.hh.

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

Definition at line 39 of file option.cc.

void Option::set ( bool  val)

Definition at line 68 of file option.cc.

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

Definition at line 44 of file option.cc.

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

Definition at line 43 of file option.hh.

Friends And Related Function Documentation

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

Member Data Documentation

World* Stg::Option::_world
private

Definition at line 32 of file option.hh.

std::string Stg::Option::htname

Definition at line 67 of file option.hh.

Fl_Menu_* Stg::Option::menu
private

Definition at line 28 of file option.hh.

Fl_Callback* Stg::Option::menuCb
private

Definition at line 30 of file option.hh.

Fl_Widget* Stg::Option::menuCbWidget
private

Definition at line 31 of file option.hh.

int Stg::Option::menuIndex
private

Definition at line 29 of file option.hh.

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

Definition at line 23 of file option.hh.

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

Definition at line 27 of file option.hh.

bool Stg::Option::value
private

Definition at line 24 of file option.hh.

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 Jun 10 2019 15:06:12