GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ALLEGRO_MENU_INFO(3) ALLEGRO_MENU_INFO(3)

ALLEGRO_MENU_INFO - Allegro 5 API


#include <allegro5/allegro_native_dialog.h>
typedef struct ALLEGRO_MENU_INFO {

    

A structure that defines how to create a complete menu system. For standard menu items, the following format is used:

   { caption, id, flags, icon }

    

For special items, these macros are helpful:


ALLEGRO_START_OF_MENU(caption, id)
ALLEGRO_MENU_SEPARATOR
ALLEGRO_END_OF_MENU

    

A well-defined menu will begin with ALLEGRO_START_OF_MENU, contain one or more menu items, and end with ALLEGRO_END_OF_MENU. A menu may contain sub-menus. An example:


ALLEGRO_MENU_INFO menu_info[] = {
   ALLEGRO_START_OF_MENU("&File", 1),
      { "&Open", 2, 0, NULL },
      ALLEGRO_START_OF_MENU("Open &Recent...", 3),
         { "Recent 1", 4, 0, NULL },
         { "Recent 2", 5, 0, NULL },
         ALLEGRO_END_OF_MENU,
      ALLEGRO_MENU_SEPARATOR,
      { "E&xit", 6, 0, NULL },
      ALLEGRO_END_OF_MENU,
   ALLEGRO_START_OF_MENU("&Help", 7),
      {"&About", 8, 0, NULL },
      ALLEGRO_END_OF_MENU,
   ALLEGRO_END_OF_MENU
};
ALLEGRO_MENU *menu = al_build_menu(menu_info);

    

If you prefer, you can build the menu without the structure by using al_create_menu(3) and al_insert_menu_item(3).

al_build_menu(3)
Allegro reference manual

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.