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 
25 namespace libepubgen
26 {
27 
28 class EPUBFontManager;
29 class EPUBHTMLGenerator;
30 class EPUBImageManager;
31 class EPUBListStyleManager;
32 class EPUBParagraphStyleManager;
33 class EPUBSpanStyleManager;
34 class EPUBTableStyleManager;
35 class EPUBManifest;
36 class EPUBPackage;
37 
39 {
40  // disable copying
43 
44 public:
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 
63 private:
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: EPUBXMLContent.h:24
Small class to manage the span style.
Definition: EPUBSpanStyleManager.h:30
void writeTocTo(EPUBXMLContent &xml, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition: EPUBHTMLManager.cpp:92
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
Definition: EPUBBinaryContent.cpp:14
bool hasHeadingText() const
If the current heading has a title.
Definition: EPUBHTMLManager.cpp:174
std::vector< EPUBXMLContent > m_contents
Definition: EPUBHTMLManager.h:66
Small class to manage the paragraph style.
Definition: EPUBParagraphStyleManager.h:29
Small class to manage the list style.
Definition: EPUBListStyleManager.h:31
Definition: EPUBHTMLManager.h:38
void writeTo(EPUBPackage &package)
Definition: EPUBHTMLManager.cpp:71
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:29
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition: EPUBHTMLManager.cpp:158
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
Manages embedded fonts.
Definition: EPUBFontManager.h:32
Definition: EPUBManifest.h:23
EPUBManifest & m_manifest
Definition: EPUBHTMLManager.h:64
Representation of a path in the package.
Definition: EPUBPath.h:21
EPUBHTMLManager(const EPUBHTMLManager &)
std::vector< EPUBPath > m_paths
Definition: EPUBHTMLManager.h:65
EPUBCounter m_number
Definition: EPUBHTMLManager.h:68
std::vector< std::string > m_ids
Definition: EPUBHTMLManager.h:67
void addChapterName(const std::string &text)
Registers a chapter name for the current page (fixed layout case).
Definition: EPUBHTMLManager.cpp:166
Definition: EPUBCounter.h:16
void writeSpineTo(EPUBXMLContent &xml)
Definition: EPUBHTMLManager.cpp:82
Definition: EPUBImageManager.h:32

Generated for libepubgen by doxygen 1.8.14