VGUI::Toggle Class Reference

#include <toggle.h>

Inheritance diagram for VGUI::Toggle:

Inheritance graph
[legend]
Collaboration diagram for VGUI::Toggle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Toggle ()
 Toggle (Widget *w)
 ~Toggle ()
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 Press ()
void Release ()
void ResetValue ()
bool GetValue ()
bool GetDefaultValue ()
string GetTrueText ()
string GetFalseText ()
float GetSpacing ()
void SetValue (bool new_value)
void SetDefaultValue (bool new_value)
void SetTrueText (string txt)
void SetFalseText (string txt)
void SetSetting (string new_setting)
void SetSpacing (float new_spacing)
void TogValue ()

Private Attributes

TEXTURE_HANDLE on_up
TEXTURE_HANDLE on_down
TEXTURE_HANDLE off_up
TEXTURE_HANDLE off_down
bool value
bool default_value
string setting
string true_txt
string false_txt
float tex_width
float tex_height
float spacing
bool down

Detailed Description

Definition at line 9 of file toggle.h.


Constructor & Destructor Documentation

Toggle::Toggle  ) 
 

Definition at line 6 of file toggle.cpp.

Toggle::Toggle Widget w  ) 
 

Definition at line 10 of file toggle.cpp.

References VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, default_value, down, 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, TEXTURE_HANDLE::Load(), VGUI::Widget::name, off_down, off_up, on_down, on_up, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, setting, settings, spacing, tex_height, tex_width, VGUI::Widget::text, VGUI::Widget::tip, VGUI::Widget::type, value, and VGUI::Widget::width_auto.

Toggle::~Toggle  ) 
 

Definition at line 66 of file toggle.cpp.


Member Function Documentation

void Toggle::Draw float  opacity  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 75 of file toggle.cpp.

References VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, down, UTILITY::Draw2D(), VGUI::Widget::enabled, false_txt, font, VGUI::Widget::font_size, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), FONT::Height(), off_down, off_up, on_down, on_up, FONT::Print(), VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, spacing, tex_width, VGUI::Widget::text, VGUI::Widget::tip, true_txt, utility, value, and FONT::Width().

void Toggle::Draw  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 70 of file toggle.cpp.

bool VGUI::Toggle::GetDefaultValue  )  [inline]
 

Definition at line 35 of file toggle.h.

References default_value.

string VGUI::Toggle::GetFalseText  )  [inline]
 

Definition at line 37 of file toggle.h.

References false_txt.

float VGUI::Toggle::GetSpacing  )  [inline]
 

Definition at line 38 of file toggle.h.

References spacing.

string VGUI::Toggle::GetTrueText  )  [inline]
 

Definition at line 36 of file toggle.h.

References true_txt.

bool VGUI::Toggle::GetValue  )  [inline]
 

Definition at line 34 of file toggle.h.

References value.

bool Toggle::MouseOver float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 122 of file toggle.cpp.

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

string Toggle::MousePress float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 133 of file toggle.cpp.

References down.

string Toggle::MouseRelease float  x,
float  y
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 139 of file toggle.cpp.

References down.

void Toggle::Press  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 145 of file toggle.cpp.

References down.

void Toggle::Release  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 150 of file toggle.cpp.

References down.

void Toggle::ResetValue  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 115 of file toggle.cpp.

References SETTINGS::Get(), setting, settings, and SetValue().

void Toggle::Save  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 109 of file toggle.cpp.

References default_value, SETTINGS::Set(), setting, settings, and value.

void VGUI::Toggle::SetDefaultValue bool  new_value  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 40 of file toggle.h.

References default_value.

void VGUI::Toggle::SetFalseText string  txt  )  [inline]
 

Definition at line 42 of file toggle.h.

References false_txt.

void VGUI::Toggle::SetSetting string  new_setting  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 43 of file toggle.h.

References setting.

void Toggle::SetSpacing float  new_spacing  ) 
 

Definition at line 57 of file toggle.cpp.

References VGUI::Widget::rel_width, spacing, tex_width, and VGUI::Widget::width_auto.

void VGUI::Toggle::SetTrueText string  txt  )  [inline]
 

Definition at line 41 of file toggle.h.

References true_txt.

void VGUI::Toggle::SetValue bool  new_value  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 39 of file toggle.h.

References value.

Referenced by ResetValue().

void VGUI::Toggle::TogValue void   )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 45 of file toggle.h.

References value.


Member Data Documentation

bool VGUI::Toggle::default_value [private]
 

Definition at line 13 of file toggle.h.

Referenced by GetDefaultValue(), Save(), SetDefaultValue(), and Toggle().

bool VGUI::Toggle::down [private]
 

Definition at line 18 of file toggle.h.

Referenced by Draw(), MousePress(), MouseRelease(), Press(), Release(), and Toggle().

string VGUI::Toggle::false_txt [private]
 

Definition at line 16 of file toggle.h.

Referenced by Draw(), GetFalseText(), and SetFalseText().

TEXTURE_HANDLE VGUI::Toggle::off_down [private]
 

Definition at line 12 of file toggle.h.

Referenced by Draw(), and Toggle().

TEXTURE_HANDLE VGUI::Toggle::off_up [private]
 

Definition at line 12 of file toggle.h.

Referenced by Draw(), and Toggle().

TEXTURE_HANDLE VGUI::Toggle::on_down [private]
 

Definition at line 12 of file toggle.h.

Referenced by Draw(), and Toggle().

TEXTURE_HANDLE VGUI::Toggle::on_up [private]
 

Definition at line 12 of file toggle.h.

Referenced by Draw(), and Toggle().

string VGUI::Toggle::setting [private]
 

Definition at line 14 of file toggle.h.

Referenced by ResetValue(), Save(), SetSetting(), and Toggle().

float VGUI::Toggle::spacing [private]
 

Definition at line 17 of file toggle.h.

Referenced by Draw(), GetSpacing(), SetSpacing(), and Toggle().

float VGUI::Toggle::tex_height [private]
 

Definition at line 17 of file toggle.h.

Referenced by Toggle().

float VGUI::Toggle::tex_width [private]
 

Definition at line 17 of file toggle.h.

Referenced by Draw(), SetSpacing(), and Toggle().

string VGUI::Toggle::true_txt [private]
 

Definition at line 15 of file toggle.h.

Referenced by Draw(), GetTrueText(), and SetTrueText().

bool VGUI::Toggle::value [private]
 

Definition at line 13 of file toggle.h.

Referenced by Draw(), GetValue(), Save(), SetValue(), Toggle(), and TogValue().


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