Planeshift
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

pawsNumberPromptWindow Class Reference

pawsNumberPromptWindow is window that lets the user enter a number More...

#include <pawsnumberpromptwindow.h>

List of all members.

Public Member Functions

virtual void Close ()
 Simply calls Hide() unless overidden.
void Initialize (const csString &label, int number, int minNumber, int maxNumber, iOnNumberEnteredAction *action, const char *name, int param=0)
bool OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget)
 Called whenever a button is pressed.
virtual bool OnChange (pawsWidget *widget)
 Called whenever a widget is selected.
virtual bool OnScroll (int scrollDirection, pawsScrollBar *widget)
 Called whenever a window is scrolled.
 pawsNumberPromptWindow (const pawsNumberPromptWindow &origin)
 pawsNumberPromptWindow ()
virtual bool PostSetup ()
 Executed after the widget is setup.

Static Public Member Functions

static pawsNumberPromptWindowCreate (const csString &label, int number, int minNumber, int maxNumber, iOnNumberEnteredAction *action, const char *name, int param=0)

Protected Member Functions

void LayoutWindow ()
 Sets positions of widgets and size of whole window.
void NumberWasEntered (int count)
 This is called when the user enters final count (which is valid)
void SetBoundaries (int minNumber, int maxNumber)
bool TextIsValidForEditing (const csString &text)
 Will we allow user to enter 'text' during editation ?
bool TextIsValidForOutput (const csString &text)
 Will we allow user to return 'text' as the final result ? The difference is that TextIsValidForOutput() won't allow zero and empty string.

Protected Attributes

iOnNumberEnteredActionaction
pawsEditTextBoxeditBox
csString lastValidText
 This is last valid input from user - we use it to fall back from invalid input.
int maxDigits
int maxNumber
int minNumber
csString name
 The name of this widget.
int param
pawsScrollBarscrollBar

Detailed Description

pawsNumberPromptWindow is window that lets the user enter a number

Definition at line 46 of file pawsnumberpromptwindow.h.


Constructor & Destructor Documentation

pawsNumberPromptWindow::pawsNumberPromptWindow ( )
pawsNumberPromptWindow::pawsNumberPromptWindow ( const pawsNumberPromptWindow origin)

Member Function Documentation

virtual void pawsNumberPromptWindow::Close ( ) [virtual]

Simply calls Hide() unless overidden.

Reimplemented from pawsWidget.

static pawsNumberPromptWindow* pawsNumberPromptWindow::Create ( const csString &  label,
int  number,
int  minNumber,
int  maxNumber,
iOnNumberEnteredAction action,
const char *  name,
int  param = 0 
) [static]
void pawsNumberPromptWindow::Initialize ( const csString &  label,
int  number,
int  minNumber,
int  maxNumber,
iOnNumberEnteredAction action,
const char *  name,
int  param = 0 
)
void pawsNumberPromptWindow::LayoutWindow ( ) [protected, virtual]

Sets positions of widgets and size of whole window.

Reimplemented from pawsPromptWindow.

void pawsNumberPromptWindow::NumberWasEntered ( int  count) [protected]

This is called when the user enters final count (which is valid)

bool pawsNumberPromptWindow::OnButtonPressed ( int  button,
int  keyModifier,
pawsWidget widget 
) [virtual]

Called whenever a button is pressed.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsNumberPromptWindow::OnChange ( pawsWidget widget) [virtual]

Called whenever a widget is selected.

Parameters:
widgetThe widget acted upon.
Returns:
Notify parent and return result FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsNumberPromptWindow::OnScroll ( int  scrollDirection,
pawsScrollBar widget 
) [virtual]

Called whenever a window is scrolled.

Parameters:
scrollDirectionThe direction to move.
widgetThe scrollbar widget being manipulated.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsNumberPromptWindow::PostSetup ( ) [virtual]

Executed after the widget is setup.

Returns:
true

Reimplemented from pawsPromptWindow.

void pawsNumberPromptWindow::SetBoundaries ( int  minNumber,
int  maxNumber 
) [protected]
bool pawsNumberPromptWindow::TextIsValidForEditing ( const csString &  text) [protected]

Will we allow user to enter 'text' during editation ?

bool pawsNumberPromptWindow::TextIsValidForOutput ( const csString &  text) [protected]

Will we allow user to return 'text' as the final result ? The difference is that TextIsValidForOutput() won't allow zero and empty string.


Member Data Documentation

Definition at line 90 of file pawsnumberpromptwindow.h.

Definition at line 87 of file pawsnumberpromptwindow.h.

This is last valid input from user - we use it to fall back from invalid input.

Definition at line 85 of file pawsnumberpromptwindow.h.

Definition at line 82 of file pawsnumberpromptwindow.h.

Definition at line 81 of file pawsnumberpromptwindow.h.

Definition at line 81 of file pawsnumberpromptwindow.h.

csString pawsNumberPromptWindow::name [protected]

The name of this widget.

Reimplemented from pawsWidget.

Definition at line 91 of file pawsnumberpromptwindow.h.

Definition at line 92 of file pawsnumberpromptwindow.h.

Definition at line 88 of file pawsnumberpromptwindow.h.


The documentation for this class was generated from the following file: