CL_SpanLayout Class Reference
[clanDisplay 2D]

Span layout class. More...

#include <span_layout.h>

List of all members.

Public Member Functions

Construction
 CL_SpanLayout ()
 ~CL_SpanLayout ()
Operations
void clear ()
 Clear.
void add_text (const CL_String &text, const CL_Font &font, const CL_Colorf &color=CL_Colorf::white, int id=-1)
 Add text.
void add_image (const CL_Image &image, int baseline_offset=0, int id=-1)
 Add image.
template<typename T>
void add_component (T *component, int baseline_offset=0, int id=-1)
 Add component.
void layout (CL_GraphicContext &gc, int max_width)
 Layout.
void set_position (const CL_Point &pos)
 Set position.
CL_Size get_size () const
 Get Size.
std::vector< CL_Rectget_rect_by_id (int id) const
 Get Rect By Id.
HitTestResult hit_test (CL_GraphicContext &gc, const CL_Point &pos)
 Hit test.
void draw_layout (CL_GraphicContext &gc)
 Draw layout.
void set_component_geometry ()
 Set component geometry.
CL_Size find_preferred_size (CL_GraphicContext &gc)
 Find preferred size.
void set_selection_range (CL_String::size_type start, CL_String::size_type end)
 Set selection range.
void set_selection_colors (const CL_Colorf &foreground, const CL_Colorf &background)
 Set selection colors.
CL_String get_combined_text () const
 Get Combined text.
void set_align (CL_SpanAlign align)
 Sets the text alignment.

Classes

struct  HitTestResult


Detailed Description

Span layout class.


Constructor & Destructor Documentation

CL_SpanLayout::CL_SpanLayout  ) 
 

CL_SpanLayout::~CL_SpanLayout  ) 
 


Member Function Documentation

template<typename T>
void CL_SpanLayout::add_component T *  component,
int  baseline_offset = 0,
int  id = -1
[inline]
 

Add component.

Parameters:
component = T
baseline_offset = value
id = value

void CL_SpanLayout::add_image const CL_Image image,
int  baseline_offset = 0,
int  id = -1
 

Add image.

Parameters:
image = Image
baseline_offset = value
id = value

void CL_SpanLayout::add_text const CL_String text,
const CL_Font font,
const CL_Colorf color = CL_Colorf::white,
int  id = -1
 

Add text.

Parameters:
text = String
font = Font
color = Colorf
id = value

void CL_SpanLayout::clear  ) 
 

Clear.

void CL_SpanLayout::draw_layout CL_GraphicContext gc  ) 
 

Draw layout.

Parameters:
gc = Graphic Context

CL_Size CL_SpanLayout::find_preferred_size CL_GraphicContext gc  ) 
 

Find preferred size.

Parameters:
gc = Graphic Context
Returns:
Size

CL_String CL_SpanLayout::get_combined_text  )  const
 

Get Combined text.

Returns:
combined_text

std::vector<CL_Rect> CL_SpanLayout::get_rect_by_id int  id  )  const
 

Get Rect By Id.

Returns:
rect

CL_Size CL_SpanLayout::get_size  )  const
 

Get Size.

Returns:
size

HitTestResult CL_SpanLayout::hit_test CL_GraphicContext gc,
const CL_Point pos
 

Hit test.

Parameters:
gc = Graphic Context
pos = Point
Returns:
Hit Test Result

void CL_SpanLayout::layout CL_GraphicContext gc,
int  max_width
 

Layout.

Parameters:
gc = Graphic Context
max_width = value

void CL_SpanLayout::set_align CL_SpanAlign  align  ) 
 

Sets the text alignment.

Alignment is applied when layout() is called

Parameters:
align = The alignment

void CL_SpanLayout::set_component_geometry  ) 
 

Set component geometry.

void CL_SpanLayout::set_position const CL_Point pos  ) 
 

Set position.

Parameters:
pos = Point

void CL_SpanLayout::set_selection_colors const CL_Colorf foreground,
const CL_Colorf background
 

Set selection colors.

Parameters:
foreground = Colorf
background = Colorf

void CL_SpanLayout::set_selection_range CL_String::size_type  start,
CL_String::size_type  end
 

Set selection range.

Parameters:
size_type = String
size_type = String


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:41 2009 for ClanLib by  doxygen 1.4.6