fltk::ToolWindow Class Reference

Inheritance diagram for fltk::ToolWindow:

Inheritance graph
Collaboration diagram for fltk::ToolWindow:

Collaboration graph
List of all members.

Public Member Functions

void draw ()
void layout ()
int handle (int)
void label (const char *a)

Detailed Description

This class provide the functionality of a dockable-floatable window.

Member Function Documentation

void ToolWindow::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.

int ToolWindow::handle int  event  )  [virtual]

Calls send() on some or all of the children widgets.

Reimplemented from fltk::DockWindow.

void fltk::ToolWindow::label const char *  a  )  [inline]

Sets the label directly to a string. The label is printed somewhere on the widget or next to it. The string passed to label() is not copied, instead the pointer to the string is stored. If copy_label() was called earlier the old string's memory is freed.

Reimplemented from fltk::Widget.

void ToolWindow::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.

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