Crazy Eddies GUI System  0.7.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CEGUI::RenderedStringComponent Class Referenceabstract

Base class representing a part of a rendered string. The 'part' represented may be a text string, an image or some other entity. More...

+ Inheritance diagram for CEGUI::RenderedStringComponent:
+ Collaboration diagram for CEGUI::RenderedStringComponent:

Public Member Functions

virtual ~RenderedStringComponent ()
 Destructor.
 
void setVerticalFormatting (VerticalFormatting fmt)
 Set the VerticalFormatting option for this component.
 
VerticalFormatting getVerticalFormatting () const
 return the current VerticalFormatting option.
 
void setPadding (const Rect &padding)
 set the padding values.
 
void setLeftPadding (const float padding)
 set the left padding value.
 
void setRightPadding (const float padding)
 set the right padding value.
 
void setTopPadding (const float padding)
 set the top padding value.
 
void setBottomPadding (const float padding)
 set the Bottom padding value.
 
const RectgetPadding () const
 return the current padding value Rect.
 
float getLeftPadding () const
 return the left padding value.
 
float getRightPadding () const
 return the right padding value.
 
float getTopPadding () const
 return the top padding value.
 
float getBottomPadding () const
 return the bottom padding value.
 
void setAspectLock (const bool setting)
 set the aspect-lock state
 
bool getAspectLock () const
 return the aspect-lock state
 
virtual void draw (GeometryBuffer &buffer, const Vector2 &position, const ColourRect *mod_colours, const Rect *clip_rect, const float vertical_space, const float space_extra) const =0
 draw the component.
 
virtual Size getPixelSize () const =0
 return the pixel size of the rendered component.
 
virtual bool canSplit () const =0
 return whether the component can be split
 
virtual RenderedStringComponentsplit (float split_point, bool first_component)=0
 split the component as close to split_point as possible, returning a new RenderedStringComponent of the same type as '*this' holding the left side of the split, and leaving the right side of the split in this object. More...
 
virtual RenderedStringComponentclone () const =0
 clone this component.
 
virtual size_t getSpaceCount () const =0
 return the total number of spacing characters in the string.
 

Protected Member Functions

 RenderedStringComponent ()
 Protected constructor.
 

Protected Attributes

Rect d_padding
 Rect object holding the padding values for this component.
 
VerticalFormatting d_verticalFormatting
 Vertical formatting to be used for this component.
 
bool d_aspectLock
 true if the aspect ratio should be maintained where possible.
 

Detailed Description

Base class representing a part of a rendered string. The 'part' represented may be a text string, an image or some other entity.

Member Function Documentation

virtual RenderedStringComponent* CEGUI::RenderedStringComponent::split ( float  split_point,
bool  first_component 
)
pure virtual

split the component as close to split_point as possible, returning a new RenderedStringComponent of the same type as '*this' holding the left side of the split, and leaving the right side of the split in this object.

Exceptions
InvalidRequestExceptionthrown if the RenderedStringComponent does not support being split.

Implemented in CEGUI::RenderedStringTextComponent, CEGUI::RenderedStringImageComponent, and CEGUI::RenderedStringWidgetComponent.