28#include "Fl_Scrollbar.H"
31#define FL_NORMAL_BROWSER 0
32#define FL_SELECT_BROWSER 1
33#define FL_HOLD_BROWSER 2
34#define FL_MULTI_BROWSER 3
36#define FL_SORT_ASCENDING 0
37#define FL_SORT_DESCENDING 1
38#define FL_SORT_CASEINSENSITIVE 0x2
96 void *redraw1,*redraw2;
147 virtual int item_quick_height(
void *item)
const ;
152 virtual void item_draw(
void *item,
int X,
int Y,
int W,
int H)
const = 0;
158 virtual const char *
item_text(
void *item)
const { (void)item;
return 0L; }
164 virtual void item_swap(
void *a,
void *b) { (void)a; (void)b; }
171 virtual void *
item_at(
int index)
const { (void)index;
return 0L; }
173 virtual int full_width()
const ;
174 virtual int full_height()
const ;
175 virtual int incr_height()
const ;
177 virtual void item_select(
void *item,
int val=1);
178 virtual int item_selected(
void *item)
const ;
184 void *
top()
const {
return top_; }
194 void deleting(
void *item);
195 void replacing(
void *a,
void *b);
196 void swapping(
void *a,
void *b);
197 void inserting(
void *a,
void *b);
198 int displayed(
void *item)
const ;
199 void redraw_line(
void *item);
205 void bbox(
int &X,
int &Y,
int &W,
int &H)
const;
206 int leftedge()
const;
207 void *find_item(
int ypos);
210 Fl_Browser_(
int X,
int Y,
int W,
int H,const
char *L=0);
238 int select(
void *item,
int val=1,
int docallbacks=0);
239 int select_only(
void *item,
int docallbacks=0);
240 int deselect(
int docallbacks=0);
248 int vposition()
const {
return position_; }
252 void vposition(
int pos);
266 void display(
void *item);
282 HORIZONTAL_ALWAYS = 5,
352 return(scrollbar_size_);
374 scrollbar_size_ = newSize;
403 void sort(
int flags=0);
const Fl_Align FL_ALIGN_RIGHT
Align the label to the right of the widget.
Definition Enumerations.H:985
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1044
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
@ FL_DAMAGE_SCROLL
The Fl_Scroll widget was scrolled.
Definition Enumerations.H:1321
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1073
const Fl_Align FL_ALIGN_LEFT
Align the label at the left of the widget.
Definition Enumerations.H:982
Fl_Group and Fl_End classes.
This is the base class for browsers.
Definition Fl_Browser_.H:83
void * top() const
Returns the item that appears at the top of the list.
Definition Fl_Browser_.H:184
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.
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:129
Fl_Color textcolor() const
Gets the default text color for the lines in the browser.
Definition Fl_Browser_.H:336
Fl_Font textfont() const
Gets the default text font for the lines in the browser.
Definition Fl_Browser_.H:318
int linespacing() const
Return the height of additional spacing between browser lines.
Definition Fl_Browser_.H:414
int scrollbar_width() const
Returns the global value Fl::scrollbar_size().
Definition Fl_Browser_.H:381
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.
virtual void * item_at(int index) const
This method must be provided by the subclass to return the item for the specified index.
Definition Fl_Browser_.H:171
void linespacing(int pixels)
Add some space between browser lines.
Definition Fl_Browser_.H:409
Fl_Fontsize textsize() const
Gets the default text size (in pixels) for the lines in the browser.
Definition Fl_Browser_.H:327
void scrollbar_width(int width)
Sets the global Fl::scrollbar_size(), and forces this instance of the widget to use it.
Definition Fl_Browser_.H:389
virtual void item_swap(void *a, void *b)
This optional method should be provided by the subclass to efficiently swap browser items a and b,...
Definition Fl_Browser_.H:164
virtual int item_height(void *item) const =0
This method must be provided by the subclass to return the height of item in pixels.
void scrollbar_size(int newSize)
Sets the pixel size of the scrollbars' troughs to newSize, in pixels.
Definition Fl_Browser_.H:373
uchar has_scrollbar() const
Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar)
Definition Fl_Browser_.H:289
void redraw_lines()
This method will cause the entire list to be redrawn.
Definition Fl_Browser_.H:204
void * selection() const
Returns the item currently selected, or NULL if there is no selection.
Definition Fl_Browser_.H:192
int scrollbar_size() const
Gets the current size of the scrollbars' troughs, in pixels.
Definition Fl_Browser_.H:351
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.
void scrollbar_right()
Moves the vertical scrollbar to the righthand side of the list.
Definition Fl_Browser_.H:397
virtual void * item_first() const =0
This method must be provided by the subclass to return the first item in the list.
void has_scrollbar(uchar mode)
Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH).
Definition Fl_Browser_.H:312
void position(int pos)
Definition Fl_Browser_.H:254
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 textcolor(Fl_Color col)
Sets the default text color for the lines in the browser to color col.
Definition Fl_Browser_.H:340
void textsize(Fl_Fontsize newSize)
Sets the default text size (in pixels) for the lines in the browser to size.
Definition Fl_Browser_.H:331
int hposition() const
Gets the horizontal scroll position of the list as a pixel position pos.
Definition Fl_Browser_.H:264
void textfont(Fl_Font font)
Sets the default text font for the lines in the browser to font.
Definition Fl_Browser_.H:322
int position() const
Definition Fl_Browser_.H:250
void scrollbar_left()
Moves the vertical scrollbar to the lefthand side of the list.
Definition Fl_Browser_.H:402
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:158
The Fl_Group class is the FLTK container widget.
Definition Fl_Group.H:56
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Group.cxx:926
static int scrollbar_size()
Gets the default scrollbar size used by Fl_Browser_, Fl_Help_View, Fl_Scroll, and Fl_Text_Display wid...
Definition Fl.cxx:148
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
#define FL_DEPRECATED(msg, func)
Enclosing a function or method in FL_DEPRECATED marks it as no longer recommended.
Definition fl_attr.h:57
unsigned char uchar
unsigned char
Definition fl_types.h:30