Class to define the position of an object (textbox, picture, ..) in the document. More...
#include <MWAWPosition.hxx>
Public Types | |
| enum | AnchorTo { Char, CharBaseLine, Frame, Paragraph, Page, Unknown } |
| a list of enum used to defined the anchor More... | |
| enum | Wrapping { WNone, WBackground, WDynamic, WForeground, WRunThrough } |
| an enum used to define the wrapping: none, ... More... | |
| enum | XPos { XRight, XLeft, XCenter, XFull } |
| an enum used to define the relative X position More... | |
| enum | YPos { YTop, YBottom, YCenter, YFull } |
| an enum used to define the relative Y position More... | |
Public Member Functions | |
| MWAWPosition (MWAWVec2f const &orig=MWAWVec2f(), MWAWVec2f const &sz=MWAWVec2f(), librevenge::RVNGUnit theUnit=librevenge::RVNG_INCH) | |
| constructor | |
| virtual | ~MWAWPosition () |
| bool | operator== (MWAWPosition const &f) const |
| basic operator== | |
| bool | operator!= (MWAWPosition const &f) const |
| basic operator!= | |
| bool | operator< (MWAWPosition const &f) const |
| basic operator< | |
| int | page () const |
| returns the frame page | |
| MWAWVec2f const & | origin () const |
| return the frame origin | |
| MWAWVec2f const & | size () const |
| returns the frame size | |
| MWAWVec2f const & | naturalSize () const |
| returns the natural size (if known) | |
| MWAWVec2f const & | leftTopClipping () const |
| returns the left top clipping | |
| MWAWVec2f const & | rightBottomClipping () const |
| returns the right bottom clipping | |
| librevenge::RVNGUnit | unit () const |
| returns the unit | |
| float | getInvUnitScale (librevenge::RVNGUnit fromUnit) const |
| returns a float which can be used to scale some data in object unit | |
| void | setPage (int pg) const |
| sets the page | |
| void | setOrigin (MWAWVec2f const &orig) |
| sets the frame origin | |
| void | setSize (MWAWVec2f const &sz) |
| sets the frame size | |
| void | setNaturalSize (MWAWVec2f const &naturalSz) |
| sets the natural size (if known) | |
| void | setUnit (librevenge::RVNGUnit newUnit) |
| sets the dimension unit | |
| void | setPagePos (int pg, MWAWVec2f const &newOrig) const |
| sets/resets the page and the origin | |
| void | setRelativePosition (AnchorTo anchor, XPos X=XLeft, YPos Y=YTop) |
| sets the relative position | |
| void | setClippingPosition (MWAWVec2f lTop, MWAWVec2f rBottom) |
| sets the clipping position | |
| int | order () const |
| returns background/foward order | |
| void | setOrder (int ord) const |
| set background/foward order | |
Static Public Member Functions | |
| static float | getScaleFactor (librevenge::RVNGUnit orig, librevenge::RVNGUnit dest) |
Public Attributes | |
| AnchorTo | m_anchorTo |
| anchor position | |
| XPos | m_xPos |
| X relative position. | |
| YPos | m_yPos |
| Y relative position. | |
| Wrapping | m_wrapping |
| Wrapping. | |
Protected Member Functions | |
| int | cmp (MWAWPosition const &f) const |
| basic function to compare two positions | |
Protected Attributes | |
| int | m_page |
| the page | |
| MWAWVec2f | m_orig |
| the origin position in a page | |
| MWAWVec2f | m_size |
| MWAWVec2f | m_naturalSize |
| the natural size of the data (if known) | |
| MWAWVec2f | m_LTClip |
| the left top clip position | |
| MWAWVec2f | m_RBClip |
| librevenge::RVNGUnit | m_unit |
| the unit used in orig, in m_size and in m_LTClip , .... Default: in inches | |
| int | m_order |
| background/foward order | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, MWAWPosition const &pos) |
| operator<< | |
Class to define the position of an object (textbox, picture, ..) in the document.
Stores the page, object position, object size, anchor, wrapping, ...
| enum MWAWPosition::XPos |
| enum MWAWPosition::YPos |
| MWAWPosition::MWAWPosition | ( | MWAWVec2f const & | orig = MWAWVec2f(), |
| MWAWVec2f const & | sz = MWAWVec2f(), |
||
| librevenge::RVNGUnit | theUnit = librevenge::RVNG_INCH |
||
| ) | [inline] |
constructor
| virtual MWAWPosition::~MWAWPosition | ( | ) | [inline, virtual] |
| int MWAWPosition::cmp | ( | MWAWPosition const & | f | ) | const [inline, protected] |
basic function to compare two positions
Referenced by operator!=(), operator<(), and operator==().
| float MWAWPosition::getInvUnitScale | ( | librevenge::RVNGUnit | fromUnit | ) | const [inline] |
returns a float which can be used to scale some data in object unit
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWPresentationListener::insertPicture(), MWAWGraphicListener::insertPicture(), MWAWPresentationListener::insertSlideNote(), MWAWPresentationListener::insertTextBox(), MWAWGraphicListener::insertTextBox(), and MWAWOLEParser::parse().
| static float MWAWPosition::getScaleFactor | ( | librevenge::RVNGUnit | orig, |
| librevenge::RVNGUnit | dest | ||
| ) | [inline, static] |
| MWAWVec2f const& MWAWPosition::leftTopClipping | ( | ) | const [inline] |
returns the left top clipping
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), and MWAWGraphicListener::_handleFrameParameters().
| MWAWVec2f const& MWAWPosition::naturalSize | ( | ) | const [inline] |
returns the natural size (if known)
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), and MWAWOLEParser::parse().
| bool MWAWPosition::operator!= | ( | MWAWPosition const & | f | ) | const [inline] |
basic operator!=
| bool MWAWPosition::operator< | ( | MWAWPosition const & | f | ) | const [inline] |
basic operator<
| bool MWAWPosition::operator== | ( | MWAWPosition const & | f | ) | const [inline] |
basic operator==
| int MWAWPosition::order | ( | ) | const [inline] |
returns background/foward order
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), and ClarisDrawGraph::sendShape().
| MWAWVec2f const& MWAWPosition::origin | ( | ) | const [inline] |
return the frame origin
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWPresentationListener::insertHeader(), MWAWGraphicListener::insertHeader(), MWAWTextListener::insertPicture(), MWAWPresentationListener::insertPicture(), MWAWGraphicListener::insertPicture(), MWAWSpreadsheetListener::insertPicture(), MWAWPresentationListener::insertSlideNote(), MWAWPresentationListener::insertTextBox(), MWAWGraphicListener::insertTextBox(), MsWksGraph::send(), RagTimeParser::sendBasicPicture(), MsWksTable::sendChart(), ClarisDrawGraph::sendGroup(), ClarisWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), ClarisDrawGraph::sendMainGroupChild(), NisusWrtGraph::sendPicture(), MsWrdParser::sendPicture(), GreatWksGraph::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdKGraph::sendShapeGraph(), HanMacWrdJGraph::sendShapeGraph(), and GreatWksGraph::sendTextbox().
| int MWAWPosition::page | ( | ) | const [inline] |
returns the frame page
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), cmp(), and MsWks4ZoneInternal::operator<<().
| MWAWVec2f const& MWAWPosition::rightBottomClipping | ( | ) | const [inline] |
returns the right bottom clipping
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), and MWAWGraphicListener::_handleFrameParameters().
| void MWAWPosition::setClippingPosition | ( | MWAWVec2f | lTop, |
| MWAWVec2f | rBottom | ||
| ) | [inline] |
sets the clipping position
Referenced by NisusWrtGraph::sendPicture().
| void MWAWPosition::setNaturalSize | ( | MWAWVec2f const & | naturalSz | ) | [inline] |
sets the natural size (if known)
Referenced by MWAWOLEParser::parse(), MWAWOLEParser::readContents(), MWAWOLEParser::readCONTENTS(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MWAWOLEParser::readOlePres(), WriteNowText::readTokenV2(), FullWrtGraph::sendGraphic(), WriteNowParser::sendPicture(), and MacWrtProParser::sendPicture().
| void MWAWPosition::setOrder | ( | int | ord | ) | const [inline] |
set background/foward order
Referenced by MsWksGraphInternal::Zone::getPosition(), HanMacWrdKGraph::sendEmptyPicture(), HanMacWrdJGraph::sendEmptyPicture(), ClarisWksGraph::sendGroup(), ClarisDrawGraph::sendShape(), and HanMacWrdKGraph::sendTextBox().
| void MWAWPosition::setOrigin | ( | MWAWVec2f const & | orig | ) | [inline] |
sets the frame origin
Referenced by MsWksGraph::send(), MsWksTable::sendChart(), HanMacWrdKGraph::sendFrame(), HanMacWrdJGraph::sendFrame(), ClarisWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), NisusWrtGraph::sendPicture(), MsWrdParser::sendPicture(), MacWrtProParser::sendPicture(), GreatWksGraph::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdKGraph::sendShapeGraph(), and HanMacWrdJGraph::sendShapeGraph().
| void MWAWPosition::setPage | ( | int | pg | ) | const [inline] |
sets the page
Referenced by MsWks4ZoneInternal::Frame::Frame(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Block::getPosition(), MsWks4Zone::readFRAM(), MacWrtParser::readInformations(), MacWrtParser::readInformationsV3(), SuperPaintParser::sendPictures(), BeagleWksDRParser::sendPictures(), and FullWrtGraph::sendSideBar().
| void MWAWPosition::setPagePos | ( | int | pg, |
| MWAWVec2f const & | newOrig | ||
| ) | const [inline] |
sets/resets the page and the origin
Referenced by BeagleWksDBParser::sendFrame(), BeagleWksSSParser::sendFrame(), BeagleWksBMParser::sendFrame(), BeagleWksParser::sendFrame(), BeagleWksDRParser::sendFrame(), ClarisWksGraph::sendGroup(), and BeagleWksSSParser::sendSpreadsheet().
sets the relative position
Referenced by ClarisDrawParser::createDocument(), MarinerWrtGraph::flushExtra(), NisusWrtGraph::flushExtra(), HanMacWrdKGraph::flushExtra(), HanMacWrdJGraph::flushExtra(), ClarisDrawGraph::flushExtra(), ClarisWksGraph::flushExtra(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Block::getPosition(), ClarisDrawParser::parse(), ClarisWksBMParser::parse(), MsWksGraphInternal::SubDocument::parse(), MWAWOLEParser::readContents(), MWAWOLEParser::readCONTENTS(), MindWrtParser::readGraphic(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MWAWOLEParser::readOlePres(), WriteNowText::readTokenV2(), MacPaintParser::sendBitmap(), BeagleWksBMParser::sendBitmap(), SuperPaintParser::sendBitmap(), MsWksTable::sendChart(), HanMacWrdKGraph::sendEmptyPicture(), HanMacWrdJGraph::sendEmptyPicture(), MWAWTable::sendExtraLines(), BeagleWksDBParser::sendFrame(), BeagleWksSSParser::sendFrame(), BeagleWksBMParser::sendFrame(), BeagleWksParser::sendFrame(), BeagleWksDRParser::sendFrame(), GreatWksGraph::sendFrame(), ActaText::sendGraphic(), FullWrtGraph::sendGraphic(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), LightWayTxtGraph::sendJPEG(), MsWksGraph::sendObjects(), ClarisWksGraph::sendPageChild(), NisusWrtGraph::sendPageGraphics(), HanMacWrdKGraph::sendPageGraphics(), HanMacWrdJGraph::sendPageGraphics(), LightWayTxtGraph::sendPICT(), GreatWksBMParser::sendPicture(), MacDocParser::sendPicture(), EDocParser::sendPicture(), NisusWrtGraph::sendPicture(), TeachTxtParser::sendPicture(), DocMkrParser::sendPicture(), MarinerWrtGraph::sendPicture(), WriteNowParser::sendPicture(), MsWrdParser::sendPicture(), MarinerWrtGraph::sendRule(), BeagleWksSSParser::sendSpreadsheet(), NisusWrtText::sendText(), ClarisWksText::sendText(), MacWrtProParser::sendText(), GreatWksText::sendZone(), HanMacWrdJParser::sendZone(), and HanMacWrdKParser::sendZone().
| void MWAWPosition::setSize | ( | MWAWVec2f const & | sz | ) | [inline] |
sets the frame size
Referenced by MWAWOLEParser::readContents(), ClarisDrawGraph::sendBitmap(), ClarisWksGraph::sendBitmap(), MsWksTable::sendChart(), HanMacWrdJGraph::sendComment(), HanMacWrdKGraph::sendFrame(), HanMacWrdJGraph::sendFrame(), ClarisWksGraph::sendGroup(), MsWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), LightWayTxtGraph::sendJPEG(), NisusWrtGraph::sendPicture(), MsWrdParser::sendPicture(), MacWrtProParser::sendPicture(), ClarisWksGraph::sendPicture(), HanMacWrdKGraph::sendPictureFrame(), HanMacWrdJGraph::sendPictureFrame(), MarinerWrtGraph::sendPSZone(), GreatWksGraph::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdJGraph::sendShapeGraph(), HanMacWrdKGraph::sendShapeGraph(), GreatWksGraph::sendTextbox(), HanMacWrdKGraph::sendTextBox(), and HanMacWrdJGraph::sendTextbox().
| void MWAWPosition::setUnit | ( | librevenge::RVNGUnit | newUnit | ) | [inline] |
sets the dimension unit
Referenced by MWAWOLEParser::readContents(), MWAWOLEParser::readCONTENTS(), MWAWOLEParser::readOlePres(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), LightWayTxtGraph::sendJPEG(), and MacWrtProParser::sendPicture().
| MWAWVec2f const& MWAWPosition::size | ( | ) | const [inline] |
returns the frame size
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWTextListener::insertPicture(), MWAWPresentationListener::insertPicture(), MWAWGraphicListener::insertPicture(), MWAWSpreadsheetListener::insertPicture(), MWAWPresentationListener::insertTextBox(), MWAWGraphicListener::insertTextBox(), MWAWOLEParser::parse(), MsWksGraph::send(), RagTimeSpreadsheet::send(), ClarisDrawGraph::sendBitmap(), ClarisWksGraph::sendBitmap(), MsWksTable::sendChart(), HanMacWrdKGraph::sendEmptyPicture(), HanMacWrdJGraph::sendEmptyPicture(), HanMacWrdKGraph::sendFrame(), HanMacWrdJGraph::sendFrame(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), NisusWrtGraph::sendPicture(), MacWrtProParser::sendPicture(), ClarisWksGraph::sendPicture(), HanMacWrdKGraph::sendPictureFrame(), HanMacWrdJGraph::sendPictureFrame(), MarinerWrtGraph::sendPSZone(), GreatWksGraph::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdJGraph::sendShapeGraph(), HanMacWrdKGraph::sendShapeGraph(), GreatWksGraph::sendTextbox(), HanMacWrdKGraph::sendTextBox(), and HanMacWrdJGraph::sendTextbox().
| librevenge::RVNGUnit MWAWPosition::unit | ( | ) | const [inline] |
returns the unit
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWTextListener::insertPicture(), MWAWSpreadsheetListener::insertPicture(), and MWAWOLEParser::parse().
| std::ostream& operator<< | ( | std::ostream & | o, |
| MWAWPosition const & | pos | ||
| ) | [friend] |
operator<<
anchor position
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), cmp(), MsWksGraph::flushExtra(), RagTimeSpreadsheet::flushExtra(), RagTimeParser::flushExtra(), MWAWPresentationListener::insertFooter(), MWAWGraphicListener::insertFooter(), MWAWPresentationListener::insertHeader(), MWAWGraphicListener::insertHeader(), MWAWTextListener::insertPicture(), MWAWSpreadsheetListener::insertPicture(), MWAWTextListener::openFrame(), MWAWSpreadsheetListener::openFrame(), MWAWPresentationListener::openTable(), MWAWGraphicListener::openTable(), MacDrawParser::send(), MsWksGraph::send(), MacDraftParser::send(), RagTimeParser::send(), MacDrawProParser::send(), MsWksGraph::sendAll(), ClarisDrawGraph::sendBitmap(), ClarisWksGraph::sendBitmap(), HanMacWrdKGraph::sendEmptyPicture(), HanMacWrdJGraph::sendEmptyPicture(), HanMacWrdJGraph::sendFrame(), HanMacWrdKGraph::sendFrame(), ClarisDrawGraph::sendGroup(), GreatWksGraph::sendGroup(), ClarisWksGraph::sendGroup(), HanMacWrdKGraph::sendGroup(), HanMacWrdJGraph::sendGroup(), MsWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), MindWrtParser::sendHeaderFooter(), ClarisDrawGraph::sendMainGroupChild(), MsWksGraph::sendObjects(), NisusWrtGraph::sendPicture(), MarinerWrtGraph::sendRule(), MoreText::sendText(), GreatWksGraph::sendTextboxAsGraphic(), ClarisWksPresentation::sendZone(), and setRelativePosition().
MWAWVec2f MWAWPosition::m_LTClip [protected] |
the left top clip position
Referenced by cmp(), leftTopClipping(), and setClippingPosition().
MWAWVec2f MWAWPosition::m_naturalSize [protected] |
the natural size of the data (if known)
Referenced by cmp(), naturalSize(), and setNaturalSize().
int MWAWPosition::m_order [mutable, protected] |
background/foward order
Referenced by order(), and setOrder().
MWAWVec2f MWAWPosition::m_orig [protected] |
the origin position in a page
Referenced by cmp(), origin(), setOrigin(), and setPagePos().
int MWAWPosition::m_page [protected] |
the page
Referenced by page(), setPage(), and setPagePos().
MWAWVec2f MWAWPosition::m_RBClip [protected] |
Referenced by cmp(), rightBottomClipping(), and setClippingPosition().
MWAWVec2f MWAWPosition::m_size [protected] |
librevenge::RVNGUnit MWAWPosition::m_unit [protected] |
the unit used in orig, in m_size and in m_LTClip , .... Default: in inches
Referenced by cmp(), getInvUnitScale(), setUnit(), and unit().
Wrapping.
Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Block::getPosition(), ClarisWksBMParser::parse(), MsWksGraph::send(), MacPaintParser::sendBitmap(), BeagleWksBMParser::sendBitmap(), SuperPaintParser::sendBitmap(), BeagleWksDBParser::sendFrame(), BeagleWksSSParser::sendFrame(), BeagleWksBMParser::sendFrame(), BeagleWksParser::sendFrame(), BeagleWksDRParser::sendFrame(), ClarisWksGraph::sendGroup(), ClarisWksGraph::sendGroupChild(), MindWrtParser::sendHeaderFooter(), MsWksGraph::sendObjects(), GreatWksBMParser::sendPicture(), NisusWrtGraph::sendPicture(), TeachTxtParser::sendPicture(), DocMkrParser::sendPicture(), and MsWrdParser::sendPicture().