EPUBHTMLGenerator.h Source File documentation

EPUBHTMLGenerator.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 libepubgen 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 INCLUDED_EPUBHTMLGENERATOR_H
11#define INCLUDED_EPUBHTMLGENERATOR_H
12
13#include <memory>
14
15#include <librevenge/librevenge.h>
16
17#include <libepubgen/libepubgen-decls.h>
18
19namespace libepubgen
20{
21
22struct EPUBHTMLGeneratorImpl;
23class EPUBImageManager;
24class EPUBFontManager;
25class EPUBListStyleManager;
26class EPUBSpanStyleManager;
27class EPUBParagraphStyleManager;
28class EPUBTableStyleManager;
29class EPUBPath;
30class EPUBXMLContent;
31
32 class EPUBHTMLGenerator : public librevenge::RVNGTextInterface
33{
34public:
35 EPUBHTMLGenerator(EPUBXMLContent &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBSpanStyleManager &bodyStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
36 ~EPUBHTMLGenerator() override;
37
38 void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) override;
39
40 void startDocument(const librevenge::RVNGPropertyList &propList) override;
41 void endDocument() override;
42
43 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override;
44
45 void definePageStyle(const librevenge::RVNGPropertyList &) override;
46 void openPageSpan(const librevenge::RVNGPropertyList &propList) override;
47 void closePageSpan() override;
48 void openHeader(const librevenge::RVNGPropertyList &propList) override;
49 void closeHeader() override;
50 void openFooter(const librevenge::RVNGPropertyList &propList) override;
51 void closeFooter() override;
52
53 void defineSectionStyle(const librevenge::RVNGPropertyList &) override;
54 void openSection(const librevenge::RVNGPropertyList &propList) override;
55 void closeSection() override;
56
57 void defineParagraphStyle(const librevenge::RVNGPropertyList &) override;
58 void openParagraph(const librevenge::RVNGPropertyList &propList) override;
59 void closeParagraph() override;
60
61 void defineCharacterStyle(const librevenge::RVNGPropertyList &) override;
62 void openSpan(const librevenge::RVNGPropertyList &propList) override;
63 void closeSpan() override;
64
65 void openLink(const librevenge::RVNGPropertyList &propList) override;
66 void closeLink() override;
67
68 void insertTab() override;
69 void insertText(const librevenge::RVNGString &text) override;
70 void insertSpace() override;
71 void insertLineBreak() override;
72 void insertField(const librevenge::RVNGPropertyList &propList) override;
73
74 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override;
75 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override;
76 void closeOrderedListLevel() override;
77 void closeUnorderedListLevel() override;
78 void openListElement(const librevenge::RVNGPropertyList &propList) override;
79 void closeListElement() override;
80
81 void openFootnote(const librevenge::RVNGPropertyList &propList) override;
82 void closeFootnote() override;
83 void openEndnote(const librevenge::RVNGPropertyList &propList) override;
84 void closeEndnote() override;
85 void openComment(const librevenge::RVNGPropertyList &propList) override;
86 void closeComment() override;
87 void openTextBox(const librevenge::RVNGPropertyList &propList) override;
88 void closeTextBox() override;
89
90 void openTable(const librevenge::RVNGPropertyList &propList) override;
91 void openTableRow(const librevenge::RVNGPropertyList &propList) override;
92 void closeTableRow() override;
93 void openTableCell(const librevenge::RVNGPropertyList &propList) override;
94 void closeTableCell() override;
95 void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) override;
96 void closeTable() override;
97
98 void openFrame(const librevenge::RVNGPropertyList &propList) override;
99 void closeFrame() override;
100
101 void openGroup(const librevenge::RVNGPropertyList &propList) override;
102 void closeGroup() override;
103
104 void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) override;
105 void drawRectangle(const librevenge::RVNGPropertyList &propList) override;
106 void drawEllipse(const librevenge::RVNGPropertyList &propList) override;
107 void drawPolygon(const librevenge::RVNGPropertyList &propList) override;
108 void drawPolyline(const librevenge::RVNGPropertyList &propList) override;
109 void drawPath(const librevenge::RVNGPropertyList &propList) override;
110 void drawConnector(const librevenge::RVNGPropertyList &propList) override;
111
112 void insertBinaryObject(const librevenge::RVNGPropertyList &propList) override;
113 void insertEquation(const librevenge::RVNGPropertyList &propList) override;
114
116 void getPageProperties(librevenge::RVNGPropertyList &propList) const;
118 void setPageProperties(const librevenge::RVNGPropertyList &propList);
119
120private:
121 EPUBXMLContent &openPopup();
122 void closePopup(EPUBXMLContent &main);
123
124 std::unique_ptr<EPUBHTMLGeneratorImpl> m_impl;
125
126 // Unimplemented to prevent compiler from creating crasher ones
127 EPUBHTMLGenerator(const EPUBHTMLGenerator &);
128 EPUBHTMLGenerator &operator=(const EPUBHTMLGenerator &);
129};
130
131}
132
133#endif /* EPUBHTMLGENERATOR_H */
134
135/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libepubgen::EPUBFontManager
Manages embedded fonts.
Definition: EPUBFontManager.h:33
libepubgen::EPUBHTMLGenerator
Definition: EPUBHTMLGenerator.h:33
libepubgen::EPUBHTMLGenerator::closeFootnote
void closeFootnote() override
Definition: EPUBHTMLGenerator.cpp:955
libepubgen::EPUBHTMLGenerator::drawConnector
void drawConnector(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1179
libepubgen::EPUBHTMLGenerator::openTable
void openTable(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1050
libepubgen::EPUBHTMLGenerator::EPUBHTMLGenerator
EPUBHTMLGenerator(EPUBXMLContent &document, EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBSpanStyleManager &bodyStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
Definition: EPUBHTMLGenerator.cpp:526
libepubgen::EPUBHTMLGenerator::closeUnorderedListLevel
void closeUnorderedListLevel() override
Definition: EPUBHTMLGenerator.cpp:917
libepubgen::EPUBHTMLGenerator::getPageProperties
void getPageProperties(librevenge::RVNGPropertyList &propList) const
Gets the actual page properties into propList.
Definition: EPUBHTMLGenerator.cpp:1253
libepubgen::EPUBHTMLGenerator::closeComment
void closeComment() override
Definition: EPUBHTMLGenerator.cpp:989
libepubgen::EPUBHTMLGenerator::openTextBox
void openTextBox(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:996
libepubgen::EPUBHTMLGenerator::closeTextBox
void closeTextBox() override
Definition: EPUBHTMLGenerator.cpp:1025
libepubgen::EPUBHTMLGenerator::drawPolygon
void drawPolygon(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1176
libepubgen::EPUBHTMLGenerator::openComment
void openComment(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:980
libepubgen::EPUBHTMLGenerator::openListElement
void openListElement(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:926
libepubgen::EPUBHTMLGenerator::closeGroup
void closeGroup() override
Definition: EPUBHTMLGenerator.cpp:1171
libepubgen::EPUBHTMLGenerator::insertCoveredTableCell
void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1123
libepubgen::EPUBHTMLGenerator::openSpan
void openSpan(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:741
libepubgen::EPUBHTMLGenerator::closeOrderedListLevel
void closeOrderedListLevel() override
Definition: EPUBHTMLGenerator.cpp:898
libepubgen::EPUBHTMLGenerator::openFooter
void openFooter(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:668
libepubgen::EPUBHTMLGenerator::closeTableCell
void closeTableCell() override
Definition: EPUBHTMLGenerator.cpp:1116
libepubgen::EPUBHTMLGenerator::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:535
libepubgen::EPUBHTMLGenerator::drawEllipse
void drawEllipse(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1175
libepubgen::EPUBHTMLGenerator::drawRectangle
void drawRectangle(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1174
libepubgen::EPUBHTMLGenerator::openGroup
void openGroup(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1170
libepubgen::EPUBHTMLGenerator::closeSection
void closeSection() override
Definition: EPUBHTMLGenerator.cpp:686
libepubgen::EPUBHTMLGenerator::closeSpan
void closeSpan() override
Definition: EPUBHTMLGenerator.cpp:773
libepubgen::EPUBHTMLGenerator::closePopup
void closePopup(EPUBXMLContent &main)
Definition: EPUBHTMLGenerator.cpp:1234
libepubgen::EPUBHTMLGenerator::closeFrame
void closeFrame() override
Definition: EPUBHTMLGenerator.cpp:1156
libepubgen::EPUBHTMLGenerator::closeParagraph
void closeParagraph() override
Definition: EPUBHTMLGenerator.cpp:722
libepubgen::EPUBHTMLGenerator::closePageSpan
void closePageSpan() override
Definition: EPUBHTMLGenerator.cpp:651
libepubgen::EPUBHTMLGenerator::defineSectionStyle
void defineSectionStyle(const librevenge::RVNGPropertyList &) override
Definition: EPUBHTMLGenerator.cpp:678
libepubgen::EPUBHTMLGenerator::insertTab
void insertTab() override
Definition: EPUBHTMLGenerator.cpp:841
libepubgen::EPUBHTMLGenerator::endDocument
void endDocument() override
Definition: EPUBHTMLGenerator.cpp:570
libepubgen::EPUBHTMLGenerator::openOrderedListLevel
void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:887
libepubgen::EPUBHTMLGenerator::insertLineBreak
void insertLineBreak() override
Definition: EPUBHTMLGenerator.cpp:854
libepubgen::EPUBHTMLGenerator::defineGraphicStyle
void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1173
libepubgen::EPUBHTMLGenerator::definePageStyle
void definePageStyle(const librevenge::RVNGPropertyList &) override
Definition: EPUBHTMLGenerator.cpp:655
libepubgen::EPUBHTMLGenerator::openHeader
void openHeader(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:657
libepubgen::EPUBHTMLGenerator::closeFooter
void closeFooter() override
Definition: EPUBHTMLGenerator.cpp:673
libepubgen::EPUBHTMLGenerator::openFootnote
void openFootnote(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:942
libepubgen::EPUBHTMLGenerator::openParagraph
void openParagraph(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:697
libepubgen::EPUBHTMLGenerator::openPopup
EPUBXMLContent & openPopup()
Definition: EPUBHTMLGenerator.cpp:1221
libepubgen::EPUBHTMLGenerator::closeLink
void closeLink() override
Definition: EPUBHTMLGenerator.cpp:831
libepubgen::EPUBHTMLGenerator::closeHeader
void closeHeader() override
Definition: EPUBHTMLGenerator.cpp:662
libepubgen::EPUBHTMLGenerator::insertEquation
void insertEquation(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1251
libepubgen::EPUBHTMLGenerator::closeEndnote
void closeEndnote() override
Definition: EPUBHTMLGenerator.cpp:973
libepubgen::EPUBHTMLGenerator::closeListElement
void closeListElement() override
Definition: EPUBHTMLGenerator.cpp:935
libepubgen::EPUBHTMLGenerator::drawPath
void drawPath(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1178
libepubgen::EPUBHTMLGenerator::openSection
void openSection(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:680
libepubgen::EPUBHTMLGenerator::openPageSpan
void openPageSpan(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:642
libepubgen::EPUBHTMLGenerator::closeTable
void closeTable() override
Definition: EPUBHTMLGenerator.cpp:1125
libepubgen::EPUBHTMLGenerator::m_impl
std::unique_ptr< EPUBHTMLGeneratorImpl > m_impl
Definition: EPUBHTMLGenerator.h:124
libepubgen::EPUBHTMLGenerator::startDocument
void startDocument(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:566
libepubgen::EPUBHTMLGenerator::insertField
void insertField(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:862
libepubgen::EPUBHTMLGenerator::insertSpace
void insertSpace() override
Definition: EPUBHTMLGenerator.cpp:879
libepubgen::EPUBHTMLGenerator::defineCharacterStyle
void defineCharacterStyle(const librevenge::RVNGPropertyList &) override
Definition: EPUBHTMLGenerator.cpp:736
libepubgen::EPUBHTMLGenerator::openTableCell
void openTableCell(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1094
libepubgen::EPUBHTMLGenerator::openUnorderedListLevel
void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:906
libepubgen::EPUBHTMLGenerator::setPageProperties
void setPageProperties(const librevenge::RVNGPropertyList &propList)
Sets the actual page properties from propList.
Definition: EPUBHTMLGenerator.cpp:1261
libepubgen::EPUBHTMLGenerator::openTableRow
void openTableRow(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1070
libepubgen::EPUBHTMLGenerator::insertText
void insertText(const librevenge::RVNGString &text) override
Definition: EPUBHTMLGenerator.cpp:869
libepubgen::EPUBHTMLGenerator::openLink
void openLink(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:794
libepubgen::EPUBHTMLGenerator::defineParagraphStyle
void defineParagraphStyle(const librevenge::RVNGPropertyList &) override
Definition: EPUBHTMLGenerator.cpp:692
libepubgen::EPUBHTMLGenerator::openEndnote
void openEndnote(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:964
libepubgen::EPUBHTMLGenerator::insertBinaryObject
void insertBinaryObject(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1181
libepubgen::EPUBHTMLGenerator::~EPUBHTMLGenerator
~EPUBHTMLGenerator() override
Definition: EPUBHTMLGenerator.cpp:531
libepubgen::EPUBHTMLGenerator::drawPolyline
void drawPolyline(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1177
libepubgen::EPUBHTMLGenerator::openFrame
void openFrame(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:1134
libepubgen::EPUBHTMLGenerator::EPUBHTMLGenerator
EPUBHTMLGenerator(const EPUBHTMLGenerator &)
libepubgen::EPUBHTMLGenerator::operator=
EPUBHTMLGenerator & operator=(const EPUBHTMLGenerator &)
libepubgen::EPUBHTMLGenerator::closeTableRow
void closeTableRow() override
Definition: EPUBHTMLGenerator.cpp:1087
libepubgen::EPUBHTMLGenerator::defineEmbeddedFont
void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override
Definition: EPUBHTMLGenerator.cpp:637
libepubgen::EPUBImageManager
Definition: EPUBImageManager.h:33
libepubgen::EPUBListStyleManager
Small class to manage the list style.
Definition: EPUBListStyleManager.h:32
libepubgen::EPUBParagraphStyleManager
Small class to manage the paragraph style.
Definition: EPUBParagraphStyleManager.h:30
libepubgen::EPUBPath
Representation of a path in the package.
Definition: EPUBPath.h:22
libepubgen::EPUBSpanStyleManager
Small class to manage the span style.
Definition: EPUBSpanStyleManager.h:31
libepubgen::EPUBTableStyleManager
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:30
libepubgen::EPUBXMLContent
Definition: EPUBXMLContent.h:25
libepubgen
Definition: EPUBBinaryContent.cpp:15