VGUI::ControlGrab Class Reference

#include <controlgrab.h>

Inheritance diagram for VGUI::ControlGrab:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ControlGrab ()
 ControlGrab (Widget *w)
 ~ControlGrab ()
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 IncValueRelease ()
void DecValueRelease ()
void Press ()
void Release ()
void GrabKey (SDLKey key)
void GrabMouseMovement (string direction)
void GrabMouseButton (int button_idx)
void GrabJoyButton (Uint8 joy_idx, Uint8 joy_btn)
void GrabJoyMove (Uint8 joy_idx, Uint8 joy_axis, bool joy_positive, float joy_value)
void SelectIcon (unsigned int new_selected_icon)
string GetSetting ()
float GetSpacing ()
bool GetAdding ()
bool GetAnalog ()
bool GetOnlyOne ()
void SetSetting (string new_setting)
void SetSpacing (float new_spacing)
void SetAnalog (bool new_analog)
void SetOnlyOne (bool new_only_one)

Private Member Functions

void BuildControlVectors ()

Private Attributes

TEXTURE_HANDLE add_tex
TEXTURE_HANDLE add_tex_sel
TEXTURE_HANDLE key_tex
TEXTURE_HANDLE joy_axis_tex
TEXTURE_HANDLE joy_btn_tex
TEXTURE_HANDLE mouse_btn_tex
TEXTURE_HANDLE mouse_move_tex
TEXTURE_HANDLE key_tex_x
TEXTURE_HANDLE joy_axis_tex_x
TEXTURE_HANDLE joy_btn_tex_x
TEXTURE_HANDLE mouse_btn_tex_x
TEXTURE_HANDLE mouse_move_tex_x
bool l_down
bool r_down
bool mbtn_down
bool adding
bool pressed
bool analog
string setting
float spacing
vector< ControlSetlocal_controls
unsigned int selected_icon
unsigned int pressed_icon
unsigned int clicked_icon
Uint32 add_start
bool only_one

Detailed Description

Definition at line 31 of file controlgrab.h.


Constructor & Destructor Documentation

VGUI::ControlGrab::ControlGrab  ) 
 

ControlGrab::ControlGrab Widget w  ) 
 

Definition at line 8 of file controlgrab.cpp.

References add_tex, add_tex_sel, adding, analog, VGUI::Widget::center, clicked_icon, VGUI::Widget::color_b, VGUI::Widget::color_g, VGUI::Widget::color_r, 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, joy_axis_tex, joy_axis_tex_x, joy_btn_tex, joy_btn_tex_x, key_tex, key_tex_x, l_down, TEXTURE_HANDLE::Load(), mbtn_down, mouse_btn_tex, mouse_btn_tex_x, mouse_move_tex, mouse_move_tex_x, VGUI::Widget::name, only_one, pressed_icon, r_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, VGUI::Widget::selected, selected_icon, setting, settings, spacing, VGUI::Widget::text, VGUI::Widget::tip, VGUI::Widget::type, and VGUI::Widget::width_auto.

ControlGrab::~ControlGrab  ) 
 

Definition at line 66 of file controlgrab.cpp.


Member Function Documentation

void ControlGrab::BuildControlVectors  )  [private]
 

Definition at line 70 of file controlgrab.cpp.

References Axis, GAMECONTROLS::ControlIteratorGetControl(), GAMECONTROLS::ControlIteratorIncrement(), GAMECONTROLS::ControlIteratorReset(), gamecontrols, CONTROL::GetJoyAxis(), CONTROL::GetJoyAxisType(), CONTROL::GetJoyNum(), CONTROL::GetJoyType(), CONTROL::GetName(), CONTROL::GetType(), Joy, key_tex, key_tex_x, local_controls, NULL, Positive, CONTROL::SetJoyAxis(), CONTROL::SetJoyAxisType(), CONTROL::SetJoyNum(), CONTROL::SetJoyType(), CONTROL::SetName(), setting, and CONTROL::SetType().

