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

This class represents the context required to generate the widgets' HTML. More...

#include <cppcms/form.h>

Inheritance diagram for cppcms::form_context:

Public Member Functions

 form_context ()
 form_context (form_context const &other)
form_context const & operator= (form_context const &other)
 form_context (std::ostream &output, html_type ht=form_flags::as_html, html_list_type hlt=form_flags::as_p)
 ~form_context ()
void html (html_type t)
void html_list (html_list_type t)
void widget_part (widget_part_type t)
void out (std::ostream &out)
html_type html () const
html_list_type html_list () const
widget_part_type widget_part () const
std::ostream & out () const

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 }

Detailed Description

This class represents the context required to generate the widgets' HTML.

Constructor & Destructor Documentation

cppcms::form_context::form_context ( )

Default constructor.

cppcms::form_context::form_context ( form_context const &  other)


cppcms::form_context::form_context ( std::ostream &  output,
html_type  ht = form_flags::as_html,
html_list_type  hlt = form_flags::as_p 

Create a rendering context.

outputthe std::ostream output to write HTML to.
htflags represents the type of HTML that should be generated.
hltflag defines the style of widgets generation.
cppcms::form_context::~form_context ( )


Member Function Documentation

void cppcms::form_context::html ( html_type  t)

Set the HTML/XHTML flag.

html_type cppcms::form_context::html ( ) const

Set the HTML/XHTML flag. The default is as_html.

void cppcms::form_context::html_list ( html_list_type  t)

Set the widgets rendering style.

html_list_type cppcms::form_context::html_list ( ) const

Get the widget rendering style. The default is as_p.

form_context const& cppcms::form_context::operator= ( form_context const &  other)


void cppcms::form_context::out ( std::ostream &  out)

Set the output stream.

Referenced by cppcms::widgets::numeric< T >::render_value().

std::ostream& cppcms::form_context::out ( ) const

Get the output stream.

void cppcms::form_context::widget_part ( widget_part_type  t)

Set the flag for the partial rendering of the widget.

widget_part_type cppcms::form_context::widget_part ( ) const

Get the part of the widget that should be generated. See widget_part_type. The default is first_part.

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