IWORKTypes.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 IWORKTYPES_H_INCLUDED
11 #define IWORKTYPES_H_INCLUDED
12 
13 #include "IWORKTypes_fwd.h"
14 
15 #include <deque>
16 #include <string>
17 
18 #include <boost/optional.hpp>
19 
20 #include <mdds/flat_segment_tree.hpp>
21 
22 #include "libetonyek_utils.h"
23 #include "IWORKEnum.h"
24 #include "IWORKPath_fwd.h"
25 #include "IWORKStyle_fwd.h"
26 
27 namespace libetonyek
28 {
29 
31 
32 typedef boost::unordered_map<std::string, IWORKOutputElements> IWORKHeaderFooterMap_t;
33 
34 struct IWORKSize
35 {
36  double m_width;
37  double m_height;
38 
39  IWORKSize();
40  IWORKSize(double w, double h);
41 };
42 
44 {
45  double m_x;
46  double m_y;
47 
48  IWORKPosition();
49  IWORKPosition(double x_, double y_);
50 };
51 
53 {
57  boost::optional<double> m_angle;
58  boost::optional<double> m_shearXAngle;
59  boost::optional<double> m_shearYAngle;
60  boost::optional<bool> m_horizontalFlip;
61  boost::optional<bool> m_verticalFlip;
62  boost::optional<bool> m_aspectRatioLocked;
63  boost::optional<bool> m_sizesLocked;
64 
65  IWORKGeometry();
66 };
67 
68 struct IWORKColor
69 {
70  double m_red;
71  double m_green;
72  double m_blue;
73  double m_alpha;
74 
75  IWORKColor();
76  IWORKColor(double r, double g, double b, double a);
77 };
78 
80 {
81  boost::optional<int> m_top;
82  boost::optional<int> m_right;
83  boost::optional<int> m_bottom;
84  boost::optional<int> m_left;
85 
86  IWORKPadding();
87 };
88 
90 {
91  double m_pos;
92 
93  explicit IWORKTabStop(double pos_);
94 };
95 
96 typedef std::deque<IWORKTabStop> IWORKTabStops_t;
97 typedef boost::unordered_map<ID_t, IWORKTabStops_t> IWORKTabStopsMap_t;
98 typedef mdds::flat_segment_tree<unsigned, IWORKStylePtr_t> IWORKGridLine_t;
99 typedef std::vector<IWORKGridLine_t> IWORKGridLineList_t;
100 
101 struct IWORKLine
102 {
105  boost::optional<double> m_x1;
106  boost::optional<double> m_y1;
107  boost::optional<double> m_x2;
108  boost::optional<double> m_y2;
109 
110  IWORKLine();
111 };
112 
113 struct IWORKData
114 {
116  boost::optional<std::string> m_displayName;
118 
119  IWORKData();
120 };
121 
123 {
124  boost::optional<IWORKSize> m_size;
126 
128 };
129 
131 {
132  boost::optional<IWORKSize> m_size;
133  boost::optional<std::string> m_path;
134  boost::optional<std::string> m_type;
135  boost::optional<unsigned> m_dataSize;
136 
137  IWORKBinary();
138 };
139 
141 {
142  boost::optional<bool> m_locked;
144  boost::optional<IWORKBinary> m_binary;
145 
146  IWORKImage();
147 };
148 
150 {
153  boost::optional<bool> m_placeholder;
154  boost::optional<IWORKSize> m_placeholderSize;
156 
157  IWORKMedia();
158 };
159 
160 struct IWORKWrap
161 {
164 
165  IWORKWrap();
166 };
167 
169 {
170  IWORKLineSpacing(double value, bool relative);
171 
172  double m_value;
174 };
175 
177 {
178  IWORKTableData();
179 
182 
183  unsigned m_column;
184  unsigned m_row;
185  unsigned m_numColumns;
186  unsigned m_numRows;
187 
188  boost::optional<unsigned> m_columnSpan;
189  boost::optional<unsigned> m_rowSpan;
190  boost::optional<unsigned> m_cellMove;
191  boost::optional<std::string> m_content;
192  IWORKGridLineList_t m_horizontalLines;
193  IWORKGridLineList_t m_verticalLines;
194 };
195 
197 {
198  IWORKStroke();
199 
200  double m_width;
204  std::deque<double> m_pattern;
205 };
206 
208 {
209  IWORKMetadata();
210 
215 };
216 
218 {
219  struct Column
220  {
221  Column();
222 
223  double m_width;
224  double m_spacing;
225  };
226 
227  typedef std::deque<Column> Columns_t;
228 
229  IWORKColumns();
230 
231  bool m_equal;
232  Columns_t m_columns;
233 };
234 
235 }
236 
237 #endif // IWORKTYPES_H_INCLUDED
238 
239 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
std::string m_keywords
Definition: IWORKTypes.h:213
boost::optional< double > m_x1
Definition: IWORKTypes.h:105
Definition: IWORKBezierElement.cpp:18
double m_blue
Definition: IWORKTypes.h:72
Definition: IWORKOutputElements.h:25
boost::optional< double > m_angle
Definition: IWORKTypes.h:57
boost::optional< double > m_shearXAngle
Definition: IWORKTypes.h:58
std::string m_comment
Definition: IWORKTypes.h:214
unsigned m_numRows
Definition: IWORKTypes.h:186
double m_width
Definition: IWORKTypes.h:200
boost::shared_ptr< IWORKMediaContent > IWORKMediaContentPtr_t
Definition: IWORKTypes_fwd.h:46
boost::optional< unsigned > m_columnSpan
Definition: IWORKTypes.h:188
boost::optional< bool > m_horizontalFlip
Definition: IWORKTypes.h:60
Definition: IWORKTypes.h:196
IWORKLineJoin m_join
Definition: IWORKTypes.h:202
Definition: IWORKTypes.h:68
boost::optional< bool > m_sizesLocked
Definition: IWORKTypes.h:63
IWORKMediaContentPtr_t m_content
Definition: IWORKTypes.h:155
boost::optional< int > m_bottom
Definition: IWORKTypes.h:83
boost::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
double m_width
Definition: IWORKTypes.h:223
IWORKGridLineList_t m_horizontalLines
Definition: IWORKTypes.h:192
Definition: IWORKTypes.h:140
IWORKStylePtr_t m_style
Definition: IWORKTypes.h:104
Definition: IWORKTypes.h:113
IWORKLineJoin
Definition: IWORKEnum.h:62
boost::optional< IWORKSize > m_placeholderSize
Definition: IWORKTypes.h:154
Definition: IWORKToken.h:213
std::deque< double > m_pattern
Definition: IWORKTypes.h:204
unsigned m_numColumns
Definition: IWORKTypes.h:185
IWORKSize()
Definition: IWORKTypes.cpp:17
Definition: IWORKTypes.h:217
IWORKSize m_naturalSize
Definition: IWORKTypes.h:54
boost::optional< IWORKSize > m_size
Definition: IWORKTypes.h:132
double m_value
Definition: IWORKTypes.h:172
mdds::flat_segment_tree< unsigned, IWORKStylePtr_t > IWORKGridLine_t
Definition: IWORKTypes.h:98
IWORKStylePtr_t m_style
Definition: IWORKTypes.h:152
boost::optional< std::string > m_content
Definition: IWORKTypes.h:191
Definition: IWORKTypes.h:160
Definition: IWORKToken.h:177
boost::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:33
Definition: IWORKTypes.h:101
Definition: IWORKTypes.h:34
double m_width
Definition: IWORKTypes.h:36
Definition: IWORKTypes.h:168
double m_x
Definition: IWORKTypes.h:45
IWORKGridLineList_t m_verticalLines
Definition: IWORKTypes.h:193
Columns_t m_columns
Definition: IWORKTypes.h:232
boost::optional< unsigned > m_cellMove
Definition: IWORKTypes.h:190
boost::optional< unsigned > m_dataSize
Definition: IWORKTypes.h:135
IWORKGeometryPtr_t m_geometry
Definition: IWORKTypes.h:143
IWORKSize m_size
Definition: IWORKTypes.h:55
std::deque< IWORKTabStop > IWORKTabStops_t
Definition: IWORKTypes.h:96
Definition: IWORKTypes.h:79
unsigned m_column
Definition: IWORKTypes.h:183
IWORKGeometryPtr_t m_geometry
Definition: IWORKTypes.h:103
std::vector< IWORKGridLine_t > IWORKGridLineList_t
Definition: IWORKTypes.h:99
Definition: IWORKToken.h:261
boost::shared_ptr< IWORKPath > IWORKPathPtr_t
Definition: IWORKPath_fwd.h:19
Definition: IWORKTypes.h:89
IWORKDataPtr_t m_data
Definition: IWORKTypes.h:125
boost::optional< bool > m_placeholder
Definition: IWORKTypes.h:153
Definition: IWORKToken.h:218
Definition: IWORKTypes.h:176
IWORKPosition m_position
Definition: IWORKTypes.h:56
bool m_relative
Definition: IWORKTypes.h:173
boost::shared_ptr< IWORKData > IWORKDataPtr_t
Definition: IWORKTypes_fwd.h:41
boost::optional< unsigned > m_rowSpan
Definition: IWORKTypes.h:189
boost::optional< IWORKSize > m_size
Definition: IWORKTypes.h:124
Definition: IWORKTypes.h:122
IWORKLineCap m_cap
Definition: IWORKTypes.h:203
boost::optional< bool > m_aspectRatioLocked
Definition: IWORKTypes.h:62
Definition: IWORKToken.h:91
Definition: IWORKTypes.h:130
Definition: IWORKToken.h:157
RVNGInputStreamPtr_t m_stream
Definition: IWORKTypes.h:115
std::deque< double > IWORKColumnSizes_t
Definition: IWORKTypes_fwd.h:22
Definition: IWORKToken.h:229
boost::optional< int > m_right
Definition: IWORKTypes.h:82
bool m_equal
Definition: IWORKTypes.h:231
std::deque< double > IWORKRowSizes_t
Definition: IWORKTypes_fwd.h:24
boost::optional< std::string > m_type
Definition: IWORKTypes.h:134
Definition: IWORKTypes.h:43
boost::optional< bool > m_verticalFlip
Definition: IWORKTypes.h:61
double m_height
Definition: IWORKTypes.h:37
boost::optional< double > m_y2
Definition: IWORKTypes.h:108
boost::optional< std::string > m_displayName
Definition: IWORKTypes.h:116
IWORKGeometryPtr_t m_geometry
Definition: IWORKTypes.h:163
boost::unordered_map< std::string, IWORKOutputElements > IWORKHeaderFooterMap_t
Definition: IWORKTypes.h:30
double m_spacing
Definition: IWORKTypes.h:224
boost::optional< double > m_shearYAngle
Definition: IWORKTypes.h:59
IWORKLineCap
Definition: IWORKEnum.h:56
IWORKRowSizes_t m_rowSizes
Definition: IWORKTypes.h:181
Definition: IWORKTypes.h:52
std::string m_author
Definition: IWORKTypes.h:212
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:99
std::string m_mimeType
Definition: IWORKTypes.h:117
Definition: IWORKToken.h:279
IWORKPathPtr_t m_path
Definition: IWORKTypes.h:162
boost::unordered_map< ID_t, IWORKTabStops_t > IWORKTabStopsMap_t
Definition: IWORKTypes.h:97
Definition: IWORKTypes.h:219
IWORKColumnSizes_t m_columnSizes
Definition: IWORKTypes.h:180
boost::optional< IWORKBinary > m_binary
Definition: IWORKTypes.h:144
std::deque< Column > Columns_t
Definition: IWORKTypes.h:227
boost::optional< double > m_y1
Definition: IWORKTypes.h:106
double m_y
Definition: IWORKTypes.h:46
unsigned m_row
Definition: IWORKTypes.h:184
boost::optional< std::string > m_path
Definition: IWORKTypes.h:133
double m_green
Definition: IWORKTypes.h:71
boost::optional< int > m_left
Definition: IWORKTypes.h:84
boost::optional< bool > m_locked
Definition: IWORKTypes.h:142
IWORKColor m_color
Definition: IWORKTypes.h:201
double m_alpha
Definition: IWORKTypes.h:73
std::string m_title
Definition: IWORKTypes.h:211
boost::optional< double > m_x2
Definition: IWORKTypes.h:107
double m_pos
Definition: IWORKTypes.h:91
double m_red
Definition: IWORKTypes.h:70
IWORKGeometryPtr_t m_geometry
Definition: IWORKTypes.h:151
boost::optional< int > m_top
Definition: IWORKTypes.h:81
Definition: IWORKTypes.h:207
Definition: IWORKTypes.h:149

Generated for libetonyek by doxygen 1.8.11