Class to define the position of an object (textbox, picture, ..) in the document. More...
#include <WPSPosition.h>
Public Types | |
| enum | AnchorTo { Char, CharBaseLine, Paragraph, ParagraphContent, Page, PageContent } |
| a list of enum used to defined the anchor More... | |
| enum | Wrapping { WNone, WDynamic, WRunThrough } |
| an enum used to define the wrapping 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 | |
| WPSPosition (Vec2f const &orig=Vec2f(), Vec2f const &sz=Vec2f(), librevenge::RVNGUnit unt=librevenge::RVNG_INCH) | |
| constructor More... | |
| ~WPSPosition () | |
| destructor More... | |
| bool | operator== (WPSPosition const &f) const |
| basic operator== More... | |
| bool | operator!= (WPSPosition const &f) const |
| basic operator!= More... | |
| bool | operator< (WPSPosition const &f) const |
| basic operator< More... | |
| int | page () const |
| returns the frame page More... | |
| Vec2f const & | origin () const |
| return the frame origin More... | |
| Vec2f const & | size () const |
| returns the frame size More... | |
| Vec2f const & | naturalSize () const |
| returns the natural size (if known) More... | |
| librevenge::RVNGUnit | unit () const |
| returns the unit More... | |
| float | getInvUnitScale (librevenge::RVNGUnit unt) const |
| returns a float which can be used to scale some data in object unit More... | |
| void | setPage (int pg) const |
| sets the page More... | |
| void | setOrigin (Vec2f const &orig) |
| sets the frame origin More... | |
| void | setSize (Vec2f const &sz) |
| sets the frame size More... | |
| void | setNaturalSize (Vec2f const &natSize) |
| sets the natural size (if known) More... | |
| void | setUnit (librevenge::RVNGUnit unt) |
| sets the dimension unit More... | |
| void | setPagePos (int pg, Vec2f const &newOrig) const |
| sets/resets the page and the origin More... | |
| void | setRelativePosition (AnchorTo anchor, XPos X=XLeft, YPos Y=YTop) |
| sets the relative position More... | |
| int | order () const |
| returns background/foward order More... | |
| void | setOrder (int ord) const |
| set background/foward order More... | |
Static Public Member Functions | |
| static float | getScaleFactor (librevenge::RVNGUnit orig, librevenge::RVNGUnit dest) |
| returns a float which can be used to convert between to unit More... | |
Public Attributes | |
| AnchorTo | m_anchorTo |
| anchor position More... | |
| XPos | m_xPos |
| X relative position. More... | |
| YPos | m_yPos |
| Y relative position. More... | |
| Wrapping | m_wrapping |
| Wrapping. More... | |
Protected Member Functions | |
| int | cmp (WPSPosition const &f) const |
| basic function to compare two positions More... | |
Protected Attributes | |
| int | m_page |
| the page More... | |
| Vec2f | m_orig |
| the origin position in a page More... | |
| Vec2f | m_size |
| Vec2f | m_naturalSize |
| the natural size of the data (if known) More... | |
| librevenge::RVNGUnit | m_unit |
| the unit used in orig and in m_size. Default: in inches More... | |
| int | m_order |
| background/foward order More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, WPSPosition const &pos) |
| operator<< More... | |
Class to define the position of an object (textbox, picture, ..) in the document.
Stores the page, object position, object size, anchor, wrapping, ...
| enum WPSPosition::XPos |
| enum WPSPosition::YPos |
|
inline |
constructor
|
inline |
destructor
|
inlineprotected |
basic function to compare two positions
Referenced by operator!=(), operator<(), and operator==().
|
inline |
returns a float which can be used to scale some data in object unit
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSOLEParser::parse(), and WPS4Graph::readObject().
|
inlinestatic |
returns a float which can be used to convert between to unit
Referenced by getInvUnitScale(), WKSContentListener::insertPicture(), and WPSContentListener::openSection().
|
inline |
returns the natural size (if known)
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSOLEParser::parse(), and WPS4Graph::readObject().
|
inline |
basic operator!=
|
inline |
basic operator<
|
inline |
basic operator==
|
inline |
returns background/foward order
|
inline |
return the frame origin
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WKSContentListener::insertPicture(), and WPS8Parser::sendPageFrames().
|
inline |
returns the frame page
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), cmp(), and WPS8ParserInternal::operator<<().
|
inline |
sets the natural size (if known)
Referenced by WPSOLEParser::parse(), WPSOLEParser::readContents(), WPSOLEParser::readCONTENTS(), WPSOLEParser::readOlePres(), WPS4Graph::sendObject(), and WPS8Graph::sendObjects().
|
inline |
set background/foward order
|
inline |
sets the frame origin
Referenced by MSWriteParser::readText(), and WPS8Parser::sendPageFrames().
|
inline |
sets the page
Referenced by WPS4Text::sendObjects().
|
inline |
sets/resets the page and the origin
sets the relative position
Referenced by LotusGraphInternal::ZoneMac::getGraphicShape(), WPS4Text::readText(), MSWriteParser::readText(), WPS8Graph::sendBorder(), LotusGraph::sendGraphics(), WPS8Parser::sendObject(), WPS4Text::sendObjects(), WPS8Graph::sendObjects(), and WPS4Graph::sendObjects().
|
inline |
sets the frame size
Referenced by MSWriteParser::processDDB(), WPSOLEParser::readContents(), MSWriteParser::readText(), WPS8Graph::sendBorder(), and WPS8Graph::sendObject().
|
inline |
sets the dimension unit
Referenced by WPSOLEParser::readContents(), WPSOLEParser::readCONTENTS(), WPSOLEParser::readOlePres(), and MSWriteParser::readText().
|
inline |
returns the frame size
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSOLEParser::parse(), MSWriteParser::readText(), and WPS8Graph::sendObject().
|
inline |
returns the unit
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WKSContentListener::insertPicture(), and WPSOLEParser::parse().
|
friend |
operator<<
| AnchorTo WPSPosition::m_anchorTo |
anchor position
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSContentListener::_openFrame(), WKSContentListener::_openFrame(), cmp(), WPS8Parser::sendPageFrames(), WPS8Table::sendTable(), WPS8Parser::sendTable(), and setRelativePosition().
|
protected |
the natural size of the data (if known)
Referenced by cmp(), naturalSize(), and setNaturalSize().
|
mutableprotected |
background/foward order
Referenced by order(), and setOrder().
|
protected |
the origin position in a page
Referenced by cmp(), origin(), setOrigin(), and setPagePos().
|
protected |
the page
Referenced by page(), setPage(), and setPagePos().
|
protected |
the unit used in orig and in m_size. Default: in inches
Referenced by cmp(), getInvUnitScale(), setUnit(), and unit().
| Wrapping WPSPosition::m_wrapping |
Wrapping.
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPS4Text::readText(), WPS8Graph::sendBorder(), WPS8Parser::sendObject(), WPS4Text::sendObjects(), WPS8Graph::sendObjects(), WPS4Graph::sendObjects(), WPS8Parser::sendPageFrames(), WPS8Table::sendTable(), and WPS8Parser::sendTable().
| XPos WPSPosition::m_xPos |
X relative position.
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), cmp(), and setRelativePosition().
| YPos WPSPosition::m_yPos |
Y relative position.
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), cmp(), and setRelativePosition().