27 #ifndef _CEGUIRenderedString_h_
28 #define _CEGUIRenderedString_h_
30 #include "CEGUI/Size.h"
31 #include "CEGUI/Rect.h"
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
50 class CEGUIEXPORT RenderedString :
51 public AllocatedObject<RenderedString>
58 virtual ~RenderedString();
96 void draw(
const Window* ref_wnd,
97 const size_t line, GeometryBuffer& buffer,
98 const Vector2f& position,
const ColourRect* mod_colours,
99 const Rectf* clip_rect,
const float space_extra)
const;
115 Sizef getPixelSize(
const Window* ref_wnd,
const size_t line)
const;
118 float getHorizontalExtent(
const Window* ref_wnd)
const;
121 float getVerticalExtent(
const Window* ref_wnd)
const;
124 void appendComponent(
const RenderedStringComponent& component);
127 void clearComponents();
130 size_t getComponentCount()
const;
155 void split(
const Window* ref_wnd,
156 const size_t line,
float split_point, RenderedString& left);
159 size_t getSpaceCount(
const size_t line)
const;
162 void appendLineBreak();
165 size_t getLineCount()
const;
168 void setSelection(
const Window* ref_wnd,
float start,
float end);
171 RenderedString(
const RenderedString& other);
173 RenderedString& operator=(
const RenderedString& rhs);
177 typedef std::vector<RenderedStringComponent*
178 CEGUI_VECTOR_ALLOC(RenderedStringComponent*)> ComponentList;
180 ComponentList d_components;
182 typedef std::pair<size_t, size_t> LineInfo;
184 typedef std::vector<LineInfo
185 CEGUI_VECTOR_ALLOC(LineInfo)> LineList;
189 void cloneComponentList(
const ComponentList& list);
191 static void clearComponentList(ComponentList& list);
196 #if defined(_MSC_VER)
197 # pragma warning(pop)
200 #endif // end of guard _CEGUIRenderedString_h_