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
39{
40 // disable copying
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
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:
65 std::vector<EPUBPath> m_paths;
66 std::vector<EPUBXMLContent> m_contents;
67 std::vector<std::string> m_ids;
69};
70
71}
72
73#endif // INCLUDED_EPUBHTMLMANAGER
74
75/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition EPUBCounter.h:17
Manages embedded fonts.
Definition EPUBFontManager.h:33
Definition EPUBHTMLManager.h:39
std::vector< EPUBPath > m_paths
Definition EPUBHTMLManager.h:65
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition EPUBHTMLManager.cpp:158
EPUBHTMLManager(const EPUBHTMLManager &)
bool hasHeadingText() const
If the current heading has a title.
Definition EPUBHTMLManager.cpp:174
void addChapterName(const std::string &text)
Registers a chapter name for the current page (fixed layout case).
Definition EPUBHTMLManager.cpp:166
void writeTocTo(EPUBXMLContent &xml, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition EPUBHTMLManager.cpp:92
void writeTo(EPUBPackage &package)
Definition EPUBHTMLManager.cpp:71
EPUBManifest & m_manifest
Definition EPUBHTMLManager.h:64
std::vector< std::string > m_ids
Definition EPUBHTMLManager.h:67
std::vector< EPUBXMLContent > m_contents
Definition EPUBHTMLManager.h:66
EPUBCounter m_number
Definition EPUBHTMLManager.h:68
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
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
void writeSpineTo(EPUBXMLContent &xml)
Definition EPUBHTMLManager.cpp:82
Definition EPUBImageManager.h:33
Small class to manage the list style.
Definition EPUBListStyleManager.h:32
Definition EPUBManifest.h:24
Small class to manage the paragraph style.
Definition EPUBParagraphStyleManager.h:30
Representation of a path in the package.
Definition EPUBPath.h:22
Small class to manage the span style.
Definition EPUBSpanStyleManager.h:31
Small class to manage the tables style.
Definition EPUBTableStyleManager.h:30
Definition EPUBXMLContent.h:25
Definition EPUBBinaryContent.cpp:15

Generated for libepubgen by doxygen 1.12.0