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

PG_MaskEdit Class Reference

Inheritance diagram for PG_MaskEdit:

Inheritance graph
[legend]
Collaboration diagram for PG_MaskEdit:

Collaboration 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"
 


Member Function Documentation

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

Reimplemented from PG_LineEdit.

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.

const PG_String& PG_MaskEdit::GetMask  ) 
 

Get current input mask.

Returns:
input mask

PG_Char PG_MaskEdit::GetSpacer  ) 
 

Get the current "spacer" character.

Returns:
"spacer" character

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

Reimplemented from PG_LineEdit.

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

Set the valid input mask.

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

void PG_MaskEdit::SetSpacer const PG_Char &  c  ) 
 

Set the "spacer" character.

This char is displayed instead of "#"

Parameters:
c "spacer" character

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.


Generated on Tue Jun 24 02:25:53 2008 for ParaGUI by  doxygen 1.4.2