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

PG_MaskEdit Class Reference

#include <pgmaskedit.h>

Inheritance diagram for PG_MaskEdit:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_MaskEdit (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &style="LineEdit")
void SetText (const std::string &new_text)
 Set the text of the maskedit control.
void SetMask (const std::string &mask)
 Set the valid input mask.
const PG_String & GetMask ()
 Get current input mask.
void SetSpacer (const PG_Char &c)
 Set the "spacer" character.
PG_Char GetSpacer ()
 Get the current "spacer" character.

Protected Member Functions

bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
void InsertChar (const PG_Char &c)
void DeleteChar (Uint16 pos)

Constructor & Destructor Documentation

PG_MaskEdit::PG_MaskEdit PG_Widget parent,
const PG_Rect r = PG_Rect::null,
const std::string &  style = "LineEdit"
 

Definition at line 33 of file pgmaskedit.cpp.


Member Function Documentation

void PG_MaskEdit::DeleteChar Uint16  pos  )  [protected, virtual]
 

Reimplemented from PG_LineEdit.

Definition at line 102 of file pgmaskedit.cpp.

References PG_Widget::my_text.

bool PG_MaskEdit::eventMouseButtonDown const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 108 of file pgmaskedit.cpp.

References PG_MessageObject::eventMouseButtonDown(), PG_LineEdit::my_cursorPosition, PG_Widget::my_text, and PG_LineEdit::SetCursorPos().

const PG_String & PG_MaskEdit::GetMask  ) 
 

Get current input mask.

Returns:
input mask

Definition at line 66 of file pgmaskedit.cpp.

PG_Char PG_MaskEdit::GetSpacer  ) 
 

Get the current "spacer" character.

Returns:
"spacer" character

Definition at line 74 of file pgmaskedit.cpp.

void PG_MaskEdit::InsertChar const PG_Char &  c  )  [protected, virtual]
 

Reimplemented from PG_LineEdit.

Definition at line 78 of file pgmaskedit.cpp.

References PG_LineEdit::my_cursorPosition, PG_Widget::my_text, and PG_LineEdit::SetCursorPos().

Referenced by SetText().

void PG_MaskEdit::SetMask const std::string &  mask  ) 
 

Set the valid input mask.

Parameters:
mask input mask (e.g. ##.##.####)

Definition at line 53 of file pgmaskedit.cpp.

References PG_LineEdit::SetText().

Referenced by PG_SpinnerBox::SetMask(), and SetMaskEditAtts().

void PG_MaskEdit::SetSpacer const PG_Char &  c  ) 
 

Set the "spacer" character.

This char is displayed instead of "#"

Parameters:
c "spacer" character

Definition at line 70 of file pgmaskedit.cpp.

Referenced by SetMaskEditAtts().

void PG_MaskEdit::SetText const std::string &  new_text  )  [virtual]
 

Set the text of the maskedit control.

The new text is merged with the current mask

Parameters:
new_text pointer to new text string

Reimplemented from PG_LineEdit.

Definition at line 37 of file pgmaskedit.cpp.

References InsertChar(), PG_LineEdit::SetCursorPos(), and PG_LineEdit::SetText().

Referenced by PG_SpinnerBox::PG_SpinnerBox().


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