VGUI::Wheel< wheel_t > Class Template Reference

#include <wheel.h>

Inheritance diagram for VGUI::Wheel< wheel_t >:

Inheritance graph
[legend]
Collaboration diagram for VGUI::Wheel< wheel_t >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Wheel ()
 Wheel (Widget *w)
 ~Wheel ()
void Draw ()
void Draw (float opacity)
void Save ()
bool MouseOver (float x, float y)
string MousePress (float x, float y)
string MouseRelease (float x, float y)
void ResetValue ()
vector< string > GetOptionList ()
vector< wheel_t > GetValueList ()
wheel_t GetValue ()
wheel_t GetDefaultValue ()
string GetSetting ()
float GetSpacing ()
string GetHook ()
bool GetSaved ()
void SetOptionList (vector< string > new_option_list)
void SetValueList (vector< wheel_t > new_value_list)
void SetValue (wheel_t new_value)
void SetDefaultValue (wheel_t new_value)
void SetSetting (string new_setting)
void SetSpacing (float new_spacing)
void SetHook (string new_hook)
void SetSaved (bool new_saved)
void IncValuePress ()
void DecValuePress ()
void IncValueRelease ()
void DecValueRelease ()
void Release ()

Private Attributes

TEXTURE_HANDLE l_arrow_up
TEXTURE_HANDLE r_arrow_up
TEXTURE_HANDLE l_arrow_down
TEXTURE_HANDLE r_arrow_down
string setting
string wgt_hook
vector< string > option_list
vector< wheel_t > value_list
unsigned int cur_option
unsigned int default_option
bool l_down
bool r_down
bool saved
float tex_width
float tex_height
float spacing

Detailed Description

template<class wheel_t>
class VGUI::Wheel< wheel_t >

Definition at line 11 of file wheel.h.


Constructor & Destructor Documentation

template<class wheel_t>
VGUI::Wheel< wheel_t >::Wheel  )  [inline]
 

Definition at line 24 of file wheel.h.

template<class wheel_t>
VGUI::Wheel< wheel_t >::Wheel Widget w  ) 
 

Definition at line 111 of file wheel.h.

References VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, VGUI::Wheel< wheel_t >::cur_option, VGUI::Wheel< wheel_t >::default_option, VGUI::Widget::enabled, VGUI::Widget::font_size, VGUI::Widget::GetCancel(), VGUI::Widget::GetCenter(), VGUI::Widget::GetColorB(), VGUI::Widget::GetColorG(), VGUI::Widget::GetColorR(), VGUI::Widget::GetDefault(), VGUI::Widget::GetEnabled(), VGUI::Widget::GetFontSize(), VGUI::Widget::GetHasIcon(), VGUI::Widget::GetHeightAuto(), VGUI::Widget::GetName(), VGUI::Widget::GetRelHeight(), VGUI::Widget::GetRelWidth(), VGUI::Widget::GetSelected(), SETTINGS::GetSkinPath(), VGUI::Widget::GetText(), VGUI::Widget::GetTip(), VGUI::Widget::GetType(), VGUI::Widget::GetWidthAuto(), VGUI::Widget::has_icon, VGUI::Widget::height_auto, VGUI::Widget::is_cancel, VGUI::Widget::is_default, VGUI::Wheel< wheel_t >::l_arrow_down, VGUI::Wheel< wheel_t >::l_arrow_up, VGUI::Wheel< wheel_t >::l_down, TEXTURE_HANDLE::Load(), VGUI::Widget::name, VGUI::Wheel< wheel_t >::r_arrow_down, VGUI::Wheel< wheel_t >::r_arrow_up, VGUI::Wheel< wheel_t >::r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Wheel< wheel_t >::saved, VGUI::Widget::selected, VGUI::Wheel< wheel_t >::setting, settings, VGUI::Wheel< wheel_t >::spacing, VGUI::Wheel< wheel_t >::tex_height, VGUI::Wheel< wheel_t >::tex_width, VGUI::Widget::text, VGUI::Widget::tip, VGUI::Widget::type, VGUI::Wheel< wheel_t >::wgt_hook, and VGUI::Widget::width_auto.

