fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Box Class Reference

#include <Fl_Box.H>

Inheritance diagram for Fl_Box:
Collaboration diagram for Fl_Box:

List of all members.

Public Member Functions

 Fl_Box (int X, int Y, int W, int H, const char *l=0)
 Fl_Box (Fl_Boxtype b, int X, int Y, int W, int H, const char *l)
virtual int handle (int)

Protected Member Functions

void draw ()

Detailed Description

This widget simply draws its box, and possibly it's label. Putting it before some other widgets and making it big enough to surround them will let you draw a frame around them.

Definition at line 43 of file Fl_Box.H.


Constructor & Destructor Documentation

Fl_Box::Fl_Box ( int  X,
int  Y,
int  W,
int  H,
const char *  l = 0 
) [inline]
  • The first constructor sets box() to FL_NO_BOX, which means it is invisible. However such widgets are useful as placeholders or Fl_Group::resizable() values. To change the box to something visible, use box(n).
  • The second form of the constructor sets the box to the specified box type.

The destructor removes the box.

Definition at line 56 of file Fl_Box.H.

Fl_Box::Fl_Box ( Fl_Boxtype  b,
int  X,
int  Y,
int  W,
int  H,
const char *  l 
) [inline]

See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0)

Definition at line 59 of file Fl_Box.H.

References Fl_Widget::box().


Member Function Documentation

void Fl_Box::draw ( ) [protected, virtual]

Draws the widget. Never call this function directly. FLTK will schedule redrawing whenever needed. If your widget must be redrawn as soon as possible, call redraw() instead.

Override this function to draw your own widgets.

If you ever need to call another widget's draw method from within your own draw() method, e.g. for an embedded scrollbar, you can do it (because draw() is virtual) like this:

        Fl_Widget *s = &scroll;         // scroll is an embedded Fl_Scrollbar
        s->draw();                      // calls Fl_Scrollbar::draw()

Implements Fl_Widget.

Definition at line 31 of file Fl_Box.cxx.

References Fl_Widget::draw_box(), and Fl_Widget::draw_label().

int Fl_Box::handle ( int  event) [virtual]

Handles the specified event. You normally don't call this method directly, but instead let FLTK do it when the user interacts with the widget.

When implemented in a widget, this function must return 0 if the widget does not use the event or 1 otherwise.

Most of the time, you want to call the inherited handle() method in your overridden method so that you don't short-circuit events that you don't handle. In this last case you should return the callee retval.

Parameters:
[in]eventthe kind of event received
Return values:
0if the event was not used or understood
1if the event was used and can be deleted
See also:
Fl_Event

Reimplemented from Fl_Widget.

Definition at line 36 of file Fl_Box.cxx.

References FL_ENTER, and FL_LEAVE.


The documentation for this class was generated from the following files: