| 1 |
#ifdef Check_Browser |
| 2 |
%{ |
| 3 |
#include "Check_Browser.h" |
| 4 |
%} |
| 5 |
|
| 6 |
%include "macros.i" |
| 7 |
|
| 8 |
CHANGE_OWNERSHIP(Fl_Check_Browser) |
| 9 |
|
| 10 |
class Check_Browser : public Fl_Browser_ { |
| 11 |
|
| 12 |
public: |
| 13 |
Check_Browser(int x, int y, int w, int h, const char *l = 0); |
| 14 |
|
| 15 |
int add(char *s); // add an (unchecked) item |
| 16 |
%name(add1) int add(char *s, int b); // add an item and set checked |
| 17 |
// both return the new nitems() |
| 18 |
void clear(); // delete all items |
| 19 |
int nitems() const { return nitems_; } |
| 20 |
int nchecked() const { return nchecked_; } |
| 21 |
int checked(int item) const; |
| 22 |
%name(checked1) void checked(int item, int b); |
| 23 |
void set_checked(int item) { checked(item, 1); } |
| 24 |
void check_all(); |
| 25 |
void check_none(); |
| 26 |
int value() const; // currently selected item |
| 27 |
char *text(int item) const; // returns pointer to internal buffer |
| 28 |
}; |
| 29 |
|
| 30 |
|
| 31 |
#endif |