WingzGraph.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) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 /*
35  * Parser to Claris Resolve/Wingz document ( graphic part )
36  *
37  */
38 #ifndef WINGZ_GRAPH
39 # define WINGZ_GRAPH
40 
41 #include <string>
42 #include <vector>
43 
44 #include <librevenge/librevenge.h>
45 
46 #include "libmwaw_internal.hxx"
47 
48 #include "MWAWDebug.hxx"
49 #include "MWAWGraphicStyle.hxx"
50 #include "MWAWInputStream.hxx"
51 
52 namespace WingzGraphInternal
53 {
54 struct Graphic;
55 struct State;
56 class SubDocument;
57 }
58 
59 class WingzParser;
60 
67 {
68  friend class WingzParser;
70 
71 public:
73  explicit WingzGraph(WingzParser &parser);
75  virtual ~WingzGraph();
76 
78  int version() const;
79 
80 protected:
82  bool sendPageGraphics();
83 
84  //
85  // Intermediate level
86  //
87 
89  bool readGraphic();
91  bool readEndGroup();
93  bool readTextZone(std::shared_ptr<WingzGraphInternal::Graphic> graphic);
94 
96  bool readChartData(std::shared_ptr<WingzGraphInternal::Graphic> graphic);
98  bool readPattern(MWAWGraphicStyle::Pattern &pattern, int &patId);
100  bool readColor(MWAWColor &color, int &patId);
101 
102  //
103  // send data
104  //
105 
107  bool sendGraphic(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos);
109  bool sendShape(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos);
111  bool sendPicture(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos);
113  bool sendText(WingzGraphInternal::Graphic const &graphic);
114 private:
115  WingzGraph(WingzGraph const &orig) = delete;
116  WingzGraph &operator=(WingzGraph const &orig) = delete;
117 
118 protected:
119  //
120  // data
121  //
124 
126  std::shared_ptr<WingzGraphInternal::State> m_state;
127 
130 };
131 #endif
132 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Internal a Graphic of a WingzGraph.
Definition: WingzGraph.cxx:61
bool readPattern(MWAWGraphicStyle::Pattern &pattern, int &patId)
read a pattern
Definition: WingzGraph.cxx:999
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
bool readEndGroup()
read a end group zone: 0xf
Definition: WingzGraph.cxx:596
bool readChartData(std::shared_ptr< WingzGraphInternal::Graphic > graphic)
read a chart
Definition: WingzGraph.cxx:1037
int version() const
returns the file version
Definition: WingzGraph.cxx:267
bool readGraphic()
read a graphic zone: 0xe
Definition: WingzGraph.cxx:281
Internal: the subdocument of a WingzGraph.
Definition: WingzGraph.cxx:203
bool sendPicture(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos)
try to send a picture graphic
Definition: WingzGraph.cxx:1503
the class to store a color
Definition: libmwaw_internal.hxx:192
bool sendGraphic(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos)
try to send a generic graphic
Definition: WingzGraph.cxx:1444
bool sendShape(WingzGraphInternal::Graphic const &graphic, MWAWPosition const &pos)
try to send a shape graphic
Definition: WingzGraph.cxx:1525
std::shared_ptr< WingzGraphInternal::State > m_state
the state
Definition: WingzGraph.hxx:126
bool readTextZone(std::shared_ptr< WingzGraphInternal::Graphic > graphic)
read a text zone or a button zone ( some graphic zone)
Definition: WingzGraph.cxx:635
WingzParser * m_mainParser
the main parser;
Definition: WingzGraph.hxx:129
WingzGraph(WingzParser &parser)
constructor
Definition: WingzGraph.cxx:257
MWAWParserStatePtr m_parserState
the parser state
Definition: WingzGraph.hxx:123
bool sendPageGraphics()
try to send the page graphic
Definition: WingzGraph.cxx:1693
Internal: the structures of a WingzGraph.
Definition: WingzGraph.cxx:58
WingzGraph & operator=(WingzGraph const &orig)=delete
bool readColor(MWAWColor &color, int &patId)
read a color: front color, patId, background color
Definition: WingzGraph.cxx:1025
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
the main class to read the graphic part of a Claris Resolve/Wingz file
Definition: WingzGraph.hxx:66
bool sendText(WingzGraphInternal::Graphic const &graphic)
try to send the content of a textbox/button
Definition: WingzGraph.cxx:1644
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:351
the main class to read a Claris Resolve or a Wingz document
Definition: WingzParser.hxx:62
virtual ~WingzGraph()
destructor
Definition: WingzGraph.cxx:264

Generated for libmwaw by doxygen 1.8.14