19 #ifndef Fl_Menu_Item_H
20 #define Fl_Menu_Item_H
25 # if defined(__APPLE__) && defined(check)
34 FL_MENU_INVISIBLE = 0x10,
35 FL_SUBMENU_POINTER = 0x20,
37 FL_MENU_DIVIDER = 0x80,
38 FL_MENU_HORIZONTAL = 0x100
145 const char*
label()
const {
return text;}
295 int submenu()
const {
return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);}
300 int checkbox()
const {
return flags&FL_MENU_TOGGLE;}
307 int radio()
const {
return flags&FL_MENU_RADIO;}
315 int value()
const {
return flags&FL_MENU_VALUE;}
320 void set() {flags |= FL_MENU_VALUE;}
323 void clear() {flags &= ~FL_MENU_VALUE;}
328 int visible()
const {
return !(flags&FL_MENU_INVISIBLE);}
331 void show() {flags &= ~FL_MENU_INVISIBLE;}
334 void hide() {flags |= FL_MENU_INVISIBLE;}
337 int active()
const {
return !(flags&FL_MENU_INACTIVE);}
347 int activevisible()
const {
return !(flags & (FL_MENU_INACTIVE|FL_MENU_INVISIBLE));}
358 int measure(
int* h,
const Fl_Menu_*)
const;
359 void draw(
int x,
int y,
int w,
int h,
const Fl_Menu_*,
int t=0)
const;
364 const char *title = 0,
368 int X,
int Y,
int W,
int H,
372 int menubar=0)
const;
374 const Fl_Menu_Item* find_shortcut(
int *ip=0,
const bool require_alt =
false)
const;
402 int checked()
const {
return flags&FL_MENU_VALUE;}
405 void check() {flags |= FL_MENU_VALUE;}
410 int insert(
int,
const char*,
int,
Fl_Callback*,
void* =0,
int =0);
411 int add(
const char*,
int shortcut,
Fl_Callback*,
void* =0,
int = 0);
415 void* d = 0,
int e = 0) {
425 FL_PUP_GREY = FL_MENU_INACTIVE,
426 FL_PUP_GRAY = FL_MENU_INACTIVE,
427 FL_MENU_BOX = FL_MENU_TOGGLE,
428 FL_PUP_BOX = FL_MENU_TOGGLE,
429 FL_MENU_CHECK = FL_MENU_VALUE,
430 FL_PUP_CHECK = FL_MENU_VALUE,
431 FL_PUP_RADIO = FL_MENU_RADIO,
432 FL_PUP_INVISIBLE = FL_MENU_INVISIBLE,
433 FL_PUP_SUBMENU = FL_SUBMENU_POINTER