28 #ifndef Fl_Menu_Item_H
29 #define Fl_Menu_Item_H
32 # include "Fl_Image.H"
34 # if defined(__APPLE__) && defined(check)
43 FL_MENU_INVISIBLE = 0x10,
44 FL_SUBMENU_POINTER = 0x20,
46 FL_MENU_DIVIDER = 0x80,
47 FL_MENU_HORIZONTAL = 0x100
154 const char*
label()
const {
return text;}
304 int submenu()
const {
return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);}
309 int checkbox()
const {
return flags&FL_MENU_TOGGLE;}
316 int radio()
const {
return flags&FL_MENU_RADIO;}
318 int value()
const {
return flags&FL_MENU_VALUE;}
323 void set() {flags |= FL_MENU_VALUE;}
326 void clear() {flags &= ~FL_MENU_VALUE;}
331 int visible()
const {
return !(flags&FL_MENU_INVISIBLE);}
334 void show() {flags &= ~FL_MENU_INVISIBLE;}
337 void hide() {flags |= FL_MENU_INVISIBLE;}
340 int active()
const {
return !(flags&FL_MENU_INACTIVE);}
350 int activevisible()
const {
return !(flags & (FL_MENU_INACTIVE|FL_MENU_INVISIBLE));}
361 int measure(
int* h,
const Fl_Menu_*)
const;
362 void draw(
int x,
int y,
int w,
int h,
const Fl_Menu_*,
int t=0)
const;
367 const char *title = 0,
371 int X,
int Y,
int W,
int H,
375 int menubar=0)
const;
377 const Fl_Menu_Item* find_shortcut(
int *ip=0,
const bool require_alt =
false)
const;
405 int checked()
const {
return flags&FL_MENU_VALUE;}
408 void check() {flags |= FL_MENU_VALUE;}
413 int insert(
int,
const char*,
int,
Fl_Callback*,
void* =0,
int =0);
414 int add(
const char*,
int shortcut,
Fl_Callback*,
void* =0,
int = 0);
418 void* d = 0,
int e = 0) {
428 FL_PUP_GREY = FL_MENU_INACTIVE,
429 FL_PUP_GRAY = FL_MENU_INACTIVE,
430 FL_MENU_BOX = FL_MENU_TOGGLE,
431 FL_PUP_BOX = FL_MENU_TOGGLE,
432 FL_MENU_CHECK = FL_MENU_VALUE,
433 FL_PUP_CHECK = FL_MENU_VALUE,
434 FL_PUP_RADIO = FL_MENU_RADIO,
435 FL_PUP_INVISIBLE = FL_MENU_INVISIBLE,
436 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:118
FL_EXPORT Fl_Shortcut fl_old_shortcut(const char *)
Emulation of XForms named shortcuts.
Definition: fl_shortcut.cxx:284
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:51
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:741
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:769
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition: Enumerations.H:606
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:712
unsigned char uchar
unsigned char
Definition: fl_types.h:39
unsigned int Fl_Shortcut
24-bit Unicode character + 8-bit indicator for keyboard flags
Definition: fl_types.h:55