- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UBoxLayout Class Reference

This layout manager lays out all children in horizontal or vertical orientation. More...

#include <uboxlayout.hpp>

Inheritance diagram for ufo::UBoxLayout:

ufo::ULayoutManager ufo::UObject ufo::UCollectable List of all members.

Public Types

enum  { XAxis = Horizontal, YAxis = Vertical }

Public Member Functions

 UBoxLayout ()
 UBoxLayout (int orientation)
 UBoxLayout (int hgap, int vgap)
 UBoxLayout (int orientation, int hgap, int vgap)
virtual void layoutContainer (const UWidget *container)
virtual UDimension getPreferredLayoutSize (const UWidget *container, const UDimension &maxSize) const

Protected Member Functions

virtual int getTotalFlex (const UWidget *container)

Protected Attributes

int m_orientation
int m_hgap
int m_vgap

Detailed Description

This layout manager lays out all children in horizontal or vertical orientation.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UBoxLayout::UBoxLayout  ) 
 

Creates a new box layout which uses the orientation of the container widget as orientation. Vertical and horizontal spacing between child widgets is 2.

ufo::UBoxLayout::UBoxLayout int  orientation  ) 
 

Creates a new box layout with the given orientation. Vertical and horizontal spacing between child widgets is 2.


Member Function Documentation

virtual UDimension ufo::UBoxLayout::getPreferredLayoutSize const UWidget container,
const UDimension maxSize
const [virtual]
 

Returns:
The preferred size of the container using the given maximum dimension.

Implements ufo::ULayoutManager.

virtual void ufo::UBoxLayout::layoutContainer const UWidget container  )  [virtual]
 

Relayouts all child widgets within the given container.

Implements ufo::ULayoutManager.


Member Data Documentation

int ufo::UBoxLayout::m_hgap [protected]
 

horizontal gap between widgets

int ufo::UBoxLayout::m_vgap [protected]
 

vertical gap between widgets


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt