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 "IWORKStyle_fwd.h"
17
18 namespace libetonyek
19 {
20
21 class IWORKText;
22
23 class IWORKTextRecorder
24 {
25 public:
26 IWORKTextRecorder();
27
28 void replay(IWORKText &text) const;
29
30 void pushBaseLayoutStyle(const IWORKStylePtr_t &style);
31 void pushBaseParagraphStyle(const IWORKStylePtr_t &style);
32
33 void setLayoutStyle(const IWORKStylePtr_t &style);
34 void flushLayout();
35
36 void setListStyle(const IWORKStylePtr_t &style);
37 void setListLevel(const unsigned level);
38 void flushList();
39
40 void setParagraphStyle(const IWORKStylePtr_t &style);
41 void flushParagraph();
42
43 void setSpanStyle(const IWORKStylePtr_t &style);
44 void setLanguage(const IWORKStylePtr_t &style);
45 void flushSpan();
46
47 void openLink(const std::string &url);
48 void closeLink();
49
50 void insertText(const std::string &text);
51 void insertTab();
52 void insertSpace();
53 void insertLineBreak();
54 void insertPageBreak();
55
56 private:
57 struct Impl;
58
59 private:
60 std::shared_ptr<Impl> m_impl;
61 };
62
63 }
64
65 #endif // IWORKTEXTRECORDER_H_INCLUDED
66
67 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKStyle_fwd.h
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::IWORKTextRecorder::replay
void replay(IWORKText &text) const
Definition: IWORKTextRecorder.cpp:313
libetonyek::IWORKTextRecorder::insertTab
void insertTab()
Definition: IWORKTextRecorder.cpp:395
libetonyek::IWORKTextRecorder::openLink
void openLink(const std::string &url)
Definition: IWORKTextRecorder.cpp:380
libetonyek::IWORKTextRecorder::insertText
void insertText(const std::string &text)
Definition: IWORKTextRecorder.cpp:390
libetonyek::IWORKTextRecorder::flushSpan
void flushSpan()
Definition: IWORKTextRecorder.cpp:375
libetonyek::IWORKText
Definition: IWORKText.h:32
libetonyek::IWORKTextRecorder::insertPageBreak
void insertPageBreak()
Definition: IWORKTextRecorder.cpp:410
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:320
libetonyek::IWORKToken::text
Definition: IWORKToken.h:284
libetonyek::IWORKTextRecorder::setSpanStyle
void setSpanStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:365
libetonyek::IWORKTextRecorder::flushParagraph
void flushParagraph()
Definition: IWORKTextRecorder.cpp:360
libetonyek::IWORKTextRecorder::insertSpace
void insertSpace()
Definition: IWORKTextRecorder.cpp:400
libetonyek::IWORKToken::style
Definition: IWORKToken.h:268
libetonyek::IWORKTextRecorder::insertLineBreak
void insertLineBreak()
Definition: IWORKTextRecorder.cpp:405
libetonyek::KEY1Token::level
Definition: KEY1Token.h:133
libetonyek::IWORKTextRecorder::setLanguage
void setLanguage(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:370
libetonyek::IWORKTextRecorder::flushList
void flushList()
Definition: IWORKTextRecorder.cpp:350
libetonyek::IWORKTextRecorder::setLayoutStyle
void setLayoutStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:330
libetonyek::IWORKTextRecorder::pushBaseParagraphStyle
void pushBaseParagraphStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:325
libetonyek::IWORKTextRecorder::setListStyle
void setListStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:340
libetonyek::IWORKTextRecorder::Impl
Definition: IWORKTextRecorder.cpp:296
libetonyek::IWORKToken::string
Definition: IWORKToken.h:266
libetonyek::IWORKTextRecorder::setParagraphStyle
void setParagraphStyle(const IWORKStylePtr_t &style)
Definition: IWORKTextRecorder.cpp:355
libetonyek::IWORKTextRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKTextRecorder.h:57
libetonyek::IWORKTextRecorder::flushLayout
void flushLayout()
Definition: IWORKTextRecorder.cpp:335
libetonyek::IWORKTextRecorder::setListLevel
void setListLevel(const unsigned level)
Definition: IWORKTextRecorder.cpp:345
libetonyek::IWORKTextRecorder::IWORKTextRecorder
IWORKTextRecorder()
Definition: IWORKTextRecorder.cpp:308
libetonyek::IWORKTextRecorder::closeLink
void closeLink()
Definition: IWORKTextRecorder.cpp:385
libetonyek::IWORKTextRecorder
Definition: IWORKTextRecorder.h:23