Wt::WFormWidget Class Reference

A WWidget that correspond to an HTML form element. More...

#include <WFormWidget>

Inherits Wt::WInteractWidget.

Inherited by Wt::WAbstractToggleButton, Wt::WComboBox, Wt::WLineEdit, Wt::WPushButton, and Wt::WTextArea.

Inheritance diagram for Wt::WFormWidget:

Inheritance graph
[legend]
List of all members.

Public Slots

void setEnabled (bool enabled)
 Change the enabled state of the widget.
void enable ()
 Enable the widget.
void disable ()
 Disable the widget.

Public Member Functions

 WFormWidget (WContainerWidget *parent=0)
 Construct a WFormWidget with an optional parent.
 ~WFormWidget ()
 Destroy a WFormWidget.
WLabellabel () const
 Get the label associated with this widget.
void setHidden (bool hidden)
 Set the hidden state of this widget.
bool isEnabled () const
 Return whether the widget is enabled.
void setValidator (WValidator *validator)
 Set a validator for this field.
WValidatorvalidator () const
 Get the validator.
virtual WValidator::State validate ()
 Validate the field.

Public Attributes

EventSignal< void > changed
 Signal emitted when the value was changed.
EventSignal< void > selected
 Signal emitted when ??
EventSignal< void > blurred
 Signal emitted when the widget lost focus.
EventSignal< void > focussed
 Signal emitted when the widget recieved focus.

Detailed Description

A WWidget that correspond to an HTML form element.

A WFormWidget may receive focus, can be disabled, and can have a label that acts as proxy for getting focus. It provides signals which reflect changes to its value, or changes to its focus.


Constructor & Destructor Documentation

Wt::WFormWidget::~WFormWidget (  ) 

Destroy a WFormWidget.

If a label was associated with the widget, the label is updated as well to indicate the loss of the buddy.


Member Function Documentation

void Wt::WFormWidget::disable (  )  [slot]

Disable the widget.

See also:
setEnabled(bool)

void Wt::WFormWidget::enable (  )  [slot]

Enable the widget.

See also:
setEnabled(bool)

WLabel* Wt::WFormWidget::label (  )  const [inline]

Get the label associated with this widget.

Returns the label (if there is one) that acts as a proxy for this widget.

See also:
WLabel::setBuddy(WFormWidget *)

void Wt::WFormWidget::setEnabled ( bool  enabled  )  [slot]

Change the enabled state of the widget.

A widget that is disabled cannot receive focus or user interaction.

void Wt::WFormWidget::setHidden ( bool  hidden  )  [virtual]

Set the hidden state of this widget.

If the widget has a label, it hidden or shown together with this widget.

Reimplemented from Wt::WWebWidget.

void Wt::WFormWidget::setValidator ( WValidator validator  ) 

Set a validator for this field.

The validator is used to validate the current input.

Ownership of the validator is transferred to the form field, and thus the validator will be deleted together with the form field.


The documentation for this class was generated from the following files:
Generated on Sun Jul 1 19:37:18 2007 for Wt by doxygen 1.4.7