OdgGenerator.hxx
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libodfgen
00003  * Version: MPL 2.0 / LGPLv2.1+
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  * Major Contributor(s):
00010  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
00011  *
00012  * For minor contributions see the git repository.
00013  *
00014  * Alternatively, the contents of this file may be used under the terms
00015  * of the GNU Lesser General Public License Version 2.1 or later
00016  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00017  * applicable instead of those above.
00018  *
00019  * For further information visit http://libwpd.sourceforge.net
00020  */
00021 
00022 /* "This product is not manufactured, approved, or supported by
00023  * Corel Corporation or Corel Corporation Limited."
00024  */
00025 #ifndef __ODGGENERATOR_HXX__
00026 #define __ODGGENERATOR_HXX__
00027 
00028 #include <libwpd/libwpd.h>
00029 #include <libwpg/libwpg.h>
00030 
00031 #include "OdfDocumentHandler.hxx"
00032 
00033 class OdgGeneratorPrivate;
00034 
00040 class OdgGenerator : public libwpg::WPGPaintInterface
00041 {
00042 public:
00043         OdgGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
00044         ~OdgGenerator();
00045 
00046         void startGraphics(const ::WPXPropertyList &propList);
00047         void endGraphics();
00048         void startLayer(const ::WPXPropertyList &propList);
00049         void endLayer();
00050         void startEmbeddedGraphics(const ::WPXPropertyList &propList);
00051         void endEmbeddedGraphics();
00052 
00053         void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
00054 
00055         void drawRectangle(const ::WPXPropertyList &propList);
00056         void drawEllipse(const ::WPXPropertyList &propList);
00057         void drawPolyline(const ::WPXPropertyListVector &vertices);
00058         void drawPolygon(const ::WPXPropertyListVector &vertices);
00059         void drawPath(const ::WPXPropertyListVector &path);
00060         void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
00061 
00062         void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
00063         void endTextObject();
00064         void startTextLine(const ::WPXPropertyList &propList);
00065         void endTextLine();
00066         void startTextSpan(const ::WPXPropertyList &propList);
00067         void endTextSpan();
00068         void insertText(const ::WPXString &str);
00069 
00070 private:
00071         OdgGenerator(OdgGenerator const &);
00072         OdgGenerator &operator=(OdgGenerator const &);
00073 
00074         OdgGeneratorPrivate *mpImpl;
00075 };
00076 
00077 #endif // __ODGGENERATOR_HXX__
00078 
00079 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */