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
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:111
FL_EXPORT Fl_Shortcut fl_old_shortcut(const char *)
Emulation of XForms named shortcuts.
Definition: fl_shortcut.cxx:331
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:52
Fl_Image, Fl_RGB_Image classes.
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:768
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:796
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition: Enumerations.H:633
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:739
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