Fl_Browser_ | +----Fl_Browser | +----Fl_Hold_Browser, Fl_Multi_Browser, Fl_Select_Browser
#include <FL/Fl_Browser.H>
Each line in the browser is identified by number. The numbers start at one (this is so that zero can be reserved for "no line" in the selective browsers). Unless otherwise noted, the methods do not check to see if the passed line number is in range and legal. It must always be greater than zero and <= size().
Each line contains a null-terminated string of text and a void * data pointer. The text string is displayed, the void * pointer can be used by the callbacks to reference the object the text describes.
The base class does nothing when the user clicks on it. The subclasses Fl_Select_Browser, Fl_Hold_Browser, and Fl_Multi_Browser react to user clicks to select lines in the browser and do callbacks.
The base class called Fl_Browser_ provides the scrolling and selection mechanisms of this and all the subclasses, but the dimensions and appearance of each item are determined by the subclass. You can use Fl_Browser_ to display information other than text, or text that is dynamically produced from your own data structures. If you find that loading the browser is a lot of work or is inefficient, you may want to make a subclass of Fl_Browser_.
The second form sets the column separator to c. This will only have an effect if you also set column_widths().
The second form sets the current array to w. Make sure the last entry is zero.
The second form sets the data for line n.
@.
Print rest of line, don't look for more '@' signs @@
Print rest of line starting with '@' @l
Use a large (24 point) font @m
Use a medium large (18 point) font @s
Use a small (11 point) font @b
Use a bold font (adds FL_BOLD to font) @i
Use an italic font (adds FL_ITALIC to font) @f
or @t
Use a fixed-pitch
font (sets font to FL_COURIER) @c
Center the line horizontally @r
Right-justify the text @B0, @B1, ... @B255
Fill the backgound with
fl_color(n) @C0, @C1, ... @C255
Use fl_color(n) to draw the text @F0, @F1, ...
Use fl_font(n) to draw the text @S1, @S2, ...
Use point size n to draw the text @u
or @_
Underline the text. @-
draw an engraved line through the middle. @.
command can be used to reliably
terminate the parsing. To print a random string in a random color, use
sprintf("@C%d@.%s", color, string) and it will work even if the
string starts with a digit or has the format character in it.
The second form sets the current prefix to c. Set the prefix to 0 to disable formatting.
The second form sets the text for line n.
The second form sets the top line in the browser to n.
The second form sets the vertical scrollbar position to p.