IWORKTable.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libetonyek project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef IWORKTABLE_H_INCLUDED
11 #define IWORKTABLE_H_INCLUDED
12 
13 #include <boost/optional.hpp>
14 
15 #include <deque>
16 
17 #include "IWORKTypes.h"
18 #include "IWORKOutputElements.h"
19 
20 namespace libetonyek
21 {
22 
24 {
25  struct Cell
26  {
28  unsigned m_columnSpan;
29  unsigned m_rowSpan;
30  bool m_covered;
31 
32  Cell();
33  };
34 
35  typedef std::deque<Cell> Row_t;
36  typedef std::deque<Row_t> Table_t;
37 
38 public:
39  IWORKTable();
40 
41  void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes);
42  void setBorders(const IWORKGridLineList_t &verticalLines, const IWORKGridLineList_t &horizontalLines);
43  void insertCell(unsigned column, unsigned row, const IWORKOutputElements &content = IWORKOutputElements(), unsigned columnSpan = 1, unsigned rowSpan = 1);
44  void insertCoveredCell(unsigned column, unsigned row);
45 
46  void draw(const librevenge::RVNGPropertyList &tableProps, IWORKOutputElements &elements);
47 
48 private:
49  Table_t m_table;
54 };
55 
56 }
57 
58 #endif // IWORKTABLE_H_INCLUDED
59 
60 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKBezierElement.cpp:18
Definition: IWORKOutputElements.h:25
IWORKRowSizes_t m_rowSizes
Definition: IWORKTable.h:51
void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes)
Definition: IWORKTable.cpp:63
Definition: IWORKTable.h:25
std::deque< Cell > Row_t
Definition: IWORKTable.h:35
std::deque< Row_t > Table_t
Definition: IWORKTable.h:36
IWORKOutputElements m_content
Definition: IWORKTable.h:27
std::vector< IWORKGridLine_t > IWORKGridLineList_t
Definition: IWORKTypes.h:99
IWORKColumnSizes_t m_columnSizes
Definition: IWORKTable.h:50
IWORKGridLineList_t m_horizontalLines
Definition: IWORKTable.h:53
IWORKGridLineList_t m_verticalLines
Definition: IWORKTable.h:52
Table_t m_table
Definition: IWORKTable.h:49
void draw(const librevenge::RVNGPropertyList &tableProps, IWORKOutputElements &elements)
Definition: IWORKTable.cpp:100
unsigned m_rowSpan
Definition: IWORKTable.h:29
unsigned m_columnSpan
Definition: IWORKTable.h:28
std::deque< double > IWORKColumnSizes_t
Definition: IWORKTypes_fwd.h:22
IWORKTable()
Definition: IWORKTable.cpp:54
std::deque< double > IWORKRowSizes_t
Definition: IWORKTypes_fwd.h:24
void insertCell(unsigned column, unsigned row, const IWORKOutputElements &content=IWORKOutputElements(), unsigned columnSpan=1, unsigned rowSpan=1)
Definition: IWORKTable.cpp:78
Definition: IWORKToken.h:56
Definition: IWORKTable.h:23
void setBorders(const IWORKGridLineList_t &verticalLines, const IWORKGridLineList_t &horizontalLines)
Definition: IWORKTable.cpp:72
Definition: IWORKToken.h:63
void insertCoveredCell(unsigned column, unsigned row)
Definition: IWORKTable.cpp:90
Cell()
Definition: IWORKTable.cpp:46
bool m_covered
Definition: IWORKTable.h:30

Generated for libetonyek by doxygen 1.8.8