Position Class Reference

Relative position of a rectangle in a box. More...

Inheritance diagram for Position:

Inheritance graph
[legend]
Collaboration diagram for Position:

Collaboration graph
[legend]

Public Types

enum  Ref_t { kLeftTop, kRightTop, kLeftBottom, kRightBottom }
 Type for reference edge/corner. More...

Public Member Functions

 Position (int left, int top, int right, int bottom, const GenericRect &rRect, Ref_t refLeftTop, Ref_t refRightBottom, bool xKeepRatio, bool yKeepRatio)
 Create a new position relative to the given box.
 ~Position ()
virtual int getLeft () const
 Get the position relative to the left top corner of the box.
virtual int getTop () const
int getRight () const
int getBottom () const
virtual int getWidth () const
 Get the size of the rectangle.
virtual int getHeight () const
Ref_t getRefLeftTop () const
 Get the reference corners.
Ref_t getRefRightBottom () const

Detailed Description

Relative position of a rectangle in a box.

Note: Even if the object is tied to its direct container rectangle, the coordinates returned by getLeft(), getTop(), getRight() and getBottom() are not relative to the direct container (which is usually a panel or the layout) but to the root container (i.e. the layout).


Member Enumeration Documentation

Type for reference edge/corner.

Enumerator:
kLeftTop  Coordinates are relative to the upper left corner.
kRightTop  Coordinates are relative to the upper right corner.
kLeftBottom  Coordinates are relative to the lower left corner.
kRightBottom  Coordinates are relative to the lower right corner.


Constructor & Destructor Documentation

Position::Position ( int  left,
int  top,
int  right,
int  bottom,
const GenericRect rRect,
Ref_t  refLeftTop,
Ref_t  refRightBottom,
bool  xKeepRatio,
bool  yKeepRatio 
)

Create a new position relative to the given box.

References Box::getHeight(), and Box::getWidth().

Position::~Position (  )  [inline]


Member Function Documentation

int Position::getLeft (  )  const [virtual]

int Position::getTop (  )  const [virtual]

int Position::getRight (  )  const

int Position::getBottom (  )  const

int Position::getWidth (  )  const [virtual]

int Position::getHeight (  )  const [virtual]

Ref_t Position::getRefLeftTop (  )  const [inline]

Get the reference corners.

Ref_t Position::getRefRightBottom (  )  const [inline]


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

Generated on Tue May 25 08:06:19 2010 for VLC by  doxygen 1.5.6