Go to the documentation of this file.
34 #ifndef MACPAINT_PARSER
35 # define MACPAINT_PARSER
40 #include <librevenge/librevenge.h>
67 void parse(librevenge::RVNGDrawingInterface *documentInterface)
final;
74 void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
91 std::shared_ptr<MacPaintParserInternal::State>
m_state;
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MacPaintParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacPaintParser.cxx:70
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Type
an enum to define the different type of document
Definition: MWAWDocument.hxx:99
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacPaintParser.cxx:122
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
@ MWAW_K_PAINT
bitmap graphic
Definition: MWAWDocument.hxx:84
@ MWAW_T_FULLPAINT
FullPaint: v1 ( same format as MacPaint file)
Definition: MWAWDocument.hxx:114
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: MacPaintParser.cxx:94
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
bool sendBitmap()
try to send a bitmap(v1)
Definition: MacPaintParser.cxx:173
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
~MacPaintParser() final
destructor
Definition: MacPaintParser.cxx:77
std::shared_ptr< MacPaintParserInternal::State > m_state
the state
Definition: MacPaintParser.hxx:91
the main class to read a MacPaint's, FullPaint's or other PNTG files
Definition: MacPaintParser.hxx:56
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWPageSpan.hxx:157
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:132
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
double getMarginRight() const
returns the right margin
Definition: MWAWPageSpan.hxx:137
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
double getPageLength() const
returns the page length (form width without margin )
Definition: MWAWPageSpan.hxx:152
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
Internal: the structures of a MacPaintParser.
Definition: MacPaintParser.cxx:52
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
bool createZones()
finds the different objects zones
Definition: MacPaintParser.cxx:145
Definition: libmwaw_internal.hxx:144
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
@ Page
Definition: MWAWPosition.hxx:51
State()
constructor
Definition: MacPaintParser.cxx:57
Internal: the state of a MacPaintParser.
Definition: MacPaintParser.cxx:55
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacPaintParser.cxx:281
bool readBitmap(bool onlyCheck=false)
try to read a bitmap(v1): 576*720
Definition: MacPaintParser.cxx:193
@ WNone
Definition: MWAWPosition.hxx:53
void init()
inits all internal variables
Definition: MacPaintParser.cxx:81
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
std::shared_ptr< MWAWPict > m_bitmap
the bitmap (v1)
Definition: MacPaintParser.cxx:62
@ MWAW_T_MACPAINT
MacPaint: v1-v2.
Definition: MWAWDocument.hxx:126
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20