VGUI::TextBox Class Reference

#include <textbox.h>

Inheritance diagram for VGUI::TextBox:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TextBox ()
 TextBox (Widget *w)
 ~TextBox ()
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 ()
void IncValuePress ()
void DecValuePress ()
void BackspacePress ()
void DeletePress ()
void IncValueRelease ()
void DecValueRelease ()
void BackspaceRelease ()
void DeleteRelease ()
void Release ()
void EnterText (SDLKey key)
string GetValue ()
string GetSetting ()
float GetSpacing ()
string GetAccepts ()
void SetValue (string new_value)
void SetSetting (string new_setting)
void SetSpacing (float new_spacing)
void SetAccepts (string new_accepts)

Private Attributes

TEXTURE_HANDLE textbox_tex
TEXTURE_HANDLE cursor_tex
TEXTURE_HANDLE highlight_tex
bool l_down
bool r_down
bool bkspc_down
bool del_down
bool mbtn_down
bool cursor_on
string value
string setting
string accepts
float spacing
float tex_width
float tex_height
string::size_type cursor_pos
string::size_type highlight_start
string::size_type highlight_end
Uint32 last_blink

Detailed Description

Definition at line 9 of file textbox.h.


Constructor & Destructor Documentation

VGUI::TextBox::TextBox  ) 
 

TextBox::TextBox Widget w  ) 
 

Definition at line 6 of file textbox.cpp.

References accepts, bkspc_down, VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, cursor_on, cursor_pos, cursor_tex, del_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, highlight_end, highlight_start, highlight_tex, VGUI::Widget::is_cancel, VGUI::Widget::is_default, l_down, TEXTURE_HANDLE::Load(), mbtn_down, VGUI::Widget::name, r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, setting, settings, spacing, tex_height, tex_width, VGUI::Widget::text, textbox_tex, VGUI::Widget::tip, VGUI::Widget::type, FONT::Width(), and VGUI::Widget::width_auto.

TextBox::~TextBox  ) 
 

Definition at line 55 of file textbox.cpp.


Member Function Documentation

void TextBox::BackspacePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 190 of file textbox.cpp.

References bkspc_down, and Release().

void TextBox::BackspaceRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 196 of file textbox.cpp.

References bkspc_down, cursor_pos, Release(), and value.

void TextBox::DecValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 175 of file textbox.cpp.

References l_down, and Release().

void TextBox::DecValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 181 of file textbox.cpp.

References cursor_pos, l_down, and Release().

void TextBox::DeletePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 206 of file textbox.cpp.

References del_down, and Release().

void TextBox::DeleteRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 212 of file textbox.cpp.

References cursor_pos, del_down, Release(), and value.

void TextBox::Draw float  opacity  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 85 of file textbox.cpp.

References VGUI::Widget::center, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, cursor_on, cursor_pos, cursor_tex, UTILITY::Draw2D(), UTILITY::DrawButton(), VGUI::Widget::enabled, font, VGUI::Widget::font_size, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), FONT::Height(), last_blink, FONT::Print(), VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, spacing, tex_width, VGUI::Widget::text, textbox_tex, VGUI::Widget::tip, utility, value, and FONT::Width().

void TextBox::Draw  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 80 of file textbox.cpp.

void TextBox::EnterText SDLKey  key  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 226 of file textbox.cpp.

References accepts, cursor_pos, and value.

string VGUI::TextBox::GetAccepts  )  [inline]
 

Definition at line 45 of file textbox.h.

References accepts.

string VGUI::TextBox::GetSetting  )  [inline]
 

Definition at line 43 of file textbox.h.

References setting.

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

Definition at line 44 of file textbox.h.

References spacing.

string VGUI::TextBox::GetValue  )  [inline]
 

Definition at line 42 of file textbox.h.

References value.

void TextBox::IncValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 160 of file textbox.cpp.

References r_down, and Release().

void TextBox::IncValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 166 of file textbox.cpp.

References cursor_pos, r_down, Release(), and value.

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

Reimplemented from VGUI::Widget.

Definition at line 252 of file textbox.cpp.

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

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

Reimplemented from VGUI::Widget.

Definition at line 315 of file textbox.cpp.

References VGUI::Widget::center, cursor_pos, font, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), highlight_start, mbtn_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, spacing, value, and FONT::Width().

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

Reimplemented from VGUI::Widget.

Definition at line 380 of file textbox.cpp.

References VGUI::Widget::center, cursor_pos, font, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), highlight_end, highlight_start, mbtn_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, spacing, value, and FONT::Width().

