MWAWGraphicInterface.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
18  * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
19 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
20 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
21 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
22 * Copyright (C) 2006, 2007 Andrew Ziem
23 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
24 *
25 *
26 * All Rights Reserved.
27 *
28 * For minor contributions see the git repository.
29 *
30 * Alternatively, the contents of this file may be used under the terms of
31 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
32 * in which case the provisions of the LGPLv2+ are applicable
33 * instead of those above.
34 */
35 
36 #ifndef __MWAW_GRAPHIC_INTERFACE_HXX__
37 #define __MWAW_GRAPHIC_INTERFACE_HXX__
38 
39 #include <libwpd/libwpd.h>
40 #include <libmwaw_internal.hxx>
41 
43 
44 namespace MWAWGraphicInterfaceInternal
45 {
46 struct State;
47 }
53 {
54 public:
60  bool getBinaryResult(WPXBinaryData &result, std::string &mimeType);
61 
62  // none of the other callback functions will be called before this function is called
63  void startDocument(const ::WPXPropertyList &propList);
64 
65  // none of the other callback functions will be called after this function is called
66  void endDocument();
67 
123  void setDocumentMetaData(const WPXPropertyList &propList);
124 
125  void startPage(const ::WPXPropertyList &propList);
126 
127  void endPage();
128 
129  void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
130 
131  void startLayer(const ::WPXPropertyList &propList);
132 
133  void endLayer();
134 
135  void startEmbeddedGraphics(const ::WPXPropertyList &propList);
136 
137  void endEmbeddedGraphics();
138 
139  // Different primitive shapes
140  void drawRectangle(const ::WPXPropertyList &propList);
141 
142  void drawEllipse(const ::WPXPropertyList &propList);
143 
144  void drawPolygon(const ::WPXPropertyListVector &vertices);
145 
146  void drawPolyline(const ::WPXPropertyListVector &vertices);
147 
148  void drawPath(const ::WPXPropertyListVector &path);
149 
150  // Embedded binary/raster data
151  void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
152 
153  // Embedded text object
154  void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
155  void endTextObject();
156 
160  void insertTab();
161 
165  void insertSpace();
166 
171  void insertText(const WPXString &text);
172 
176  void insertLineBreak();
177 
186  void insertField(const WPXString &type, const WPXPropertyList &propList);
187 
200  void defineOrderedListLevel(const WPXPropertyList &propList);
210  void defineUnorderedListLevel(const WPXPropertyList &propList);
217  void openOrderedListLevel(const WPXPropertyList &/*propList*/) {}
218 
225  void openUnorderedListLevel(const WPXPropertyList &/*propList*/) {}
226 
231 
236 
254  void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
255 
259  void closeListElement();
260 
278  void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
279 
283  void closeParagraph();
284 
301  void openSpan(const WPXPropertyList &propList);
302 
306  void closeSpan();
307 
308 protected:
310  shared_ptr<MWAWGraphicInterfaceInternal::State> m_state;
311 };
312 
313 #endif
314 
315 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
void drawEllipse(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:174
void closeListElement()
Called when a list element should be closed.
Definition: MWAWGraphicInterface.cxx:262
void insertField(const WPXString &type, const WPXPropertyList &propList)
Called when a field should be inserted.
Definition: MWAWGraphicInterface.cxx:234
void insertTab()
Called when a TAB character should be inserted.
Definition: MWAWGraphicInterface.cxx:214
void openOrderedListLevel(const WPXPropertyList &)
Called when a new ordered list level should be opened Argument defines a set of properties for the li...
Definition: MWAWGraphicInterface.hxx:217
void defineOrderedListLevel(const WPXPropertyList &propList)
Defines an ordered (enumerated) list level.
Definition: MWAWGraphicInterface.cxx:247
void startLayer(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:148
void endLayer()
Definition: MWAWGraphicInterface.cxx:153
void openUnorderedListLevel(const WPXPropertyList &)
Called when a new unordered list level should be opened Argument defines a set of properties for the ...
Definition: MWAWGraphicInterface.hxx:225
shared_ptr< MWAWGraphicInterfaceInternal::State > m_state
the actual state
Definition: MWAWGraphicInterface.hxx:310
void drawRectangle(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:168
void closeParagraph()
Called when a paragraph is closed.
Definition: MWAWGraphicInterface.cxx:272
void setDocumentMetaData(const WPXPropertyList &propList)
Called when all document metadata should be set.
Definition: MWAWGraphicInterface.cxx:130
void closeSpan()
Called when a text span is closed.
Definition: MWAWGraphicInterface.cxx:282
write in WPXBinaryData a list of tags/and properties
Definition: MWAWPropertyHandler.hxx:99
~MWAWGraphicInterface()
destructor
Definition: MWAWGraphicInterface.cxx:108
void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
Called when a list element should be opened.
Definition: MWAWGraphicInterface.cxx:257
bool getBinaryResult(WPXBinaryData &result, std::string &mimeType)
return the final graphic
Definition: MWAWGraphicInterface.cxx:112
void drawPolyline(const ::WPXPropertyListVector &vertices)
Definition: MWAWGraphicInterface.cxx:186
void insertSpace()
Called when an explicit space should be inserted.
Definition: MWAWGraphicInterface.cxx:219
void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path)
Definition: MWAWGraphicInterface.cxx:204
void startEmbeddedGraphics(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:158
void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
Called when a new paragraph is opened.
Definition: MWAWGraphicInterface.cxx:267
void closeUnorderedListLevel()
Called when an ununordered list level should be closed.
Definition: MWAWGraphicInterface.hxx:235
main class used to define the final interface to generate picture
Definition: MWAWGraphicInterface.hxx:52
void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
Definition: MWAWGraphicInterface.cxx:198
void startPage(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:134
void closeOrderedListLevel()
Called when an unordered list level should be closed.
Definition: MWAWGraphicInterface.hxx:230
void endTextObject()
Definition: MWAWGraphicInterface.cxx:209
void endDocument()
Definition: MWAWGraphicInterface.cxx:125
void insertLineBreak()
Called when a line break should be inserted.
Definition: MWAWGraphicInterface.cxx:229
void openSpan(const WPXPropertyList &propList)
Called when a text span is opened.
Definition: MWAWGraphicInterface.cxx:277
void endEmbeddedGraphics()
Definition: MWAWGraphicInterface.cxx:163
void drawPath(const ::WPXPropertyListVector &path)
Definition: MWAWGraphicInterface.cxx:192
void startDocument(const ::WPXPropertyList &propList)
Definition: MWAWGraphicInterface.cxx:120
void insertText(const WPXString &text)
Called when a string of text should be inserted.
Definition: MWAWGraphicInterface.cxx:224
MWAWGraphicInterface()
constructor
Definition: MWAWGraphicInterface.cxx:104
void defineUnorderedListLevel(const WPXPropertyList &propList)
Defines an unordered (unenumerated) list level.
Definition: MWAWGraphicInterface.cxx:252
void endPage()
Definition: MWAWGraphicInterface.cxx:138
void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient)
Definition: MWAWGraphicInterface.cxx:142
void drawPolygon(const ::WPXPropertyListVector &vertices)
Definition: MWAWGraphicInterface.cxx:180

Generated on Tue Mar 10 2015 17:32:09 for libmwaw by doxygen 1.8.5