KEYTable.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 KEYTABLE_H_INCLUDED
11 #define KEYTABLE_H_INCLUDED
12 
13 #include <deque>
14 
15 #include "KEYObject.h"
16 
17 namespace libetonyek
18 {
19 
20 class KEYTable
21 {
22  struct Cell
23  {
25  unsigned columnSpan;
26  unsigned rowSpan;
27  bool covered;
28 
29  Cell();
30  };
31 
32  typedef std::deque<Cell> Row_t;
33  typedef std::deque<Row_t> Table_t;
34 
35 public:
36  typedef std::deque<double> ColumnSizes_t;
37  typedef std::deque<double> RowSizes_t;
38 
39 public:
40  KEYTable();
41 
42  void setSizes(const ColumnSizes_t &columnSizes, const RowSizes_t &rowSizes);
43  void insertCell(unsigned column, unsigned row, const KEYObjectPtr_t &content = KEYObjectPtr_t(), unsigned columnSpan = 1, unsigned rowSpan = 1);
44  void insertCoveredCell(unsigned column, unsigned row);
45 
47 
48  void draw(const KEYOutput &output) const;
49 
50 private:
55 };
56 
57 KEYObjectPtr_t makeObject(const KEYTable &table);
58 
59 }
60 
61 #endif // KEYTABLE_H_INCLUDED
62 
63 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libetonyek by doxygen 1.8.3.1