fltk::DockHolder Class Reference

Inheritance diagram for fltk::DockHolder:

Inheritance graph
Collaboration diagram for fltk::DockHolder:

Collaboration graph
List of all members.

Public Member Functions

 DockHolder (int, int, int, int, Flags=HALIGN_UNKNOWN)
 DockHolder (int, int, Flags)
void layout ()
void draw ()
void align_holder (Flags a)
Flags align_holder () const
void write_status ()
void delete_status ()
DockWindowrecent () const

Detailed Description

The base class for all dock holders in FLTK Dock. It is required to add non floatable and non dockable widgets in fltk::RegionHolder.
Callbacks are done when a fltk::DockWindow is docked in or undocked from holder. The values for when() to control the behavior of callback are: Default value is (fltk::WHEN_DOCK | fltk::WHEN_UNDOCK)
See also:

Constructor & Destructor Documentation

DockHolder::DockHolder int  X,
int  Y,
int  W,
int  H,

This constructor takes values for x(), y(), w(), h() and align_holder(). X, Y, W, H are position and size hints for layout if it is a nested holder.
An autodetect mechanism is used for HALIGN_UNKNOWN alignment value and it is adequate for simple layout.
Providing appropriate alignment value is recommended instead of using the default value.

See also:
DockHolder::align_holder(Flags a)

DockHolder::DockHolder int  W,
int  H,
Flags  a

This constructor takes values for w(), h() and align_holder(). When it is a nested holder, W and H are width hint and height hint for layout.

Member Function Documentation

Flags DockHolder::align_holder  )  const [inline]

Returns the alignment value

See also:
DockHolder::align_holder(Flags a)

void DockHolder::align_holder Flags  a  )  [inline]

Sets the alignment value The value can be any of these constants

See also:
DockHolder::align_holder() const

void DockHolder::delete_status  )  [inline]

Deletes stored status or perspective in disk.

See also:

void DockHolder::draw  )  [virtual]

Fltk calls this virtual function to draw the widget, after setting up the graphics (current window, xy translation, etc) so that any drawing functions will go into this widget.

User code should not call this! You probably want to call redraw().

The default version calls draw_box() and draw_label(), thus drawing the box() to fill the widget and putting the label() and image() inside it to fill it, unless the align() flags are set to put it outside.

Information on how to write your own version is here.

Reimplemented from fltk::Group.

Reimplemented in fltk::RegionHolder, and fltk::WindowHolder.

void DockHolder::layout  )  [virtual]

Virtual function to respond to layout_damage(), it should calculate the correct size of this widget and all it's children. This function is called by fltk or by the layout() method in other widgets. User programs should not call it.

A widget is allowed to alter it's own size in a layout() method, to indicate a size that the data will fit in. A parent widget is then expected to rearrange itself to accomodate the new size. This may mean it will move the widget and thus layout() will be called again.

You can look at layout_damage() to find out why this is being called.

The base class redraws the widget and sets layout_damage() to zero.

Reimplemented from fltk::Group.

Reimplemented in fltk::BarHolder, fltk::RegionHolder, and fltk::WindowHolder.

DockWindow * DockHolder::recent  )  const [inline]

Returns the last fltk::DockWindow that is docked in or undocked from holder. DockWindow::state() is used to determine either it is docked or undocked.

void DockHolder::write_status  )  [inline]

Stores the user changes of status or perspective in disk for future use.

Tue Jun 27 02:20:00 2006. FLTK Dock is copyright © 2006 by MD. Z. Hossain