home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume11 / monthtool / monthtool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-10-03  |  2.2 KB  |  89 lines

  1. /*
  2.      Name:        monthtool
  3.   
  4.     Purpose:     visual appointment calendar 
  5.   
  6.     Author:        Sarah Metcalfe apres Mike Essex & Rich Burridge
  7.   
  8.     Date:        June 24, 1987 
  9.   
  10.     Discussion: Displays a calendar to the screen for a given month.  
  11.                 User may move the mouse to any day of the
  12.                 month and view or enter appointments for that date. 
  13.  
  14. */
  15.  
  16. #include <stdio.h>
  17. #include <ctype.h>
  18.  
  19. #include <suntool/sunview.h>
  20. #include <suntool/canvas.h>
  21. #include <suntool/panel.h>
  22. #include <suntool/walkmenu.h>
  23. #include <suntool/textsw.h>
  24.  
  25. char *sprintf() ;
  26. char *malloc() ;
  27. char *strcat();
  28. char *strtok();
  29. char *getenv();
  30.  
  31.  
  32.  
  33. #define  LARGEFONT        "/usr/lib/fonts/fixedwidthfonts/gallant.r.10"
  34. #define  NORMALFONT        "/monthtool.font"
  35.  
  36.  
  37. #define  DATE_ROWS            6            /* No of rows of dates. */
  38. #define  DATE_COLS            7            /* No of columns of dates. */
  39.  
  40. #define  DATE_BOX_HEIGHT    26            /* Number of pixels for height. */
  41. #define  DATE_BOX_WIDTH        40            /* No of pixels for width. */
  42. #define  DATE_BORDER        5            /* No of pixels in border. */
  43. #define  GAP                5            /* No of pixels between dates. */
  44.  
  45. #define  BTN_WIDTH            21            /* No of pixels in up and down buttons. */
  46. #define  BTN_HEIGHT            19            /* No of pixels in up and down buttons. */
  47.  
  48.  
  49. #define  WINDOW_WIDTH    (DATE_COLS * DATE_BOX_WIDTH) + \
  50.                         ((DATE_COLS - 1) * GAP) + (2 * DATE_BORDER)
  51. #define  MONTH_HEIGHT        35            
  52. #define  DATES_HEIGHT   (DATE_ROWS * DATE_BOX_HEIGHT) + \
  53.                         ((DATE_ROWS - 1) * GAP) + (2 * DATE_BORDER)
  54. #define  NOTES_PANEL_HEIGHT    20            
  55. #define  NOTES_HEIGHT        100            
  56.  
  57.  
  58. #define  NUM_NOTES_TYPE        4                /* Types of records value */
  59. #define  NOTES_D_M_Y        0                /* ddmmyyyy */
  60. #define  NOTES_D_M_ALL        1                /* ddmm* */
  61. #define  NOTES_D_ALL_ALL    2                /* dd** */
  62. #define  NOTES_ALL_ALL_ALL    3                /* *** */
  63. #define  NOTES_ERROR        NUM_NOTES_TYPE    /* *mmyy **yy dd*yy *mm* */
  64.  
  65.  
  66. #define  MENU_CLOSE            1                /* Menu selection value */
  67. #define  MENU_SAVE            2
  68. #define  MENU_RELOAD        3
  69. #define  MENU_QUIT            4
  70.  
  71. #define  HIGHLIGHT            1
  72. #define  NOHIGHLIGHT        0
  73.  
  74. struct dateBox {
  75.             int          date ;
  76.             int            hasNotes ;
  77. } ;
  78.  
  79. struct apptsData {
  80.             int                   year ;
  81.             int                   month ;
  82.             int                   day ;
  83.             int                   dateNum ;    /* 10000*year + 100*month + day */
  84.             int                   time ;
  85.             char                  *apptMsg ;
  86.             struct apptsData    *next ; 
  87.             struct apptsData    *prev ; 
  88. } ;
  89.