30 #include "Fl_Scrollbar.H" 
   33 #define FL_NORMAL_BROWSER       0        
   34 #define FL_SELECT_BROWSER       1        
   35 #define FL_HOLD_BROWSER         2        
   36 #define FL_MULTI_BROWSER        3        
   38 #define FL_SORT_ASCENDING       0        
   39 #define FL_SORT_DESCENDING      1        
   77 class FL_EXPORT Fl_Browser_ : public Fl_Group { 
   90   void *redraw1,*redraw2; 
 
  104   virtual void *item_first() 
const = 0;
 
  110   virtual void *item_next(
void *item) 
const = 0;
 
  116   virtual void *item_prev(
void *item) 
const = 0;
 
  131   virtual int item_height(
void *item) 
const = 0;
 
  139   virtual int item_width(
void *item) 
const = 0;
 
  140   virtual int item_quick_height(
void *item) 
const ;
 
  145   virtual void item_draw(
void *item,
int X,
int Y,
int W,
int H) 
const = 0;
 
  151   virtual const char *
item_text(
void *item)
 const { (void)item; 
return 0L; }
 
  157   virtual void item_swap(
void *a,
void *b) { (void)a; (void)b; }
 
  164   virtual void *
item_at(
int index)
 const { (void)index; 
return 0L; }
 
  166   virtual int full_width() 
const ;      
 
  167   virtual int full_height() 
const ;     
 
  168   virtual int incr_height() 
const ;     
 
  170   virtual void item_select(
void *item,
int val=1);
 
  171   virtual int item_selected(
void *item) 
const ;
 
  177   void *
top()
 const { 
return top_; }
 
  187   void deleting(
void *item); 
 
  188   void replacing(
void *a,
void *b); 
 
  189   void swapping(
void *a,
void *b); 
 
  190   void inserting(
void *a,
void *b); 
 
  191   int displayed(
void *item) 
const ; 
 
  192   void redraw_line(
void *item); 
 
  198   void bbox(
int &X,
int &Y,
int &W,
int &H) 
const;
 
  199   int leftedge() 
const; 
 
  200   void *find_item(
int ypos); 
 
  203   Fl_Browser_(
int X,
int Y,
int W,
int H,
const char *L=0);
 
  216   int handle(
int event);
 
  217   void resize(
int X,
int Y,
int W,
int H);
 
  219   int select(
void *item,
int val=1,
int docallbacks=0);
 
  220   int select_only(
void *item,
int docallbacks=0);
 
  221   int deselect(
int docallbacks=0);
 
  230   void position(
int pos); 
 
  240   void display(
void *item); 
 
  256     HORIZONTAL_ALWAYS = 5,      
 
  326       return(scrollbar_size_);
 
  348       scrollbar_size_ = newSize;
 
  381   void sort(
int flags=0);
 
Fl_Fontsize textsize() const 
Gets the default text size (in pixels) for the lines in the browser. 
Definition: Fl_Browser_.H:301
void scrollbar_left()
Moves the vertical scrollbar to the lefthand side of the list. 
Definition: Fl_Browser_.H:380
int scrollbar_size() const 
Gets the current size of the scrollbars' troughs, in pixels. 
Definition: Fl_Browser_.H:325
void * selection() const 
Returns the item currently selected, or NULL if there is no selection. 
Definition: Fl_Browser_.H:185
void textcolor(Fl_Color col)
Sets the default text color for the lines in the browser to color col. 
Definition: Fl_Browser_.H:314
Fl_Color textcolor() const 
Gets the default text color for the lines in the browser. 
Definition: Fl_Browser_.H:310
This is the base class for browsers. 
Definition: Fl_Browser_.H:77
void scrollbar_right()
Moves the vertical scrollbar to the righthand side of the list. 
Definition: Fl_Browser_.H:375
Fl_Scrollbar hscrollbar
Horizontal scrollbar. 
Definition: Fl_Browser_.H:214
void * top() const 
Returns the item that appears at the top of the list. 
Definition: Fl_Browser_.H:177
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:151
void textfont(Fl_Font font)
Sets the default text font for the lines in the browser to font. 
Definition: Fl_Browser_.H:296
Fl_Scrollbar scrollbar
Vertical scrollbar. 
Definition: Fl_Browser_.H:210
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:157
The Fl_Scroll widget was scrolled. 
Definition: Enumerations.H:969
Fl_Font textfont() const 
Gets the default text font for the lines in the browser. 
Definition: Fl_Browser_.H:292
void textsize(Fl_Fontsize newSize)
Sets the default text size (in pixels) for the lines in the browser to size. 
Definition: Fl_Browser_.H:305
int Fl_Fontsize
Size of a font in pixels. 
Definition: Enumerations.H:768
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:122
void has_scrollbar(uchar mode)
Sets whether the widget should have scrollbars or not (default Fl_Browser_::BOTH). 
Definition: Fl_Browser_.H:286
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:164
void scrollbar_size(int newSize)
Sets the pixel size of the scrollbars' troughs to newSize, in pixels. 
Definition: Fl_Browser_.H:347
unsigned int Fl_Color
An FLTK color value; see also Colors. 
Definition: Enumerations.H:796
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:149
int Fl_Font
A font number is an index into the internal font table. 
Definition: Enumerations.H:739
int position() const 
Gets the vertical scroll position of the list as a pixel position pos. 
Definition: Fl_Browser_.H:229
uchar has_scrollbar() const 
Returns the current scrollbar mode, see Fl_Browser_::has_scrollbar(uchar) 
Definition: Fl_Browser_.H:263
void redraw_lines()
This method will cause the entire list to be redrawn. 
Definition: Fl_Browser_.H:197
const Fl_Align FL_ALIGN_LEFT
Align the label at the left of the widget. 
Definition: Enumerations.H:701
int scrollbar_width() const 
This method has been deprecated, existing for backwards compatibility only. 
Definition: Fl_Browser_.H:357
void scrollbar_width(int width)
This method has been deprecated, existing for backwards compatibility only. 
Definition: Fl_Browser_.H:367
unsigned char uchar
unsigned char 
Definition: fl_types.h:30
const Fl_Align FL_ALIGN_RIGHT
Align the label to the right of the widget. 
Definition: Enumerations.H:703
int hposition() const 
Gets the horizontal scroll position of the list as a pixel position pos. 
Definition: Fl_Browser_.H:238