Rocket::Controls::ElementFormControlTextArea Class Reference

#include <ElementFormControlTextArea.h>

Inheritance diagram for Rocket::Controls::ElementFormControlTextArea:
Collaboration diagram for Rocket::Controls::ElementFormControlTextArea:

Public Member Functions

 ElementFormControlTextArea (const Rocket::Core::String &tag)
virtual Rocket::Core::String GetValue () const
virtual void SetValue (const Rocket::Core::String &value)
void SetNumColumns (int num_columns)
int GetNumColumns () const
void SetNumRows (int num_rows)
int GetNumRows () const
void SetMaxLength (int max_length)
int GetMaxLength () const
void SetWordWrap (bool word_wrap)
bool GetWordWrap ()
virtual bool GetIntrinsicDimensions (Rocket::Core::Vector2f &dimensions)

Protected Member Functions

void OnUpdate ()
 Updates the control's widget.
void OnRender ()
 Renders the control's widget.
void OnLayout ()
 Formats the element.
virtual void OnAttributeChange (const Core::AttributeNameList &changed_attributes)
 Called when attributes on the element are changed.
virtual void OnPropertyChange (const Core::PropertyNameList &changed_properties)
virtual void GetInnerRML (Rocket::Core::String &content) const

Detailed Description

Default Rocket implemention of a text area.

Author:
Peter Curry

Constructor & Destructor Documentation

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

Constructs a new ElementFormControlTextArea. 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::ElementFormControlTextArea::GetValue (  )  const [virtual]

Returns a string representation of the current value of the form control. This is the value of the control regardless of whether it has been selected / checked (as appropriate for the control).

Returns:
The value of the form control.

Implements Rocket::Controls::ElementFormControl.

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

Sets the current value of the form control.

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

Implements Rocket::Controls::ElementFormControl.

void Rocket::Controls::ElementFormControlTextArea::SetNumColumns ( int  num_columns  ) 

Sets the number of characters visible across the text area. Note that this will only be precise when using a fixed-width font.

Parameters:
[in] size The number of visible characters.

int Rocket::Controls::ElementFormControlTextArea::GetNumColumns (  )  const

Returns the approximate number of characters visible at once.

Returns:
The number of visible characters.

void Rocket::Controls::ElementFormControlTextArea::SetNumRows ( int  num_rows  ) 

Sets the number of visible lines of text in the text area.

Parameters:
[in] num_rows The new number of visible lines of text.

int Rocket::Controls::ElementFormControlTextArea::GetNumRows (  )  const

Returns the number of visible lines of text in the text area.

Returns:
The number of visible lines of text.

void Rocket::Controls::ElementFormControlTextArea::SetMaxLength ( int  max_length  ) 

Sets the maximum length (in characters) of this text area.

Parameters:
[in] max_length The new maximum length of the text area. A number lower than zero will mean infinite characters.

int Rocket::Controls::ElementFormControlTextArea::GetMaxLength (  )  const

Returns the maximum length (in characters) of this text area.

Returns:
The maximum number of characters allowed in this text area.

void Rocket::Controls::ElementFormControlTextArea::SetWordWrap ( bool  word_wrap  ) 

Enables or disables word-wrapping in the text area.

Parameters:
[in] word_wrap True to enable word-wrapping, false to disable.

bool Rocket::Controls::ElementFormControlTextArea::GetWordWrap (  ) 

Returns the state of word-wrapping in the text area.

Returns:
True if the text area is word-wrapping, false otherwise.

bool Rocket::Controls::ElementFormControlTextArea::GetIntrinsicDimensions ( Rocket::Core::Vector2f dimensions  )  [virtual]

Returns the control's inherent size, based on the length of the input field and the current font size.

Returns:
True.

Reimplemented from Rocket::Core::Element.

void Rocket::Controls::ElementFormControlTextArea::OnPropertyChange ( const Core::PropertyNameList &  changed_properties  )  [protected, virtual]

Called when properties on the control are changed.

Parameters:
[in] changed_properties The properties changed on the element.

Reimplemented from Rocket::Core::Element.

void Rocket::Controls::ElementFormControlTextArea::GetInnerRML ( Rocket::Core::String content  )  const [protected, virtual]

Returns the text content of the element.

Parameters:
[out] content The content of the element.

Reimplemented from Rocket::Core::Element.


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