Rocket::Controls::ElementFormControl Class Reference

#include <ElementFormControl.h>

Inheritance diagram for Rocket::Controls::ElementFormControl:
Collaboration diagram for Rocket::Controls::ElementFormControl:

Public Member Functions

 ElementFormControl (const Rocket::Core::String &tag)
Rocket::Core::String GetName () const
void SetName (const Rocket::Core::String &name)
virtual Rocket::Core::String GetValue () const =0
virtual void SetValue (const Rocket::Core::String &value)=0
virtual bool IsSubmitted ()
bool IsDisabled () const
void SetDisabled (bool disable)

Protected Member Functions

virtual void OnAttributeChange (const Core::AttributeNameList &changed_attributes)

Detailed Description

A generic specialisation of the generic Core::Element for all input controls.

Author:
Peter Curry

Constructor & Destructor Documentation

Rocket::Controls::ElementFormControl::ElementFormControl ( const Rocket::Core::String tag  ) 

Constructs a new ElementFormControl. This should not be called directly; use the Factory instead.

Parameters:
[in] tag The tag the element was declared as in RML.


Member Function Documentation

Rocket::Core::String Rocket::Controls::ElementFormControl::GetName (  )  const

Returns the name of the form control. This is not guaranteed to be unique, and in the case of some form controls (such as radio buttons) most likely will not be.

Returns:
The name of the form control.

void Rocket::Controls::ElementFormControl::SetName ( const Rocket::Core::String name  ) 

Sets the name of the form control.

Parameters:
[in] name The new name of the form control.

virtual Rocket::Core::String Rocket::Controls::ElementFormControl::GetValue (  )  const [pure virtual]

Returns a string representation of the current value of the form control.

Returns:
The value of the form control.

Implemented in Rocket::Controls::ElementFormControlInput, Rocket::Controls::ElementFormControlSelect, and Rocket::Controls::ElementFormControlTextArea.

virtual void Rocket::Controls::ElementFormControl::SetValue ( const Rocket::Core::String value  )  [pure virtual]

Sets the current value of the form control.

Parameters:
[in] value The new value of the form control.

Implemented in Rocket::Controls::ElementFormControlInput, Rocket::Controls::ElementFormControlSelect, and Rocket::Controls::ElementFormControlTextArea.

bool Rocket::Controls::ElementFormControl::IsSubmitted (  )  [virtual]

Returns if this value should be submitted with the form.

Returns:
True if the value should be be submitted with the form, false otherwise.

Reimplemented in Rocket::Controls::ElementFormControlInput.

bool Rocket::Controls::ElementFormControl::IsDisabled (  )  const

Returns the disabled status of the form control.

Returns:
True if the element is disabled, false otherwise.

void Rocket::Controls::ElementFormControl::SetDisabled ( bool  disable  ) 

Sets the disabled status of the form control.

Parameters:
[in] disable True to disable the element, false to enable.

void Rocket::Controls::ElementFormControl::OnAttributeChange ( const Core::AttributeNameList &  changed_attributes  )  [protected, virtual]

Checks for changes to the 'disabled' attribute.

Parameters:
[in] changed_attributes List of changed attributes on the element.

Reimplemented from Rocket::Core::Element.

Reimplemented in Rocket::Controls::ElementFormControlDataSelect, Rocket::Controls::ElementFormControlInput, and Rocket::Controls::ElementFormControlTextArea.


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