diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Image.cxx | 10 | ||||
| -rw-r--r-- | src/Fl_Multi_Label.cxx | 18 |
2 files changed, 21 insertions, 7 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index efe980cb8..a43a596eb 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -113,6 +113,16 @@ void Fl_Image::color_average(Fl_Color, float) { void Fl_Image::desaturate() { } +// Doxygen documentation in FL/Enumerations.H +Fl_Labeltype fl_define_FL_IMAGE_LABEL() { + return Fl_Image::define_FL_IMAGE_LABEL(); +} + +Fl_Labeltype Fl_Image::define_FL_IMAGE_LABEL() { + Fl::set_labeltype(_FL_IMAGE_LABEL, Fl_Image::labeltype, Fl_Image::measure); + return _FL_IMAGE_LABEL; +} + /** The label() methods are an obsolete way to set the image attribute of a widget or menu item. Use the diff --git a/src/Fl_Multi_Label.cxx b/src/Fl_Multi_Label.cxx index 56ce602ca..1a9050494 100644 --- a/src/Fl_Multi_Label.cxx +++ b/src/Fl_Multi_Label.cxx @@ -3,7 +3,7 @@ // // Multi-label widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2017 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -16,8 +16,8 @@ // http://www.fltk.org/str.php // -// Allows two labels to be used on a widget (by having one of them -// be one of these it allows an infinte number!) +// Allows two or more labels to be used on a widget (by having one of them +// be one of these it allows an infinite number!) #include <FL/Fl.H> #include <FL/Fl_Widget.H> @@ -56,14 +56,18 @@ static void multi_measure(const Fl_Label* o, int& w, int& h) { w += W; if (H>h) h = H; } -void Fl_Multi_Label::label(Fl_Widget* o) { +// used by FL_MULTI_LABEL to set up the internal table, see FL/Enumerations.H +Fl_Labeltype fl_define_FL_MULTI_LABEL() { Fl::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure); - o->label(_FL_MULTI_LABEL, (const char*)this); + return _FL_MULTI_LABEL; +} + +void Fl_Multi_Label::label(Fl_Widget* o) { + o->label(FL_MULTI_LABEL, (const char*)this); // calls fl_define_FL_MULTI_LABEL() } void Fl_Multi_Label::label(Fl_Menu_Item* o) { - Fl::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure); - o->label(_FL_MULTI_LABEL, (const char*)this); + o->label(FL_MULTI_LABEL, (const char*)this); // calls fl_define_FL_MULTI_LABEL() } // |
