diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-05 18:17:04 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-05 18:17:04 +0000 |
commit | 732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51 (patch) | |
tree | f09bb3b8c34cdfd78f8346460fabac7b2f21ddf8 /src/gui/inttextbox.h | |
parent | aba239393ecd298e8ffd16e0b6a5d86837c594ae (diff) | |
download | mana-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.gz mana-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.bz2 mana-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.xz mana-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.zip |
Using custom focus handler to work around problem with multiple widgets
requesting modal focus using a stack based approach.
Diffstat (limited to 'src/gui/inttextbox.h')
-rw-r--r-- | src/gui/inttextbox.h | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/src/gui/inttextbox.h b/src/gui/inttextbox.h index eda5ff78..c9eec49e 100644 --- a/src/gui/inttextbox.h +++ b/src/gui/inttextbox.h @@ -30,27 +30,45 @@ #include "textbox.h" /** - * IntTextBox - * TextBox which only accepts numbers as input + * TextBox which only accepts numbers as input. */ class IntTextBox : public TextBox { - int min; //min value - int max; //max value - - int value; //current value - - IntTextBox(const std::string&) { } - public: + /** + * Constructor. + */ IntTextBox(); - IntTextBox(int); - void keyPress(const gcn::Key &); + /** + * Constructor, sets initial value. + */ + IntTextBox(int value); + + /** + * Sets the minimum and maximum values of the text box. + */ + void setRange(int minimum, int maximum); - void setRange(int, int); + /** + * Returns the value in the text box. + */ int getInt(); - void setInt(int); + + /** + * Set the value of the text box to the specified value. + */ + void setInt(int value); + + /** + * Responds to key presses. + */ + void keyPress(const gcn::Key &key); + + private: + int min; /**< Minimum value */ + int max; /**< Maximum value */ + int value; /**< Current value */ }; #endif |