27#ifndef _CEGUISpinner_h_
28#define _CEGUISpinner_h_
35# pragma warning(disable : 4251)
394 bool handleIncreaseButton(
const EventArgs& e);
395 bool handleDecreaseButton(
const EventArgs& e);
396 bool handleEditTextChange(
const EventArgs& e);
419 void addSpinnerProperties(
void);
433 static const String& getDataTypeName()
435 static String type(
"TextInputMode");
442 if (str ==
"FloatingPoint")
446 else if (str ==
"Hexadecimal")
450 else if (str ==
"Octal")
468 return "FloatingPoint";
472 return "Hexadecimal";
480 assert(
false &&
"Invalid Text Input Mode");
481 return "FloatingPoint";
EventArgs based class that is used for Activated and Deactivated window events.
Definition InputEvent.h:330
Base class for an Editbox widget.
Definition widgets/Editbox.h:70
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Helper class used to convert various data types to and from the format expected in Property strings.
Definition PropertyHelper.h:84
Base class for the Spinner widget.
Definition Spinner.h:51
static const String EventTextInputModeChanged
Definition Spinner.h:99
void setCurrentValue(double value)
Set the current spinner value.
void setTextInputMode(TextInputMode mode)
Set the spinner input / display mode.
static const String IntegerValidator
Validator regex used for decimal integer mode.
Definition Spinner.h:256
static const String EventValueChanged
Definition Spinner.h:75
void setStepSize(double step)
Set the current step value.
virtual double getValueFromText(void) const
Returns the numerical representation of the current editbox text.
static const String HexValidator
Validator regex used for hexadecimal mode.
Definition Spinner.h:257
PushButton * getIncreaseButton() const
Return a pointer to the 'increase' PushButtoncomponent widget for this Spinner.
double getStepSize(void) const
Return the current step value.
Spinner(const String &type, const String &name)
Constructor for Spinner objects.
double getCurrentValue(void) const
Return the current spinner value.
void initialiseComponents(void)
Initialises the Window based object ready for use.
static const String EventNamespace
Namespace for global events.
Definition Spinner.h:69
TextInputMode getTextInputMode(void) const
Return the current text input / display mode setting.
double d_stepSize
Step size value used y the increase & decrease buttons.
Definition Spinner.h:402
virtual void onTextChanged(WindowEventArgs &e)
Handler called when the window's text is changed.
TextInputMode
Enumerated type specifying possible input and/or display modes for the spinner.
Definition Spinner.h:58
@ FloatingPoint
Floating point decimal.
Definition Spinner.h:59
@ Hexadecimal
Hexadecimal.
Definition Spinner.h:61
@ Octal
Octal.
Definition Spinner.h:62
@ Integer
Integer decimal.
Definition Spinner.h:60
double d_currentValue
Numerical copy of the text in d_editbox.
Definition Spinner.h:403
static const String DecreaseButtonName
Widget name for the decrease button component.
Definition Spinner.h:106
double getMaximumValue(void) const
Return the current maximum limit value for the Spinner.
virtual void onMinimumValueChanged(WindowEventArgs &e)
Method called when the minimum value setting changes.
virtual void onMaximumValueChanged(WindowEventArgs &e)
Method called when the maximum value setting changes.
static const String EventMaximumValueChanged
Definition Spinner.h:87
void setMaximumValue(double maxValue)
Set the spinner maximum value.
virtual void onStepChanged(WindowEventArgs &e)
Method called when the step value changes.
virtual void onActivated(ActivationEventArgs &e)
Handler called when this window has become the active window.
TextInputMode d_inputMode
Current text display/input mode.
Definition Spinner.h:406
virtual ~Spinner(void)
Destructor for Spinner objects.
void setMinimumValue(double minVaue)
Set the spinner minimum value.
PushButton * getDecreaseButton() const
Return a pointer to the 'decrease' PushButton component widget for this Spinner.
double d_maxValue
Maximum value for spinner.
Definition Spinner.h:404
virtual void onTextInputModeChanged(WindowEventArgs &e)
Method called when the text input/display mode is changed.
static const String EventMinimumValueChanged
Definition Spinner.h:93
static const String IncreaseButtonName
Widget name for the increase button component.
Definition Spinner.h:105
double getMinimumValue(void) const
Return the current minimum limit value for the Spinner.
static const String WidgetTypeName
Window factory name.
Definition Spinner.h:68
virtual void onValueChanged(WindowEventArgs &e)
Method called when the spinner value changes.
static const String FloatValidator
Validator regex used for floating point mode.
Definition Spinner.h:255
static const String OctalValidator
Validator regex used for octal mode.
Definition Spinner.h:258
static const String EditboxName
Widget name for the editbox thumb component.
Definition Spinner.h:104
static const String EventStepChanged
Definition Spinner.h:81
double d_minValue
Minimum value for spinner.
Definition Spinner.h:405
virtual String getTextFromValue(void) const
Returns the textual representation of the current spinner value.
Editbox * getEditbox() const
Return a pointer to the Editbox component widget for this Spinner.
virtual void onFontChanged(WindowEventArgs &e)
Handler called when the window's font is changed.
String class used within the GUI system.
Definition String.h:64
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition InputEvent.h:252
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1