class Fl_Select_Browser : public Fl_Browser
This is a subclass of Fl_Browser which lets the user click on an item.
As long as the mouse button is held down the item pointed to by it is
highlighted. The highlight goes away when the mouse is released.
Normally the callback is done when the user releases the mouse, but
you can change this with when().
See Fl_Browser for methods to add and remove lines from the browser.
Fl_Select_Browser::Fl_Select_Browser(int x,int y,int w,int
h,const char *l)
Constructor.
uchar Fl_Widget::when() const;
void Fl_Widget::when(uchar);
Controls when callbacks are done. The following values work,
the default value is FL_WHEN_RELEASE
:
FL_WHEN_CHANGED
: The callback is done as the user
drags the mouse, each time the selected item changes.
FL_WHEN_RELEASE
(default value) : The callback will
be done when the user releases the mouse.
uchar Fl_Browser::selection_color() const ;
void Fl_Browser::selection_color(n);
The color to draw the background of selected lines. Lines that aren't
selected use color().
int Fl_Browser::value() const ;
Return the number of the highlighted item, or zero if none. Notice
that this is going to be zero except during a callback!
int Fl_Browser::select(int, int=1);
void Fl_Browser::value(int) ;
int Fl_Browser::deselect();
int Fl_Browser::selected(int) const ;
You can use these for compatibility with the Fl_Multi_Browser.
However if you turn on the selection of a line the results
are unpredictable.