EPUBHTMLManager.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libepubgen project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef INCLUDED_EPUBHTMLMANAGER_H
00011 #define INCLUDED_EPUBHTMLMANAGER_H
00012 
00013 #include <string>
00014 #include <vector>
00015 
00016 #include <librevenge/librevenge.h>
00017 
00018 #include "EPUBCounter.h"
00019 #include "EPUBHTMLGenerator.h"
00020 #include "EPUBPath.h"
00021 #include "EPUBXMLSink.h"
00022 
00023 namespace libepubgen
00024 {
00025 
00026 class EPUBImageManager;
00027 class EPUBListStyleManager;
00028 class EPUBParagraphStyleManager;
00029 class EPUBSpanStyleManager;
00030 class EPUBTableStyleManager;
00031 class EPUBManifest;
00032 class EPUBPackage;
00033 class EPUBGenerator;
00034 
00035 class EPUBHTMLManager
00036 {
00037   // disable copying
00038   EPUBHTMLManager(const EPUBHTMLManager &);
00039   EPUBHTMLManager &operator=(const EPUBHTMLManager &);
00040 
00041 public:
00042   explicit EPUBHTMLManager(EPUBManifest &manifest);
00043 
00044   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);
00045 
00046   void writeTo(EPUBPackage &package);
00047 
00048   void writeSpineTo(EPUBXMLSink &sink);
00049   void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout);
00050 
00052   void insertHeadingText(const std::string &text);
00053 
00055   bool hasHeadingText() const;
00056 
00057 private:
00058   EPUBManifest &m_manifest;
00059   std::vector<EPUBPath> m_paths;
00060   std::vector<EPUBXMLSink> m_contents;
00061   std::vector<std::string> m_ids;
00062   EPUBCounter m_number;
00063 };
00064 
00065 }
00066 
00067 #endif // INCLUDED_EPUBHTMLMANAGER
00068 
00069 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */