VSDPages.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 libvisio 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 __VSDPAGES_H__
00011 #define __VSDPAGES_H__
00012 
00013 #include "VSDOutputElementList.h"
00014 #include "VSDTypes.h"
00015 
00016 namespace libvisio
00017 {
00018 
00019 class VSDPage
00020 {
00021 public:
00022   VSDPage();
00023   VSDPage(const VSDPage &page);
00024   ~VSDPage();
00025   VSDPage &operator=(const VSDPage &page);
00026   void append(const VSDOutputElementList &outputElements);
00027   void draw(librevenge::RVNGDrawingInterface *painter) const;
00028   double m_pageWidth, m_pageHeight;
00029   librevenge::RVNGString m_pageName;
00030   unsigned m_currentPageID, m_backgroundPageID;
00031   VSDOutputElementList m_pageElements;
00032 };
00033 
00034 class VSDPages
00035 {
00036 public:
00037   VSDPages();
00038   ~VSDPages();
00039   void addPage(const VSDPage &page);
00040   void addBackgroundPage(const VSDPage &page);
00041   void draw(librevenge::RVNGDrawingInterface *painter);
00042   void setMetaData(const librevenge::RVNGPropertyList &metaData);
00043 private:
00044   void _drawWithBackground(librevenge::RVNGDrawingInterface *painter, const VSDPage &page);
00045   std::vector<VSDPage> m_pages;
00046   std::map<unsigned, VSDPage> m_backgroundPages;
00047   librevenge::RVNGPropertyList m_metaData;
00048 };
00049 
00050 
00051 } // namespace libvisio
00052 
00053 #endif // __VSDPAGES_H__
00054 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */