19 #ifndef Fl_Menu_Item_H
20 #define Fl_Menu_Item_H
23 # include "Fl_Image.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;}
309 int value()
const {
return flags&FL_MENU_VALUE;}
314 void set() {flags |= FL_MENU_VALUE;}
317 void clear() {flags &= ~FL_MENU_VALUE;}
322 int visible()
const {
return !(flags&FL_MENU_INVISIBLE);}
325 void show() {flags &= ~FL_MENU_INVISIBLE;}
328 void hide() {flags |= FL_MENU_INVISIBLE;}
331 int active()
const {
return !(flags&FL_MENU_INACTIVE);}
341 int activevisible()
const {
return !(flags & (FL_MENU_INACTIVE|FL_MENU_INVISIBLE));}
352 int measure(
int* h,
const Fl_Menu_*)
const;
353 void draw(
int x,
int y,
int w,
int h,
const Fl_Menu_*,
int t=0)
const;
358 const char *title = 0,
362 int X,
int Y,
int W,
int H,
366 int menubar=0)
const;
368 const Fl_Menu_Item* find_shortcut(
int *ip=0,
const bool require_alt =
false)
const;
396 int checked()
const {
return flags&FL_MENU_VALUE;}
399 void check() {flags |= FL_MENU_VALUE;}
404 int insert(
int,
const char*,
int,
Fl_Callback*,
void* =0,
int =0);
405 int add(
const char*,
int shortcut,
Fl_Callback*,
void* =0,
int = 0);
409 void* d = 0,
int e = 0) {
419 FL_PUP_GREY = FL_MENU_INACTIVE,
420 FL_PUP_GRAY = FL_MENU_INACTIVE,
421 FL_MENU_BOX = FL_MENU_TOGGLE,
422 FL_PUP_BOX = FL_MENU_TOGGLE,
423 FL_MENU_CHECK = FL_MENU_VALUE,
424 FL_PUP_CHECK = FL_MENU_VALUE,
425 FL_PUP_RADIO = FL_MENU_RADIO,
426 FL_PUP_INVISIBLE = FL_MENU_INVISIBLE,
427 FL_PUP_SUBMENU = FL_SUBMENU_POINTER
virtual void label(Fl_Widget *w)
The label() methods are an obsolete way to set the image attribute of a widget or menu item...
Definition: Fl_Image.cxx:109
FL_EXPORT Fl_Shortcut fl_old_shortcut(const char *)
Emulation of XForms named shortcuts.
Definition: fl_shortcut.cxx:275
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:44
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:746
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:774
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition: Enumerations.H:611
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:717
unsigned char uchar
unsigned char
Definition: fl_types.h:30
unsigned int Fl_Shortcut
24-bit Unicode character + 8-bit indicator for keyboard flags
Definition: fl_types.h:46