IWORKTextRecorder.h Source File documentation

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
19namespace libetonyek
20{
21
22class IWORKText;
23
24 class IWORKTextRecorder
25{
26public:
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
59private:
60 struct Impl;
61
62private:
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: */
IWORKEnum.h
IWORKStyle_fwd.h
libetonyek::IWORKTextRecorder::flushLayout
void flushLayout()
Definition IWORKTextRecorder.cpp:363
libetonyek::IWORKTextRecorder::insertLineBreak
void insertLineBreak()
Definition IWORKTextRecorder.cpp:443
libetonyek::IWORKTextRecorder::replay
void replay(IWORKText &text) const
Definition IWORKTextRecorder.cpp:341
libetonyek::IWORKTextRecorder::setSpanStyle
void setSpanStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:393
libetonyek::IWORKTextRecorder::insertTab
void insertTab()
Definition IWORKTextRecorder.cpp:428
libetonyek::IWORKTextRecorder::flushParagraph
void flushParagraph()
Definition IWORKTextRecorder.cpp:388
libetonyek::IWORKTextRecorder::flushList
void flushList()
Definition IWORKTextRecorder.cpp:378
libetonyek::IWORKTextRecorder::flushSpan
void flushSpan()
Definition IWORKTextRecorder.cpp:403
libetonyek::IWORKTextRecorder::insertPageBreak
void insertPageBreak()
Definition IWORKTextRecorder.cpp:448
libetonyek::IWORKTextRecorder::insertColumnBreak
void insertColumnBreak()
Definition IWORKTextRecorder.cpp:438
libetonyek::IWORKTextRecorder::openLink
void openLink(const std::string &url)
Definition IWORKTextRecorder.cpp:413
libetonyek::IWORKTextRecorder::closeLink
void closeLink()
Definition IWORKTextRecorder.cpp:418
libetonyek::IWORKTextRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition IWORKTextRecorder.h:63
libetonyek::IWORKTextRecorder::setLayoutStyle
void setLayoutStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:358
libetonyek::IWORKTextRecorder::pushBaseLayoutStyle
void pushBaseLayoutStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:348
libetonyek::IWORKTextRecorder::insertField
void insertField(IWORKFieldType fieldType)
Definition IWORKTextRecorder.cpp:408
libetonyek::IWORKTextRecorder::setListStyle
void setListStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:368
libetonyek::IWORKTextRecorder::pushBaseParagraphStyle
void pushBaseParagraphStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:353
libetonyek::IWORKTextRecorder::insertSpace
void insertSpace()
Definition IWORKTextRecorder.cpp:433
libetonyek::IWORKTextRecorder::IWORKTextRecorder
IWORKTextRecorder()
Definition IWORKTextRecorder.cpp:336
libetonyek::IWORKTextRecorder::setListLevel
void setListLevel(const unsigned level)
Definition IWORKTextRecorder.cpp:373
libetonyek::IWORKTextRecorder::setParagraphStyle
void setParagraphStyle(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:383
libetonyek::IWORKTextRecorder::setLanguage
void setLanguage(const IWORKStylePtr_t &style)
Definition IWORKTextRecorder.cpp:398
libetonyek::IWORKTextRecorder::insertText
void insertText(const std::string &text)
Definition IWORKTextRecorder.cpp:423
libetonyek::IWORKText
Definition IWORKText.h:34
libetonyek::IWORKToken::text
@ text
Definition IWORKToken.h:472
libetonyek::IWORKToken::style
@ style
Definition IWORKToken.h:421
libetonyek::KEY1Token::level
@ level
Definition KEY1Token.h:158
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::IWORKFieldType
IWORKFieldType
Definition IWORKEnum.h:144
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
libetonyek::IWORKTextRecorder::Impl
Definition IWORKTextRecorder.cpp:325