Referenced by ResetValue(), and SetSetting().

void ControlGrab::DecValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 387 of file controlgrab.cpp.

References l_down, and Release().

void ControlGrab::DecValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 393 of file controlgrab.cpp.

References l_down, local_controls, and selected_icon.

void ControlGrab::Draw float  opacity  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 291 of file controlgrab.cpp.

References add_tex, add_tex_sel, VGUI::Widget::center, UTILITY::DrawButton(), VGUI::Widget::enabled, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), local_controls, VGUI::Widget::rel_width, VGUI::Widget::selected, selected_icon, spacing, and utility.

void ControlGrab::Draw  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 286 of file controlgrab.cpp.

bool VGUI::ControlGrab::GetAdding  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 75 of file controlgrab.h.

References adding.

bool VGUI::ControlGrab::GetAnalog  )  [inline]
 

Definition at line 76 of file controlgrab.h.

References analog.

bool VGUI::ControlGrab::GetOnlyOne  )  [inline]
 

Definition at line 77 of file controlgrab.h.

References only_one.

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

Definition at line 73 of file controlgrab.h.

References setting.

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

Definition at line 74 of file controlgrab.h.

References spacing.

void ControlGrab::GrabJoyButton Uint8  joy_idx,
Uint8  joy_btn
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 520 of file controlgrab.cpp.

References analog, joy_btn_tex, joy_btn_tex_x, local_controls, only_one, VGUI::ControlSet::SetControl(), CONTROL::SetJoyButton(), CONTROL::SetJoyNum(), CONTROL::SetJoyPushDown(), CONTROL::SetJoyType(), VGUI::ControlSet::SetName(), CONTROL::SetName(), CONTROL::SetOneTime(), VGUI::ControlSet::SetTex(), VGUI::ControlSet::SetTexX(), setting, and CONTROL::SetType().

void ControlGrab::GrabJoyMove Uint8  joy_idx,
Uint8  joy_axis,
bool  joy_positive,
float  joy_value
[virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 551 of file controlgrab.cpp.

References joy_axis_tex, joy_axis_tex_x, local_controls, Negative, only_one, Positive, VGUI::ControlSet::SetControl(), CONTROL::SetJoyAxis(), CONTROL::SetJoyAxisType(), CONTROL::SetJoyNum(), CONTROL::SetJoyType(), VGUI::ControlSet::SetName(), CONTROL::SetName(), VGUI::ControlSet::SetTex(), VGUI::ControlSet::SetTexX(), setting, and CONTROL::SetType().

void ControlGrab::GrabKey SDLKey  key  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 430 of file controlgrab.cpp.

References analog, KEYMAN::GetKeyName(), key_tex, key_tex_x, keyman, local_controls, only_one, VGUI::ControlSet::SetControl(), CONTROL::SetKeyCode(), CONTROL::SetKeyPushDown(), VGUI::ControlSet::SetName(), CONTROL::SetName(), CONTROL::SetOneTime(), VGUI::ControlSet::SetTex(), VGUI::ControlSet::SetTexX(), setting, and CONTROL::SetType().

void ControlGrab::GrabMouseButton int  button_idx  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 477 of file controlgrab.cpp.

References analog, local_controls, mouse_btn_tex, mouse_btn_tex_x, only_one, VGUI::ControlSet::SetControl(), CONTROL::SetMouseButton(), CONTROL::SetMousePushDown(), CONTROL::SetMouseType(), VGUI::ControlSet::SetName(), CONTROL::SetName(), CONTROL::SetOneTime(), VGUI::ControlSet::SetTex(), VGUI::ControlSet::SetTexX(), setting, and CONTROL::SetType().

void ControlGrab::GrabMouseMovement string  direction  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 458 of file controlgrab.cpp.

References local_controls, mouse_move_tex, mouse_move_tex_x, only_one, VGUI::ControlSet::SetControl(), CONTROL::SetMouseDirection(), CONTROL::SetMouseType(), VGUI::ControlSet::SetName(), CONTROL::SetName(), VGUI::ControlSet::SetTex(), VGUI::ControlSet::SetTexX(), setting, and CONTROL::SetType().

void ControlGrab::IncValuePress  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 368 of file controlgrab.cpp.

References r_down, and Release().

void ControlGrab::IncValueRelease  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 374 of file controlgrab.cpp.

References local_controls, r_down, Release(), and selected_icon.

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

Reimplemented from VGUI::Widget.

Definition at line 588 of file controlgrab.cpp.

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

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

Reimplemented from VGUI::Widget.

Definition at line 621 of file controlgrab.cpp.

References VGUI::Widget::center, clicked_icon, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), local_controls, mbtn_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, and spacing.

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

