1d_menu_proc(3) Allegro manual d_menu_proc(3)
2
3
4
6 d_menu_proc - Dialog procedure implementing a menu bar object. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 int d_menu_proc(int msg, DIALOG *d, int c);
14
16 This object is a menu bar which will drop down child menus when it is
17 clicked or if an alt+key corresponding to one of the shortcuts in the
18 menu is pressed. It ignores a lot of the fields in the dialog struc‐
19 ture, in particular the color is taken from the gui_*_color variables,
20 and the width and height are calculated automatically (the w and h
21 fields from the DIALOG are only used as a minimum size.) The dp field
22 points to an array of menu structures: see do_menu() for more informa‐
23 tion. The top level menu will be displayed as a horizontal bar, but
24 when child menus drop down from it they will be in the normal vertical
25 format used by do_menu(). When a menu item is selected, the return
26 value from the menu callback function is passed back to the dialog man‐
27 ager, so your callbacks should return D_O_K, D_REDRAW, or D_CLOSE.
28
29
31 active_menu(3), gui_menu_draw_menu(3), exgui(3)
32
33
34
35Allegro version 4.2.2 d_menu_proc(3)