Crazy Eddie's GUI System
0.8.6
|
StaticText class for the FalagardBase module. More...
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. More... | |
void | render (void) |
Populate render cache. More... | |
float | getHorizontalScrollPosition () const |
Get the current position of the horizontal scrollbar within the text. More... | |
float | getVerticalScrollPosition () const |
Get the current position of the vertical scrollbar within the text. More... | |
float | getUnitIntervalHorizontalScrollPosition () const |
return the current horizontal scrollbar position as a value in the interval [0, 1]. | |
float | getUnitIntervalVerticalScrollPosition () const |
return the current vertical scrollbar position as a value in the interval [0, 1]. | |
void | setHorizontalScrollPosition (float position) |
Set the current position of the horizontal scrollbar within the text. More... | |
void | setVerticalScrollPosition (float position) |
Set the current position of the vertical scrollbar within the text. More... | |
void | setUnitIntervalHorizontalScrollPosition (float position) |
set the current horizontal scrollbar position as a value in the interval [0, 1]. | |
void | setUnitIntervalVerticalScrollPosition (float position) |
set the current vertical scrollbar position as a value in the interval [0, 1]. | |
void | invalidateFormatting () |
Invalidate string formatting and scrollbars visibility. More... | |
Public Member Functions inherited from CEGUI::FalagardStatic | |
FalagardStatic (const String &type) | |
type name for this widget. More... | |
bool | isFrameEnabled (void) const |
Return whether the frame for this static widget is enabled or disabled. More... | |
bool | isBackgroundEnabled (void) const |
Return whether the background for this static widget is enabled to disabled. More... | |
void | setFrameEnabled (bool setting) |
Enable or disable rendering of the frame for this static widget. More... | |
void | setBackgroundEnabled (bool setting) |
Enable or disable rendering of the background for this static widget. More... | |
Public Member Functions inherited from CEGUI::WindowRenderer | |
WindowRenderer (const String &name, const String &class_name="Window") | |
Constructor. More... | |
virtual | ~WindowRenderer () |
Destructor. | |
const String & | getName () const |
Returns the factory type name of this window renderer. | |
Window * | getWindow () const |
Get the window this windowrenderer is attached to. | |
const String & | getClass () const |
Get the "minimum" Window class this renderer requires. | |
const WidgetLookFeel & | getLookNFeel () 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. | |
virtual void | update (float) |
perform any time based updates for this WindowRenderer. | |
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. | |
Static Public Attributes inherited from CEGUI::FalagardStatic | |
static const String | TypeName |
Protected Types | |
typedef std::vector< Event::Connection > | ConnectionList |
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. | |
Protected Member Functions | |
void | updateFormatting () const |
Update string formatting and scrollbars visibility. More... | |
void | updateFormatting (const Sizef &) const |
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 () const |
void | configureScrollbars (void) |
Scrollbar * | getVertScrollbar () const |
Scrollbar * | getHorzScrollbar () const |
Rectf | getTextRenderArea () const |
Sizef | getDocumentSize () 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 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. | |
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. | |
FormattedRenderedString * | d_formattedRenderedString |
Class that renders RenderedString with some formatting. | |
ConnectionList | d_connections |
bool | d_formatValid |
True when string formatting and scrollbars visibility are up to date. | |
Protected Attributes inherited from CEGUI::FalagardStatic | |
bool | d_frameEnabled |
True when the frame is enabled. | |
bool | d_backgroundEnabled |
true when the background is enabled. | |
Protected Attributes inherited from CEGUI::WindowRenderer | |
Window * | d_window |
Pointer to the window this windowrenderer is assigned to. | |
const String | d_name |
Name of the factory type used to create this window renderer. | |
const String | d_class |
Name of the widget class that is the "minimum" requirement. | |
PropertyList | d_properties |
The list of properties that this windowrenderer will be handling. | |
StaticText class for the FalagardBase module.
This class requires LookNFeel to be assigned. The LookNFeel should provide the following:
States:
Named Areas (missing areas will default to 'WithFrameTextRenderArea'): WithFrameTextRenderArea WithFrameTextRenderAreaHScroll WithFrameTextRenderAreaVScroll WithFrameTextRenderAreaHVScroll NoFrameTextRenderArea NoFrameTextRenderAreaHScroll NoFrameTextRenderAreaVScroll NoFrameTextRenderAreaHVScroll
|
protected |
float CEGUI::FalagardStaticText::getHorizontalScrollPosition | ( | ) | const |
Get the current position of the horizontal scrollbar within the text.
The range of the scrollbar is from 0 to the width of the text minus the width of a page (0 <= position <= (textSize - pageSize)).
position | Float value specifying the position of the scrollbar within the text. |
float CEGUI::FalagardStaticText::getVerticalScrollPosition | ( | ) | const |
Get the current position of the vertical scrollbar within the text.
The range of the scrollbar is from 0 to the height of the text minus the height of a page (0 <= position <= (textSize - pageSize)).
position | Float value specifying the position of the scrollbar within the text. |
|
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::FalagardStaticText::invalidateFormatting | ( | ) |
Invalidate string formatting and scrollbars visibility.
This sets a "dirty" flag which causes "updateFormatting" to actually perform an update.
|
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.
void CEGUI::FalagardStaticText::setHorizontalScrollPosition | ( | float | position | ) |
Set the current position of the horizontal scrollbar within the text.
The range of the scrollbar is from 0 to the width of the text minus the width of a page (0 <= position <= (textSize - pageSize)), any attempt to set the position outside this range will be adjusted so that it falls within the legal range.
position | Float value specifying the position of the scrollbar within the text. |
void CEGUI::FalagardStaticText::setVerticalScrollPosition | ( | float | position | ) |
Set the current position of the vertical scrollbar within the text.
The range of the scrollbar is from 0 to the height of the text minus the height of a page (0 <= position <= (textSize - pageSize)), any attempt to set the position outside this range will be adjusted so that it falls within the legal range.
position | Float value specifying the position of the scrollbar within the text. |
|
protected |
Update string formatting and scrollbars visibility.
This only happens if a "dirty" flag is set. The flag is set by "invalidateFormatting".
|
protected |