Reimplemented from VGUI::Widget.

Definition at line 653 of file controlgrab.cpp.

References add_start, VGUI::Widget::center, clicked_icon, VGUI::Location::GetXPercent(), VGUI::Location::GetYPercent(), local_controls, mbtn_down, VGUI::Widget::rel_height, VGUI::Widget::rel_width, selected_icon, and spacing.

void ControlGrab::Press  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 406 of file controlgrab.cpp.

References pressed, pressed_icon, and selected_icon.

void ControlGrab::Release  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 412 of file controlgrab.cpp.

References add_start, local_controls, pressed, pressed_icon, and selected_icon.

Referenced by DecValuePress(), IncValuePress(), and IncValueRelease().

void ControlGrab::ResetValue  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 281 of file controlgrab.cpp.

References BuildControlVectors().

void ControlGrab::Save  )  [virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 271 of file controlgrab.cpp.

References GAMECONTROLS::AddControl(), GAMECONTROLS::DeleteControlsWithAction(), gamecontrols, local_controls, and setting.

void VGUI::ControlGrab::SelectIcon unsigned int  new_selected_icon  )  [inline, virtual]
 

Reimplemented from VGUI::Widget.

Definition at line 71 of file controlgrab.h.

References selected_icon.

void VGUI::ControlGrab::SetAnalog bool  new_analog  )  [inline]
 

Definition at line 80 of file controlgrab.h.

References analog.

void VGUI::ControlGrab::SetOnlyOne bool  new_only_one  )  [inline]
 

Definition at line 81 of file controlgrab.h.

References only_one.

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

Reimplemented from VGUI::Widget.

Definition at line 78 of file controlgrab.h.

References BuildControlVectors(), and setting.

void ControlGrab::SetSpacing float  new_spacing  ) 
 

Definition at line 262 of file controlgrab.cpp.

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


Member Data Documentation

Uint32 VGUI::ControlGrab::add_start [private]
 

Definition at line 45 of file controlgrab.h.

Referenced by MouseRelease(), and Release().

TEXTURE_HANDLE VGUI::ControlGrab::add_tex [private]
 

Definition at line 36 of file controlgrab.h.

Referenced by ControlGrab(), and Draw().

TEXTURE_HANDLE VGUI::ControlGrab::add_tex_sel [private]
 

Definition at line 36 of file controlgrab.h.

Referenced by ControlGrab(), and Draw().

bool VGUI::ControlGrab::adding [private]
 

Definition at line 39 of file controlgrab.h.

Referenced by ControlGrab(), and GetAdding().

bool VGUI::ControlGrab::analog [private]
 

Definition at line 40 of file controlgrab.h.

Referenced by ControlGrab(), GetAnalog(), GrabJoyButton(), GrabKey(), GrabMouseButton(), and SetAnalog().

unsigned int VGUI::ControlGrab::clicked_icon [private]
 

Definition at line 44 of file controlgrab.h.

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

TEXTURE_HANDLE VGUI::ControlGrab::joy_axis_tex [private]
 

Definition at line 37 of file controlgrab.h.

Referenced by ControlGrab(), and GrabJoyMove().

TEXTURE_HANDLE VGUI::ControlGrab::joy_axis_tex_x [private]
 

Definition at line 38 of file controlgrab.h.

