VGUI::Button Class Reference

#include <button.h>

Inheritance diagram for VGUI::Button:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Button ()
 Button (Widget *w)
 ~Button ()
void Draw ()
void Draw (float opacity)
bool MouseOver (float x, float y)
string MousePress (float x, float y)
string MouseRelease (float x, float y)
void Press ()
void Release ()
string GetAction ()
void SetAction (string new_action)

Private Attributes

TEXTURE_HANDLE btn_up
TEXTURE_HANDLE btn_down
string action
float tex_width
float tex_height
bool down

Detailed Description

Definition at line 9 of file button.h.


Constructor & Destructor Documentation

VGUI::Button::Button  )  [inline]
 

Definition at line 12 of file button.h.

Button::Button Widget w  ) 
 

Definition at line 6 of file button.cpp.

References action, btn_down, btn_up, VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, down, VGUI::Widget::enabled, font, 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, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, settings, tex_height, tex_width, VGUI::Widget::text, VGUI::Widget::tip, VGUI::Widget::type, FONT::Width(), and VGUI::Widget::width_auto.

Button::~Button  ) 
 

Definition at line 49 of file button.cpp.


Member Function Documentation

void Button::Draw float  opacity  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 58 of file button.cpp.

References btn_down, btn_up, VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, down, UTILITY::DrawButton(), VGUI::Widget::enabled, font, VGUI::Widget::font_size, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), FONT::Height(), FONT::Print(), VGUI::Widget::rel_height, VGUI::Widget::selected, VGUI::Widget::text, VGUI::Widget::tip, utility, and FONT::Width().

void Button::Draw  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 53 of file button.cpp.

string VGUI::Button::GetAction void   )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 23 of file button.h.

References action.

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

Reimplemented from VGUI::Widget.

Definition at line 87 of file button.cpp.

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

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

Reimplemented from VGUI::Widget.

Definition at line 98 of file button.cpp.

References down.

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

Reimplemented from VGUI::Widget.

Definition at line 104 of file button.cpp.

References down.

void Button::Press  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 110 of file button.cpp.

References down.

void Button::Release  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 115 of file button.cpp.

References down.

void VGUI::Button::SetAction string  new_action  )  [inline]
 

Definition at line 24 of file button.h.

References action.


Member Data Documentation

string VGUI::Button::action [private]
 

Definition at line 28 of file button.h.

Referenced by Button(), GetAction(), and SetAction().

TEXTURE_HANDLE VGUI::Button::btn_down [private]
 

Definition at line 27 of file button.h.

Referenced by Button(), and Draw().

TEXTURE_HANDLE VGUI::Button::btn_up [private]
 

Definition at line 27 of file button.h.

Referenced by Button(), and Draw().

bool VGUI::Button::down [private]
 

Definition at line 30 of file button.h.

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

float VGUI::Button::tex_height [private]
 

Definition at line 29 of file button.h.

Referenced by Button().

float VGUI::Button::tex_width [private]
 

Definition at line 29 of file button.h.

Referenced by Button().


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