From 09daf20b81cdae78772f07c0af22a571d7cc73eb Mon Sep 17 00:00:00 2001
From: Michael R Sweet 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
+ The Fl_Browser widget displays a scrolling list of text
+lines, and manages all the storage for the text. This is not a text
+editor or spreadsheet! But it is useful for showing a vertical list of
+named objects to the user.
+ 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
+ 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
+ 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
+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
+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
+ 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_. Description
- The Fl_Browser widget displays a scrolling list of text
-lines, and manages all the storage for the text. This is not a text
-editor or spreadsheet! But it is useful for showing a vertical list of
-named objects to the user.
-Methods
The second form sets the column separator to c. This will + The first form gets the current column separator character. By default +this is '\t' (tab). +
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 +. The default value is a one-element array of just a zero, which makes +there are no columns. +
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 '@' @c Center the line horizontally @r Right-justify the text @B0, @B1, ... @B255 Fill the backgound with
+@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 @u or @_ Underline the text. @- draw an engraved line through the middle. @. command can be used to reliably
+ Notice that the @. 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 +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 vertical scrollbar position to p.
The second form sets the text for line n.
The second form scrolls the browser so the top line in the browser is n.