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 <memory>
14#include <string>
15#include <vector>
16
17#include <librevenge/librevenge.h>
18
19#include <libepubgen/libepubgen-decls.h>
20
21#include "EPUBCounter.h"
22#include "EPUBPath.h"
23#include "EPUBXMLContent.h"
24
25namespace libepubgen
26{
27
28class EPUBFontManager;
29class EPUBHTMLGenerator;
30class EPUBImageManager;
31class EPUBListStyleManager;
32class EPUBParagraphStyleManager;
33class EPUBSpanStyleManager;
34class EPUBTableStyleManager;
35class EPUBManifest;
36class EPUBPackage;
37
38 class EPUBHTMLManager
39{
40 // disable copying
41 EPUBHTMLManager(const EPUBHTMLManager &);
42 EPUBHTMLManager &operator=(const EPUBHTMLManager &);
43
44public:
45 explicit EPUBHTMLManager(EPUBManifest &manifest);
46
47 const std::shared_ptr<EPUBHTMLGenerator> create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBSpanStyleManager &bodyStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
48
49 void writeTo(EPUBPackage &package);
50
51 void writeSpineTo(EPUBXMLContent &xml);
52 void writeTocTo(EPUBXMLContent &xml, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout);
53
55 void insertHeadingText(const std::string &text);
56
58 void addChapterName(const std::string &text);
59
61 bool hasHeadingText() const;
62
63private:
64 EPUBManifest &m_manifest;
65 std::vector<EPUBPath> m_paths;
66 std::vector<EPUBXMLContent> m_contents;
67 std::vector<std::string> m_ids;
68 EPUBCounter m_number;
69};
70
71}
72
73#endif // INCLUDED_EPUBHTMLMANAGER
74
75/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
EPUBCounter.h
EPUBPath.h
EPUBXMLContent.h
libepubgen::EPUBCounter
Definition: EPUBCounter.h:17
libepubgen::EPUBFontManager
Manages embedded fonts.
Definition: EPUBFontManager.h:33
libepubgen::EPUBHTMLManager
Definition: EPUBHTMLManager.h:39
libepubgen::EPUBHTMLManager::m_paths
std::vector< EPUBPath > m_paths
Definition: EPUBHTMLManager.h:65
libepubgen::EPUBHTMLManager::insertHeadingText
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition: EPUBHTMLManager.cpp:158
libepubgen::EPUBHTMLManager::EPUBHTMLManager
EPUBHTMLManager(const EPUBHTMLManager &)
libepubgen::EPUBHTMLManager::hasHeadingText
bool hasHeadingText() const
If the current heading has a title.
Definition: EPUBHTMLManager.cpp:174
libepubgen::EPUBHTMLManager::addChapterName
void addChapterName(const std::string &text)
Registers a chapter name for the current page (fixed layout case).
Definition: EPUBHTMLManager.cpp:166
libepubgen::EPUBHTMLManager::writeTocTo
void writeTocTo(EPUBXMLContent &xml, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition: EPUBHTMLManager.cpp:92
libepubgen::EPUBHTMLManager::writeTo
void writeTo(EPUBPackage &package)
Definition: EPUBHTMLManager.cpp:71
libepubgen::EPUBHTMLManager::m_manifest
EPUBManifest & m_manifest
Definition: EPUBHTMLManager.h:64
libepubgen::EPUBHTMLManager::m_ids
std::vector< std::string > m_ids
Definition: EPUBHTMLManager.h:67
libepubgen::EPUBHTMLManager::m_contents
std::vector< EPUBXMLContent > m_contents
Definition: EPUBHTMLManager.h:66
libepubgen::EPUBHTMLManager::m_number
EPUBCounter m_number
Definition: EPUBHTMLManager.h:68
libepubgen::EPUBHTMLManager::create
const std::shared_ptr< EPUBHTMLGenerator > create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBSpanStyleManager &bodyStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
Definition: EPUBHTMLManager.cpp:52
libepubgen::EPUBHTMLManager::operator=
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
libepubgen::EPUBHTMLManager::writeSpineTo
void writeSpineTo(EPUBXMLContent &xml)
Definition: EPUBHTMLManager.cpp:82
libepubgen::EPUBImageManager
Definition: EPUBImageManager.h:33
libepubgen::EPUBListStyleManager
Small class to manage the list style.
Definition: EPUBListStyleManager.h:32
libepubgen::EPUBManifest
Definition: EPUBManifest.h:24
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