KEYCollector.h Source File documentation

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 void drawTable() override;
74 void drawMedia(double x, double y, double w, double h, const std::string &mimetype, const librevenge::RVNGBinaryData &data) override;
75 void fillShapeProperties(librevenge::RVNGPropertyList &props) override;
76 void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox) override;
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:242
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:39
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::KEYCollector::startSlides
void startSlides()
Definition: KEYCollector.cpp:210
libetonyek::KEYCollector::m_layerOpened
bool m_layerOpened
Definition: KEYCollector.h:88
libetonyek::KEYCollector::drawTextBox
void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox) override
Definition: KEYCollector.cpp:330
libetonyek::KEYCollector::fillShapeProperties
void fillShapeProperties(librevenge::RVNGPropertyList &props) override
Definition: KEYCollector.cpp:326
libetonyek::KEYCollector::startLayer
void startLayer()
Definition: KEYCollector.cpp:259
libetonyek::IWORKOutputElements
Definition: IWORKOutputElements.h:29
libetonyek::IWORKToken::layer
Definition: IWORKToken.h:176
KEYTypes_fwd.h
KEYTypes.h
y
double y
Definition: IWORKShape.cpp:43
libetonyek::KEYCollector::insertTextPlaceholder
void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
Definition: KEYCollector.cpp:133
libetonyek::KEYPlaceholderPtr_t
std::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition: KEYTypes_fwd.h:26
libetonyek::KEYCollector::collectStickyNote
void collectStickyNote()
Definition: KEYCollector.cpp:160
libetonyek::KEY1Token::slide
Definition: KEY1Token.h:80
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::KEYCollector::endDocument
void endDocument()
Definition: KEYCollector.cpp:199
libetonyek::KEYCollector::collectLayer
KEYLayerPtr_t collectLayer()
Definition: KEYCollector.cpp:57
libetonyek::KEYCollector::m_slides
std::deque< Slide > m_slides
Definition: KEYCollector.h:83
libetonyek::IWORKToken::h
Definition: IWORKToken.h:328
libetonyek::KEYCollector::startDocument
void startDocument()
Definition: KEYCollector.cpp:194
libetonyek::IWORKSize
Definition: IWORKTypes.h:37
libetonyek::IWORKToken::text
Definition: IWORKToken.h:284
libetonyek::IWORKDocumentInterface
Definition: IWORKDocumentInterface.h:18
libetonyek::KEYCollector::setSlideStyle
void setSlideStyle(const IWORKStylePtr_t &style)
Definition: KEYCollector.cpp:185
x
double x
Definition: IWORKShape.cpp:42
libetonyek::IWORKToken::style
Definition: IWORKToken.h:268
libetonyek::KEYCollector::Slide::m_style
IWORKStylePtr_t m_style
Definition: KEYCollector.h:69
libetonyek::KEYCollector::endLayer
void endLayer()
Definition: KEYCollector.cpp:270
libetonyek::KEYCollector::startPage
void startPage()
Definition: KEYCollector.cpp:228
libetonyek::KEYCollector::drawTable
void drawTable() override
Definition: KEYCollector.cpp:281
libetonyek::KEYLayerPtr_t
std::shared_ptr< KEYLayer > KEYLayerPtr_t
Definition: KEYTypes_fwd.h:21
libetonyek::IWORKCollector
Definition: IWORKCollector.h:41
libetonyek::KEYCollector::insertLayer
void insertLayer(const KEYLayerPtr_t &layer)
Definition: KEYCollector.cpp:68
libetonyek::KEYCollector::collectPage
void collectPage()
Definition: KEYCollector.cpp:95
libetonyek::IWORKTextPtr_t
std::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
libetonyek::IWORKToken::size
Definition: IWORKToken.h:254
libetonyek::KEYCollector::m_notes
IWORKOutputElements m_notes
Definition: KEYCollector.h:84
libetonyek::KEYCollector::~KEYCollector
~KEYCollector()
Definition: KEYCollector.cpp:47
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:52
libetonyek::IWORKToken::w
Definition: IWORKToken.h:373
libetonyek::IWORKToken::title
Definition: IWORKToken.h:291
libetonyek::KEYCollector::startThemes
void startThemes()
Definition: KEYCollector.cpp:220
libetonyek::KEYCollector::drawMedia
void drawMedia(double x, double y, double w, double h, const std::string &mimetype, const librevenge::RVNGBinaryData &data) override
Definition: KEYCollector.cpp:310
libetonyek::IWORKToken::data
Definition: IWORKToken.h:101
libetonyek::NUM1Token::document
Definition: NUM1Token.h:34
libetonyek::IWORKToken::string
Definition: IWORKToken.h:266
libetonyek::KEYCollector
Definition: KEYCollector.h:24
libetonyek::KEYCollector::m_stickyNotes
IWORKOutputElements m_stickyNotes
Definition: KEYCollector.h:85
libetonyek::KEYCollector::Slide
Definition: KEYCollector.h:66
libetonyek::KEYCollector::endSlides
void endSlides()
Definition: KEYCollector.cpp:215
IWORKCollector.h
libetonyek::KEYCollector::endThemes
void endThemes()
Definition: KEYCollector.cpp:224
libetonyek::KEYCollector::collectNote
void collectNote()
Definition: KEYCollector.cpp:151
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:111
libetonyek::KEYCollector::writeSlide
void writeSlide(const Slide &slide)
Definition: KEYCollector.cpp:370
libetonyek::KEYCollector::KEYCollector
KEYCollector(IWORKDocumentInterface *document)
Definition: KEYCollector.cpp:33