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) |
Protected Member Functions | |
virtual void | render_value (form_context &context)=0 |
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 cppcms::widgets::base_html_input::~base_html_input | ( | ) | [virtual] |
Virtual destructor.
virtual void cppcms::widgets::base_html_input::render_input | ( | form_context & | context | ) | [virtual] |
This function generates the actual HTML. It calls render_value where needed.
Implements cppcms::widgets::base_widget.
virtual void cppcms::widgets::base_html_input::render_value | ( | form_context & | context | ) | [protected, pure 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.