KEYTypes.h Source File documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

KEYTypes.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 KEYTYPES_H_INCLUDED
11 #define KEYTYPES_H_INCLUDED
12
13 #include <deque>
14
15 #include <boost/optional.hpp>
16
17 #include "libetonyek_utils.h"
18 #include "KEYObject.h"
19 #include "KEYPath_fwd.h"
20 #include "KEYStyle.h"
21 #include "KEYText_fwd.h"
22 #include "KEYTypes_fwd.h"
23
24 namespace libetonyek
25 {
26
27 struct KEYSize
28 {
29 double width;
30 double height;
31
32 KEYSize();
33 KEYSize(double w, double h);
34 };
35
36 struct KEYPosition
37 {
38 double x;
39 double y;
40
41 KEYPosition();
42 KEYPosition(double x_, double y_);
43 };
44
45 struct KEYGeometry
46 {
47 KEYSize naturalSize;
48 KEYSize size;
49 KEYPosition position;
50 boost::optional<double> angle;
51 boost::optional<double> shearXAngle;
52 boost::optional<double> shearYAngle;
53 boost::optional<bool> horizontalFlip;
54 boost::optional<bool> verticalFlip;
55 boost::optional<bool> aspectRatioLocked;
56 boost::optional<bool> sizesLocked;
57
58 KEYGeometry();
59 };
60
61 struct KEYColor
62 {
63 double red;
64 double green;
65 double blue;
66 double alpha;
67
68 KEYColor();
69 KEYColor(double r, double g, double b, double a);
70 };
71
72 struct KEYPadding
73 {
74 boost::optional<int> top;
75 boost::optional<int> right;
76 boost::optional<int> bottom;
77 boost::optional<int> left;
78
79 KEYPadding();
80 };
81
82 struct KEYLine
83 {
84 KEYGeometryPtr_t geometry;
85 KEYStylePtr_t style;
86 boost::optional<double> x1;
87 boost::optional<double> y1;
88 boost::optional<double> x2;
89 boost::optional<double> y2;
90
91 KEYLine();
92 };
93
94 struct KEYData
95 {
96 RVNGInputStreamPtr_t stream;
97 boost::optional<std::string> displayName;
98 boost::optional<int> type;
99
100 KEYData();
101 };
102
103 struct KEYMediaContent
104 {
105 boost::optional<KEYSize> size;
106 KEYDataPtr_t data;
107
108 KEYMediaContent();
109 };
110
111 struct KEYBinary
112 {
113 boost::optional<KEYSize> size;
114 boost::optional<std::string> path;
115 boost::optional<std::string> type;
116 boost::optional<unsigned> dataSize;
117
118 KEYBinary();
119 };
120
121 struct KEYImage
122 {
123 boost::optional<bool> locked;
124 KEYGeometryPtr_t geometry;
125 boost::optional<KEYBinary> binary;
126
127 KEYImage();
128 };
129
130 struct KEYMedia
131 {
132 KEYGeometryPtr_t geometry;
133 KEYGraphicStylePtr_t style;
134 boost::optional<bool> placeholder;
135 boost::optional<KEYSize> placeholderSize;
136 KEYMediaContentPtr_t content;
137
138 KEYMedia();
139 };
140
141 struct KEYWrap
142 {
143 KEYPathPtr_t path;
144 KEYGeometryPtr_t geometry;
145
146 KEYWrap();
147 };
148
149 struct KEYGroup
150 {
151 KEYObjectList_t objects;
152
153 KEYGroup();
154 };
155
156 struct KEYLayer
157 {
158 boost::optional<std::string> type;
159 KEYObjectList_t objects;
160
161 KEYLayer();
162 };
163
164 struct KEYPlaceholder
165 {
166 boost::optional<bool> title;
167 boost::optional<bool> empty;
168 KEYPlaceholderStylePtr_t style;
169 KEYGeometryPtr_t geometry;
170 KEYTextPtr_t text;
171
172 KEYPlaceholder();
173 };
174
175 struct KEYStickyNote
176 {
177 KEYGeometryPtr_t geometry;
178 KEYTextPtr_t text;
179
180 KEYStickyNote();
181 KEYStickyNote(const KEYGeometryPtr_t &geometry, const KEYTextPtr_t &text);
182 };
183
184 typedef std::deque<KEYStickyNote> KEYStickyNotes_t;
185
186 struct KEYTabStop
187 {
188 double pos;
189
190 explicit KEYTabStop(double pos_);
191 };
192
193 typedef std::deque<KEYTabStop> KEYTabStops_t;
194
195 KEYObjectPtr_t makeObject(const KEYGroupPtr_t &group);
196 KEYObjectPtr_t makeObject(const KEYImagePtr_t &image);
197 KEYObjectPtr_t makeObject(const KEYLinePtr_t &line);
198 KEYObjectPtr_t makeObject(const KEYMediaPtr_t &media);
199 KEYObjectPtr_t makeObject(const KEYPlaceholderPtr_t &placeholder);
200
201 }
202
203 #endif // KEYTYPES_H_INCLUDED
204
205 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEY2Token::group
Definition: KEY2Token.h:220
libetonyek::KEYGraphicStylePtr_t
boost::shared_ptr< KEYGraphicStyle > KEYGraphicStylePtr_t
Definition: KEYStyles_fwd.h:36
libetonyek::KEYImage::KEYImage
KEYImage()
Definition: KEYTypes.cpp:189
libetonyek::KEYStickyNotes_t
std::deque< KEYStickyNote > KEYStickyNotes_t
Definition: KEYTypes.h:184
libetonyek
Definition: EtonyekDocument.cpp:40
libetonyek::KEYColor::green
double green
Definition: KEYTypes.h:64
libetonyek::KEYPlaceholder::text
KEYTextPtr_t text
Definition: KEYTypes.h:170
libetonyek::KEY2Token::r
Definition: KEY2Token.h:373
libetonyek::KEYPosition::KEYPosition
KEYPosition()
Definition: KEYTypes.cpp:108
libetonyek::KEYImage::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:124
libetonyek::KEYColor::KEYColor
KEYColor()
Definition: KEYTypes.cpp:134
libetonyek::KEY2Token::g
Definition: KEY2Token.h:212
libetonyek::KEYColor::blue
double blue
Definition: KEYTypes.h:65
libetonyek::KEYGeometry::shearXAngle
boost::optional< double > shearXAngle
Definition: KEYTypes.h:51
KEYTypes_fwd.h
libetonyek::KEYData
Definition: KEYTypes.h:94
KEYText_fwd.h
libetonyek::KEYData::displayName
boost::optional< std::string > displayName
Definition: KEYTypes.h:97
libetonyek::KEYLayer::type
boost::optional< std::string > type
Definition: KEYTypes.h:158
libetonyek::KEYBinary::type
boost::optional< std::string > type
Definition: KEYTypes.h:115
libetonyek::KEYPlaceholder::title
boost::optional< bool > title
Definition: KEYTypes.h:166
libetonyek::KEYTabStops_t
std::deque< KEYTabStop > KEYTabStops_t
Definition: KEYTypes.h:193
libetonyek::KEYStickyNote::KEYStickyNote
KEYStickyNote()
Definition: KEYTypes.cpp:231
libetonyek::KEYLine
Definition: KEYTypes.h:82
libetonyek::KEY2Token::b
Definition: KEY2Token.h:915
libetonyek::KEYMediaContent::KEYMediaContent
KEYMediaContent()
Definition: KEYTypes.cpp:175
libetonyek::KEYStylePtr_t
boost::shared_ptr< KEYStyle > KEYStylePtr_t
Definition: KEYStyle.h:49
libetonyek::KEYPlaceholder
Definition: KEYTypes.h:164
libetonyek::KEYMediaPtr_t
boost::shared_ptr< KEYMedia > KEYMediaPtr_t
Definition: KEYTypes_fwd.h:48
libetonyek::KEYLayer::objects
KEYObjectList_t objects
Definition: KEYTypes.h:159
libetonyek::KEYColor::alpha
double alpha
Definition: KEYTypes.h:66
libetonyek::KEYWrap::KEYWrap
KEYWrap()
Definition: KEYTypes.cpp:205
libetonyek::KEYPosition::y
double y
Definition: KEYTypes.h:39
libetonyek::KEYGeometry::KEYGeometry
KEYGeometry()
Definition: KEYTypes.cpp:120
libetonyek::KEYPadding
Definition: KEYTypes.h:72
libetonyek::KEYDataPtr_t
boost::shared_ptr< KEYData > KEYDataPtr_t
Definition: KEYTypes_fwd.h:33
libetonyek::KEYPlaceholderPtr_t
boost::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition: KEYTypes_fwd.h:65
libetonyek::KEYMedia::placeholderSize
boost::optional< KEYSize > placeholderSize
Definition: KEYTypes.h:135
libetonyek::KEYColor::red
double red
Definition: KEYTypes.h:63
libetonyek::KEYImage
Definition: KEYTypes.h:121
libetonyek::KEYGroup::objects
KEYObjectList_t objects
Definition: KEYTypes.h:151
libetonyek::KEYMediaContentPtr_t
boost::shared_ptr< KEYMediaContent > KEYMediaContentPtr_t
Definition: KEYTypes_fwd.h:38
libetonyek::KEYGeometry::horizontalFlip
boost::optional< bool > horizontalFlip
Definition: KEYTypes.h:53
libetonyek::KEYPathPtr_t
boost::shared_ptr< KEYPath > KEYPathPtr_t
Definition: KEYPath_fwd.h:17
libetonyek::KEYTabStop::KEYTabStop
KEYTabStop(double pos_)
Definition: KEYTypes.cpp:243
libetonyek::KEYPadding::right
boost::optional< int > right
Definition: KEYTypes.h:75
libetonyek::KEYData::KEYData
KEYData()
Definition: KEYTypes.cpp:168
libetonyek::KEYTextPtr_t
boost::shared_ptr< KEYText > KEYTextPtr_t
Definition: KEYText_fwd.h:16
libetonyek::KEYObjectPtr_t
boost::shared_ptr< KEYObject > KEYObjectPtr_t
Definition: KEYObject.h:44
libetonyek::KEYGeometry::verticalFlip
boost::optional< bool > verticalFlip
Definition: KEYTypes.h:54
libetonyek::KEY2Token::placeholder
Definition: KEY2Token.h:1057
libetonyek::KEYGeometry::sizesLocked
boost::optional< bool > sizesLocked
Definition: KEYTypes.h:56
libetonyek::KEYLine::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:84
libetonyek::KEYLine::x1
boost::optional< double > x1
Definition: KEYTypes.h:86
libetonyek::KEYLayer
Definition: KEYTypes.h:156
libetonyek::KEYLine::KEYLine
KEYLine()
Definition: KEYTypes.cpp:158
libetonyek::KEYMedia::KEYMedia
KEYMedia()
Definition: KEYTypes.cpp:196
KEYObject.h
libetonyek::KEY1Token::line
Definition: KEY1Token.h:51
libetonyek::KEYMediaContent::size
boost::optional< KEYSize > size
Definition: KEYTypes.h:105
libetonyek::KEYPlaceholder::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:169
libetonyek::KEYGeometry::aspectRatioLocked
boost::optional< bool > aspectRatioLocked
Definition: KEYTypes.h:55
libetonyek::KEYPadding::left
boost::optional< int > left
Definition: KEYTypes.h:77
libetonyek::KEYPadding::bottom
boost::optional< int > bottom
Definition: KEYTypes.h:76
libetonyek::KEYSize
Definition: KEYTypes.h:27
libetonyek::KEYPlaceholder::empty
boost::optional< bool > empty
Definition: KEYTypes.h:167
libetonyek::KEY2Token::media
Definition: KEY2Token.h:315
libetonyek::KEYMedia::content
KEYMediaContentPtr_t content
Definition: KEYTypes.h:136
libetonyek::KEYGeometry::shearYAngle
boost::optional< double > shearYAngle
Definition: KEYTypes.h:52
libetonyek::KEYGeometry::naturalSize
KEYSize naturalSize
Definition: KEYTypes.h:47
libetonyek::KEYLayer::KEYLayer
KEYLayer()
Definition: KEYTypes.cpp:216
libetonyek::KEY1Token::image
Definition: KEY1Token.h:49
libetonyek::KEYGeometry::position
KEYPosition position
Definition: KEYTypes.h:49
libetonyek::KEYLine::x2
boost::optional< double > x2
Definition: KEYTypes.h:88
libetonyek::makeObject
KEYObjectPtr_t makeObject(const KEYShapePtr_t &shape)
Object creator function for shape.
Definition: KEYShape.cpp:88
libetonyek::KEYPadding::KEYPadding
KEYPadding()
Definition: KEYTypes.cpp:150
libetonyek::KEYPlaceholderStylePtr_t
boost::shared_ptr< KEYPlaceholderStyle > KEYPlaceholderStylePtr_t
Definition: KEYStyles_fwd.h:56
libetonyek::KEYLine::style
KEYStylePtr_t style
Definition: KEYTypes.h:85
libetonyek::KEYTabStop::pos
double pos
Definition: KEYTypes.h:188
libetonyek::KEYData::type
boost::optional< int > type
Definition: KEYTypes.h:98
libetonyek::KEYImagePtr_t
boost::shared_ptr< KEYImage > KEYImagePtr_t
Definition: KEYTypes_fwd.h:43
libetonyek::KEYSize::width
double width
Definition: KEYTypes.h:29
libetonyek::KEYGroup::KEYGroup
KEYGroup()
Definition: KEYTypes.cpp:211
libetonyek::KEYLinePtr_t
boost::shared_ptr< KEYLine > KEYLinePtr_t
Definition: KEYTypes_fwd.h:29
libetonyek::KEYGeometry::angle
boost::optional< double > angle
Definition: KEYTypes.h:50
libetonyek::KEYBinary::KEYBinary
KEYBinary()
Definition: KEYTypes.cpp:181
libetonyek::KEYTabStop
Definition: KEYTypes.h:186
libetonyek::KEYWrap::path
KEYPathPtr_t path
Definition: KEYTypes.h:143
libetonyek::KEYMedia
Definition: KEYTypes.h:130
libetonyek::KEYStickyNote::text
KEYTextPtr_t text
Definition: KEYTypes.h:178
libetonyek::KEYStickyNote::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:177
libetonyek::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:88
libetonyek::KEY2Token::a
Definition: KEY2Token.h:903
libetonyek::KEY2Token::h
Definition: KEY2Token.h:982
libetonyek::KEYMedia::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:132
libetonyek::KEYGeometryPtr_t
boost::shared_ptr< KEYGeometry > KEYGeometryPtr_t
Definition: KEYTypes_fwd.h:25
libetonyek::KEYSize::height
double height
Definition: KEYTypes.h:30
libetonyek::KEYStickyNote
Definition: KEYTypes.h:175
libetonyek::KEYMediaContent
Definition: KEYTypes.h:103
KEYStyle.h
libetonyek::KEYMedia::placeholder
boost::optional< bool > placeholder
Definition: KEYTypes.h:134
libetonyek::KEYLine::y1
boost::optional< double > y1
Definition: KEYTypes.h:87
libetonyek::KEYWrap::geometry
KEYGeometryPtr_t geometry
Definition: KEYTypes.h:144
libetonyek::KEYLine::y2
boost::optional< double > y2
Definition: KEYTypes.h:89
libetonyek::KEYSize::KEYSize
KEYSize()
Definition: KEYTypes.cpp:96
libetonyek::KEYPadding::top
boost::optional< int > top
Definition: KEYTypes.h:74
libetonyek::KEYColor
Definition: KEYTypes.h:61
libetonyek::KEYBinary::dataSize
boost::optional< unsigned > dataSize
Definition: KEYTypes.h:116
libetonyek::KEYPlaceholder::style
KEYPlaceholderStylePtr_t style
Definition: KEYTypes.h:168
libetonyek::KEYBinary::path
boost::optional< std::string > path
Definition: KEYTypes.h:114
libetonyek::KEYGeometry::size
KEYSize size
Definition: KEYTypes.h:48
libetonyek::KEYData::stream
RVNGInputStreamPtr_t stream
Definition: KEYTypes.h:96
libetonyek_utils.h
libetonyek::KEYGroup
Definition: KEYTypes.h:149
libetonyek::KEYBinary
Definition: KEYTypes.h:111
libetonyek::KEYMediaContent::data
KEYDataPtr_t data
Definition: KEYTypes.h:106
libetonyek::KEYImage::locked
boost::optional< bool > locked
Definition: KEYTypes.h:123
KEYPath_fwd.h
libetonyek::KEYObjectList_t
std::deque< KEYObjectPtr_t > KEYObjectList_t
A list of presentation objects.
Definition: KEYObject.h:48
libetonyek::KEYPlaceholder::KEYPlaceholder
KEYPlaceholder()
Definition: KEYTypes.cpp:222
libetonyek::KEYPosition
Definition: KEYTypes.h:36
libetonyek::KEYWrap
Definition: KEYTypes.h:141
libetonyek::KEYBinary::size
boost::optional< KEYSize > size
Definition: KEYTypes.h:113
libetonyek::KEYGroupPtr_t
boost::shared_ptr< KEYGroup > KEYGroupPtr_t
Definition: KEYTypes_fwd.h:56
libetonyek::KEYMedia::style
KEYGraphicStylePtr_t style
Definition: KEYTypes.h:133
libetonyek::KEYPosition::x
double x
Definition: KEYTypes.h:38
libetonyek::KEYImage::binary
boost::optional< KEYBinary > binary
Definition: KEYTypes.h:125
libetonyek::KEY2Token::w
Definition: KEY2Token.h:1116
libetonyek::KEYGeometry
Definition: KEYTypes.h:45