Vaca::AnchorLayout Class Reference

#include <AnchorLayout.h>

Inheritance diagram for Vaca::AnchorLayout:

Vaca::Layout

List of all members.


Detailed Description

An AnchorLayout tries to maintain the same aspect of the widgets using references rectangles.

It uses Anchor contraints to known which side of a child must be "anchored" (to maintain the same distance) to which side of the parent.

AnchorLayout.png

See also:
AnchorLayout::AnchorLayout, Anchor

Public Member Functions

 AnchorLayout (const Size &refSize)
 Creates a new anchor layout.
virtual void layout (Widget *parent, Widget::Container &widgets, const Rect &rc)

Private Attributes

Size m_refSize
 The size of the imaginary rectangle Rect(Point(0,0),refSize).

Constructor & Destructor Documentation

AnchorLayout::AnchorLayout ( const Size refSize  ) 

Creates a new anchor layout.

Parameters:
refSize The size of the imaginary rectangle Rect(Point(0,0),refSize). All refRect specified in Anchor constructor should be inside this rectangle, and the distance of each anchored side in an Anchor will be kept equal.


Member Function Documentation

void AnchorLayout::layout ( Widget parent,
Widget::Container widgets,
const Rect rc 
) [virtual]

Implements Vaca::Layout.


Member Data Documentation

The size of the imaginary rectangle Rect(Point(0,0),refSize).

See also:
AnchorLayout::AnchorLayout