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
21namespace libetonyek
22{
23
24 class KEYCollector : public IWORKCollector
25{
26public:
27 explicit KEYCollector(IWORKDocumentInterface *document);
28 ~KEYCollector() override;
29
30 // collector functions
31
32 void collectPresentationSize(const IWORKSize &size);
33
34 KEYLayerPtr_t collectLayer();
35 void insertLayer(const KEYLayerPtr_t &layer);
36 KEYSlidePtr_t collectSlide();
37
38 KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title, const boost::optional<unsigned> &resizeFlags=boost::none);
39 void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder);
40
41 void collectNote();
42
43 void collectStickyNote() override;
44
45 void setSlideStyle(const IWORKStylePtr_t &style);
46
47 // helper functions
48
49 void startDocument();
50 void sendSlides(const std::deque<KEYSlidePtr_t> &slides);
51 void endDocument();
52
53 void startSlides();
54 void endSlides();
55 void startThemes();
56 void endThemes();
57
58 void startPage();
59 void endPage();
60 void startLayer();
61 void endLayer();
62
63protected:
64 bool m_inSlides;
65
66private:
67 void insertSlide(const KEYSlidePtr_t &slide, bool isMaster, const boost::optional<std::string> &pageName=boost::none);
68 void drawTable() override;
69 void drawMedia(double x, double y, const librevenge::RVNGPropertyList &data) override;
70 void fillShapeProperties(librevenge::RVNGPropertyList &props) override;
71 bool createFrameStylesForTextBox() const override
72 {
73 return false;
74 }
75 void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox, const librevenge::RVNGPropertyList &style) override;
76
77private:
78 IWORKSize m_size;
79
80 KEYSlidePtr_t m_currentSlide;
81 IWORKOutputElements m_notes;
82 IWORKOutputElements m_stickyNotes;
83
84 bool m_pageOpened;
85 bool m_layerOpened;
86 int m_layerCount;
87};
88
89} // namespace libetonyek
90
91#endif // KEYCOLLECTOR_H_INCLUDED
92
93/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKCollector.h
IWORKPath_fwd.h
IWORKStyle_fwd.h
KEYTypes.h
KEYTypes_fwd.h
libetonyek::IWORKCollector::IWORKCollector
IWORKCollector(IWORKDocumentInterface *document)
Definition IWORKCollector.cpp:191
libetonyek::IWORKDocumentInterface
Definition IWORKDocumentInterface.h:19
libetonyek::IWORKOutputElements
Definition IWORKOutputElements.h:33
libetonyek::KEYCollector::startSlides
void startSlides()
Definition KEYCollector.cpp:289
libetonyek::KEYCollector::insertSlide
void insertSlide(const KEYSlidePtr_t &slide, bool isMaster, const boost::optional< std::string > &pageName=boost::none)
Definition KEYCollector.cpp:120
libetonyek::KEYCollector::collectLayer
KEYLayerPtr_t collectLayer()
Definition KEYCollector.cpp:59
libetonyek::KEYCollector::collectSlide
KEYSlidePtr_t collectSlide()
Definition KEYCollector.cpp:101
libetonyek::KEYCollector::endDocument
void endDocument()
Definition KEYCollector.cpp:284
libetonyek::KEYCollector::KEYCollector
KEYCollector(IWORKDocumentInterface *document)
Definition KEYCollector.cpp:35
libetonyek::KEYCollector::setSlideStyle
void setSlideStyle(const IWORKStylePtr_t &style)
Definition KEYCollector.cpp:225
libetonyek::KEYCollector::endLayer
void endLayer()
Definition KEYCollector.cpp:345
libetonyek::KEYCollector::m_inSlides
bool m_inSlides
Definition KEYCollector.h:64
libetonyek::KEYCollector::startDocument
void startDocument()
Definition KEYCollector.cpp:234
libetonyek::KEYCollector::sendSlides
void sendSlides(const std::deque< KEYSlidePtr_t > &slides)
Definition KEYCollector.cpp:239
libetonyek::KEYCollector::startPage
void startPage()
Definition KEYCollector.cpp:307
libetonyek::KEYCollector::insertLayer
void insertLayer(const KEYLayerPtr_t &layer)
Definition KEYCollector.cpp:75
libetonyek::KEYCollector::collectTextPlaceholder
KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title, const boost::optional< unsigned > &resizeFlags=boost::none)
Definition KEYCollector.cpp:145
libetonyek::KEYCollector::endSlides
void endSlides()
Definition KEYCollector.cpp:294
libetonyek::KEYCollector::m_stickyNotes
IWORKOutputElements m_stickyNotes
Definition KEYCollector.h:82
libetonyek::KEYCollector::startThemes
void startThemes()
Definition KEYCollector.cpp:299
libetonyek::KEYCollector::m_notes
IWORKOutputElements m_notes
Definition KEYCollector.h:81
libetonyek::KEYCollector::m_pageOpened
bool m_pageOpened
Definition KEYCollector.h:84
libetonyek::KEYCollector::endThemes
void endThemes()
Definition KEYCollector.cpp:303
libetonyek::KEYCollector::insertTextPlaceholder
void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
Definition KEYCollector.cpp:167
libetonyek::KEYCollector::drawTable
void drawTable() override
Definition KEYCollector.cpp:356
libetonyek::KEYCollector::m_layerCount
int m_layerCount
Definition KEYCollector.h:86
libetonyek::KEYCollector::collectNote
void collectNote()
Definition KEYCollector.cpp:190
libetonyek::KEYCollector::endPage
void endPage()
Definition KEYCollector.cpp:321
libetonyek::KEYCollector::startLayer
void startLayer()
Definition KEYCollector.cpp:334
libetonyek::KEYCollector::fillShapeProperties
void fillShapeProperties(librevenge::RVNGPropertyList &props) override
Definition KEYCollector.cpp:403
libetonyek::KEYCollector::collectPresentationSize
void collectPresentationSize(const IWORKSize &size)
Definition KEYCollector.cpp:54
libetonyek::KEYCollector::m_layerOpened
bool m_layerOpened
Definition KEYCollector.h:85
libetonyek::KEYCollector::collectStickyNote
void collectStickyNote() override
Definition KEYCollector.cpp:199
libetonyek::KEYCollector::~KEYCollector
~KEYCollector() override
Definition KEYCollector.cpp:49
libetonyek::KEYCollector::m_size
IWORKSize m_size
Definition KEYCollector.h:78
libetonyek::KEYCollector::drawTextBox
void drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox, const librevenge::RVNGPropertyList &style) override
Definition KEYCollector.cpp:407
libetonyek::KEYCollector::m_currentSlide
KEYSlidePtr_t m_currentSlide
Definition KEYCollector.h:80
libetonyek::KEYCollector::createFrameStylesForTextBox
bool createFrameStylesForTextBox() const override
Definition KEYCollector.h:71
libetonyek::KEYCollector::drawMedia
void drawMedia(double x, double y, const librevenge::RVNGPropertyList &data) override
Definition KEYCollector.cpp:388
libetonyek::IWORKToken::y
@ y
Definition IWORKToken.h:643
libetonyek::IWORKToken::text
@ text
Definition IWORKToken.h:472
libetonyek::IWORKToken::layer
@ layer
Definition IWORKToken.h:291
libetonyek::IWORKToken::size
@ size
Definition IWORKToken.h:402
libetonyek::IWORKToken::title
@ title
Definition IWORKToken.h:483
libetonyek::IWORKToken::data
@ data
Definition IWORKToken.h:178
libetonyek::IWORKToken::x
@ x
Definition IWORKToken.h:641
libetonyek::IWORKToken::style
@ style
Definition IWORKToken.h:421
libetonyek::KEY1Token::slide
@ slide
Definition KEY1Token.h:92
libetonyek::NUM1Token::document
@ document
Definition NUM1Token.h:34
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::KEYLayerPtr_t
std::shared_ptr< KEYLayer > KEYLayerPtr_t
Definition KEYTypes_fwd.h:23
libetonyek::IWORKTextPtr_t
std::shared_ptr< IWORKText > IWORKTextPtr_t
Definition IWORKText_fwd.h:22
libetonyek::KEYPlaceholderPtr_t
std::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition KEYTypes_fwd.h:28
libetonyek::KEYSlidePtr_t
std::shared_ptr< KEYSlide > KEYSlidePtr_t
Definition KEYTypes_fwd.h:33
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition IWORKTypes_fwd.h:45
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
libetonyek::IWORKSize
Definition IWORKTypes.h:45