Public Member Functions

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

List of all members.

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)

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::render_value ( form_context context  )  [virtual]

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: