|
Crazy Eddie's GUI System
0.8.4
|
Editbox class for the FalagardBase module. More...
Inheritance diagram for CEGUI::FalagardEditbox:
Collaboration diagram for CEGUI::FalagardEditbox:Public Member Functions | |
| FalagardEditbox (const String &type) | |
| Constructor. | |
| 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 | 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. | |
| 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). | |
| void | setTextFormatting (const HorizontalTextFormatting format) |
| Sets the horizontal text formatting to be used from now onwards. | |
| HorizontalTextFormatting | getTextFormatting () const |
| void | render () |
| Populate render cache. | |
| size_t | getTextIndexFromPosition (const Vector2f &pt) const |
| Return the text code point index that is rendered closest to screen position pt. | |
| void | update (float elapsed) |
| perform any time based updates for this WindowRenderer. | |
| bool | handleFontRenderSizeChange (const Font *const font) |
| Perform any updates needed because the given font's render size has changed. | |
Static Public Attributes | |
| static const String | TypeName |
| type name for this widget. | |
| static const String | UnselectedTextColourPropertyName |
| Name of property to access for unselected text colour. | |
| static const String | SelectedTextColourPropertyName |
| Name of property to access for selected text colour. | |
| static const float | DefaultCaretBlinkTimeout |
| The default timeout (in seconds) used when blinking the caret. | |
Protected Member Functions | |
| void | renderBaseImagery (const WidgetLookFeel &wlf) const |
| helper to draw the base imagery (container and what have you) | |
| void | setupVisualString (String &visual) const |
| helper to set 'visual' to the string we will render (part of) | |
| size_t | getCaretIndex (const String &visual_string) const |
| float | calculateTextOffset (const Rectf &text_area, const float text_extent, const float caret_width, const float extent_to_caret) |
| void | renderTextNoBidi (const WidgetLookFeel &wlf, const String &text, const Rectf &text_area, float text_offset) |
| void | renderTextBidi (const WidgetLookFeel &wlf, const String &text, const Rectf &text_area, float text_offset) |
| bool | editboxIsFocussed () const |
| bool | editboxIsReadOnly () const |
| void | renderCaret (const ImagerySection &imagery, const Rectf &text_area, const float text_offset, const float extent_to_caret) const |
| bool | isUnsupportedFormat (const HorizontalTextFormatting format) |
Protected Attributes | |
| float | d_lastTextOffset |
| x rendering offset used last time we drew the widget. | |
| 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. | |
| HorizontalTextFormatting | d_textFormatting |
| horizontal formatting. Only supports left, right, and centred. | |
Editbox class for the FalagardBase module.
This class requires LookNFeel to be assigned. The LookNFeel should provide the following:
States:
NamedAreas:
PropertyDefinitions (optional)
Imagery Sections:
| size_t CEGUI::FalagardEditbox::getTextIndexFromPosition | ( | const Vector2f & | pt | ) | const [virtual] |
Return the text code point index that is rendered closest to screen position pt.
| pt | Point object describing a position on the screen in pixels. |
Implements CEGUI::EditboxWindowRenderer.
| bool CEGUI::FalagardEditbox::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.
| font | Pointer to the Font whose render size has changed. |
Reimplemented from CEGUI::WindowRenderer.
| void CEGUI::FalagardEditbox::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::FalagardEditbox::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.
| propertyName | String object holding the name of the property to be accessed if it exists. |
| colour_rect | Reference to a ColourRect that will be set. |
| void CEGUI::FalagardEditbox::setTextFormatting | ( | const HorizontalTextFormatting | format | ) |
Sets the horizontal text formatting to be used from now onwards.
| format | Specifies the formatting to use. Currently can only be one of the following HorizontalTextFormatting values:
|