home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / MODEL / BUTTON.H < prev    next >
C/C++ Source or Header  |  1996-03-11  |  1KB  |  54 lines

  1. /*
  2.  *    ユーザーボタン制御
  3.  *
  4.  *        Copyright    M.Takatsu        1996.1.24
  5.  */
  6. #ifndef BUTTON_H
  7. #define    BUTTON_H
  8.  
  9. #define    MAX_BUTTON        40            /*    ボタンの最大数                */
  10. #define BUTTON_WIDTH    20            /*    ボタンの幅                    */
  11. #define BUTTON_HEIGHT    20            /*    ボタンの高さ                */
  12. #define BUTTON_BITMAP_WIDTH 16
  13. #define BUTTON_BITMAP_HEIGHT    16
  14.  
  15. #define BUTTON_UNUSED    0
  16. #define BUTTON_STRING    1
  17. #define BUTTON_BITMAP    2
  18.  
  19. #define BUTTON_DISABLE    0
  20. #define BUTTON_ENABLE    1
  21. #define BUTTON_NOREPEAT    0
  22. #define BUTTON_REPEAT    2
  23.  
  24. typedef    struct    {
  25.     int            type ;
  26.     short        x, y ;
  27.     int            exec;
  28.     int            enable;
  29.     unsigned char bitmap[((BUTTON_BITMAP_WIDTH-1)/16+1)*2*BUTTON_BITMAP_HEIGHT];
  30. }
  31.     ButtonData ;
  32.  
  33. extern    ButtonData    UserButton[MAX_BUTTON];
  34. extern    int    ButtonClassID;
  35. extern    int    ButtonAreaWidth;
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. /*    button.c    */
  41. extern    void    ButtonInit( void );
  42. extern    void    DrawUserButtonAll( void );
  43. extern    void    DrawUserButton( int pos );
  44. extern    void    CallButton( int, int );
  45. extern    int        CreateButton(int x, int y, char *bitmap, int type, int exec, int enable);
  46. extern    void    SetButtonArea(int width);
  47. /*    buttlib.c    */
  48. extern    void    ButtonLibInit( void );
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #endif
  54.