20#ifndef Fl_Check_Browser_H
21#define Fl_Check_Browser_H
24#include "Fl_Browser_.H"
72 int lineno(cb_item *)
const;
79 int add(
char *s,
int b);
85 int add(
const char *s) {
return add((
char *)s); }
87 int add(
const char *s,
int b) {
return add((
char *)s, b); }
94 int nitems()
const {
return nitems_; }
97 int checked(
int item)
const;
98 void checked(
int item,
int b);
104 char *text(
int item)
const;
This is the base class for browsers.
Definition Fl_Browser_.H:83
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:1101
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 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
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.
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_first() const =0
This method must be provided by the subclass to return the first item in the list.
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:1093
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,...
int handle(int event) FL_OVERRIDE
Handles the event within the normal widget bounding box.
Definition Fl_Browser_.cxx:692
void * find_item(int ypos)
This method returns the item under mouse y position ypos.
Definition Fl_Browser_.cxx:582
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_Check_Browser widget displays a scrolling list of text lines that may be selected and/or check...
Definition Fl_Check_Browser.H:30
int nchecked() const
Returns how many items are currently checked.
Definition Fl_Check_Browser.H:96
int nitems() const
Returns how many lines are in the browser.
Definition Fl_Check_Browser.H:94
int add(const char *s)
See int Fl_Check_Browser::add(char *s)
Definition Fl_Check_Browser.H:85
~Fl_Check_Browser()
The destructor deletes all list items and destroys the browser.
Definition Fl_Check_Browser.H:77
void set_checked(int item)
Equivalent to Fl_Check_Browser::checked(item, 1).
Definition Fl_Check_Browser.H:100
int add(const char *s, int b)
See int Fl_Check_Browser::add(char *s)
Definition Fl_Check_Browser.H:87
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:558
void clear()
Deletes all child widgets from memory recursively.
Definition Fl_Group.cxx:379
void remove(int index)
Removes the widget at index from the group but does not delete it.
Definition Fl_Group.cxx:583
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46