#include <Anchor.h>
You should setup an Anchor contraint for every widget controled by an AnchorLayout.
Public Member Functions | |
Anchor (const Rect &refRect, Sides borders) | |
Creates an anchor constraint to be used in a child that has a parent with an AnchorLayout assigned. | |
Anchor (const Anchor &anchor) | |
virtual | ~Anchor () |
Rect | getRefRect () const |
void | setRefRect (const Rect &refRect) |
Sides | getSides () const |
void | setSides (Sides borders) |
Private Attributes | |
Rect | m_refRect |
Sides | m_sides |
Creates an anchor constraint to be used in a child that has a parent with an AnchorLayout assigned.
The AnchorLayout tries to maintain the distance of each anchored refRect's side with each side of the Rect
(Point(0,0),refSize) rectangle, where refSize
is specified in the AnchorLayout constructor.
refRect | The rectangle of reference. This rectangle should be inside Rect (Point(0,0),refSize). | |
sides | Which sides of the refRect do you want to anchor. Where "to anchor" means "maintain the specified sides in the same distance to the refSize specified in the AnchorLayout constructor". Zero or more of the following values:
| operator. E.g: myWidget.setConstraint(new Anchor(Rect(...), Sides::Left | Sides::Top)); |
Anchor::Anchor | ( | const Anchor & | anchor | ) |
Anchor::~Anchor | ( | ) | [virtual] |
Rect Anchor::getRefRect | ( | ) | const |
void Anchor::setRefRect | ( | const Rect & | refRect | ) |
Sides Anchor::getSides | ( | ) | const |
void Anchor::setSides | ( | Sides | borders | ) |
Rect Vaca::Anchor::m_refRect [private] |
Sides Vaca::Anchor::m_sides [private] |