#include <cornercontainer.h>
Inheritance diagram for wftk::CornerContainer:

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. | |
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.
| wftk::CornerContainer::CornerContainer | ( | Corner | corner = BOTTOM_RIGHT, |
|
| unsigned | hpad = 10, |
|||
| unsigned | vpad = 10 | |||
| ) |
Constructor.
| 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. |
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.