- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 <librevenge/librevenge.h>
14
15 #include <boost/shared_ptr.hpp>
16
17 #include "EPUBXMLSink.h"
18
19 namespace libepubgen
20 {
21
22 struct EPUBHTMLGeneratorImpl;
23 class EPUBImageManager;
24 class EPUBListStyleManager;
25 class EPUBSpanStyleManager;
26 class EPUBParagraphStyleManager;
27 class EPUBTableStyleManager;
28 class EPUBPath;
29
30 class EPUBHTMLGenerator : public librevenge::RVNGTextInterface
31 {
32 public:
33 EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath);
34 ~EPUBHTMLGenerator();
35
36 void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
37
38 void startDocument(const librevenge::RVNGPropertyList &propList);
39 void endDocument();
40
41 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
42
43 void definePageStyle(const librevenge::RVNGPropertyList &);
44 void openPageSpan(const librevenge::RVNGPropertyList &propList);
45 void closePageSpan();
46 void openHeader(const librevenge::RVNGPropertyList &propList);
47 void closeHeader();
48 void openFooter(const librevenge::RVNGPropertyList &propList);
49 void closeFooter();
50
51 void defineSectionStyle(const librevenge::RVNGPropertyList &);
52 void openSection(const librevenge::RVNGPropertyList &propList);
53 void closeSection();
54
55 void defineParagraphStyle(const librevenge::RVNGPropertyList &);
56 void openParagraph(const librevenge::RVNGPropertyList &propList);
57 void closeParagraph();
58
59 void defineCharacterStyle(const librevenge::RVNGPropertyList &);
60 void openSpan(const librevenge::RVNGPropertyList &propList);
61 void closeSpan();
62
63 void openLink(const librevenge::RVNGPropertyList &propList);
64 void closeLink();
65
66 void insertTab();
67 void insertText(const librevenge::RVNGString &text);
68 void insertSpace();
69 void insertLineBreak();
70 void insertField(const librevenge::RVNGPropertyList &propList);
71
72 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
73 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
74 void closeOrderedListLevel();
75 void closeUnorderedListLevel();
76 void openListElement(const librevenge::RVNGPropertyList &propList);
77 void closeListElement();
78
79 void openFootnote(const librevenge::RVNGPropertyList &propList);
80 void closeFootnote();
81 void openEndnote(const librevenge::RVNGPropertyList &propList);
82 void closeEndnote();
83 void openComment(const librevenge::RVNGPropertyList &propList);
84 void closeComment();
85 void openTextBox(const librevenge::RVNGPropertyList &propList);
86 void closeTextBox();
87
88 void openTable(const librevenge::RVNGPropertyList &propList);
89 void openTableRow(const librevenge::RVNGPropertyList &propList);
90 void closeTableRow();
91 void openTableCell(const librevenge::RVNGPropertyList &propList);
92 void closeTableCell();
93 void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
94 void closeTable();
95
96 void openFrame(const librevenge::RVNGPropertyList &propList);
97 void closeFrame();
98
99 void openGroup(const librevenge::RVNGPropertyList &propList);
100 void closeGroup();
101
102 void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
103 void drawRectangle(const librevenge::RVNGPropertyList &propList);
104 void drawEllipse(const librevenge::RVNGPropertyList &propList);
105 void drawPolygon(const librevenge::RVNGPropertyList &propList);
106 void drawPolyline(const librevenge::RVNGPropertyList &propList);
107 void drawPath(const librevenge::RVNGPropertyList &propList);
108 void drawConnector(const librevenge::RVNGPropertyList &propList);
109
110 void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
111 void insertEquation(const librevenge::RVNGPropertyList &propList);
112
113 private:
114 EPUBHTMLGeneratorImpl *m_impl;
115
116 // Unimplemented to prevent compiler from creating crasher ones
117 EPUBHTMLGenerator(const EPUBHTMLGenerator &);
118 EPUBHTMLGenerator &operator=(const EPUBHTMLGenerator &);
119 };
120
121 typedef boost::shared_ptr<EPUBHTMLGenerator> EPUBHTMLGeneratorPtr_t;
122
123 }
124
125 #endif /* EPUBHTMLGENERATOR_H */
126
127 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libepubgen::EPUBHTMLGenerator::insertTab
void insertTab()
Definition: EPUBHTMLGenerator.cpp:647
libepubgen::EPUBHTMLGenerator::startDocument
void startDocument(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:510
libepubgen::EPUBHTMLGenerator::closeComment
void closeComment()
Definition: EPUBHTMLGenerator.cpp:778
libepubgen::EPUBSpanStyleManager
Small class to manage the span style.
Definition: EPUBSpanStyleManager.h:28
EPUBXMLSink.h
libepubgen::EPUBHTMLGenerator::definePageStyle
void definePageStyle(const librevenge::RVNGPropertyList &)
Definition: EPUBHTMLGenerator.cpp:553
libepubgen::EPUBHTMLGenerator::closeUnorderedListLevel
void closeUnorderedListLevel()
Definition: EPUBHTMLGenerator.cpp:715
libepubgen::EPUBHTMLGenerator::insertEquation
void insertEquation(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:891
libepubgen::EPUBHTMLGenerator::insertField
void insertField(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:664
libepubgen::EPUBHTMLGenerator::openOrderedListLevel
void openOrderedListLevel(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:685
libepubgen
Definition: EPUBBinarySink.cpp:12
libepubgen::EPUBHTMLGenerator::endDocument
void endDocument()
Definition: EPUBHTMLGenerator.cpp:514
libepubgen::EPUBHTMLGenerator::closePageSpan
void closePageSpan()
Definition: EPUBHTMLGenerator.cpp:549
libepubgen::EPUBHTMLGenerator::drawPolygon
void drawPolygon(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:869
libepubgen::EPUBParagraphStyleManager
Small class to manage the paragraph style.
Definition: EPUBParagraphStyleManager.h:28
libepubgen::EPUBListStyleManager
Small class to manage the list style.
Definition: EPUBListStyleManager.h:30
libepubgen::EPUBHTMLGenerator::drawPolyline
void drawPolyline(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:870
libepubgen::EPUBHTMLGenerator::drawPath
void drawPath(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:871
libepubgen::EPUBHTMLGenerator::closeFootnote
void closeFootnote()
Definition: EPUBHTMLGenerator.cpp:748
libepubgen::EPUBHTMLGenerator::closeSpan
void closeSpan()
Definition: EPUBHTMLGenerator.cpp:618
libepubgen::EPUBHTMLGenerator::openTextBox
void openTextBox(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:785
libepubgen::EPUBHTMLGenerator::openFootnote
void openFootnote(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:740
libepubgen::EPUBHTMLGenerator::openPageSpan
void openPageSpan(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:544
libepubgen::EPUBHTMLGenerator::EPUBHTMLGenerator
EPUBHTMLGenerator(EPUBXMLSink &document, EPUBImageManager &imageManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &path, const EPUBPath &stylesheetPath)
Definition: EPUBHTMLGenerator.cpp:469
libepubgen::EPUBTableStyleManager
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:28
libepubgen::EPUBHTMLGenerator::openTableRow
void openTableRow(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:812
libepubgen::EPUBHTMLGenerator::openParagraph
void openParagraph(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:585
libepubgen::EPUBHTMLGenerator::openFrame
void openFrame(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:860
libepubgen::EPUBHTMLGenerator::openUnorderedListLevel
void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:704
libepubgen::EPUBHTMLGenerator::closeOrderedListLevel
void closeOrderedListLevel()
Definition: EPUBHTMLGenerator.cpp:696
libepubgen::EPUBHTMLGenerator::defineSectionStyle
void defineSectionStyle(const librevenge::RVNGPropertyList &)
Definition: EPUBHTMLGenerator.cpp:576
libepubgen::EPUBHTMLGenerator::drawRectangle
void drawRectangle(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:867
libepubgen::EPUBHTMLGenerator::insertBinaryObject
void insertBinaryObject(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:874
libepubgen::EPUBHTMLGenerator::closeTextBox
void closeTextBox()
Definition: EPUBHTMLGenerator.cpp:793
libepubgen::EPUBHTMLGenerator::defineParagraphStyle
void defineParagraphStyle(const librevenge::RVNGPropertyList &)
Definition: EPUBHTMLGenerator.cpp:580
libepubgen::EPUBHTMLGenerator::closeEndnote
void closeEndnote()
Definition: EPUBHTMLGenerator.cpp:763
libepubgen::EPUBHTMLGenerator::openLink
void openLink(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:625
libepubgen::EPUBHTMLGeneratorImpl
the internal state of a html document generator
Definition: EPUBHTMLGenerator.cpp:354
libepubgen::EPUBHTMLGenerator::openListElement
void openListElement(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:724
libepubgen::EPUBHTMLGenerator::openEndnote
void openEndnote(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:755
libepubgen::EPUBHTMLGenerator::closeLink
void closeLink()
Definition: EPUBHTMLGenerator.cpp:640
libepubgen::EPUBHTMLGenerator::openFooter
void openFooter(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:566
libepubgen::EPUBPath
Representation of a path in the package.
Definition: EPUBPath.h:21
libepubgen::EPUBHTMLGenerator::closeFrame
void closeFrame()
Definition: EPUBHTMLGenerator.cpp:861
libepubgen::EPUBHTMLGenerator::m_impl
EPUBHTMLGeneratorImpl * m_impl
Definition: EPUBHTMLGenerator.h:114
libepubgen::EPUBHTMLGeneratorPtr_t
boost::shared_ptr< EPUBHTMLGenerator > EPUBHTMLGeneratorPtr_t
Definition: EPUBHTMLGenerator.h:121
libepubgen::EPUBHTMLGenerator::closeHeader
void closeHeader()
Definition: EPUBHTMLGenerator.cpp:560
libepubgen::EPUBHTMLGenerator::openHeader
void openHeader(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:555
libepubgen::EPUBHTMLGenerator::openTable
void openTable(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:800
libepubgen::EPUBHTMLGenerator::insertSpace
void insertSpace()
Definition: EPUBHTMLGenerator.cpp:678
libepubgen::EPUBHTMLGenerator::openGroup
void openGroup(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:863
libepubgen::EPUBHTMLGenerator::closeTableCell
void closeTableCell()
Definition: EPUBHTMLGenerator.cpp:842
libepubgen::EPUBHTMLGenerator::drawConnector
void drawConnector(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:872
libepubgen::EPUBHTMLGenerator::defineEmbeddedFont
void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:540
libepubgen::EPUBHTMLGenerator::insertCoveredTableCell
void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:849
libepubgen::EPUBHTMLGenerator::closeGroup
void closeGroup()
Definition: EPUBHTMLGenerator.cpp:864
libepubgen::EPUBHTMLGenerator::defineGraphicStyle
void defineGraphicStyle(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:866
libepubgen::EPUBHTMLGenerator
Definition: EPUBHTMLGenerator.h:30
libepubgen::EPUBHTMLGenerator::closeParagraph
void closeParagraph()
Definition: EPUBHTMLGenerator.cpp:595
libepubgen::EPUBHTMLGenerator::insertText
void insertText(const librevenge::RVNGString &text)
Definition: EPUBHTMLGenerator.cpp:671
libepubgen::EPUBHTMLGenerator::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:479
libepubgen::EPUBHTMLGenerator::insertLineBreak
void insertLineBreak()
Definition: EPUBHTMLGenerator.cpp:656
libepubgen::EPUBHTMLGenerator::openComment
void openComment(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:770
libepubgen::EPUBHTMLGenerator::closeSection
void closeSection()
Definition: EPUBHTMLGenerator.cpp:578
libepubgen::EPUBHTMLGenerator::openSpan
void openSpan(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:608
libepubgen::EPUBHTMLGenerator::defineCharacterStyle
void defineCharacterStyle(const librevenge::RVNGPropertyList &)
Definition: EPUBHTMLGenerator.cpp:603
libepubgen::EPUBHTMLGenerator::openTableCell
void openTableCell(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:828
libepubgen::EPUBHTMLGenerator::closeTable
void closeTable()
Definition: EPUBHTMLGenerator.cpp:851
libepubgen::EPUBHTMLGenerator::~EPUBHTMLGenerator
~EPUBHTMLGenerator()
Definition: EPUBHTMLGenerator.cpp:474
libepubgen::EPUBHTMLGenerator::drawEllipse
void drawEllipse(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:868
libepubgen::EPUBHTMLGenerator::closeListElement
void closeListElement()
Definition: EPUBHTMLGenerator.cpp:733
libepubgen::EPUBXMLSink
Definition: EPUBXMLSink.h:26
libepubgen::EPUBHTMLGenerator::operator=
EPUBHTMLGenerator & operator=(const EPUBHTMLGenerator &)
libepubgen::EPUBHTMLGenerator::closeFooter
void closeFooter()
Definition: EPUBHTMLGenerator.cpp:571
libepubgen::EPUBHTMLGenerator::openSection
void openSection(const librevenge::RVNGPropertyList &propList)
Definition: EPUBHTMLGenerator.cpp:577
libepubgen::EPUBHTMLGenerator::closeTableRow
void closeTableRow()
Definition: EPUBHTMLGenerator.cpp:821
libepubgen::EPUBImageManager
Definition: EPUBImageManager.h:26