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: */
Small class to manage the span style.
Definition: EPUBSpanStyleManager.h:29
bool hasHeadingText() const
If the current heading has a title.
Definition: EPUBHTMLManager.cpp:143
Definition: EPUBBinarySink.cpp:12
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:35
void writeTo(EPUBPackage &package)
Definition: EPUBHTMLManager.cpp:69
Small class to manage the tables style.
Definition: EPUBTableStyleManager.h:29
std::vector< EPUBXMLSink > m_contents
Definition: EPUBHTMLManager.h:60
void writeSpineTo(EPUBXMLSink &sink)
Definition: EPUBHTMLManager.cpp:80
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition: EPUBHTMLManager.cpp:135
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
Manages embedded fonts.
Definition: EPUBImageManager.h:77
Definition: EPUBManifest.h:23
std::shared_ptr< EPUBHTMLGenerator > EPUBHTMLGeneratorPtr_t
Definition: EPUBHTMLGenerator.h:131
void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition: EPUBHTMLManager.cpp:90
EPUBManifest & m_manifest
Definition: EPUBHTMLManager.h:58
Representation of a path in the package.
Definition: EPUBPath.h:21
EPUBHTMLManager(const EPUBHTMLManager &)
std::vector< EPUBPath > m_paths
Definition: EPUBHTMLManager.h:59
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
EPUBCounter m_number
Definition: EPUBHTMLManager.h:62
std::vector< std::string > m_ids
Definition: EPUBHTMLManager.h:61
Definition: EPUBCounter.h:16
Definition: EPUBXMLSink.h:25
Definition: EPUBImageManager.h:30

Generated for libepubgen by doxygen 1.8.11