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

- File List
- File Members

KEYCollector.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 KEYCOLLECTOR_H_INCLUDED
11 #define KEYCOLLECTOR_H_INCLUDED
12
13 #include <deque>
14
15 #include "IWORKCollector.h"
16 #include "IWORKPath_fwd.h"
17 #include "KEYTypes.h"
18 #include "KEYTypes_fwd.h"
19
20 namespace libetonyek
21 {
22
23 class KEYCollector : public IWORKCollector
24 {
25 public:
26 explicit KEYCollector(IWORKDocumentInterface *document);
27 ~KEYCollector();
28
29 // collector functions
30
31 void collectPresentationSize(const IWORKSize &size);
32
33 KEYLayerPtr_t collectLayer();
34 void insertLayer(const KEYLayerPtr_t &layer);
35 void collectPage();
36
37 KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title);
38 void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder);
39
40 void collectNote();
41
42 void collectStickyNote();
43
44 void setSlideStyle(const IWORKStylePtr_t &style);
45
46 // helper functions
47
48 void startDocument();
49 void endDocument();
50
51 void startSlides();
52 void endSlides();
53 void startThemes();
54 void endThemes();
55
56 void startPage();
57 void endPage();
58 void startLayer();
59 void endLayer();
60
61 private:
62 struct Slide
63 {
64 IWORKOutputElements m_content;
65 boost::shared_ptr<IWORKStyle> m_style;
66 };
67
68 private:
69 virtual void drawTable();
70 virtual void drawMedia(double x, double y, double w, double h, const std::string &mimetype, const librevenge::RVNGBinaryData &data);
71 virtual void fillShapeProperties(librevenge::RVNGPropertyList &props);
72 virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox);
73
74 void writeSlide(const Slide &slide);
75
76 private:
77 IWORKSize m_size;
78
79 std::deque<Slide> m_slides;
80 IWORKOutputElements m_notes;
81 IWORKOutputElements m_stickyNotes;
82
83 bool m_pageOpened;
84 bool m_layerOpened;
85 int m_layerCount;
86
87 bool m_paint;
88 };
89
90 } // namespace libetonyek
91
92 #endif // KEYCOLLECTOR_H_INCLUDED
93
94 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEYCollector::m_paint
bool m_paint
Definition: KEYCollector.h:87
libetonyek::KEYCollector::m_pageOpened
bool m_pageOpened
Definition: KEYCollector.h:83
libetonyek::KEYCollector::endPage
void endPage()
Definition: KEYCollector.cpp:240
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::KEYCollector::startSlides
void startSlides()
Definition: KEYCollector.cpp:208
libetonyek::KEYCollector::m_layerOpened
bool m_layerOpened
Definition: KEYCollector.h:84
libetonyek::KEYCollector::startLayer
void startLayer()
Definition: KEYCollector.cpp:252
libetonyek::IWORKOutputElements
Definition: IWORKOutputElements.h:30
libetonyek::KEYCollector::Slide::m_style
boost::shared_ptr< IWORKStyle > m_style
Definition: KEYCollector.h:65
libetonyek::IWORKToken::layer
Definition: IWORKToken.h:164
KEYTypes_fwd.h
KEYTypes.h
y
double y
Definition: IWORKShape.cpp:43
libetonyek::KEYCollector::insertTextPlaceholder
void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
Definition: KEYCollector.cpp:131
libetonyek::IWORKStylePtr_t
boost::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::KEYCollector::collectStickyNote
void collectStickyNote()
Definition: KEYCollector.cpp:158
libetonyek::KEY1Token::slide
Definition: KEY1Token.h:80
libetonyek::KEYCollector::endDocument
void endDocument()
Definition: KEYCollector.cpp:197
libetonyek::KEYCollector::collectLayer
KEYLayerPtr_t collectLayer()
Definition: KEYCollector.cpp:55
libetonyek::KEYCollector::m_slides
std::deque< Slide > m_slides
Definition: KEYCollector.h:79
libetonyek::IWORKToken::h
Definition: IWORKToken.h:295
libetonyek::KEYCollector::startDocument
void startDocument()
Definition: KEYCollector.cpp:192
libetonyek::IWORKGeometryPtr_t
boost::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:40
libetonyek::IWORKSize
Definition: IWORKTypes.h:36
libetonyek::KEYPlaceholderPtr_t
boost::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition: KEYTypes_fwd.h:27
libetonyek::IWORKToken::text
Definition: IWORKToken.h:257
libetonyek::IWORKDocumentInterface
Definition: IWORKDocumentInterface.h:18
libetonyek::KEYCollector::setSlideStyle
void setSlideStyle(const IWORKStylePtr_t &style)
Definition: KEYCollector.cpp:183
x
double x
Definition: IWORKShape.cpp:42
libetonyek::KEYCollector::fillShapeProperties
virtual void fillShapeProperties(librevenge::RVNGPropertyList &props)
Definition: KEYCollector.cpp:319
libetonyek::IWORKToken::style
Definition: IWORKToken.h:241
libetonyek::KEYCollector::endLayer
void endLayer()
Definition: KEYCollector.cpp:263
libetonyek::KEYCollector::startPage
void startPage()
Definition: KEYCollector.cpp:226
libetonyek::KEYCollector::drawMedia
virtual void drawMedia(double x, double y, double w, double h, const std::string &mimetype, const librevenge::RVNGBinaryData &data)
Definition: KEYCollector.cpp:303
libetonyek::IWORKCollector
Definition: IWORKCollector.h:40
libetonyek::KEYCollector::insertLayer
void insertLayer(const KEYLayerPtr_t &layer)
Definition: KEYCollector.cpp:66
libetonyek::KEYCollector::collectPage
void collectPage()
Definition: KEYCollector.cpp:93
libetonyek::IWORKToken::size
Definition: IWORKToken.h:227
libetonyek::KEYCollector::m_notes
IWORKOutputElements m_notes
Definition: KEYCollector.h:80
libetonyek::KEYCollector::~KEYCollector
~KEYCollector()
Definition: KEYCollector.cpp:45
IWORKPath_fwd.h
libetonyek::KEYCollector::m_layerCount
int m_layerCount
Definition: KEYCollector.h:85
libetonyek::KEYCollector::m_size
IWORKSize m_size
Definition: KEYCollector.h:77
libetonyek::KEYCollector::collectPresentationSize
void collectPresentationSize(const IWORKSize &size)
Definition: KEYCollector.cpp:50
libetonyek::IWORKToken::w
Definition: IWORKToken.h:333
libetonyek::IWORKToken::title
Definition: IWORKToken.h:262
libetonyek::KEYCollector::startThemes
void startThemes()
Definition: KEYCollector.cpp:218
libetonyek::IWORKToken::data
Definition: IWORKToken.h:92
libetonyek::NUM1Token::document
Definition: NUM1Token.h:34
libetonyek::IWORKToken::string
Definition: IWORKToken.h:239
libetonyek::KEYCollector
Definition: KEYCollector.h:23
libetonyek::KEYCollector::m_stickyNotes
IWORKOutputElements m_stickyNotes
Definition: KEYCollector.h:81
libetonyek::KEYCollector::drawTable
virtual void drawTable()
Definition: KEYCollector.cpp:274
libetonyek::KEYCollector::drawTextBox
virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox)
Definition: KEYCollector.cpp:323
libetonyek::KEYCollector::Slide
Definition: KEYCollector.h:62
libetonyek::IWORKTextPtr_t
boost::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
libetonyek::KEYCollector::endSlides
void endSlides()
Definition: KEYCollector.cpp:213
IWORKCollector.h
libetonyek::KEYCollector::endThemes
void endThemes()
Definition: KEYCollector.cpp:222
libetonyek::KEYCollector::collectNote
void collectNote()
Definition: KEYCollector.cpp:149
libetonyek::KEYCollector::Slide::m_content
IWORKOutputElements m_content
Definition: KEYCollector.h:64
libetonyek::KEYCollector::collectTextPlaceholder
KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title)
Definition: KEYCollector.cpp:109
libetonyek::KEYCollector::writeSlide
void writeSlide(const Slide &slide)
Definition: KEYCollector.cpp:363
libetonyek::KEYCollector::KEYCollector
KEYCollector(IWORKDocumentInterface *document)
Definition: KEYCollector.cpp:31
libetonyek::KEYLayerPtr_t
boost::shared_ptr< KEYLayer > KEYLayerPtr_t
Definition: KEYTypes_fwd.h:22