void TextBox::Release  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 221 of file textbox.cpp.

References bkspc_down, del_down, l_down, and r_down.

Referenced by BackspacePress(), BackspaceRelease(), DecValuePress(), DecValueRelease(), DeletePress(), DeleteRelease(), IncValuePress(), and IncValueRelease().

void TextBox::ResetValue  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 73 of file textbox.cpp.

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

void TextBox::Save  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 68 of file textbox.cpp.

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

void VGUI::TextBox::SetAccepts string  new_accepts  )  [inline]
 

Definition at line 49 of file textbox.h.

References accepts.

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

Reimplemented from VGUI::Widget.

Definition at line 47 of file textbox.h.

References setting.

void TextBox::SetSpacing float  new_spacing  ) 
 

Definition at line 59 of file textbox.cpp.

References font, VGUI::Widget::rel_width, spacing, FONT::Width(), and VGUI::Widget::width_auto.

void VGUI::TextBox::SetValue string  new_value  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 46 of file textbox.h.

References value.

Referenced by ResetValue().


Member Data Documentation

string VGUI::TextBox::accepts [private]
 

Definition at line 14 of file textbox.h.

Referenced by EnterText(), GetAccepts(), SetAccepts(), and TextBox().

bool VGUI::TextBox::bkspc_down [private]
 

Definition at line 13 of file textbox.h.

Referenced by BackspacePress(), BackspaceRelease(), Release(), and TextBox().

bool VGUI::TextBox::cursor_on [private]
 

Definition at line 13 of file textbox.h.

Referenced by Draw(), and TextBox().

string::size_type VGUI::TextBox::cursor_pos [private]
 

Definition at line 16 of file textbox.h.

Referenced by BackspaceRelease(), DecValueRelease(), DeleteRelease(), Draw(), EnterText(), IncValueRelease(), MousePress(), MouseRelease(), and TextBox().

TEXTURE_HANDLE VGUI::TextBox::cursor_tex [private]
 

Definition at line 12 of file textbox.h.

Referenced by Draw(), and TextBox().

bool VGUI::TextBox::del_down [private]
 

Definition at line 13 of file textbox.h.

Referenced by DeletePress(), DeleteRelease(), Release(), and TextBox().

string::size_type VGUI::TextBox::highlight_end [private]
 

Definition at line 16 of file textbox.h.

Referenced by MouseRelease(), and TextBox().

string::size_type VGUI::TextBox::highlight_start [private]
 

Definition at line 16 of file textbox.h.

Referenced by MousePress(), MouseRelease(), and TextBox().

TEXTURE_HANDLE VGUI::TextBox::highlight_tex [private]
 

Definition at line 12 of file textbox.h.

Referenced by TextBox().

bool VGUI::TextBox::l_down [private]
 

Definition at line 13 of file textbox.h.

Referenced by DecValuePress(), DecValueRelease(), Release(), and TextBox().

Uint32 VGUI::TextBox::last_blink [private]
 

Definition at line 17 of file textbox.h.

Referenced by Draw().

bool VGUI::TextBox::mbtn_down [private]
 

Definition at line 13 of file textbox.h.

Referenced by MousePress(), MouseRelease(), and TextBox().

bool VGUI::TextBox::r_down [private]
 

Definition at line 13 of file textbox.h.

Referenced by IncValuePress(), IncValueRelease(), Release(), and TextBox().

string VGUI::TextBox::setting [private]
 

Definition at line 14 of file textbox.h.

Referenced by GetSetting(), ResetValue(), Save(), SetSetting(), and TextBox().

float VGUI::TextBox::spacing [private]
 

Definition at line 15 of file textbox.h.

Referenced by Draw(), GetSpacing(), MousePress(), MouseRelease(), SetSpacing(), and TextBox().

float VGUI::TextBox::tex_height [private]
 

Definition at line 15 of file textbox.h.

Referenced by TextBox().

float VGUI::TextBox::tex_width [private]
 

Definition at line 15 of file textbox.h.

Referenced by Draw(), and TextBox().

TEXTURE_HANDLE VGUI::TextBox::textbox_tex [private]
 

Definition at line 12 of file textbox.h.

Referenced by Draw(), and TextBox().

string VGUI::TextBox::value [private]
 

Definition at line 14 of file textbox.h.

Referenced by BackspaceRelease(), DeleteRelease(), Draw(), EnterText(), GetValue(), IncValueRelease(), MousePress(), MouseRelease(), Save(), and SetValue().


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