fltk/layout.h File Reference

Detailed Description

Values of the bits stored in Widget::layout_damage().

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 virtual function Widget::layout() 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 fltk::PackedGroup will also use the virtual 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().


namespace  fltk


enum  {
  fltk::LAYOUT_X, fltk::LAYOUT_Y, fltk::LAYOUT_XY, fltk::LAYOUT_W,
  fltk::LAYOUT_H, fltk::LAYOUT_WH, fltk::LAYOUT_XYWH, fltk::LAYOUT_CHILD,

Wed Sep 10 02:47:46 2008. FLTK ©2007 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.