wxFreeChart
Public Member Functions | List of all members
TextElementContainer Class Reference

Represents a chart title. More...

#include <title.h>

Public Member Functions

 wxDEPRECATED_MSG ("Use TextElementContainer(const TextElement&) instead)") TextElementContainer(const wxString &title)
 
 TextElementContainer (const TextElement &element)
 
 TextElementContainer (const TextElementContainer &orig)
 
TextElementContaineroperator= (const TextElementContainer &title)
 
void AddElement (TextElement element)
 Adds a TextElement to the TextElementContainer. More...
 
bool IsEmpty () const
 Checks whether the TextElementContainer is empty. More...
 
void Draw (wxDC &dc, wxRect rc)
 Draws the TextElementContainer. More...
 
wxSize CalculateExtent (wxDC &dc)
 Calculates the extent of the TextElementContainer. More...
 

Detailed Description

Represents a chart title.

Divides the title line into three boxes which could be independently filled with content. When drawing the title, the text in the boxes is wrapped at word boundary.

Definition at line 77 of file title.h.

Member Function Documentation

void TextElementContainer::AddElement ( TextElement  element)

Adds a TextElement to the TextElementContainer.

Title takes ownership of the TextElement object.

Parameters
elementA new TextElement object which is added to the list of elements.
wxSize TextElementContainer::CalculateExtent ( wxDC &  dc)

Calculates the extent of the TextElementContainer.

Parameters
dcA wxDC drawing context.
rcThe rectangle of the drawing area
Returns
The dimension of the TextElementContainer.
void TextElementContainer::Draw ( wxDC &  dc,
wxRect  rc 
)

Draws the TextElementContainer.

Parameters
dcThe wxDC drawing context used to draw the text.
rcThe rectangle of the drawing area.
bool TextElementContainer::IsEmpty ( ) const

Checks whether the TextElementContainer is empty.

Returns
true if the title is empty, false otherwise.

The documentation for this class was generated from the following file: