/****************************************************************************************/
/*                                                                                      */
/*              load_button.h                                                           */
/*                                                                                      */
/****************************************************************************************/

#ifndef _LOAD_BUTTON_H_
#define _LOAD_BUTTON_H_




#include "objects/button.h"
#include "objects/tooltip.h"




/************************************************************************************/
/*                                                                                  */
/*      Package sur les push buttons                                                */
/*                                                                                  */
/************************************************************************************/


#define BUTTONPKGSIZE   28

char * buttonpkgname [ BUTTONPKGSIZE ] = {
    "_CRbutton"  , "_PAINTbutton" , "_CRcheck" , "_GETcheck" ,
    "_SETcheck" , "_CRbuttonBitmap" , "_CBbutton" , "_DSbutton" ,
    "_DScheck" , "_CBcheck" , "_PAINTcheck" , "_GETbuttonSizePosition" ,
    "_SIZEbutton" , "_GETcheckSizePosition" , "_SIZEcheck" , "_SETbuttonName" ,
    "_SETcheckName" , "_GETbuttonPositionSize" , "_POSITIONbutton" ,"_GETcheckPositionSize",
    "_POSITIONcheck" ,"_SETbuttonBitmap" , "_SHOWbutton" , "_SHOWcheck" , 
    "_CBbuttonDropFile","_ENbutton","_ENcheck" ,"_TIPbutton",
} ;

char * buttonpkgtype [BUTTONPKGSIZE] = {
    "fun [ Chn ObjWin I I I I I S ] ObjButton",             /* _create_push_button          */ 
    "fun [ ObjButton ] ObjButton",                          /* _paint_obj_button            */ 
    "fun [ Chn ObjWin I I I I I S ] ObjCheck",              /* _create_check_box            */ 
    "fun [ ObjCheck ] I",                                   /* _get_check_box               */ 
    "fun [ ObjCheck I ] ObjCheck",                          /* _set_check_box               */ 
    "fun [ Chn ObjWin ObjBitmap I I I I I] ObjButton" ,     /*_create_push_button_bitmap    */ 
    "fun [ ObjButton fun [ ObjButton u0] u1 u0] ObjButton", /* _reflex_button_event         */ 
    "fun [ ObjButton ] I" ,                                 /* _destroy_obj_button          */ 
    "fun [ ObjCheck ] I" ,                                  /* _destroy_obj_check           */ 
    "fun [ ObjCheck fun [ ObjCheck u0 I] u1 u0] ObjCheck" , /* _reflex_check_event          */ 
    "fun [ ObjCheck ] ObjCheck" ,                           /* _paint_obj_check             */ 
    "fun [ ObjButton ] [ I I I I ]" ,                       /* _get_button_size_position    */ 
    "fun [ ObjButton I I I I ] ObjButton" ,                 /* _size_button                 */ 
    "fun [ ObjCheck ] [ I I I I ]" ,                        /* _get_check_size_position     */ 
    "fun [ ObjCheck I I I I ] ObjCheck" ,                   /* _size_check                  */ 
    "fun [ ObjButton S ] ObjButton" ,                       /* _set_button_name             */ 
    "fun [ ObjCheck S ] ObjCheck" ,                         /* _set_check_name              */ 
    "fun [ ObjButton ] [ I I I I]",                         /* _get_button_position_size    */ 
    "fun [ ObjButton I I I I ] ObjButton",                  /* _pos_button                  */    
    "fun [ ObjCheck ] [ I I I I ]",                         /* _get_check_position_size     */ 
    "fun [ ObjCheck I I I I] ObjCheck",                     /* _pos_check                   */   
    "fun [ ObjButton ObjBitmap] ObjButton" ,                /* _set_button_bitmap           */ 
    "fun [ ObjButton I ] ObjButton",                        /* _show_button                 */ 
    "fun [ ObjCheck I] ObjCheck" ,                          /* _show_check                  */ 
    "fun [ObjButton fun[ObjButton u0 I I [P r1]]u1 u0] ObjButton",
                                                            /* _reflex_button_dropfile      */ 
    "fun [ObjButton I] ObjButton",                          /*_enable_button                */ 
    "fun [ObjCheck I] ObjCheck",                            /* _enable_check                */ 
    "fun [ObjButton  S] ObjButton",                         /*_tip_button                   */ 
} ;

#define NARG_CREATE_PUSH_BUTTON         8
#define NARG_PAINT_OBJ_BUTTON           1
#define NARG_CREATE_CHECK_BOX           8
#define NARG_GET_CHECK_BOX              1
#define NARG_SET_CHECK_BOX              2
#define NARG_CREATE_PUSH_BUTTON_BITMAP  8
#define NARG_REFLEX_BUTTON_EVENT        3
#define NARG_DESTROY_OBJ_BUTTON         1
#define NARG_DESTROY_OBJ_CHECK          1
#define NARG_REFLEX_CHECK_EVENT         3
#define NARG_PAINT_OBJ_CHECK            1
#define NARG_SET_BUTTON_BITMAP          2
#define NARG_SHOW_BUTTON                2
#define NARG_SHOW_CHECK                 2
#define NARG_REFLEX_BUTTON_DROPFILE     3
#define NARG_TIP                        2

int buttonpkgarg [ BUTTONPKGSIZE ] = {
    NARG_CREATE_PUSH_BUTTON , NARG_PAINT_OBJ_BUTTON , NARG_CREATE_CHECK_BOX , NARG_GET_CHECK_BOX ,
    NARG_SET_CHECK_BOX , NARG_CREATE_PUSH_BUTTON_BITMAP , NARG_REFLEX_BUTTON_EVENT , NARG_DESTROY_OBJ_BUTTON ,
    NARG_DESTROY_OBJ_CHECK , NARG_REFLEX_CHECK_EVENT , NARG_PAINT_OBJ_CHECK , NARG_GET_SIZE_POSITION_WINDOW ,
    NARG_RESIZE_WINDOW , NARG_GET_SIZE_POSITION_WINDOW , NARG_RESIZE_WINDOW , NARG_SET_WINDOW_NAME ,
    NARG_SET_WINDOW_NAME , NARG_GET_SIZE_POSITION_WINDOW , NARG_RESIZE_WINDOW , NARG_GET_SIZE_POSITION_WINDOW , 
    NARG_RESIZE_WINDOW , NARG_SET_BUTTON_BITMAP , NARG_SHOW_BUTTON , NARG_SHOW_CHECK ,
    NARG_REFLEX_BUTTON_DROPFILE , NARG_ENABLE_WINDOW , NARG_ENABLE_WINDOW , NARG_TIP ,
} ;

 int (*buttonpkgfun [ BUTTONPKGSIZE ]) ( mmachine m ) = {
        GRCreatePushButton , GRPaintObjButton , GRCreateCheckBox , GRGetCheckBox ,
        GRSetCheckBox , GRCreatePushButtonBitmap , GRReflexButtonEvent , GRDestroyObjButton ,
        GRDestroyObjButton , GRReflexCheckEvent , GRPaintObjButton , GRGetSizePositionWindow ,
        GRResizeWindow , GRGetSizePositionWindow , GRResizeWindow ,GRSetWindowName ,
        GRSetWindowName , GRGetPositionSizeWindow , GRReposWindow , GRGetPositionSizeWindow , 
        GRReposWindow , GRSetButtonBitmap , GRShowWindow , GRShowWindow ,
        GRReflexButtonDropFile , GREnableWindow , GREnableWindow , GRToolTip ,
} ;





#endif
