Widget for number input. It is a template class that assumes that T is a number. More...
#include <cppcms/form.h>
Public Member Functions | |
| void | non_empty () |
| T | value () |
| void | value (T v) |
| void | low (T a) |
| void | high (T b) |
| void | range (T a, T b) |
| virtual void | render_value (form_context &context) |
| virtual void | clear () |
| virtual void | load (http::context &context) |
| virtual bool | validate () |
Widget for number input. It is a template class that assumes that T is a number.
This class parses the input and checks if it is input text is a valid numeric value. If it is valid, the set() would return true be true.
If the value was not defined, access to value() will throw an exception.
| virtual void cppcms::widgets::numeric< T >::clear | ( | ) | [inline, virtual] |
Clear the form. It also calls set(false).
Reimplemented from cppcms::widgets::base_widget.
| void cppcms::widgets::numeric< T >::high | ( | T | b | ) | [inline] |
Set the maximum valid value.
| virtual void cppcms::widgets::numeric< T >::load | ( | http::context & | context | ) | [inline, virtual] |
Load the widget data.
| void cppcms::widgets::numeric< T >::low | ( | T | a | ) | [inline] |
Set the minimum valid value.
| void cppcms::widgets::numeric< T >::non_empty | ( | ) | [inline] |
Inform the validator that this widget should contain some value.
| void cppcms::widgets::numeric< T >::range | ( | T | a, | |
| T | b | |||
| ) | [inline] |
Same as low(a); high(b);
| virtual void cppcms::widgets::numeric< T >::render_value | ( | form_context & | context | ) | [inline, virtual] |
Render the first part of the widget.
Implements cppcms::widgets::base_html_input.
| virtual bool cppcms::widgets::numeric< T >::validate | ( | ) | [inline, virtual] |
Validate the widget.
Reimplemented from cppcms::widgets::base_widget.
| void cppcms::widgets::numeric< T >::value | ( | T | v | ) | [inline] |
Set the value of the widget.
| T cppcms::widgets::numeric< T >::value | ( | ) | [inline] |
Get numeric value that was loaded from the POST or GET data.
1.7.1