Crazy Eddie's GUI System  0.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGUI::FalagardMultiLineEditbox Class Reference

MultiLineEditbox class for the FalagardBase module. More...

+ Inheritance diagram for CEGUI::FalagardMultiLineEditbox:
+ Collaboration diagram for CEGUI::FalagardMultiLineEditbox:

Public Member Functions

 FalagardMultiLineEditbox (const String &type)
 Constructor.
 
Rectf getTextRenderArea (void) const
 Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to. More...
 
void render ()
 Populate render cache. More...
 
void update (float elapsed)
 perform any time based updates for this WindowRenderer.
 
bool isCaretBlinkEnabled () const
 return whether the blinking caret is enabled.
 
float getCaretBlinkTimeout () const
 return the caret blink timeout period (only used if blink is enabled).
 
void setCaretBlinkEnabled (bool enable)
 set whether the blinking caret is enabled.
 
void setCaretBlinkTimeout (float seconds)
 set the caret blink timeout period (only used if blink is enabled).
 
bool handleFontRenderSizeChange (const Font *const font)
 Perform any updates needed because the given font's render size has changed. More...
 
- Public Member Functions inherited from CEGUI::MultiLineEditboxWindowRenderer
 MultiLineEditboxWindowRenderer (const String &name)
 Constructor.
 
- Public Member Functions inherited from CEGUI::WindowRenderer
 WindowRenderer (const String &name, const String &class_name="Window")
 Constructor. More...
 
virtual ~WindowRenderer ()
 Destructor.
 
const StringgetName () const
 Returns the factory type name of this window renderer.
 
WindowgetWindow () const
 Get the window this windowrenderer is attached to.
 
const StringgetClass () const
 Get the "minimum" Window class this renderer requires.
 
const WidgetLookFeelgetLookNFeel () const
 Get the Look'N'Feel assigned to our window.
 
virtual Rectf getUnclippedInnerRect () const
 Get unclipped inner rectangle that our window should return from its member function with the same name.
 
virtual void performChildWindowLayout ()
 Method called to perform extended laying out of the window's attached child windows.
 
virtual void getRenderingContext (RenderingContext &ctx) const
 update the RenderingContext as needed for our window. This is normally invoked via our window's member function with the same name.
 

Static Public Attributes

static const String TypeName
 
static const String UnselectedTextColourPropertyName
 type name for this widget. More...
 
static const String SelectedTextColourPropertyName
 Name of property to use to obtain selected text rendering colour.
 
static const String ActiveSelectionColourPropertyName
 Name of property to use to obtain active selection rendering colour.
 
static const String InactiveSelectionColourPropertyName
 Name of property to use to obtain inactive selection rendering colour.
 
static const float DefaultCaretBlinkTimeout
 The default timeout (in seconds) used when blinking the caret.
 

Protected Member Functions

void cacheEditboxBaseImagery ()
 Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual text. Note that the text will be rendered to layer 4 and the selection brush to layer 3, other layers can be used for rendering imagery behind and infront of the text & selection.. More...
 
void cacheCaretImagery (const Rectf &textArea)
 Render the caret. More...
 
void cacheTextLines (const Rectf &dest_area)
 Render text lines.
 
void setColourRectToUnselectedTextColour (ColourRect &colour_rect) const
 Set the given ColourRect to the colour to be used for rendering Editbox text oustside of the selected region.
 
void setColourRectToSelectedTextColour (ColourRect &colour_rect) const
 Set the given ColourRect to the colour to be used for rendering Editbox text falling within the selected region.
 
void setColourRectToActiveSelectionColour (ColourRect &colour_rect) const
 Set the given ColouRect to the colours to be used for rendering the selection highlight when the editbox is active.
 
void setColourRectToInactiveSelectionColour (ColourRect &colour_rect) const
 set the given ColourRect to the colours to be used for rendering the selection highlight when the editbox is inactive.
 
void setColourRectToOptionalPropertyColour (const String &propertyName, ColourRect &colour_rect) const
 Set the given ColourRect to the colour(s) fetched from the named property if it exists, else the default colour of black. More...
 
- Protected Member Functions inherited from CEGUI::MultiLineEditboxWindowRenderer
void onLookNFeelAssigned ()
 Handler called when a Look'N'Feel is assigned to our window.
 
- Protected Member Functions inherited from CEGUI::WindowRenderer
void registerProperty (Property *property, const bool ban_from_xml)
 Register a property class that will be properly managed by this window renderer. More...
 
