fltk::GripperBar Class Reference

Inheritance diagram for fltk::GripperBar:

Inheritance graph
[legend]
Collaboration diagram for fltk::GripperBar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void layout ()
void draw ()
Flags state () const
void state (Flags a)
uchar type () const

Detailed Description

The base class for fltk::ToolBar. Generally it is used to contain the fltk::MenuBar


Member Function Documentation

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

void GripperBar::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::ToolBar.

void GripperBar::state Flags  a  )  [virtual]
 

Sets the dock or undock state value. The value can be any of these following constants
For docked with alignment

  • DOCKED_TOP
  • DOCKED_BOTTOM
  • DOCKED_LEFT
  • DOCKED_RIGHT
  • DOCKED_CENTER
For docked without alignment
  • DOCKED_XY
For not docked or undocked
  • DOCKED_NONE

Reimplemented from fltk::DockWindow.

Flags fltk::GripperBar::state  )  const [inline]
 

Returns the dock or undock state value.

See also:
DockWindow::state(Flags)

Reimplemented from fltk::DockWindow.

uchar fltk::GripperBar::type  )  const [inline]
 

8-bit identifier that controls how widget works. This value had to be provided for Forms compatibility, but you can use it for any purpose you want (mostly for "bad object oriented programming" where you insert some subclass functionality into the base class). Widget subclasses may store values in the range 0-99 here (larger values are reserved for use by FLTK).

The fltk::PackedGroup widget uses the low bit of the type() of each child to indicate HORIZONTAL (1) or VERTICAL (0).

For portability FLTK does not use RTTI (Run Time Typing Infomation) internally (you are free to use it, though). If you don't have RTTI you can use the clumsy FLTK mechanisim, by having type() use a unique value. These unique values must be greater than the symbol Widget::RESERVED_TYPE (which is 100). Look through the header files for Widget::RESERVED_TYPE to find an unused number. If you make a subclass of fltk::Window you must use Widget::WINDOW_TYPE+n (n must be in the range 1 to 7) so that is_window() will work, if you make a subclass of fltk::Group you must use Widget::GROUP_TYPE+n (n must be in the range 1 to 7) so that is_group() will work.

Reimplemented from fltk::Widget.


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