template<class wheel_t>
VGUI::Wheel< wheel_t >::~Wheel  ) 
 

Definition at line 162 of file wheel.h.


Member Function Documentation

template<class wheel_t>
void VGUI::Wheel< wheel_t >::DecValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 262 of file wheel.h.

References VGUI::Wheel< wheel_t >::l_down, and VGUI::Wheel< wheel_t >::Release().

Referenced by VGUI::SpinningCar::DecValuePress().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::DecValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 269 of file wheel.h.

References VGUI::Wheel< wheel_t >::cur_option, and VGUI::Wheel< wheel_t >::Release().

Referenced by VGUI::SpinningCar::DecValueRelease(), and VGUI::Wheel< wheel_t >::MouseRelease().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::Draw float  opacity  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 203 of file wheel.h.

References _, VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, VGUI::Wheel< wheel_t >::cur_option, UTILITY::Draw2D(), VGUI::Widget::enabled, font, VGUI::Widget::font_size, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), FONT::Height(), VGUI::Wheel< wheel_t >::l_arrow_down, VGUI::Wheel< wheel_t >::l_arrow_up, VGUI::Wheel< wheel_t >::l_down, VGUI::Wheel< wheel_t >::option_list, FONT::Print(), VGUI::Wheel< wheel_t >::r_arrow_down, VGUI::Wheel< wheel_t >::r_arrow_up, VGUI::Wheel< wheel_t >::r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, VGUI::Wheel< wheel_t >::spacing, VGUI::Wheel< wheel_t >::tex_width, VGUI::Widget::text, VGUI::Widget::tip, utility, and FONT::Width().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::Draw  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 197 of file wheel.h.

Referenced by VGUI::SpinningCar::Draw().

template<class wheel_t>
wheel_t VGUI::Wheel< wheel_t >::GetDefaultValue  )  [inline]
 

Definition at line 38 of file wheel.h.

template<class wheel_t>
string VGUI::Wheel< wheel_t >::GetHook void   )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 41 of file wheel.h.

template<class wheel_t>
vector<string> VGUI::Wheel< wheel_t >::GetOptionList  )  [inline]
 

Definition at line 35 of file wheel.h.

template<class wheel_t>
bool VGUI::Wheel< wheel_t >::GetSaved  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 42 of file wheel.h.

template<class wheel_t>
string VGUI::Wheel< wheel_t >::GetSetting  )  [inline]
 

Definition at line 39 of file wheel.h.

template<class wheel_t>
float VGUI::Wheel< wheel_t >::GetSpacing  )  [inline]
 

Definition at line 40 of file wheel.h.

template<class wheel_t>
wheel_t VGUI::Wheel< wheel_t >::GetValue  )  [inline]
 

Definition at line 37 of file wheel.h.

Referenced by VGUI::SpinningCar::DecValueRelease(), VGUI::SpinningCar::IncValueRelease(), VGUI::SpinningCar::MouseRelease(), and VGUI::SpinningCar::ResetValue().

template<class wheel_t>
vector<wheel_t> VGUI::Wheel< wheel_t >::GetValueList  )  [inline]
 

Definition at line 36 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::IncValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 245 of file wheel.h.

References VGUI::Wheel< wheel_t >::r_down, and VGUI::Wheel< wheel_t >::Release().

Referenced by VGUI::SpinningCar::IncValuePress().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::IncValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 252 of file wheel.h.

References VGUI::Wheel< wheel_t >::cur_option, VGUI::Wheel< wheel_t >::option_list, and VGUI::Wheel< wheel_t >::Release().

Referenced by VGUI::SpinningCar::IncValueRelease(), and VGUI::Wheel< wheel_t >::MouseRelease().

template<class wheel_t>
bool VGUI::Wheel< wheel_t >::MouseOver float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 285 of file wheel.h.

References VGUI::Widget::center, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), VGUI::Widget::rel_height, and VGUI::Widget::rel_width.

Referenced by VGUI::SpinningCar::MouseOver().

template<class wheel_t>
string VGUI::Wheel< wheel_t >::MousePress float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 297 of file wheel.h.

