Public Member Functions | List of all members
cppcms::widgets::checkbox Class Reference

This class represent an HTML checkbox input element. More...

#include <cppcms/form.h>

Inheritance diagram for cppcms::widgets::checkbox:
cppcms::widgets::base_html_input cppcms::widgets::base_widget cppcms::base_form booster::noncopyable cppcms::form_flags

Public Member Functions

 checkbox (std::string const &type)
 checkbox ()
bool value ()
void value (bool is_set)
std::string identification ()
void identification (std::string const &)
virtual void render_value (form_context &context)
virtual void load (http::context &context)
- Public Member Functions inherited from cppcms::widgets::base_html_input
 base_html_input (std::string const &type)
virtual ~base_html_input ()
virtual void render_input (form_context &context)
- Public Member Functions inherited from cppcms::widgets::base_widget
 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 formparent ()
void pre_load (http::context &)

Additional Inherited Members

- Public Types inherited from cppcms::form_flags
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 }
- Protected Member Functions inherited from cppcms::widgets::base_widget
void auto_generate (form_context *context=0)

Detailed Description

This class represent an HTML checkbox input element.

Constructor & Destructor Documentation

cppcms::widgets::checkbox::checkbox ( std::string const &  type)

The constructor that allows you to specify type HTML attribute. It is passed to the constructor of the base_html_input class.

cppcms::widgets::checkbox::checkbox ( )

Default constructor.

Member Function Documentation

std::string cppcms::widgets::checkbox::identification ( )

Get the unique identification string of the checkbox.

void cppcms::widgets::checkbox::identification ( std::string const &  )

Set the unique identification string of the checkbox. It is useful when you want to have many options with the same name.

virtual void cppcms::widgets::checkbox::load ( http::context context)

Load the form information from the provided http::context context. A user can call this function to load all information from the raw POST/GET data into the internal widget representation.

Implements cppcms::base_form.

virtual void cppcms::widgets::checkbox::render_value ( form_context context)

Write the actual value of the HTML tag. Derived classes must implement this.

Implements cppcms::widgets::base_html_input.

bool cppcms::widgets::checkbox::value ( )

Return true if the checkbox was checked (selected).

void cppcms::widgets::checkbox::value ( bool  is_set)

Set the state as checked.

The documentation for this class was generated from the following file: