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

PG_MaskEdit Class Reference

Inheritance diagram for PG_MaskEdit:

Inheritance graph
[legend]
Collaboration diagram for PG_MaskEdit:

Collaboration graph
[legend]
List of all members.

Detailed Description

Examples:

paratest.cpp.


Public Member Functions

 PG_MaskEdit (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const char *style="LineEdit")
void SetText (const char *new_text)
 Set the text of the maskedit control.

void SetMask (const char *mask)
 Set the valid input mask.

const char * GetMask ()
 Get current input mask.

void SetSpacer (char c)
 Set the "spacer" character.

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 char *c)
void DeleteChar (Uint16 pos)


Constructor & Destructor Documentation

PG_MaskEdit::PG_MaskEdit PG_Widget parent,
const PG_Rect r = PG_Rect::null,
const char *  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 char* PG_MaskEdit::GetMask  ) 
 

Get current input mask.

Returns:
input mask

char PG_MaskEdit::GetSpacer  ) 
 

Get the current "spacer" character.

Returns:
"spacer" character

void PG_MaskEdit::InsertChar const char *  c  )  [protected, virtual]
 

Reimplemented from PG_LineEdit.

void PG_MaskEdit::SetMask const char *  mask  ) 
 

Set the valid input mask.

Parameters:
mask input mask (e.g. ##.##.####)
Examples:
paratest.cpp.

void PG_MaskEdit::SetSpacer char  c  ) 
 

Set the "spacer" character.

This char is displayed instead of "#"

Parameters:
c "spacer" character

void PG_MaskEdit::SetText const char *  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.



The ParaGUI Project - Alexander Pipelka