Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

wftk::CornerContainer Class Reference

A container which puts its single child in one of its corners. More...

#include <cornercontainer.h>

Inheritance diagram for wftk::CornerContainer:

wftk::SingleContainer wftk::Widget wftk::ScreenArea List of all members.

Public Types

enum  Corner {
  LEFT = 1, RIGHT = 2, TOP = 4, BOTTOM = 8,
  TOP_LEFT = TOP | LEFT, TOP_RIGHT = TOP | RIGHT, BOTTOM_LEFT = BOTTOM | LEFT, BOTTOM_RIGHT = BOTTOM | RIGHT
}
 Corner enumeration defines four flages, one each for the diagonal corners of a rectangle: TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT.

Public Member Functions

 CornerContainer (Corner corner=BOTTOM_RIGHT, unsigned hpad=10, unsigned vpad=10)
 Constructor.

Protected Member Functions

virtual void handleResize (Uint16 w, Uint16 h)
 Calculate new shape for shaped widgets, call to setShape() after a resize.

Detailed Description

A container which puts its single child in one of its corners.

This is used in the terrain demos and the uclient map dialog to put a 'close' button in the lower right corner of a dialog whose entire purpose is to hold a drawing surface as its background. More creative uses are probably possible.


Constructor & Destructor Documentation

wftk::CornerContainer::CornerContainer Corner  corner = BOTTOM_RIGHT,
unsigned  hpad = 10,
unsigned  vpad = 10
 

Constructor.

Parameters:
corner corner to put the button into. Defaults to bottom right.
hpad the horizontal padding in pixels. Defaults to 10.
vpad the vertical padding in picels. Defaults to 10.


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

Generated Tue Apr 12 22:48:54 2005.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.