/****************************************************************************************/
/*                                                                                      */
/*              load_menu.h                                                             */
/*                                                                                      */
/****************************************************************************************/

#ifndef _LOAD_MENU_H_
#define _LOAD_MENU_H_




#include "objects/menu.h"



/*************************************************************************************/
/*                                                                                   */
/*     Package sur les menus                                                         */
/*                                                                                   */
/*************************************************************************************/

#define MENUPKGSIZE 18

char * menupkgname [ MENUPKGSIZE ] = {
    "_CRmenu" , "_APPitem" , "_APPpopup" , "_PAINTmenu" ,
    "_ENmenuItem" , "_DImenuItem" , "_APPitemBitmap" , "_APPpopupBitmap" ,
    "_CBmenu" , "_CHKmenu" , "_GETcheckMenu" , "_DSmenuItem" ,
    "_DSmenu" , "_CRpopupMenu", "_DRAWmenu" ,"_SETmenuItemBitmaps",
    "_CHKpopup" , "_DRAWmenuTree" ,
} ;

char * menupkgtype [ MENUPKGSIZE ] = {
    "fun [Chn ObjWin ] ObjMenu",                            /* _create_menu                 */ 
    "fun [Chn ObjMenu I S ] ObjMenuItem",                   /* _append_item                 */ 
    "fun [Chn ObjMenu S] ObjMenu",                          /* _append_popup                */ 
    "fun [ObjMenu] ObjMenu" ,                               /* _paint_obj_menu              */ 
    "fun [ObjMenuItem ] ObjMenuItem",                       /* _enable_menu_item            */ 
    "fun [ObjMenuItem ] ObjMenuItem",                       /* _disable_menu_item           */ 
    "fun [Chn ObjMenu I ObjBitmap] ObjMenuItem" ,           /* _append_menu_bitmap          */ 
    "fun [Chn ObjMenu ObjBitmap] ObjMenu" ,                 /* _append_popup_bitmap         */    
    "fun [ObjMenuItem fun [ObjMenuItem u0] u1 u0] ObjMenuItem",/* _reflex_menu_select       */ 
    "fun [ObjMenuItem I] ObjMenuItem" ,                     /* _check_menu_item             */ 
    "fun [ObjMenuItem] I" ,                                 /* _get_check_menu_item         */ 
    "fun [ObjMenuItem] I" ,                                 /* _destroy_menu_item           */ 
    "fun [ObjMenu] I" ,                                     /* _destroy_menu                */ 
    "fun [Chn] ObjMenu",                                    /* _create_popup_menu           */ 
    "fun [ObjWin ObjMenu I I I] ObjWin",                    /* _draw_menu                   */ 
    "fun [ObjMenuItem ObjBitmap ObjBitmap] ObjMenuItem",    /* _set_menu_item_bitmaps       */ 
    "fun [ObjMenu I] ObjMenu",                              /* _check_menu                  */ 
    "fun [ObjTree ObjMenu I I I] ObjTree",                  /* _draw_menu_tree              */ 

} ;
#define NARG_CREATE_MENU                2
#define NARG_CREATE_MENU_ITEM_STRING    4
#define NARG_APPEND_POPUP               3
#define NARG_PAINT_OBJ_MENU             1
#define NARG_ENABLE_MENU_ITEM           1
#define NARG_DISABLE_MENU_ITEM          1
#define NARG_APPEND_MENU_BITMAP         4
#define NARG_APPEND_POPUP_BITMAP        3
#define NARG_REFLEX_MENU_SELECT         3
#define NARG_CHECK_MENU_ITEM            2
#define NARG_GET_CHECK_MENU_ITEM        1
#define NARG_DESTROY_MENU_ITEM          1
#define NARG_DESTROY_OBJ_MENU           1
#define NARG_DESTROY_OBJ_MENU           1
#define NARG_CREATE_POPUP_MENU          1
#define NARG_DRAW_MENU                  5
#define NARG_SET_MENU_ITEM_BITMAP       3
#define NARG_CHECK_MENU                 2

int menupkgarg [MENUPKGSIZE ] = {
    NARG_CREATE_MENU , NARG_CREATE_MENU_ITEM_STRING , NARG_APPEND_POPUP , NARG_PAINT_OBJ_MENU ,
    NARG_ENABLE_MENU_ITEM , NARG_DISABLE_MENU_ITEM , NARG_APPEND_MENU_BITMAP , NARG_APPEND_POPUP_BITMAP ,
    NARG_REFLEX_MENU_SELECT , NARG_CHECK_MENU_ITEM , NARG_GET_CHECK_MENU_ITEM , NARG_DESTROY_MENU_ITEM ,
    NARG_DESTROY_OBJ_MENU , NARG_CREATE_POPUP_MENU , NARG_DRAW_MENU ,NARG_SET_MENU_ITEM_BITMAP ,
    NARG_CHECK_MENU , NARG_DRAW_MENU ,
} ;

int (*menupkgfun [ MENUPKGSIZE ]) ( mmachine m ) = {
    GRCreateMenu , GRCreateMenuItemString , GRAppendPopup , GRPaintObjMenu ,
    GREnableMenuItem , GRDisableMenuItem , GRAppendMenuBitmap , GRAppendPopupBitmap , 
    GRReflexMenuSelect , GRCheckMenuItem , GRGetCheckMenuItem , GRDestroyMenuItem ,
    GRDestroyObjMenu , GRCreatePopupMenu , GRDrawMenu ,GRSetMenuItemBitmap ,
    GRCheckMenu ,GRDrawMenu ,
} ;




#endif
