File: Check_Browser.i

package info (click to toggle)
pyfltk 1.3.8%2Brepack-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,868 kB
  • sloc: python: 7,494; cpp: 351; perl: 55; makefile: 24
file content (31 lines) | stat: -rw-r--r-- 849 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifdef Check_Browser
%{
#include "Check_Browser.h"
%}

%include "macros.i"

CHANGE_OWNERSHIP(Fl_Check_Browser)

class Check_Browser : public Fl_Browser_ {

public:
	Check_Browser(int x, int y, int w, int h, const char *l = 0);

	int add(char *s);               // add an (unchecked) item
	%name(add1) int add(char *s, int b);        // add an item and set checked
					// both return the new nitems()
	void clear();                   // delete all items
	int nitems() const { return nitems_; }
	int nchecked() const { return nchecked_; }
	int checked(int item) const;
	%name(checked1) void checked(int item, int b);
	void set_checked(int item) { checked(item, 1); }
	void check_all();
	void check_none();
	int value() const;              // currently selected item
	char *text(int item) const;     // returns pointer to internal buffer
};


#endif