EPUBHTMLManager.h Source File documentation

EPUBHTMLManager.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_EPUBHTMLMANAGER_H
11 #define INCLUDED_EPUBHTMLMANAGER_H
12
13 #include <string>
14 #include <vector>
15
16 #include <librevenge/librevenge.h>
17
18 #include "EPUBCounter.h"
19 #include "EPUBHTMLGenerator.h"
20 #include "EPUBPath.h"
21 #include "EPUBXMLSink.h"
22
23 namespace libepubgen
24 {
25
26 class EPUBImageManager;
27 class EPUBListStyleManager;
28 class EPUBParagraphStyleManager;
29 class EPUBSpanStyleManager;
30 class EPUBTableStyleManager;
31 class EPUBManifest;
32 class EPUBPackage;
33 class EPUBGenerator;
34
35 class EPUBHTMLManager
36 {
37 // disable copying
38 EPUBHTMLManager(const EPUBHTMLManager &);
39 EPUBHTMLManager &operator=(const EPUBHTMLManager &);
40
41 public:
42 explicit EPUBHTMLManager(EPUBManifest &manifest);
43
44 const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
45
46 void writeTo(EPUBPackage &package);
47
48 void writeSpineTo(EPUBXMLSink &sink);
49 void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout);
50
52 void insertHeadingText(const std::string &text);
53
55 bool hasHeadingText() const;
56
57 private:
58 EPUBManifest &m_manifest;
59 std::vector<EPUBPath> m_paths;
60 std::vector<EPUBXMLSink> m_contents;
61 std::vector<std::string> m_ids;
62 EPUBCounter m_number;
63 };
64
65 }
66
67 #endif // INCLUDED_EPUBHTMLMANAGER
68
69 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
EPUBCounter.h
libepubgen::EPUBSpanStyleManager
Small class to manage the span style.
Definition: EPUBSpanStyleManager.h:29
EPUBXMLSink.h
libepubgen
Definition: EPUBBinarySink.cpp:12
libepubgen::EPUBHTMLManager::hasHeadingText
bool hasHeadingText() const
If the current heading has a title.
Definition: EPUBHTMLManager.cpp:143
libepubgen::EPUBParagraphStyleManager
Small class to manage the paragraph style.
Definition: EPUBParagraphStyleManager.h:29
libepubgen::EPUBListStyleManager
Small class to manage the list style.
Definition: EPUBListStyleManager.h:31
libepubgen::EPUBHTMLManager
Definition: EPUBHTMLManager.h:35
libepubgen::EPUBHTMLManager::writeTo
void writeTo(EPUBPackage &package)
Definition: EPUBHTMLManager.cpp:69
libepubgen::EPUBTableStyleManager
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:29
libepubgen::EPUBHTMLManager::m_contents
std::vector< EPUBXMLSink > m_contents
Definition: EPUBHTMLManager.h:60
libepubgen::EPUBHTMLManager::writeSpineTo
void writeSpineTo(EPUBXMLSink &sink)
Definition: EPUBHTMLManager.cpp:80
libepubgen::EPUBHTMLManager::insertHeadingText
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition: EPUBHTMLManager.cpp:135
libepubgen::EPUBHTMLManager::operator=
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
libepubgen::EPUBFontManager
Manages embedded fonts.
Definition: EPUBImageManager.h:77
libepubgen::EPUBManifest
Definition: EPUBManifest.h:23
libepubgen::EPUBHTMLGeneratorPtr_t
std::shared_ptr< EPUBHTMLGenerator > EPUBHTMLGeneratorPtr_t
Definition: EPUBHTMLGenerator.h:131
libepubgen::EPUBHTMLManager::writeTocTo
void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition: EPUBHTMLManager.cpp:90
libepubgen::EPUBHTMLManager::m_manifest
EPUBManifest & m_manifest
Definition: EPUBHTMLManager.h:58
EPUBPath.h
libepubgen::EPUBPath
Representation of a path in the package.
Definition: EPUBPath.h:21
libepubgen::EPUBHTMLManager::EPUBHTMLManager
EPUBHTMLManager(const EPUBHTMLManager &)
libepubgen::EPUBHTMLManager::m_paths
std::vector< EPUBPath > m_paths
Definition: EPUBHTMLManager.h:59
EPUBHTMLGenerator.h
libepubgen::EPUBHTMLManager::create
const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
Definition: EPUBHTMLManager.cpp:50
libepubgen::EPUBHTMLManager::m_number
EPUBCounter m_number
Definition: EPUBHTMLManager.h:62
libepubgen::EPUBHTMLManager::m_ids
std::vector< std::string > m_ids
Definition: EPUBHTMLManager.h:61
libepubgen::EPUBCounter
Definition: EPUBCounter.h:16
libepubgen::EPUBXMLSink
Definition: EPUBXMLSink.h:25
libepubgen::EPUBImageManager
Definition: EPUBImageManager.h:30