Version: 0.6.0
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Variables
Pages
title.h
1
// Name: chart.h
3
// Purpose: title text element declarations
4
// Author: Andreas Kuechler
5
// Created: 2010/03/23
6
// Copyright: (c) 2010 Andreas Kulcher
7
// Licence: wxWidgets licence
9
10
#ifndef TITLE_H_
11
#define TITLE_H_
12
13
#include <wx/wxfreechartdefs.h>
14
#include <wx/arrstr.h>
15
#include <wx/hashmap.h>
16
#include <wx/defs.h>
17
21
class
WXDLLIMPEXP_FREECHART
TextElement
22
{
23
public
:
24
// Constructors
25
TextElement
(
const
wxString& text,
int
hAlign, wxFont font = *wxNORMAL_FONT);
26
TextElement
(
const
TextElement
& orig);
27
28
TextElement
& operator = (
const
TextElement
& orig);
29
30
virtual
~
TextElement
();
31
36
wxSize CalculateExtent(wxDC& dc);
37
43
void
Draw(wxDC& dc, wxRect rc);
44
49
void
SetHorzAlign
(
int
hAlign)
50
{
51
m_hAlign = hAlign;
52
}
53
58
void
SetColour
(wxColour colour)
59
{
60
m_textColour = colour;
61
}
62
63
private
:
64
wxString m_text;
65
int
m_hAlign;
66
wxFont m_font;
67
wxColour m_textColour;
68
};
69
70
WX_DECLARE_USER_EXPORTED_OBJARRAY(
TextElement
, Elements, WXDLLIMPEXP_FREECHART);
71
77
class
WXDLLIMPEXP_FREECHART
TextElementContainer
78
{
79
public
:
80
TextElementContainer
();
81
TextElementContainer
(
const
wxString& title);
82
TextElementContainer
(
const
TextElementContainer
& orig);
83
TextElementContainer
& operator=(
const
TextElementContainer
& title);
84
virtual
~
TextElementContainer
();
85
91
void
AddElement(
TextElement
element);
92
97
bool
IsEmpty()
const
;
98
104
void
Draw(wxDC& dc, wxRect rc);
105
112
wxSize CalculateExtent(wxDC& dc);
113
114
private
:
115
Elements m_elements;
116
wxSize m_extent;
117
size_t
m_margin;
118
};
119
120
121
typedef
TextElementContainer
Header
;
122
typedef
TextElementContainer
Footer
;
123
124
#endif // TITLE_H_
TextElement::SetHorzAlign
void SetHorzAlign(int hAlign)
Definition:
title.h:49
TextElement::SetColour
void SetColour(wxColour colour)
Definition:
title.h:58
TextElement
Definition:
title.h:21
TextElementContainer
Definition:
title.h:77
include
freechart
wx
title.h
Generated on Fri Sep 26 2014 01:10:55 for ngm by
1.8.6