Sanko Robinson > FLTK > FLTK::Layout

Download:
FLTK-0.532009.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.532006   Source  

NAME ^

FLTK::Layout - Values of the bits stored in FLTK::Widget::layout_damage( )

Description ^

When a widget resized or moved (or when it is initially created), flags are set in Widget::layout_damage() to indicate the layout is damaged. This will cause the Widget::layout() function to be called just before fltk attempts to draw the windows on the screen. This is useful because often calculating the new layout is quite expensive, this expense is now deferred until the user will actually see the new size.

Some Group widgets such as PackedGroup will also use the Widget::layout() function to find out how big a widget should be. A Widget is allowed to change it's own dimensions in layout() (except it is not allowed to change it if called a second time with no changes other than it's x/y position). This allows widgets to resize to fit their contents.

The layout bits are turned on by calling Widget::relayout().

Values are imported with the layout tag and include the following:

LAYOUT_X

Widget::x() changed by resize().

LAYOUT_Y

Widget::y() changed by resize().

LAYOUT_XY

Same as LAYOUT_X|LAYOUT_Y.

CLAYOUT_W>

Widget::w() changed by resize().

LAYOUT_H

Widget::h() changed by resize().

LAYOUT_WH

Same as LAYOUT_W|LAYOUT_H.

LAYOUT_XYWH

Same as LAYOUT_XY|LAYOUT_WH.

LAYOUT_CHILD

Widget::layout() needs to be called on a child of this group widget.

LAYOUT_USER

The moving/resizing is being caused by the user and not internal code.

LAYOUT_DAMAGE

Widget::relayout() was called.

Author ^

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

License and Legal ^

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.

When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.

syntax highlighting: