typedef fltk::Labeltype


fltk::Labeltype is a pointer to the structure fltk::Labeltype_, which contains the information needed to draw text labels. This is used by fltk::Widget::label_type().

void (*fltk::Labeltype_::draw_)(const fltk::Labeltype_* this, const char* label, int,int,int,int, fltk::Color fill, fltk::Flags);

Pointer to the function that draws the text. The first argument is the fltk::Labeltype_ itself, this allows access to the data value. Next is the text string. The next four integers are the x,y,w,h to fit the label into. The next is the color to fill the interior of the letters with. The last argument is a set of bitflags. The following values are of use to the labeltypes, ignore any other bits that are on:

The label should be drawn inside this bounding box. Ignore the setting of fltk::ALIGN_INSIDE. Outside labels are handled by the fltk::Group code by modifying the bounding box before this is called.

If none of the align flags are on you should center the label in the widget.

The function is not called if the label value is NULL.

const void* fltk::Labeltype_::data;

This is a pointer to arbitrary data used by draw_(). Often several labeltypes use the same draw_() but different data.

void fltk::Labeltype_::draw(const char* m, int x,int y,int w,int h,fltk::Color c, fltk::Flags f=0) const

This is the public method to draw the label. It is simply an inline function to call draw_ with this labeltype as the first argument.