Crazy Eddie's GUI System  0.8.4
CEGUI::FalagardStaticText Class Reference

StaticText class for the FalagardBase module. More...

+ Inheritance diagram for CEGUI::FalagardStaticText:
+ Collaboration diagram for CEGUI::FalagardStaticText:

List of all members.

Public Member Functions

 FalagardStaticText (const String &type)
 Constructor.
 ~FalagardStaticText ()
 Destructor.
ColourRect getTextColours (void) const
 Return a ColourRect object containing the colours used when rendering this widget.
HorizontalTextFormatting getHorizontalFormatting (void) const
 Return the current horizontal formatting option set for this widget.
VerticalTextFormatting getVerticalFormatting (void) const
 Return the current vertical formatting option set for this widget.
void setTextColours (const ColourRect &colours)
 Sets the colours to be applied when rendering the text.
void setVerticalFormatting (VerticalTextFormatting v_fmt)
 Set the vertical formatting required for the text.
void setHorizontalFormatting (HorizontalTextFormatting h_fmt)
 Set the horizontal formatting required for the text.
bool isVerticalScrollbarEnabled (void) const
 Return whether the vertical scroll bar is set to be shown if needed.
bool isHorizontalScrollbarEnabled (void) const
 Return whether the horizontal scroll bar is set to be shown if needed.
void setVerticalScrollbarEnabled (bool setting)
 Set whether the vertical scroll bar will be shown if needed.
void setHorizontalScrollbarEnabled (bool setting)
 Set whether the horizontal scroll bar will be shown if needed.
float getHorizontalTextExtent () const
 return the current horizontal formatted text extent in pixels.
float getVerticalTextExtent () const
 return the current vertical formatted text extent in pixels.
bool handleFontRenderSizeChange (const Font *const font)
 Perform any updates needed because the given font's render size has changed.
void render (void)
 Populate render cache.

Static Public Attributes

static const String TypeName
 type name for this widget.
static const String VertScrollbarName
 Widget name for the vertical scrollbar component.
static const String HorzScrollbarName
 Widget name for the horizontal scrollbar component.

Protected Types

typedef std::vector
< Event::Connection
ConnectionList

Protected Member Functions

void updateFormatting () const
 update string formatting (gets area size to use from looknfeel)
void updateFormatting (const Sizef &sz) const
 update string formatting using given area size.
void onLookNFeelAssigned ()
 Handler called when a Look'N'Feel is assigned to our window.
void onLookNFeelUnassigned ()
 Handler called when a Look'N'Feel is removed/unassigned from our window.
void renderScrolledText (void)
void configureScrollbars (void)
ScrollbargetVertScrollbar (void) const
ScrollbargetHorzScrollbar (void) const
Rectf getTextRenderArea (void) const
Sizef getDocumentSize (const Rectf &renderArea) const
void setupStringFormatter () const
bool onTextChanged (const EventArgs &e)
bool onSized (const EventArgs &e)
bool onFontChanged (const EventArgs &e)
bool onMouseWheel (const EventArgs &e)
bool handleScrollbarChange (const EventArgs &e)

Protected Attributes

HorizontalTextFormatting d_horzFormatting
 Horizontal formatting to be applied to the text.
VerticalTextFormatting d_vertFormatting
 Vertical formatting to be applied to the text.
ColourRect d_textCols
 Colours used when rendering the text.
bool d_enableVertScrollbar
 true if vertical scroll bar is enabled.
bool d_enableHorzScrollbar
 true if horizontal scroll bar is enabled.
FormattedRenderedStringd_formattedRenderedString
 Class that renders RenderedString with some formatting.
ConnectionList d_connections
bool d_formatValid
 true when string formatting is up to date.

Detailed Description

StaticText class for the FalagardBase module.

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

States:

  • Enabled - basic rendering for enabled state.
  • Disabled - basic rendering for disabled state.
  • EnabledFrame - frame rendering for enabled state
  • DisabledFrame - frame rendering for disabled state.
  • WithFrameEnabledBackground - backdrop rendering for enabled state with frame enabled.
  • WithFrameDisabledBackground - backdrop rendering for disabled state with frame enabled.
  • NoFrameEnabledBackground - backdrop rendering for enabled state with frame disabled.
  • NoFrameDisabledBackground - backdrop rendering for disabled state with frame disabled.

Named Areas (missing areas will default to 'WithFrameTextRenderArea'): WithFrameTextRenderArea WithFrameTextRenderAreaHScroll WithFrameTextRenderAreaVScroll WithFrameTextRenderAreaHVScroll NoFrameTextRenderArea NoFrameTextRenderAreaHScroll NoFrameTextRenderAreaVScroll NoFrameTextRenderAreaHVScroll


Member Function Documentation

bool CEGUI::FalagardStaticText::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::FalagardStaticText::render ( void  ) [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...

Reimplemented from CEGUI::FalagardStatic.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends