CppCMS
|
This class represents a basic widget that generates HTML form elements the widgets that use the <input \/> HTML tag. More...
#include <cppcms/form.h>
Public Member Functions | |
base_html_input (std::string const &type) | |
virtual | ~base_html_input () |
virtual void | render_input (form_context &context) |
![]() | |
base_widget () | |
bool | set () |
bool | valid () |
std::string | id () |
std::string | name () |
locale::message | message () |
bool | has_message () |
locale::message | error_message () |
bool | has_error_message () |
locale::message | help () |
bool | has_help () |
bool | disabled () |
void | disabled (bool) |
bool | readonly () |
void | readonly (bool) |
std::string | attributes_string () |
void | set (bool) |
void | valid (bool) |
void | id (std::string) |
void | name (std::string) |
void | message (std::string) |
void | message (locale::message const &) |
void | error_message (std::string) |
void | error_message (locale::message const &) |
void | help (std::string) |
void | help (locale::message const &msg) |
void | attributes_string (std::string v) |
virtual void | render (form_context &context) |
virtual void | clear () |
virtual bool | validate () |
virtual void | render_attributes (form_context &context) |
virtual void | parent (base_form *subform) |
virtual form * | parent () |
void | pre_load (http::context &) |
![]() | |
virtual void | load (http::context &context)=0 |
Protected Member Functions | |
virtual void | render_value (form_context &context)=0 |
![]() | |
void | auto_generate (form_context *context=0) |
Additional Inherited Members | |
![]() | |
enum | html_type { as_html = 0, as_xhtml = 1 } |
enum | html_list_type { as_p = 0, as_table = 1, as_ul = 2, as_dl = 3, as_space = 4 } |
enum | widget_part_type { first_part = 0, second_part = 1 } |
This class represents a basic widget that generates HTML form elements the widgets that use the <input \/> HTML tag.
It allows you to create your own widgets more easily. It does most of job required to generate the HTML. The user is only required to generate the actual value like value="10.34" as with a numeric widget.
cppcms::widgets::base_html_input::base_html_input | ( | std::string const & | type | ) |
Create a new instance. type is the HTML type tag of the input element, for example "text" or "password".
|
virtual |
Virtual destructor.
|
virtual |
This function generates the actual HTML. It calls render_value where needed.
Implements cppcms::widgets::base_widget.
|
protectedpure virtual |
Write the actual value of the HTML tag. Derived classes must implement this.
Implemented in cppcms::widgets::submit, cppcms::widgets::file, cppcms::widgets::checkbox, cppcms::widgets::numeric< T >, and cppcms::widgets::text.