diff options
| author | Fabien Costantini <fabien@onepost.net> | 2008-09-14 12:45:42 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2008-09-14 12:45:42 +0000 |
| commit | 58548b781d7c3f0fa6c8c72c63dece888a02ea43 (patch) | |
| tree | af4c8ec52edf7fb82f0201a21a6cfe4da9daf759 /src/Fl_Check_Browser.cxx | |
| parent | 8bc9d467efaca58d5f515e47dd07eda9533a24b0 (diff) | |
Doxygen Documentation WP2 done.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Check_Browser.cxx')
| -rw-r--r-- | src/Fl_Check_Browser.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx index a95feabee..4476df196 100644 --- a/src/Fl_Check_Browser.cxx +++ b/src/Fl_Check_Browser.cxx @@ -85,7 +85,8 @@ int Fl_Check_Browser::lineno(cb_item *p0) const { } Fl_Check_Browser::Fl_Check_Browser(int X, int Y, int W, int H, const char *l) - : Fl_Browser_(X, Y, W, H, l) { +/** The constructor makes an empty browser.*/ +: Fl_Browser_(X, Y, W, H, l) { type(FL_SELECT_BROWSER); when(FL_WHEN_NEVER); first = last = 0; @@ -164,11 +165,16 @@ int Fl_Check_Browser::item_selected(void *v) const { cb_item *i = (cb_item *)v; return i->selected; } - +/** + 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. +*/ int Fl_Check_Browser::add(char *s) { return (add(s, 0)); } +/** See int Fl_Check_Browser::add(char *s) */ int Fl_Check_Browser::add(char *s, int b) { cb_item *p = (cb_item *)malloc(sizeof(cb_item)); p->next = 0; @@ -193,6 +199,10 @@ int Fl_Check_Browser::add(char *s, int b) { return (nitems_); } +/** + Remove line n and make the browser one line shorter. Returns the + number of lines left in the browser. +*/ int Fl_Check_Browser::remove(int item) { cb_item *p = find_item(item); @@ -225,6 +235,7 @@ int Fl_Check_Browser::remove(int item) { return (nitems_); } +/** Remove every item from the browser.*/ void Fl_Check_Browser::clear() { cb_item *p = first; cb_item *next; @@ -246,6 +257,7 @@ void Fl_Check_Browser::clear() { cached_item = -1; } +/** Gets the current status of item item. */ int Fl_Check_Browser::checked(int i) const { cb_item *p = find_item(i); @@ -253,6 +265,7 @@ int Fl_Check_Browser::checked(int i) const { return 0; } +/** Sets the check status of item item to b. */ void Fl_Check_Browser::checked(int i, int b) { cb_item *p = find_item(i); @@ -267,10 +280,12 @@ void Fl_Check_Browser::checked(int i, int b) { } } +/** Returns the index of the currently selected item.*/ int Fl_Check_Browser::value() const { return lineno((cb_item *)selection()); } +/** Return a pointer to an internal buffer holding item item's text.*/ char *Fl_Check_Browser::text(int i) const { cb_item *p = find_item(i); @@ -278,6 +293,7 @@ char *Fl_Check_Browser::text(int i) const { return 0; } +/** Sets all the items checked.*/ void Fl_Check_Browser::check_all() { cb_item *p; @@ -288,6 +304,7 @@ void Fl_Check_Browser::check_all() { redraw(); } +/** Sets all the items unchecked.*/ void Fl_Check_Browser::check_none() { cb_item *p; |
