Crazy Eddie's GUI System  0.8.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
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...

Inherits CEGUI::AllocatedObject< RenderedStringComponent >.

Inherited by CEGUI::RenderedStringImageComponent, CEGUI::RenderedStringTextComponent, and CEGUI::RenderedStringWidgetComponent.

+ 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 Rectf &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 RectfgetPadding () 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 (const Window *ref_wnd, GeometryBuffer &buffer, const Vector2f &position, const ColourRect *mod_colours, const Rectf *clip_rect, const float vertical_space, const float space_extra) const =0
 draw the component.
 
virtual Sizef getPixelSize (const Window *ref_wnd) const =0
 return the pixel size of the rendered component.
 
virtual bool canSplit () const =0
 return whether the component can be split
 
virtual RenderedStringComponentsplit (const Window *ref_wnd, 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.
 
virtual void setSelection (const Window *ref_wnd, const float start, const float end)=0
 mark some region appropriate given /a start and /a end as selected.
 

Protected Member Functions

 RenderedStringComponent ()
 Protected constructor.
 

Protected Attributes

Rectf 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.
 
const Imaged_selectionImage
 Image to draw for selection.
 

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 ( const Window ref_wnd,
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::RenderedStringImageComponent, CEGUI::RenderedStringTextComponent, and CEGUI::RenderedStringWidgetComponent.