- 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 "IWORKStyle_fwd.h"
18 #include "KEYTypes.h"
19 #include "KEYTypes_fwd.h"
20
21 namespace libetonyek
22 {
23
24 class KEYCollector : public IWORKCollector
25 {
26 public:
27 explicit KEYCollector(IWORKDocumentInterface *document);
28 ~KEYCollector();
29
30 // collector functions
31
32 void collectPresentationSize(const IWORKSize &size);
33
34 KEYLayerPtr_t collectLayer();
35 void insertLayer(const KEYLayerPtr_t &layer);
36 void collectPage();
37
38 KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title);
39 void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder);
40
41 void collectNote();
42
43 void collectStickyNote();
44
45 void setSlideStyle(const IWORKStylePtr_t &style);
46
47 // helper functions
48
49 void startDocument();
50 void endDocument();
51
52 void startSlides();
53 void endSlides();
54 void startThemes();
55 void endThemes();
56
57 void startPage();
58 void endPage();
59 void startLayer();
60 void endLayer();
61
62 protected:
63 bool m_paint;
64
65 private:
66 struct Slide
67 {
68 IWORKOutputElements m_content;
69 IWORKStylePtr_t m_style;
70 };
71
72 private:
73 virtual void drawTable();
74 virtual void drawMedia(double x, double y, double w, double h, const std::string &mimetype, const librevenge::RVNGBinaryData &data);
75 virtual void fillShapeProperties(librevenge::RVNGPropertyList &props);
76 virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox);
77
78 void writeSlide(const Slide &slide);
79
80 private:
81 IWORKSize m_size;
82
83 std::deque<Slide> m_slides;
84 IWORKOutputElements m_notes;
85 IWORKOutputElements m_stickyNotes;
86
87 bool m_pageOpened;
88 bool m_layerOpened;
89 int m_layerCount;
90 };
91
92 } // namespace libetonyek
93
94 #endif // KEYCOLLECTOR_H_INCLUDED
95
96 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEYCollector::m_paint
bool m_paint
Definition: KEYCollector.h:63
libetonyek::KEYCollector::m_pageOpened
bool m_pageOpened
Definition: KEYCollector.h:87
IWORKStyle_fwd.h
libetonyek::KEYCollector::endPage
void endPage()
Definition: KEYCollector.cpp:241
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::KEYCollector::startSlides
void startSlides()
Definition: KEYCollector.cpp:209
libetonyek::KEYCollector::m_layerOpened
bool m_layerOpened
Definition: KEYCollector.h:88
libetonyek::KEYCollector::startLayer
void startLayer()
Definition: KEYCollector.cpp:258
libetonyek::IWORKOutputElements
Definition: IWORKOutputElements.h:30
libetonyek::IWORKToken::layer
Definition: IWORKToken.h:167
KEYTypes_fwd.h
KEYTypes.h
y
double y
Definition: IWORKShape.cpp:43
libetonyek::KEYCollector::insertTextPlaceholder
void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
Definition: KEYCollector.cpp:132
libetonyek::IWORKStylePtr_t
boost::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::KEYCollector::collectStickyNote
void collectStickyNote()
Definition: KEYCollector.cpp:159
libetonyek::KEY1Token::slide
Definition: KEY1Token.h:80
libetonyek::KEYCollector::endDocument
void endDocument()
Definition: KEYCollector.cpp:198
libetonyek::KEYCollector::collectLayer
KEYLayerPtr_t collectLayer()
Definition: KEYCollector.cpp:56
libetonyek::KEYCollector::m_slides
std::deque< Slide > m_slides
Definition: KEYCollector.h:83
libetonyek::IWORKToken::h
Definition: IWORKToken.h:312
libetonyek::KEYCollector::startDocument
void startDocument()
Definition: KEYCollector.cpp:193
libetonyek::IWORKGeometryPtr_t
boost::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:40
libetonyek::IWORKSize
Definition: IWORKTypes.h:37
libetonyek::KEYPlaceholderPtr_t
boost::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition: KEYTypes_fwd.h:27
libetonyek::IWORKToken::text
Definition: IWORKToken.h:270
libetonyek::IWORKDocumentInterface
Definition: IWORKDocumentInterface.h:18
libetonyek::KEYCollector::setSlideStyle
void setSlideStyle(const IWORKStylePtr_t &style)
Definition: KEYCollector.cpp:184
x
double x
Definition: IWORKShape.cpp:42
libetonyek::KEYCollector::fillShapeProperties
virtual void fillShapeProperties(librevenge::RVNGPropertyList &props)
Definition: KEYCollector.cpp:325
libetonyek::IWORKToken::style
Definition: IWORKToken.h:254
libetonyek::KEYCollector::Slide::m_style
IWORKStylePtr_t m_style
Definition: KEYCollector.h:69
libetonyek::KEYCollector::endLayer
void endLayer()
Definition: KEYCollector.cpp:269
libetonyek::KEYCollector::startPage
void startPage()
Definition: KEYCollector.cpp:227
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:309
libetonyek::IWORKCollector
Definition: IWORKCollector.h:41
libetonyek::KEYCollector::insertLayer
void insertLayer(const KEYLayerPtr_t &layer)
Definition: KEYCollector.cpp:67
libetonyek::KEYCollector::collectPage
void collectPage()
Definition: KEYCollector.cpp:94
libetonyek::IWORKToken::size
Definition: IWORKToken.h:240
libetonyek::KEYCollector::m_notes
IWORKOutputElements m_notes
Definition: KEYCollector.h:84
libetonyek::KEYCollector::~KEYCollector
~KEYCollector()
Definition: KEYCollector.cpp:46
IWORKPath_fwd.h
libetonyek::KEYCollector::m_layerCount
int m_layerCount
Definition: KEYCollector.h:89
libetonyek::KEYCollector::m_size
IWORKSize m_size
Definition: KEYCollector.h:81
libetonyek::KEYCollector::collectPresentationSize
void collectPresentationSize(const IWORKSize &size)
Definition: KEYCollector.cpp:51
libetonyek::IWORKToken::w
Definition: IWORKToken.h:354
libetonyek::IWORKToken::title
Definition: IWORKToken.h:277
libetonyek::KEYCollector::startThemes
void startThemes()
Definition: KEYCollector.cpp:219
libetonyek::IWORKToken::data
Definition: IWORKToken.h:95
libetonyek::NUM1Token::document
Definition: NUM1Token.h:34
libetonyek::IWORKToken::string
Definition: IWORKToken.h:252
libetonyek::KEYCollector
Definition: KEYCollector.h:24
libetonyek::KEYCollector::m_stickyNotes
IWORKOutputElements m_stickyNotes
Definition: KEYCollector.h:85
libetonyek::KEYCollector::drawTable
virtual void drawTable()
Definition: KEYCollector.cpp:280
libetonyek::KEYCollector::drawTextBox
virtual void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox)
Definition: KEYCollector.cpp:329
libetonyek::KEYCollector::Slide
Definition: KEYCollector.h:66
libetonyek::IWORKTextPtr_t
boost::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
libetonyek::KEYCollector::endSlides
void endSlides()
Definition: KEYCollector.cpp:214
IWORKCollector.h
libetonyek::KEYCollector::endThemes
void endThemes()
Definition: KEYCollector.cpp:223
libetonyek::KEYCollector::collectNote
void collectNote()
Definition: KEYCollector.cpp:150
libetonyek::KEYCollector::Slide::m_content
IWORKOutputElements m_content
Definition: KEYCollector.h:68
libetonyek::KEYCollector::collectTextPlaceholder
KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title)
Definition: KEYCollector.cpp:110
libetonyek::KEYCollector::writeSlide
void writeSlide(const Slide &slide)
Definition: KEYCollector.cpp:369
libetonyek::KEYCollector::KEYCollector
KEYCollector(IWORKDocumentInterface *document)
Definition: KEYCollector.cpp:32
libetonyek::KEYLayerPtr_t
boost::shared_ptr< KEYLayer > KEYLayerPtr_t
Definition: KEYTypes_fwd.h:22