void registerProperty (Property *property)
 Register a property class that will be properly managed by this window renderer. More...
 
virtual void onAttach ()
 Handler called when this windowrenderer is attached to a window.
 
virtual void onDetach ()
 Handler called when this windowrenderer is detached from its window.
 
virtual void onLookNFeelUnassigned ()
 Handler called when a Look'N'Feel is removed/unassigned from our window.
 

Protected Attributes

bool d_blinkCaret
 true if the caret imagery should blink.
 
float d_caretBlinkTimeout
 time-out in seconds used for blinking the caret.
 
float d_caretBlinkElapsed
 current time elapsed since last caret blink state change.
 
bool d_showCaret
 true if caret should be shown.
 

Additional Inherited Members

- Protected Types inherited from CEGUI::WindowRenderer
typedef std::pair< Property
*, bool > 
PropertyEntry
 type used for entries in the PropertyList.
 
typedef std::vector
< PropertyEntry
CEGUI_VECTOR_ALLOC(PropertyEntry)> 
PropertyList
 type to use for the property list.
 

Detailed Description

MultiLineEditbox class for the FalagardBase module.

This class requires LookNFeel to be assigned. The LookNFeel should provide the following:

States:

  • Enabled - Rendering for when the editbox is in enabled and is in read-write mode.
  • ReadOnly - Rendering for when the editbox is in enabled and is in read-only mode.
  • Disabled - Rendering for when the editbox is disabled.

NamedAreas: TextArea - area where text, selection, and caret imagery will appear. TextAreaHScroll - TextArea when only horizontal scrollbar is visible. TextAreaVScroll - TextArea when only vertical scrollbar is visible. TextAreaHVScroll - TextArea when both horizontal and vertical scrollbar is visible.

PropertyDefinitions (optional, defaults will be black):

  • NormalTextColour - property that accesses a colour value to be used to render normal unselected text.
  • SelectedTextColour - property that accesses a colour value to be used to render selected text.
  • ActiveSelectionColour - property that accesses a colour value to be used to render active selection highlight.
  • InactiveSelectionColour - property that accesses a colour value to be used to render inactive selection highlight.

Imagery Sections:

  • Caret

Child Widgets: Scrollbar based widget with name suffix "__auto_vscrollbar__" Scrollbar based widget with name suffix "__auto_hscrollbar__"

Member Function Documentation

void CEGUI::FalagardMultiLineEditbox::cacheCaretImagery ( const Rectf textArea)
protected

Render the caret.

Returns
Nothing
void CEGUI::FalagardMultiLineEditbox::cacheEditboxBaseImagery ( )
protected

Perform rendering of the widget control frame and other 'static' areas. This method should not render the actual text. Note that the text will be rendered to layer 4 and the selection brush to layer 3, other layers can be used for rendering imagery behind and infront of the text & selection..

Returns
Nothing.
Rectf CEGUI::FalagardMultiLineEditbox::getTextRenderArea ( void  ) const
virtual

Return a Rect object describing, in un-clipped pixels, the window relative area that the text should be rendered in to.

Returns
Rect object describing the area of the Window to be used for rendering text.

Implements CEGUI::MultiLineEditboxWindowRenderer.

bool CEGUI::FalagardMultiLineEditbox::handleFontRenderSizeChange ( const Font *const  font)
virtual

Perform any updates needed because the given font's render size has changed.

/note This base implementation deals with updates needed for various definitions in the assigned widget look. If you override, you should generally always call this base class implementation.

Parameters
fontPointer to the Font whose render size has changed.
Returns
  • true if some action was taken.
  • false if no action was taken (i.e font is not used here).

Reimplemented from CEGUI::WindowRenderer.

void CEGUI::FalagardMultiLineEditbox::render ( )
virtual

Populate render cache.

This method must be implemented by all window renderers and should perform the rendering operations needed for this widget. Normally using the Falagard API...

Implements CEGUI::WindowRenderer.

void CEGUI::FalagardMultiLineEditbox::setColourRectToOptionalPropertyColour ( const String propertyName,
ColourRect colour_rect 
) const
protected

Set the given ColourRect to the colour(s) fetched from the named property if it exists, else the default colour of black.

Parameters
propertyNameString object holding the name of the property to be accessed if it exists.
colour_rectReference to a ColourRect that will be set.

Member Data Documentation

const String CEGUI::FalagardMultiLineEditbox::UnselectedTextColourPropertyName
static

type name for this widget.

Name of property to use to obtain unselected text rendering colour.