Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_SpinnerBox Class Reference

PG_SpinnerBox creates a textbox with attached increase/decrease buttons to control the numeric value. More...

#include <pgspinnerbox.h>

Inheritance diagram for PG_SpinnerBox:

Inheritance graph
[legend]
List of all members.

Public Types

enum  { IDSPINNERBOX_UP = PG_WIDGETID_INTERNAL + 12, IDSPINNERBOX_DOWN = PG_WIDGETID_INTERNAL + 13 }

Public Member Functions

 PG_SpinnerBox (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &style="SpinnerBox")
void SetValue (int value)
void SetMinValue (int value)
void SetMaxValue (int value)
void SetMask (const std::string &value)
int GetValue ()
int GetMinValue ()
int GetMaxValue ()
const PG_String & GetMask ()

Public Attributes

SignalChange< int > sigChange

Protected Member Functions

bool handleButtonClick (PG_Button *button)
bool handleEditEnd (PG_LineEdit *edit)

Classes

class  SignalChange
 Signal type declaration. More...

Detailed Description

PG_SpinnerBox creates a textbox with attached increase/decrease buttons to control the numeric value.

Author:
Atani - Mike Dunston
PG_SpinnerBox creates a textbox with attached increase/decrease buttons to control the numeric value. Many convenience methods are available... SetValue, SetMinValue, SetMaxValue, SetMask GetValue, GetMinValue, GetMaxValue, GetMask

Registerable Events:

MSG_SPINNER_CHANGE -

Fired when the user clicks either up or down on the spinner buttons. Currently typed modifications are not populated to the value. This will be added soon. Note: using SetValue above will fire this event.

Definition at line 61 of file pgspinnerbox.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
IDSPINNERBOX_UP 
IDSPINNERBOX_DOWN 

Definition at line 71 of file pgspinnerbox.h.


Constructor & Destructor Documentation

PG_SpinnerBox::PG_SpinnerBox PG_Widget parent,
const PG_Rect r = PG_Rect::null,
const std::string &  style = "SpinnerBox"
 

Author:
Atani - Mike Dunston

Definition at line 38 of file pgspinnerbox.cpp.

References handleButtonClick(), handleEditEnd(), IDSPINNERBOX_DOWN, IDSPINNERBOX_UP, PG_Button::LoadThemeStyle(), PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, PG_Widget::SetID(), SetMask(), PG_Rect::SetRect(), PG_MaskEdit::SetText(), PG_LineEdit::SetValidKeys(), PG_Button::sigClick, PG_LineEdit::sigEditEnd, and PG_Widget::SizeWidget().


Member Function Documentation

const PG_String& PG_SpinnerBox::GetMask  )  [inline]
 

Definition at line 102 of file pgspinnerbox.h.

int PG_SpinnerBox::GetMaxValue  )  [inline]
 

Definition at line 99 of file pgspinnerbox.h.

int PG_SpinnerBox::GetMinValue  )  [inline]
 

Definition at line 96 of file pgspinnerbox.h.

int PG_SpinnerBox::GetValue  )  [inline]
 

Definition at line 93 of file pgspinnerbox.h.

bool PG_SpinnerBox::handleButtonClick PG_Button button  )  [protected]
 

Definition at line 74 of file pgspinnerbox.cpp.

References PG_Widget::GetID(), IDSPINNERBOX_DOWN, and IDSPINNERBOX_UP.

Referenced by PG_SpinnerBox().

bool PG_SpinnerBox::handleEditEnd PG_LineEdit edit  )  [protected]
 

Definition at line 121 of file pgspinnerbox.cpp.

References atoi(), and PG_Widget::GetText().

Referenced by PG_SpinnerBox().

void PG_SpinnerBox::SetMask const std::string &  value  ) 
 

Definition at line 138 of file pgspinnerbox.cpp.

References PG_MaskEdit::SetMask().

Referenced by PG_SpinnerBox(), and SetSpinnerBoxAtts().

void PG_SpinnerBox::SetMaxValue int  value  )  [inline]
 

Definition at line 87 of file pgspinnerbox.h.

Referenced by SetSpinnerBoxAtts().

void PG_SpinnerBox::SetMinValue int  value  )  [inline]
 

Definition at line 84 of file pgspinnerbox.h.

Referenced by SetSpinnerBoxAtts().

void PG_SpinnerBox::SetValue int  value  )  [inline]
 

Definition at line 80 of file pgspinnerbox.h.

Referenced by SetSpinnerBoxAtts().


Member Data Documentation

SignalChange<int> PG_SpinnerBox::sigChange
 

Definition at line 106 of file pgspinnerbox.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:19:35 2008 for Advanced Strategic Command by  doxygen 1.4.2