27 #include "Fl_Browser_.H" 94 const int* column_widths_;
109 void item_draw(
void* item,
int X,
int Y,
int W,
int H)
const ;
118 void item_swap(
void *a,
void *b) { swap((FL_BLINE*)a, (FL_BLINE*)b); }
124 void *
item_at(
int line)
const {
return (
void*)find_line(line); }
126 FL_BLINE* find_line(
int line)
const ;
127 FL_BLINE* _remove(
int line) ;
128 void insert(
int line, FL_BLINE* item);
129 int lineno(
void *item)
const ;
130 void swap(FL_BLINE *a, FL_BLINE *b);
134 void remove(
int line);
135 void add(
const char* newtext,
void* d = 0);
136 void insert(
int line,
const char* newtext,
void* d = 0);
137 void move(
int to,
int from);
138 int load(
const char* filename);
139 void swap(
int a,
int b);
147 int size()
const {
return lines; }
161 int topline()
const ;
171 void topline(
int line) { lineposition(line, TOP); }
187 int select(
int line,
int val=1);
188 int selected(
int line)
const ;
204 const char* text(
int line)
const ;
205 void text(
int line,
const char* newtext);
206 void* data(
int line)
const ;
207 void data(
int line,
void* d);
209 Fl_Browser(
int X,
int Y,
int W,
int H,
const char *L = 0);
321 void icon(
int line,
Fl_Image* icon);
323 void remove_icon(
int line);
326 void replace(
int a,
const char* b) { text(a, b); }
327 void display(
int line,
int val=1);
int displayed(void *item) const
Returns non-zero if item has been scrolled to a position where it is being displayed.
Definition: Fl_Browser_.cxx:226
int select(void *item, int val=1, int docallbacks=0)
Sets the selection state of item to val, and returns 1 if the state changed or 0 if it did not...
Definition: Fl_Browser_.cxx:606
const int * column_widths() const
Gets the current column width array.
Definition: Fl_Browser.H:289
void topline(int line)
Scrolls the browser so the top item in the browser is showing the specified line. ...
Definition: Fl_Browser.H:171
int displayed(int line) const
Returns non-zero if line has been scrolled to a position where it is being displayed.
Definition: Fl_Browser.H:305
char format_char() const
Gets the current format code prefix character, which by default is '@'.
Definition: Fl_Browser.H:246
virtual int item_selected(void *item) const
This method must be implemented by the subclass if it supports multiple selections; returns the selec...
Definition: Fl_Browser_.cxx:1096
This is the base class for browsers.
Definition: Fl_Browser_.H:76
virtual int full_height() const
This method may be provided by the subclass to indicate the full height of the item list...
Definition: Fl_Browser_.cxx:1062
virtual int incr_height() const
This method may be provided to return the average height of all items to be used for scrolling...
Definition: Fl_Browser_.cxx:1051
void make_visible(int line)
Make the item at the specified line visible().
Definition: Fl_Browser.H:314
Fl_Fontsize textsize() const
Gets the default text size (in pixels) for the lines in the browser.
Definition: Fl_Browser.H:153
virtual int item_height(void *item) const =0
This method must be provided by the subclass to return the height of item in pixels.
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:62
void column_char(char c)
Sets the column separator to c.
Definition: Fl_Browser.H:265
virtual void * item_next(void *item) const =0
This method must be provided by the subclass to return the item in the list after item...
Fl_Image, Fl_RGB_Image classes.
virtual void * item_last() const
This method must be provided by the subclass to return the last item in the list. ...
Definition: Fl_Browser_.H:121
virtual void item_draw(void *item, int X, int Y, int W, int H) const =0
This method must be provided by the subclass to draw the item in the area indicated by X...
void value(int line)
Sets the browser's value(), which selects the specified line.
Definition: Fl_Browser.H:203
void clear()
Deletes all child widgets from memory recursively.
Definition: Fl_Group.cxx:388
void item_swap(void *a, void *b)
Swap the items a and b.
Definition: Fl_Browser.H:118
void hide()
Hides the entire Fl_Browser widget – opposite of show().
Definition: Fl_Browser.H:194
void insert(Fl_Widget &, int i)
The widget is removed from its current group (if any) and then inserted into this group...
Definition: Fl_Group.cxx:464
void replace(int a, const char *b)
For back compatibility only.
Definition: Fl_Browser.H:326
void format_char(char c)
Sets the current format code prefix character to c.
Definition: Fl_Browser.H:252
void display(void *item)
Displays the item, scrolling the list as necessary.
Definition: Fl_Browser_.cxx:243
void add(Fl_Widget &)
The widget is removed from its current group (if any) and then added to the end of this group...
Definition: Fl_Group.cxx:497
void column_widths(const int *arr)
Sets the current array to arr.
Definition: Fl_Browser.H:294
Fl_Fontsize textsize() const
Gets the default text size (in pixels) for the lines in the browser.
Definition: Fl_Browser_.H:300
void * item_at(int line) const
Return the item at specified line.
Definition: Fl_Browser.H:124
virtual void * item_first() const =0
This method must be provided by the subclass to return the first item in the list.
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1014
int size() const
Returns how many lines are in the browser.
Definition: Fl_Browser.H:147
void bottomline(int line)
Scrolls the browser so the bottom item in the browser is showing the specified line.
Definition: Fl_Browser.H:178
virtual const char * item_text(void *item) const
This optional method returns a string (label) that may be used for sorting.
Definition: Fl_Browser_.H:150
Fl_Line_Position
For internal use only?
Definition: Fl_Browser.H:163
virtual int item_width(void *item) const =0
This method must be provided by the subclass to return the width of the item in pixels.
The Fl_Browser widget displays a scrolling list of text lines, and manages all the storage for the te...
Definition: Fl_Browser.H:86
char column_char() const
Gets the current column separator character.
Definition: Fl_Browser.H:258
virtual void * item_prev(void *item) const =0
This method must be provided by the subclass to return the item in the list before item...
virtual void item_select(void *item, int val=1)
This method must be implemented by the subclass if it supports multiple selections; sets the selectio...
Definition: Fl_Browser_.cxx:1088
void show()
Shows the entire Fl_Browser widget – opposite of hide().
Definition: Fl_Browser.H:191
void middleline(int line)
Scrolls the browser so the middle item in the browser is showing the specified line.
Definition: Fl_Browser.H:185
~Fl_Browser()
The destructor deletes all list items and destroys the browser.
Definition: Fl_Browser.H:213