MWAWGraphicInterface Class Reference

main class used to define the final interface to generate picture More...

#include <MWAWGraphicInterface.hxx>

Public Member Functions

 MWAWGraphicInterface ()
 constructor More...
 
 ~MWAWGraphicInterface ()
 destructor More...
 
bool getBinaryResult (WPXBinaryData &result, std::string &mimeType)
 return the final graphic More...
 
void startDocument (const ::WPXPropertyList &propList)
 
void endDocument ()
 
void setDocumentMetaData (const WPXPropertyList &propList)
 Called when all document metadata should be set. More...
 
void startPage (const ::WPXPropertyList &propList)
 
void endPage ()
 
void setStyle (const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient)
 
void startLayer (const ::WPXPropertyList &propList)
 
void endLayer ()
 
void startEmbeddedGraphics (const ::WPXPropertyList &propList)
 
void endEmbeddedGraphics ()
 
void drawRectangle (const ::WPXPropertyList &propList)
 
void drawEllipse (const ::WPXPropertyList &propList)
 
void drawPolygon (const ::WPXPropertyListVector &vertices)
 
void drawPolyline (const ::WPXPropertyListVector &vertices)
 
void drawPath (const ::WPXPropertyListVector &path)
 
void drawGraphicObject (const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
 
void startTextObject (const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path)
 
void endTextObject ()
 
void insertTab ()
 Called when a TAB character should be inserted. More...
 
void insertSpace ()
 Called when an explicit space should be inserted. More...
 
void insertText (const WPXString &text)
 Called when a string of text should be inserted. More...
 
void insertLineBreak ()
 Called when a line break should be inserted. More...
 
void insertField (const WPXString &type, const WPXPropertyList &propList)
 Called when a field should be inserted. More...
 
void defineOrderedListLevel (const WPXPropertyList &propList)
 Defines an ordered (enumerated) list level. More...
 
void defineUnorderedListLevel (const WPXPropertyList &propList)
 Defines an unordered (unenumerated) list level. More...
 
void openOrderedListLevel (const WPXPropertyList &)
 Called when a new ordered list level should be opened Argument defines a set of properties for the list. More...
 
void openUnorderedListLevel (const WPXPropertyList &)
 Called when a new unordered list level should be opened Argument defines a set of properties for the list level. More...
 
void closeOrderedListLevel ()
 Called when an unordered list level should be closed. More...
 
void closeUnorderedListLevel ()
 Called when an ununordered list level should be closed. More...
 
void openListElement (const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
 Called when a list element should be opened. More...
 
void closeListElement ()
 Called when a list element should be closed. More...
 
void openParagraph (const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
 Called when a new paragraph is opened. More...
 
void closeParagraph ()
 Called when a paragraph is closed. More...
 
void openSpan (const WPXPropertyList &propList)
 Called when a text span is opened. More...
 
void closeSpan ()
 Called when a text span is closed. More...
 

Protected Attributes

shared_ptr
< MWAWGraphicInterfaceInternal::State
m_state
 the actual state More...
 

Detailed Description

main class used to define the final interface to generate picture

Note
: this class is clearly inspired to libwpg/WPXPaintInterface version 0.3.0

Constructor & Destructor Documentation

MWAWGraphicInterface::MWAWGraphicInterface ( )

constructor

MWAWGraphicInterface::~MWAWGraphicInterface ( )

destructor

Member Function Documentation

void MWAWGraphicInterface::closeListElement ( )

Called when a list element should be closed.

void MWAWGraphicInterface::closeOrderedListLevel ( )
inline

Called when an unordered list level should be closed.

void MWAWGraphicInterface::closeParagraph ( )

Called when a paragraph is closed.

Referenced by closeListElement().

void MWAWGraphicInterface::closeSpan ( )

Called when a text span is closed.

void MWAWGraphicInterface::closeUnorderedListLevel ( )
inline

Called when an ununordered list level should be closed.

void MWAWGraphicInterface::defineOrderedListLevel ( const WPXPropertyList &  propList)

Defines an ordered (enumerated) list level.

Parameters
propListDefines a set of properties for the list. May contain:
  • libwpd:id A unique integer identifier for the list
  • libwpd:level The level of the list in the hierarchy
  • style:num-format Type of list
  • style:num-prefix Text that comes before the number in the list
  • style:num-suffix Text that comes after the number in the list
  • text:start-value The starting number of the list
  • text:min-label-width The distance between the list label and the actual text, stored in inches
  • text:space-before The indentation level of the lists, stored in inches
void MWAWGraphicInterface::defineUnorderedListLevel ( const WPXPropertyList &  propList)

Defines an unordered (unenumerated) list level.

Parameters
propListDefines a set of properties for the list level. May contain:
  • libwpd:id A unique integer identifier for the list
  • libwpd:level The level of the list in the hierarchy
  • text:bullet-char The string that should be used as a bullet
  • text:min-label-width The distance between the bullet and the actual text, stored in inches
  • text:space-before The indentation level of the lists, stored in inches
void MWAWGraphicInterface::drawEllipse ( const ::WPXPropertyList &  propList)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::drawGraphicObject ( const ::WPXPropertyList &  propList,
const ::WPXBinaryData &  binaryData 
)
void MWAWGraphicInterface::drawPath ( const ::WPXPropertyListVector &  path)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::drawPolygon ( const ::WPXPropertyListVector &  vertices)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::drawPolyline ( const ::WPXPropertyListVector &  vertices)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::drawRectangle ( const ::WPXPropertyList &  propList)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::endDocument ( )
void MWAWGraphicInterface::endEmbeddedGraphics ( )
void MWAWGraphicInterface::endLayer ( )
void MWAWGraphicInterface::endPage ( )
void MWAWGraphicInterface::endTextObject ( )
bool MWAWGraphicInterface::getBinaryResult ( WPXBinaryData &  result,
std::string &  mimeType 
)

return the final graphic

void MWAWGraphicInterface::insertField ( const WPXString &  type,
const WPXPropertyList &  propList 
)

Called when a field should be inserted.

Parameters
typemay include:
  • text:page-number Current page number
  • text:page-count Total # of pages in document
propListDefines a set of properties for the field. May contain:
  • style:num-format Type of page number (for page number)
void MWAWGraphicInterface::insertLineBreak ( )

Called when a line break should be inserted.

void MWAWGraphicInterface::insertSpace ( )

Called when an explicit space should be inserted.

void MWAWGraphicInterface::insertTab ( )

Called when a TAB character should be inserted.

void MWAWGraphicInterface::insertText ( const WPXString &  text)

Called when a string of text should be inserted.

Parameters
textA textbuffer encoded as a UTF8 string

Referenced by insertField(), insertLineBreak(), insertSpace(), and insertTab().

void MWAWGraphicInterface::openListElement ( const WPXPropertyList &  propList,
const WPXPropertyListVector &  tabStops 
)

Called when a list element should be opened.

Parameters
propListProperty list for the paragraph. May contain:
  • fo:text-align The justification of this paragraph (left, center, end, full, or justify)
  • fo:margin-left The left indentation of this paragraph, in inches
  • fo:margin-right The right indentation of this paragraph, in inches
  • fo:margin-top The amount of extra spacing to be placed before the paragraph, in inches
  • fo:margin-bottom The amount of extra spacing to be placed after the paragraph, in inches
  • fo:text-indent The indentation of first line, in inches (difference relative to margin-left)
  • fo:line-height The amount of spacing between lines, in number of lines (1.0 is single spacing)
  • fo:break-before Whether this paragraph should be placed in a new column or page (the value is set to column or page if so)
tabStopsList of tabstop definitions for the paragraph. If the list is empty, default tabstop definition should be used. Each tab stop may contain:
  • style:type Type of tab (left, right, center, or char)
  • style:char Alingnment character for char aligned tabs
  • style:leader-text The leader character
  • style:position Position of the tab
void MWAWGraphicInterface::openOrderedListLevel ( const WPXPropertyList &  )
inline

Called when a new ordered list level should be opened Argument defines a set of properties for the list.

Must contain:

  • libwpd:id A unique integer identifier for the list
  • libwpd:level The level of the list in the hierarchy
void MWAWGraphicInterface::openParagraph ( const WPXPropertyList &  propList,
const WPXPropertyListVector &  tabStops 
)

Called when a new paragraph is opened.

This (or openListElement) will always be called before any text or span is placed into the document.

Parameters
propListProperty list for the paragraph. May contain:
  • fo:text-align The justification of this paragraph (left, center, end, full, or justify)
  • fo:margin-left The left indentation of this paragraph, in inches
  • fo:margin-right The right indentation of this paragraph, in inches
  • fo:margin-top The amount of extra spacing to be placed before the paragraph, in inches
  • fo:margin-bottom The amount of extra spacing to be placed after the paragraph, in inches
  • fo:text-indent The indentation of first line, in inches (difference relative to margin-left)
  • fo:line-height The amount of spacing between lines, in number of lines (1.0 is single spacing)
  • fo:break-before Whether this paragraph should be placed in a new column or page (the value is set to column or page if so)
tabStopsList of tabstop definitions for the paragraph. If the list is empty, default tabstop definition should be used. Each tab stop may contain:
  • style:type Type of tab (left, right, center, or char)
  • style:char Alingnment character for char aligned tabs
  • style:leader-text The leader character
  • style:position Position of the tab

Referenced by openListElement().

void MWAWGraphicInterface::openSpan ( const WPXPropertyList &  propList)

Called when a text span is opened.

Parameters
propListProperty list for the span. May contain:
  • fo:font-style Font style (italic or normal)
  • fo:font-weight Font style (bold or normal)
  • style:text-line-through-type (double or single, if present)
  • style:text-underline-type (double or single, if present)
  • style:text-outline (true or false)
  • fo:font-variant (small-caps, if present)
  • style:font-name The name of the font used in the span, a text string in ascii
  • fo:font-size The size of the font used in the span, in points (72 points per inch)
  • fo:color The color of the font used in the span (encoded in hex: #RRGGBB)
  • fo:background-color The background color of the text in the span (encoded in hex: #RRGGBB)
  • style:text-blinking Whether the text should blink (true or false)
  • fo:text-shadow
void MWAWGraphicInterface::openUnorderedListLevel ( const WPXPropertyList &  )
inline

Called when a new unordered list level should be opened Argument defines a set of properties for the list level.

Must contain:

  • libwpd:id A unique integer identifier for the list
  • libwpd:level The level of the list in the hierarchy
void MWAWGraphicInterface::setDocumentMetaData ( const WPXPropertyList &  propList)

Called when all document metadata should be set.

This is always the first callback made.

Parameters
propListProperty list for the metadata. May contain:
  • dc:creator
  • dc:language The document's keywords
  • dc:publisher The document's publisher
  • dc:source
  • dc:subject The document's subject
  • dc:type The document's type
  • dcterms:available Date when the document was completed
  • dcterms:issued: Date of the version of the document
  • libwpd:abstract Abstract of the document's contents
  • libwpd:account Account
  • libwpd:address Address
  • libwpd:attachments
  • libwpd:authorization
  • libwpd:bill-to
  • libwpd:blind-copy
  • libwpd:carbon-copy
  • libwpd:checked-by
  • libwpd:client
  • libwpd:comments
  • libwpd:department
  • libwpd:descriptive-name The descriptive name for the document
  • libwpd:descriptive-type The descriptive type for the document
  • libwpd:destination
  • libwpd:disposition
  • libwpd:division
  • libwpd:document-number
  • libwpd:editor
  • libwpd:forward-to
  • libwpd:group
  • libwpd:mail-stop
  • libwpd:matter
  • libwpd:office
  • libwpd:owner
  • libwpd:project
  • libwpd:purpose
  • libwpd:received-from
  • libwpd:recorded-by
  • libwpd:recorded-date Date when the document was recorded
  • libwpd:reference
  • libwpd:revision-notes
  • libwpd:revision-number
  • libwpd:section
  • libwpd:security
  • libwpd:status
  • libwpd:telephone-number
  • libwpd:version-notes
  • libwpd:version-number
  • meta:creation-date Document creation date
  • meta:initial-creator The document's author
  • meta:keyword The document's keywords
void MWAWGraphicInterface::setStyle ( const ::WPXPropertyList &  propList,
const ::WPXPropertyListVector &  gradient 
)

Referenced by MWAWGraphicShape::send().

void MWAWGraphicInterface::startDocument ( const ::WPXPropertyList &  propList)
void MWAWGraphicInterface::startEmbeddedGraphics ( const ::WPXPropertyList &  propList)
void MWAWGraphicInterface::startLayer ( const ::WPXPropertyList &  propList)
void MWAWGraphicInterface::startPage ( const ::WPXPropertyList &  propList)
void MWAWGraphicInterface::startTextObject ( const ::WPXPropertyList &  propList,
const ::WPXPropertyListVector &  path 
)

Member Data Documentation


The documentation for this class was generated from the following files:

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