summaryrefslogtreecommitdiff
path: root/src/gui/inttextbox.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-05 18:17:04 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-05 18:17:04 +0000
commit732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51 (patch)
treef09bb3b8c34cdfd78f8346460fabac7b2f21ddf8 /src/gui/inttextbox.h
parentaba239393ecd298e8ffd16e0b6a5d86837c594ae (diff)
downloadmana-client-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.gz
mana-client-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.bz2
mana-client-732d52d4fcb3a1ae644e6d82b2b69fbfa2efaf51.tar.xz
mana-client-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.h44
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