|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
#include <Fl_Check_Browser.H>


Classes | |
| struct | cb_item |
Public Member Functions | |
| Fl_Check_Browser (int x, int y, int w, int h, const char *l=0) | |
| ~Fl_Check_Browser () | |
| int | add (char *s) |
| int | add (char *s, int b) |
| int | remove (int item) |
| int | add (const char *s) |
| int | add (const char *s, int b) |
| void | clear () |
| int | nitems () const |
| int | nchecked () const |
| int | checked (int item) const |
| void | checked (int item, int b) |
| void | set_checked (int item) |
| void | check_all () |
| void | check_none () |
| int | value () const |
| char * | text (int item) const |
Protected Member Functions | |
| int | handle (int) |
The Fl_Check_Browser widget displays a scrolling list of text lines that may be selected and/or checked by the user.
Definition at line 41 of file Fl_Check_Browser.H.
| Fl_Check_Browser::Fl_Check_Browser | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H, | ||
| const char * | l = 0 |
||
| ) |
The constructor makes an empty browser.
Definition at line 87 of file Fl_Check_Browser.cxx.
References FL_SELECT_BROWSER, FL_WHEN_NEVER, Fl_Widget::type(), and Fl_Widget::when().
| Fl_Check_Browser::~Fl_Check_Browser | ( | ) | [inline] |
The destructor deletes all list items and destroys the browser.
Definition at line 84 of file Fl_Check_Browser.H.
| int Fl_Check_Browser::add | ( | char * | s | ) |
Add a new unchecked line to the end of the browser. The text is copied using the strdup() function. It may also be NULL to make a blank line. The second form can set the item checked.
Definition at line 173 of file Fl_Check_Browser.cxx.
Referenced by Fl_Check_Browser_Type::widget().
| int Fl_Check_Browser::add | ( | char * | s, |
| int | b | ||
| ) |
See int Fl_Check_Browser::add(char *s)
Definition at line 178 of file Fl_Check_Browser.cxx.
References b, Fl_Check_Browser::cb_item::checked, Fl_Check_Browser::cb_item::next, Fl_Check_Browser::cb_item::prev, Fl_Check_Browser::cb_item::selected, and Fl_Check_Browser::cb_item::text.
| int Fl_Check_Browser::add | ( | const char * | s | ) | [inline] |
See int Fl_Check_Browser::add(char *s)
Definition at line 92 of file Fl_Check_Browser.H.
| int Fl_Check_Browser::add | ( | const char * | s, |
| int | b | ||
| ) | [inline] |
See int Fl_Check_Browser::add(char *s)
Definition at line 94 of file Fl_Check_Browser.H.
| void Fl_Check_Browser::check_all | ( | ) |
Sets all the items checked.
Definition at line 297 of file Fl_Check_Browser.cxx.
References Fl_Check_Browser::cb_item::checked, Fl_Check_Browser::cb_item::next, and Fl_Widget::redraw().
| void Fl_Check_Browser::check_none | ( | ) |
Sets all the items unchecked.
Definition at line 308 of file Fl_Check_Browser.cxx.
References Fl_Check_Browser::cb_item::checked, Fl_Check_Browser::cb_item::next, and Fl_Widget::redraw().
| int Fl_Check_Browser::checked | ( | int | i | ) | const |
Gets the current status of item item.
Definition at line 261 of file Fl_Check_Browser.cxx.
References Fl_Check_Browser::cb_item::checked.
| void Fl_Check_Browser::checked | ( | int | i, |
| int | b | ||
| ) |
Sets the check status of item item to b.
Definition at line 269 of file Fl_Check_Browser.cxx.
References b, Fl_Check_Browser::cb_item::checked, and Fl_Widget::redraw().
| void Fl_Check_Browser::clear | ( | ) |
Remove every item from the browser.
Reimplemented from Fl_Group.
Definition at line 239 of file Fl_Check_Browser.cxx.
References Fl_Browser_::new_list(), Fl_Check_Browser::cb_item::next, and Fl_Check_Browser::cb_item::text.
| int Fl_Check_Browser::handle | ( | int | event | ) | [protected, virtual] |
Handles the event within the normal widget bounding box.
| [in] | event | The event to process. |
Reimplemented from Fl_Browser_.
Definition at line 318 of file Fl_Check_Browser.cxx.
References Fl_Browser_::deselect(), and FL_PUSH.
| int Fl_Check_Browser::nchecked | ( | ) | const [inline] |
Returns how many items are currently checked.
Definition at line 103 of file Fl_Check_Browser.H.
| int Fl_Check_Browser::nitems | ( | ) | const [inline] |
Returns how many lines are in the browser. The last line number is equal to this.
Definition at line 101 of file Fl_Check_Browser.H.
| int Fl_Check_Browser::remove | ( | int | item | ) |
Remove line n and make the browser one line shorter. Returns the number of lines left in the browser.
Reimplemented from Fl_Group.
Definition at line 206 of file Fl_Check_Browser.cxx.
References Fl_Check_Browser::cb_item::checked, Fl_Browser_::deleting(), Fl_Check_Browser::cb_item::next, Fl_Check_Browser::cb_item::prev, and Fl_Check_Browser::cb_item::text.
| void Fl_Check_Browser::set_checked | ( | int | item | ) | [inline] |
Equivalent to Fl_Check_Browser::checked(item, 1).
Definition at line 107 of file Fl_Check_Browser.H.
| char * Fl_Check_Browser::text | ( | int | i | ) | const |
Return a pointer to an internal buffer holding item item's text.
Definition at line 289 of file Fl_Check_Browser.cxx.
References Fl_Check_Browser::cb_item::text.
| int Fl_Check_Browser::value | ( | ) | const |
Returns the index of the currently selected item.
Definition at line 284 of file Fl_Check_Browser.cxx.
References Fl_Browser_::selection().