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