32#include <wx/datetime.h>
33#include <wx/cmdline.h>
36#include <wx/msw/private.h>
51enum TableState { TABLE_SETUP_WIDTHS = 0, TABLE_FILL_DATA, TABLE_FILL_HEADER };
69 std::vector<std::vector<wxString> > data;
70 std::vector<double> widths;
71 std::vector<wxString> header;
82 Table& operator<<(
const int&);
83 Table& operator<<(
const double&);
84 Table& operator<<(
const wxString&);
86 std::vector<std::vector<wxString> >& GetData() {
return data; };
88 void StartFillData() { state = TABLE_FILL_DATA; };
90 void StartFillHeader() { state = TABLE_FILL_HEADER; };
92 void StartFillWidths() { state = TABLE_SETUP_WIDTHS; };
94 int GetRowHeight(
int i) {
return widths[i]; };
97std::ostream& operator<<(std::ostream&,
Table&);
124 wxString modified_content;
144 void Init(
const wxString& _content, wxDC* _dc,
int _width,
int _cellpadding,
145 bool bold_font =
false);
148 wxRect GetRect() {
return rect; };
151 wxString GetText() {
return modified_content; };
154 int GetHeight() {
return height; };
157 int GetWidth() {
return width; };
160 void SetPage(
int _page) { page = _page; };
163 void SetHeight(
int _height) { height = _height; };
166 int GetPage() {
return page; };
180 std::vector<std::vector<PrintCell> > contents;
181 std::vector<PrintCell> header_content;
182 std::vector<int> rows_heights;
193 void AdjustCells(wxDC* _dc,
int marginX,
int marginY);
196 std::vector<std::vector<PrintCell> >& GetContent() {
return contents; };
198 std::vector<PrintCell>& GetHeader() {
return header_content; };
200 int GetNumberPages() {
return number_of_pages; };
203 int GetHeaderHeight() {
return header_height; };
This class takes multilined string and modifies it to fit into given width for given device.
Extension of a class Table with printing into dc.
Represents a NxM simple table with captions.
TableState
Enumeration is used to notice the state of the table.