IntTextField Class Reference

#include <inttextfield.h>

Inheritance diagram for IntTextField:

TextField

List of all members.


Detailed Description

TextBox which only accepts numbers as input.

Definition at line 30 of file inttextfield.h.


Public Member Functions

 IntTextField (int def=0)
 Constructor, sets default value.
void setRange (int minimum, int maximum)
 Sets the minimum and maximum values of the text box.
int getValue ()
 Returns the value in the text box.
void reset ()
 Reset the field to the default value.
void setValue (int value)
 Set the value of the text box to the specified value.
void setDefaultValue (int value)
 Set the default value of the text box to the specified value.
void keyPressed (gcn::KeyEvent &event)
 Responds to key presses.

Private Attributes

int mMin
 Minimum value.
int mMax
 Maximum value.
int mDefault
 Default value.
int mValue
 Current value.

Constructor & Destructor Documentation

IntTextField::IntTextField ( int  def = 0  ) 

Constructor, sets default value.

Definition at line 28 of file inttextfield.cpp.


Member Function Documentation

void IntTextField::setRange ( int  minimum,
int  maximum 
)

Sets the minimum and maximum values of the text box.

Reimplemented from TextField.

Definition at line 57 of file inttextfield.cpp.

int IntTextField::getValue (  ) 

Returns the value in the text box.

Definition at line 73 of file inttextfield.cpp.

void IntTextField::reset (  ) 

Reset the field to the default value.

Definition at line 102 of file inttextfield.cpp.

void IntTextField::setValue ( int  value  ) 

Set the value of the text box to the specified value.

Definition at line 78 of file inttextfield.cpp.

void IntTextField::setDefaultValue ( int  value  ) 

Set the default value of the text box to the specified value.

Definition at line 92 of file inttextfield.cpp.

void IntTextField::keyPressed ( gcn::KeyEvent &  event  ) 

Responds to key presses.

Reimplemented from TextField.

Definition at line 35 of file inttextfield.cpp.


Member Data Documentation

int IntTextField::mMin [private]

Minimum value.

Definition at line 69 of file inttextfield.h.

int IntTextField::mMax [private]

Maximum value.

Definition at line 70 of file inttextfield.h.

int IntTextField::mDefault [private]

Default value.

Definition at line 71 of file inttextfield.h.

int IntTextField::mValue [private]

Current value.

Definition at line 72 of file inttextfield.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5