References VGUI::Widget::center, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), VGUI::Wheel< wheel_t >::l_down, VGUI::Wheel< wheel_t >::r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Wheel< wheel_t >::spacing, VGUI::Wheel< wheel_t >::tex_width, and VGUI::Wheel< wheel_t >::wgt_hook.

Referenced by VGUI::SpinningCar::MousePress().

template<class wheel_t>
string VGUI::Wheel< wheel_t >::MouseRelease float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 330 of file wheel.h.

References VGUI::Widget::center, VGUI::Wheel< wheel_t >::DecValueRelease(), VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), VGUI::Wheel< wheel_t >::IncValueRelease(), VGUI::Wheel< wheel_t >::l_down, VGUI::Wheel< wheel_t >::r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Wheel< wheel_t >::Release(), VGUI::Wheel< wheel_t >::spacing, VGUI::Wheel< wheel_t >::tex_width, and VGUI::Wheel< wheel_t >::wgt_hook.

Referenced by VGUI::SpinningCar::MouseRelease().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::Release  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 279 of file wheel.h.

References VGUI::Wheel< wheel_t >::l_down, and VGUI::Wheel< wheel_t >::r_down.

Referenced by VGUI::Wheel< wheel_t >::DecValuePress(), VGUI::Wheel< wheel_t >::DecValueRelease(), VGUI::Wheel< wheel_t >::IncValuePress(), VGUI::Wheel< wheel_t >::IncValueRelease(), VGUI::Wheel< wheel_t >::MouseRelease(), and VGUI::SpinningCar::Release().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::ResetValue  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 182 of file wheel.h.

References VGUI::Wheel< wheel_t >::cur_option, VGUI::Wheel< wheel_t >::default_option, SETTINGS::Get(), VGUI::Wheel< wheel_t >::saved, VGUI::Wheel< wheel_t >::setting, settings, and VGUI::Wheel< wheel_t >::SetValue().

Referenced by VGUI::SpinningCar::ResetValue().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::Save  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 174 of file wheel.h.

References VGUI::Wheel< wheel_t >::cur_option, VGUI::Wheel< wheel_t >::default_option, VGUI::Wheel< wheel_t >::saved, SETTINGS::Set(), VGUI::Wheel< wheel_t >::setting, settings, and VGUI::Wheel< wheel_t >::value_list.

Referenced by VGUI::SpinningCar::Save().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetDefaultValue wheel_t  new_value  )  [inline]
 

Definition at line 46 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetHook string  new_hook  )  [inline]
 

Definition at line 49 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetOptionList vector< string >  new_option_list  )  [inline]
 

Definition at line 43 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetSaved bool  new_saved  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 50 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetSetting string  new_setting  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 47 of file wheel.h.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetSpacing float  new_spacing  ) 
 

Definition at line 167 of file wheel.h.

References VGUI::Widget::rel_width, VGUI::Wheel< wheel_t >::spacing, and VGUI::Wheel< wheel_t >::tex_width.

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetValue wheel_t  new_value  )  [inline]
 

Definition at line 45 of file wheel.h.

Referenced by VGUI::SpinningCar::ResetValue(), and VGUI::Wheel< wheel_t >::ResetValue().

template<class wheel_t>
void VGUI::Wheel< wheel_t >::SetValueList vector< wheel_t >  new_value_list  )  [inline]
 

Definition at line 44 of file wheel.h.


Member Data Documentation

template<class wheel_t>
unsigned int VGUI::Wheel< wheel_t >::cur_option [private]
 

Definition at line 19 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::DecValueRelease(), VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< int >::GetValue(), VGUI::Wheel< wheel_t >::IncValueRelease(), VGUI::Wheel< wheel_t >::ResetValue(), VGUI::Wheel< wheel_t >::Save(), VGUI::Wheel< int >::SetValue(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
unsigned int VGUI::Wheel< wheel_t >::default_option [private]
 

Definition at line 19 of file wheel.h.

Referenced by VGUI::Wheel< int >::GetDefaultValue(), VGUI::Wheel< wheel_t >::ResetValue(), VGUI::Wheel< wheel_t >::Save(), VGUI::Wheel< int >::SetDefaultValue(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
TEXTURE_HANDLE VGUI::Wheel< wheel_t >::l_arrow_down [private]
 

Definition at line 14 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
TEXTURE_HANDLE VGUI::Wheel< wheel_t >::l_arrow_up [private]
 

Definition at line 14 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
bool VGUI::Wheel< wheel_t >::l_down [private]
 

Definition at line 20 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::DecValuePress(), VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< wheel_t >::MousePress(), VGUI::Wheel< wheel_t >::MouseRelease(), VGUI::Wheel< wheel_t >::Release(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
vector<string> VGUI::Wheel< wheel_t >::option_list [private]
 

Definition at line 17 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< int >::GetOptionList(), VGUI::Wheel< wheel_t >::IncValueRelease(), and VGUI::Wheel< int >::SetOptionList().

template<class wheel_t>
TEXTURE_HANDLE VGUI::Wheel< wheel_t >::r_arrow_down [private]
 

Definition at line 14 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
TEXTURE_HANDLE VGUI::Wheel< wheel_t >::r_arrow_up [private]
 

Definition at line 14 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
bool VGUI::Wheel< wheel_t >::r_down [private]
 

Definition at line 20 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< wheel_t >::IncValuePress(), VGUI::Wheel< wheel_t >::MousePress(), VGUI::Wheel< wheel_t >::MouseRelease(), VGUI::Wheel< wheel_t >::Release(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
bool VGUI::Wheel< wheel_t >::saved [private]
 

Definition at line 20 of file wheel.h.

Referenced by VGUI::Wheel< int >::GetSaved(), VGUI::Wheel< wheel_t >::ResetValue(), VGUI::Wheel< wheel_t >::Save(), VGUI::Wheel< int >::SetSaved(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
string VGUI::Wheel< wheel_t >::setting [private]
 

Definition at line 15 of file wheel.h.

Referenced by VGUI::Wheel< int >::GetSetting(), VGUI::Wheel< wheel_t >::ResetValue(), VGUI::Wheel< wheel_t >::Save(), VGUI::Wheel< int >::SetSetting(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
float VGUI::Wheel< wheel_t >::spacing [private]
 

Definition at line 21 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< int >::GetSpacing(), VGUI::Wheel< wheel_t >::MousePress(), VGUI::Wheel< wheel_t >::MouseRelease(), VGUI::Wheel< wheel_t >::SetSpacing(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
float VGUI::Wheel< wheel_t >::tex_height [private]
 

Definition at line 21 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
float VGUI::Wheel< wheel_t >::tex_width [private]
 

Definition at line 21 of file wheel.h.

Referenced by VGUI::Wheel< wheel_t >::Draw(), VGUI::Wheel< wheel_t >::MousePress(), VGUI::Wheel< wheel_t >::MouseRelease(), VGUI::Wheel< wheel_t >::SetSpacing(), and VGUI::Wheel< wheel_t >::Wheel().

template<class wheel_t>
vector<wheel_t> VGUI::Wheel< wheel_t >::value_list [private]
 

Definition at line 18 of file wheel.h.

Referenced by VGUI::Wheel< int >::GetDefaultValue(), VGUI::Wheel< int >::GetValue(), VGUI::Wheel< int >::GetValueList(), VGUI::Wheel< wheel_t >::Save(), VGUI::Wheel< int >::SetDefaultValue(), VGUI::Wheel< int >::SetValue(), and VGUI::Wheel< int >::SetValueList().

template<class wheel_t>
string VGUI::Wheel< wheel_t >::wgt_hook [private]
 

Definition at line 16 of file wheel.h.

Referenced by VGUI::Wheel< int >::GetHook(), VGUI::Wheel< wheel_t >::MousePress(), VGUI::Wheel< wheel_t >::MouseRelease(), VGUI::Wheel< int >::SetHook(), and VGUI::Wheel< wheel_t >::Wheel().


The documentation for this class was generated from the following file:
Generated on Thu Oct 19 04:14:32 2006 by  doxygen 1.4.6