IWORKRecorder.h Source File documentation

IWORKRecorder.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 IWORKRECORDER_H_INCLUDED
11 #define IWORKRECORDER_H_INCLUDED
12
13 #include <memory>
14 #include <string>
15
16 #include <boost/optional.hpp>
17
18 #include "IWORKPath_fwd.h"
19 #include "IWORKStyle.h"
20 #include "IWORKStylesheet.h"
21 #include "IWORKTypes_fwd.h"
22
23 namespace libetonyek
24 {
25
26 class IWORKCollector;
27 class IWORKTable;
28 class IWORKText;
29 struct IWORKSize;
30
31 class IWORKRecorder
32 {
33 public:
34 IWORKRecorder();
35
36 void replay(IWORKCollector &collector) const;
37
38 // recorder functions
39
40 void collectStyle(const IWORKStylePtr_t &style);
41
42 void setGraphicStyle(const IWORKStylePtr_t &style);
43
44 void collectGeometry(const IWORKGeometryPtr_t &geometry);
45
46 void collectPath(const IWORKPathPtr_t &path);
47 void collectImage(const IWORKMediaContentPtr_t &image, const IWORKGeometryPtr_t &cropGeometry, const boost::optional<int> &order, bool locked);
48 void collectLine(const IWORKLinePtr_t &line);
49 void collectShape(const boost::optional<int> &order, bool locked);
50
51 void collectMedia(const IWORKMediaContentPtr_t &content, const IWORKGeometryPtr_t &cropGeometry, const boost::optional<int> &order);
52
53 void collectStylesheet(const IWORKStylesheetPtr_t &stylesheet);
54
55 void collectTable(const std::shared_ptr<IWORKTable> &table);
56 void collectText(const std::shared_ptr<IWORKText> &text);
57
58 void startAttachment();
59 void endAttachment();
60
61 void startAttachments();
62 void endAttachments();
63
64 void startGroup();
65 void endGroup();
66
67 void openGroup();
68 void closeGroup();
69
70 void startLevel();
71 void endLevel();
72
73 void pushStylesheet(const IWORKStylesheetPtr_t &stylesheet);
74 void popStylesheet();
75
76 private:
77 struct Impl;
78
79 private:
80 std::shared_ptr<Impl> m_impl;
81 };
82
83 } // namespace libetonyek
84
85 #endif // IWORKRECORDER_H_INCLUDED
86
87 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKRecorder::startLevel
void startLevel()
Definition: IWORKRecorder.cpp:465
libetonyek::IWORKRecorder::startAttachments
void startAttachments()
Definition: IWORKRecorder.cpp:435
IWORKTextRecorder.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKRecorder::endAttachment
void endAttachment()
Definition: IWORKRecorder.cpp:430
IWORKTableRecorder.h
libetonyek::IWORKRecorder::popStylesheet
void popStylesheet()
Definition: IWORKRecorder.cpp:480
libetonyek::KEY1Token::table
@ table
Definition: KEY1Token.h:198
libetonyek::IWAObjectType::Group
@ Group
Definition: IWAObjectType.h:39
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:486
libetonyek::IWORKRecorder::Impl
Definition: IWORKRecorder.cpp:345
libetonyek::IWORKToken::stylesheet
@ stylesheet
Definition: IWORKToken.h:417
libetonyek::IWORKRecorder::collectPath
void collectPath(const IWORKPathPtr_t &path)
Definition: IWORKRecorder.cpp:384
libetonyek::IWORKRecorder::pushStylesheet
void pushStylesheet(const IWORKStylesheetPtr_t &stylesheet)
Definition: IWORKRecorder.cpp:475
libetonyek::IWORKRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKRecorder.h:77
libetonyek::IWORKRecorder::collectTable
void collectTable(const std::shared_ptr< IWORKTable > &table)
Definition: IWORKRecorder.cpp:414
m_order
const boost::optional< int > m_order
Definition: IWORKRecorder.cpp:81
libetonyek::IWORKRecorder::endGroup
void endGroup()
Definition: IWORKRecorder.cpp:460
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKRecorder::collectLine
void collectLine(const IWORKLinePtr_t &line)
Definition: IWORKRecorder.cpp:394
m_style
const IWORKStylePtr_t m_style
Definition: IWORKRecorder.cpp:36
IWORKTypes_fwd.h
m_content
const IWORKMediaContentPtr_t m_content
Definition: IWORKRecorder.cpp:115
libetonyek::IWORKRecorder::Impl::m_elements
std::deque< Element_t > m_elements
Definition: IWORKRecorder.cpp:349
m_path
const IWORKPathPtr_t m_path
Definition: IWORKRecorder.cpp:66
libetonyek::IWORKRecorder::collectText
void collectText(const std::shared_ptr< IWORKText > &text)
Definition: IWORKRecorder.cpp:419
libetonyek::IWORKToken::locked
@ locked
Definition: IWORKToken.h:570
libetonyek::IWORKStylesheetPtr_t
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition: IWORKStylesheet.h:19
libetonyek::IWORKToken::path
@ path
Definition: IWORKToken.h:358
libetonyek::IWORKMediaContentPtr_t
std::shared_ptr< IWORKMediaContent > IWORKMediaContentPtr_t
Definition: IWORKTypes_fwd.h:54
libetonyek::IWORKRecorder::collectImage
void collectImage(const IWORKMediaContentPtr_t &image, const IWORKGeometryPtr_t &cropGeometry, const boost::optional< int > &order, bool locked)
Definition: IWORKRecorder.cpp:389
libetonyek::IWORKRecorder::startGroup
void startGroup()
Definition: IWORKRecorder.cpp:455
libetonyek::IWORKRecorder::endAttachments
void endAttachments()
Definition: IWORKRecorder.cpp:440
libetonyek::IWORKRecorder::collectStyle
void collectStyle(const IWORKStylePtr_t &style)
Definition: IWORKRecorder.cpp:369
libetonyek::IWORKRecorder::collectStylesheet
void collectStylesheet(const IWORKStylesheetPtr_t &stylesheet)
Definition: IWORKRecorder.cpp:409
libetonyek::PAG1Token::order
@ order
Definition: PAG1Token.h:43
libetonyek::IWORKToken::line
@ line
Definition: IWORKToken.h:298
libetonyek::IWORKToken::content
@ content
Definition: IWORKToken.h:163
m_cropGeometry
const IWORKGeometryPtr_t m_cropGeometry
Definition: IWORKRecorder.cpp:80
libetonyek::IWORKRecorder::openGroup
void openGroup()
Definition: IWORKRecorder.cpp:445
m_locked
const bool m_locked
Definition: IWORKRecorder.cpp:82
libetonyek::IWORKRecorder::Impl::Impl
Impl()
Definition: IWORKRecorder.cpp:352
m_image
const IWORKMediaContentPtr_t m_image
Definition: IWORKRecorder.cpp:79
libetonyek::IWORKRecorder
Definition: IWORKRecorder.h:31
IWORKStylesheet.h
libetonyek::IWORKPathPtr_t
std::shared_ptr< IWORKPath > IWORKPathPtr_t
Definition: IWORKPath_fwd.h:20
libetonyek::IWORKToken::image
@ image
Definition: IWORKToken.h:260
m_geometry
const IWORKGeometryPtr_t m_geometry
Definition: IWORKRecorder.cpp:56
IWORKText.h
libetonyek::IWORKLinePtr_t
std::shared_ptr< IWORKLine > IWORKLinePtr_t
Definition: IWORKTypes_fwd.h:45
libetonyek::IWORKRecorder::collectGeometry
void collectGeometry(const IWORKGeometryPtr_t &geometry)
Definition: IWORKRecorder.cpp:379
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
libetonyek::IWORKCollector
Definition: IWORKCollector.h:41
m_text
const std::shared_ptr< IWORKText > m_text
Definition: IWORKRecorder.cpp:147
m_elements
deque< IWORKShadow > & m_elements
Definition: IWORKPropertyMapElement.cpp:659
libetonyek::IWORKRecorder::startAttachment
void startAttachment()
Definition: IWORKRecorder.cpp:425
IWORKCollector.h
libetonyek::IWORKRecorder::endLevel
void endLevel()
Definition: IWORKRecorder.cpp:470
libetonyek::IWORKRecorder::closeGroup
void closeGroup()
Definition: IWORKRecorder.cpp:450
m_line
const IWORKLinePtr_t m_line
Definition: IWORKRecorder.cpp:92
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:41
libetonyek::IWORKRecorder::IWORKRecorder
IWORKRecorder()
Definition: IWORKRecorder.cpp:357
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
IWORKPath_fwd.h
m_table
const std::shared_ptr< IWORKTable > m_table
Definition: IWORKRecorder.cpp:137
IWORKRecorder.h
libetonyek::IWORKRecorder::setGraphicStyle
void setGraphicStyle(const IWORKStylePtr_t &style)
Definition: IWORKRecorder.cpp:374
libetonyek::IWORKRecorder::collectShape
void collectShape(const boost::optional< int > &order, bool locked)
Definition: IWORKRecorder.cpp:399
m_type
OperationType m_type
Definition: IWORKRecorder.cpp:158
libetonyek::IWORKToken::geometry
@ geometry
Definition: IWORKToken.h:232
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKRecorder::collectMedia
void collectMedia(const IWORKMediaContentPtr_t &content, const IWORKGeometryPtr_t &cropGeometry, const boost::optional< int > &order)
Definition: IWORKRecorder.cpp:404
libetonyek::IWORKRecorder::replay
void replay(IWORKCollector &collector) const
Definition: IWORKRecorder.cpp:362
IWORKStyle.h
m_collector
IWORKCollector & m_collector
Definition: IWORKRecorder.cpp:340
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:465
m_stylesheet
const IWORKStylesheetPtr_t m_stylesheet
Definition: IWORKRecorder.cpp:127