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 
36 {
37  // disable copying
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:
59  std::vector<EPUBPath> m_paths;
60  std::vector<EPUBXMLSink> m_contents;
61  std::vector<std::string> m_ids;
63 };
64 
65 }
66 
67 #endif // INCLUDED_EPUBHTMLMANAGER
68 
69 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EPUBCounter.h:17
Manages embedded fonts.
Definition: EPUBImageManager.h:78
Definition: EPUBHTMLManager.h:36
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
std::vector< EPUBXMLSink > m_contents
Definition: EPUBHTMLManager.h:60
std::vector< EPUBPath > m_paths
Definition: EPUBHTMLManager.h:59
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition: EPUBHTMLManager.cpp:135
EPUBHTMLManager(const EPUBHTMLManager &)
bool hasHeadingText() const
If the current heading has a title.
Definition: EPUBHTMLManager.cpp:143
void writeTo(EPUBPackage &package)
Definition: EPUBHTMLManager.cpp:69
EPUBManifest & m_manifest
Definition: EPUBHTMLManager.h:58
std::vector< std::string > m_ids
Definition: EPUBHTMLManager.h:61
EPUBCounter m_number
Definition: EPUBHTMLManager.h:62
void writeSpineTo(EPUBXMLSink &sink)
Definition: EPUBHTMLManager.cpp:80
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition: EPUBHTMLManager.cpp:90
Definition: EPUBImageManager.h:31
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:30
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:30
Definition: EPUBXMLSink.h:26
Definition: EPUBBinarySink.cpp:13
std::shared_ptr< EPUBHTMLGenerator > EPUBHTMLGeneratorPtr_t
Definition: EPUBHTMLGenerator.h:131

Generated for libepubgen by doxygen 1.9.1