Referenced by ControlGrab(), and GrabJoyMove().

TEXTURE_HANDLE VGUI::ControlGrab::joy_btn_tex [private]
 

Definition at line 37 of file controlgrab.h.

Referenced by ControlGrab(), and GrabJoyButton().

TEXTURE_HANDLE VGUI::ControlGrab::joy_btn_tex_x [private]
 

Definition at line 38 of file controlgrab.h.

Referenced by ControlGrab(), and GrabJoyButton().

TEXTURE_HANDLE VGUI::ControlGrab::key_tex [private]
 

Definition at line 37 of file controlgrab.h.

Referenced by BuildControlVectors(), ControlGrab(), and GrabKey().

TEXTURE_HANDLE VGUI::ControlGrab::key_tex_x [private]
 

Definition at line 38 of file controlgrab.h.

Referenced by BuildControlVectors(), ControlGrab(), and GrabKey().

bool VGUI::ControlGrab::l_down [private]
 

Definition at line 39 of file controlgrab.h.

Referenced by ControlGrab(), DecValuePress(), and DecValueRelease().

vector<ControlSet> VGUI::ControlGrab::local_controls [private]
 

Definition at line 43 of file controlgrab.h.

Referenced by BuildControlVectors(), DecValueRelease(), Draw(), GrabJoyButton(), GrabJoyMove(), GrabKey(), GrabMouseButton(), GrabMouseMovement(), IncValueRelease(), MouseOver(), MousePress(), MouseRelease(), Release(), and Save().

bool VGUI::ControlGrab::mbtn_down [private]
 

Definition at line 39 of file controlgrab.h.

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

TEXTURE_HANDLE VGUI::ControlGrab::mouse_btn_tex [private]
 

Definition at line 37 of file controlgrab.h.

Referenced by ControlGrab(), and GrabMouseButton().

TEXTURE_HANDLE VGUI::ControlGrab::mouse_btn_tex_x [private]
 

Definition at line 38 of file controlgrab.h.

Referenced by ControlGrab(), and GrabMouseButton().

TEXTURE_HANDLE VGUI::ControlGrab::mouse_move_tex [private]
 

Definition at line 37 of file controlgrab.h.

Referenced by ControlGrab(), and GrabMouseMovement().

TEXTURE_HANDLE VGUI::ControlGrab::mouse_move_tex_x [private]
 

Definition at line 38 of file controlgrab.h.

Referenced by ControlGrab(), and GrabMouseMovement().

bool VGUI::ControlGrab::only_one [private]
 

Definition at line 46 of file controlgrab.h.

Referenced by ControlGrab(), GetOnlyOne(), GrabJoyButton(), GrabJoyMove(), GrabKey(), GrabMouseButton(), GrabMouseMovement(), and SetOnlyOne().

bool VGUI::ControlGrab::pressed [private]
 

Definition at line 39 of file controlgrab.h.

Referenced by Press(), and Release().

unsigned int VGUI::ControlGrab::pressed_icon [private]
 

Definition at line 44 of file controlgrab.h.

Referenced by ControlGrab(), Press(), and Release().

bool VGUI::ControlGrab::r_down [private]
 

Definition at line 39 of file controlgrab.h.

Referenced by ControlGrab(), IncValuePress(), and IncValueRelease().

unsigned int VGUI::ControlGrab::selected_icon [private]
 

Definition at line 44 of file controlgrab.h.

Referenced by ControlGrab(), DecValueRelease(), Draw(), IncValueRelease(), MouseOver(), MouseRelease(), Press(), Release(), and SelectIcon().

string VGUI::ControlGrab::setting [private]
 

Definition at line 41 of file controlgrab.h.

Referenced by BuildControlVectors(), ControlGrab(), GetSetting(), GrabJoyButton(), GrabJoyMove(), GrabKey(), GrabMouseButton(), GrabMouseMovement(), Save(), and SetSetting().

float VGUI::ControlGrab::spacing [private]
 

Definition at line 42 of file controlgrab.h.

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


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