IWORKTextRecorder.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 IWORKTEXTRECORDER_H_INCLUDED
11 #define IWORKTEXTRECORDER_H_INCLUDED
12
13 #include <memory>
14 #include <string>
15
16 #include "IWORKEnum.h"
17 #include "IWORKStyle_fwd.h"
18
19 namespace libetonyek
20 {
21
22 class IWORKText;
23
24 class IWORKTextRecorder
25 {
26 public:
27 IWORKTextRecorder();
28
29 void replay(IWORKText &text) const;
30
31 void pushBaseLayoutStyle(const IWORKStylePtr_t &style);
32 void pushBaseParagraphStyle(const IWORKStylePtr_t &style);
33
34 void setLayoutStyle(const IWORKStylePtr_t &style);
35 void flushLayout();
36
37 void setListStyle(const IWORKStylePtr_t &style);
38 void setListLevel(const unsigned level);
39 void flushList();
40
41 void setParagraphStyle(const IWORKStylePtr_t &style);
42 void flushParagraph();
43
44 void setSpanStyle(const IWORKStylePtr_t &style);
45 void setLanguage(const IWORKStylePtr_t &style);
46 void flushSpan();
47
48 void insertField(IWORKFieldType fieldType);
49 void openLink(const std::string &url);
50 void closeLink();
51
52 void insertText(const std::string &text);
53 void insertTab();
54 void insertSpace();
55 void insertColumnBreak();
56 void insertLineBreak();
57 void insertPageBreak();
58
59 private:
60 struct Impl;
61
62 private:
63 std::shared_ptr<Impl> m_impl;
64 };
65
66 }
67
68 #endif // IWORKTEXTRECORDER_H_INCLUDED
69
70 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKStyle_fwd.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKTextRecorder::replay
void replay(IWORKText &text) const
Definition: IWORKTextRecorder.cpp:341
libetonyek::IWORKTextRecorder::insertTab
void insertTab()
Definition: IWORKTextRecorder.cpp:428
libetonyek::IWORKTextRecorder::openLink
void openLink(const std::string &url)
Definition: IWORKTextRecorder.cpp:413
libetonyek::IWORKTextRecorder::insertText
void insertText(const std::string &text)
Definition: IWORKTextRecorder.cpp:423
libetonyek::IWORKTextRecorder::flushSpan
void flushSpan()
Definition: IWORKTextRecorder.cpp:403
libetonyek::IWORKText
Definition: IWORKText.h:33
libetonyek::IWORKTextRecorder::insertPageBreak
void insertPageBreak()
Definition: IWORKTextRecorder.cpp:448
libetonyek::IWORKTextRecorder::insertField
void insertField(IWORKFieldType fieldType)
Definition: IWORKTextRecorder.cpp:408
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::IWORKTextRecorder::pushBaseLayoutStyle
void pushBaseLayoutStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:348
libetonyek::IWORKToken::text
Definition: IWORKToken.h:465
libetonyek::IWORKTextRecorder::setSpanStyle
void setSpanStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:393
libetonyek::IWORKTextRecorder::flushParagraph
void flushParagraph()
Definition: IWORKTextRecorder.cpp:388
libetonyek::IWORKTextRecorder::insertSpace
void insertSpace()
Definition: IWORKTextRecorder.cpp:433
libetonyek::IWORKToken::style
Definition: IWORKToken.h:414
libetonyek::IWORKTextRecorder::insertLineBreak
void insertLineBreak()
Definition: IWORKTextRecorder.cpp:443
libetonyek::KEY1Token::level
Definition: KEY1Token.h:158
libetonyek::IWORKTextRecorder::setLanguage
void setLanguage(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:398
libetonyek::IWORKTextRecorder::flushList
void flushList()
Definition: IWORKTextRecorder.cpp:378
libetonyek::IWORKTextRecorder::setLayoutStyle
void setLayoutStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:358
libetonyek::IWORKTextRecorder::pushBaseParagraphStyle
void pushBaseParagraphStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:353
IWORKEnum.h
libetonyek::IWORKTextRecorder::insertColumnBreak
void insertColumnBreak()
Definition: IWORKTextRecorder.cpp:438
libetonyek::IWORKTextRecorder::setListStyle
void setListStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:368
libetonyek::IWORKFieldType
IWORKFieldType
Definition: IWORKEnum.h:142
libetonyek::IWORKTextRecorder::Impl
Definition: IWORKTextRecorder.cpp:324
libetonyek::IWORKToken::string
Definition: IWORKToken.h:411
libetonyek::IWORKTextRecorder::setParagraphStyle
void setParagraphStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:383
libetonyek::IWORKTextRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKTextRecorder.h:60
libetonyek::IWORKTextRecorder::flushLayout
void flushLayout()
Definition: IWORKTextRecorder.cpp:363
libetonyek::IWORKTextRecorder::setListLevel
void setListLevel(const unsigned level)
Definition: IWORKTextRecorder.cpp:373
libetonyek::IWORKTextRecorder::IWORKTextRecorder
IWORKTextRecorder()
Definition: IWORKTextRecorder.cpp:336
libetonyek::IWORKTextRecorder::closeLink
void closeLink()
Definition: IWORKTextRecorder.cpp:418
libetonyek::IWORKTextRecorder
Definition: IWORKTextRecorder.h:24