27 #ifndef _CEGUISpinner_h_
28 #define _CEGUISpinner_h_
31 #include "../Window.h"
34 # pragma warning(push)
35 # pragma warning(disable : 4251)
50 class CEGUIEXPORT Spinner :
public Window
68 static const String WidgetTypeName;
69 static const String EventNamespace;
75 static const String EventValueChanged;
81 static const String EventStepChanged;
87 static const String EventMaximumValueChanged;
93 static const String EventMinimumValueChanged;
99 static const String EventTextInputModeChanged;
104 static const String EditboxName;
105 static const String IncreaseButtonName;
106 static const String DecreaseButtonName;
133 void initialiseComponents(
void);
146 double getCurrentValue(
void)
const;
156 double getStepSize(
void)
const;
165 double getMaximumValue(
void)
const;
174 double getMinimumValue(
void)
const;
184 TextInputMode getTextInputMode(
void)
const;
199 void setCurrentValue(
double value);
212 void setStepSize(
double step);
224 void setMaximumValue(
double maxValue);
236 void setMinimumValue(
double minVaue);
249 void setTextInputMode(TextInputMode mode);
255 static const String FloatValidator;
256 static const String IntegerValidator;
257 static const String HexValidator;
258 static const String OctalValidator;
272 virtual double getValueFromText(
void)
const;
281 virtual String getTextFromValue(
void)
const;
394 bool handleIncreaseButton(
const EventArgs& e);
395 bool handleDecreaseButton(
const EventArgs& e);
396 bool handleEditTextChange(
const EventArgs& e);
403 double d_currentValue;
406 TextInputMode d_inputMode;
419 void addSpinnerProperties(
void);
425 class PropertyHelper<Spinner::TextInputMode>
429 typedef return_type safe_method_return_type;
431 typedef String string_return_type;
433 static const String& getDataTypeName()
435 static String type(
"TextInputMode");
440 static return_type fromString(
const String& str)
442 if (str ==
"FloatingPoint")
446 else if (str ==
"Hexadecimal")
450 else if (str ==
"Octal")
460 static string_return_type toString(pass_type val)
468 return "FloatingPoint";
472 return "Hexadecimal";
480 assert(
false &&
"Invalid Text Input Mode");
481 return "FloatingPoint";
490 #if defined(_MSC_VER)
491 # pragma warning(pop)
494 #endif // end of guard _CEGUISpinner_h_
Hexadecimal.
Definition: cegui/include/CEGUI/widgets/Spinner.h:61
Octal.
Definition: cegui/include/CEGUI/widgets/Spinner.h:62
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
Base class used as the argument to all subscribers Event object.
Definition: cegui/include/CEGUI/EventArgs.h:49
Base class for the Spinner widget.
Definition: cegui/include/CEGUI/widgets/Spinner.h:50
Base class for an Editbox widget.
Definition: cegui/include/CEGUI/widgets/Editbox.h:69
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: cegui/include/CEGUI/InputEvent.h:251
Integer decimal.
Definition: cegui/include/CEGUI/widgets/Spinner.h:60
Floating point decimal.
Definition: cegui/include/CEGUI/widgets/Spinner.h:59
EventArgs based class that is used for Activated and Deactivated window events.
Definition: cegui/include/CEGUI/InputEvent.h:329
TextInputMode
Enumerated type specifying possible input and/or display modes for the spinner.
Definition: cegui/include/CEGUI/widgets/Spinner.h:57
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62