10 #include <FL/Fl_Image.H>
66 #if FLTK_ABI_VERSION >= 10301
68 unsigned short _flags;
77 int _collapse_xywh[4];
84 #if FLTK_ABI_VERSION >= 10301
91 void draw_vertical_connector(
int x,
int y1,
int y2,
const Fl_Tree_Prefs &prefs);
92 void draw_horizontal_connector(
int x1,
int x2,
int y,
const Fl_Tree_Prefs &prefs);
97 int x()
const {
return(_xywh[0]); }
98 int y()
const {
return(_xywh[1]); }
99 int w()
const {
return(_xywh[2]); }
100 int h()
const {
return(_xywh[3]); }
103 void show_self(
const char *indent =
"")
const;
104 void label(
const char *val);
105 const char *label()
const;
108 inline void user_data(
void* data ) { _userdata = data; }
139 return(_labelfgcolor);
143 return(_labelfgcolor);
153 return(_labelbgcolor);
165 return(_children.total());
169 return(_children[index]);
177 int find_child(
const char *name);
180 int remove_child(
const char *new_label);
181 void clear_children();
182 void swap_children(
int ax,
int bx);
200 void update_prev_next(
int index);
225 return(is_flag(OPEN));
229 return(is_flag(OPEN)?0:1);
233 is_open()?close():open();
239 set_flag(SELECTED, val);
243 if ( is_selected() ) {
255 if ( ! is_selected() ) {
259 for (
int t=0; t<children(); t++ ) {
260 count += child(t)->select_all();
266 set_flag(SELECTED, 0);
274 if ( is_selected() ) {
278 for (
int t=0; t<children(); t++ ) {
279 count += child(t)->deselect_all();
285 return(is_flag(SELECTED));
297 set_flag(ACTIVE,val);
298 if ( _widget && val != (
int)_widget->active() ) {
302 _widget->deactivate();
315 return(is_flag(ACTIVE));
319 return(is_activated());
323 return(is_visible());
327 return(is_flag(VISIBLE));
329 int visible_r()
const;
344 int event_on_collapse_icon(
const Fl_Tree_Prefs &prefs)
const;
348 return(_parent==0?1:0);
353 #if FLTK_ABI_VERSION >= 10301
355 inline void set_flag(
unsigned short flag,
int val) {
356 if ( val ) _flags |= flag;
else _flags &= ~flag;
359 inline int is_flag(
unsigned short val)
const {
360 return(_flags & val ? 1 : 0);
366 case OPEN: _open = val;
break;
367 case VISIBLE: _visible = val;
break;
368 case ACTIVE: _active = val;
break;
369 case SELECTED: _selected = val;
break;
375 case OPEN:
return(_open ? 1 : 0);
376 case VISIBLE:
return(_visible ? 1 : 0);
377 case ACTIVE:
return(_active ? 1 : 0);
378 case SELECTED:
return(_selected ? 1 : 0);