home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / c / cwl30 / cwl3demo / dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-10  |  3.2 KB  |  152 lines

  1. #ifdef DLG_GLOBAL
  2. #define DLG_EXTERN
  3. #else
  4. #define DLG_EXTERN extern
  5. #endif
  6. /* pointer to the dialog box */
  7. DLG_EXTERN FORMPTR dbox;
  8.  
  9. /* radio entries for the dialog box */
  10. DLG_EXTERN RADIO_ENTRY r1[4]
  11.  
  12. #ifdef DLG_GLOBAL
  13.    = {"( ) None    ",'N',1,2,1,3,
  14.      "( ) Smart   ",'S',2,2,2,3,
  15.      "( ) Always  ",'A',3,2,3,3,
  16.       CWL_NULL}
  17. #endif
  18. ;
  19.  
  20.  
  21. DLG_EXTERN RADIO_ENTRY r2[4]
  22.  
  23. #ifdef DLG_GLOBAL
  24. = {"( ) Hex      ",'H',1,29,1,30,
  25. "( ) Decimal  ",'D',2,29,2,30,
  26. "( ) Both     ",'B',3,29,3,30,
  27. CWL_NULL}
  28. #endif
  29. ;
  30.  
  31. DLG_EXTERN RADIO_ENTRY r3[4]
  32.  
  33. #ifdef DLG_GLOBAL
  34. = {"( ) 25   ",'2',6,3,6,4,
  35.    "( ) 43/50",'4',6,12,6,13,
  36.    CWL_NULL}
  37. #endif
  38. ;
  39.  
  40.  
  41. /* strings to write to stats window */
  42. DLG_EXTERN char *rstr1[3]
  43. #ifdef DLG_GLOBAL
  44. = {"None","Smart","Always"}
  45. #endif
  46. ;
  47.  
  48.  
  49. DLG_EXTERN char *rstr2[3]
  50. #ifdef DLG_GLOBAL
  51. = {"Hex","Decimal","Both"}
  52. #endif
  53. ;
  54.  
  55.  
  56. DLG_EXTERN char *rstr3[2]
  57. #ifdef DLG_GLOBAL
  58. = {"25","43/50"}
  59. #endif
  60. ;
  61.  
  62. DLG_EXTERN char *hotletters[7]
  63. #ifdef DLG_GLOBAL
  64.  = {"NSA","HDB","24","T","O","C","e"}
  65. #endif
  66. ;
  67.  
  68. int do_stats _PROTO_((FORMPTR form, int *entry));
  69.  
  70. DLG_EXTERN char *text_mask
  71. #ifdef DLG_GLOBAL
  72. = "_______________"
  73. #endif
  74. ;
  75.  
  76.  
  77. DLG_EXTERN char opening_text[]
  78. #ifdef DLG_GLOBAL
  79. =
  80. "The following is a demo of The C Data Forms Library.  This demo demonstrates\n"
  81. "a dialog box with radio and push buttons.  You can use a mouse to make\n"
  82. "selections in any field.\n\n"
  83. #endif
  84. ;
  85.  
  86.  
  87. DLG_EXTERN char opening_text2[]
  88. #ifdef DLG_GLOBAL
  89. =
  90. "You can also move the dialog box around by grabbing the dialog's caption bar\n"
  91. "(labeled \"Dialog Box Demo\") with the mouse and holding the left mouse button\n"
  92. "down while moving the mouse."
  93. #endif
  94. ;
  95.  
  96.  
  97.  
  98.  
  99. /* define all field types in the dialog box */
  100.  
  101. DLG_EXTERN FIELD_ENTRY fentry[]
  102. #ifdef DLG_GLOBAL
  103.  = {CWL_RADIO,0,0,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  104.                         CWL_RADIO,0,0,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  105.                         CWL_LIST, 1,50,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  106.                         CWL_RADIO,0,0,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  107.                         CWL_INTEGER,6,28,"_____",' ',1,5,NO_FIELD_OPTIONS,0,WHITEONBLUE,"5#",
  108.                         CWL_BUTTON, 8,2, "",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  109.                         CWL_BUTTON,8,11,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  110.                         CWL_BUTTON,8,24,"",' ',0,0,NO_FIELD_OPTIONS,0,0,"",
  111.                         FIELDEND}
  112. #endif
  113. ;
  114.  
  115. DLG_EXTERN int shadow_up
  116. #ifdef DLG_GLOBAL
  117.  = '▄'
  118. #endif
  119. ;
  120.  
  121. DLG_EXTERN int shadow_under
  122. #ifdef DLG_GLOBAL
  123.  = '▀'
  124. #endif
  125. ;
  126.  
  127.  
  128. DLG_EXTERN WPOINTER diagw,statw,helpw,opening_window;
  129. DLG_EXTERN int tabwidth
  130. #ifdef DLG_GLOBAL
  131. =8
  132. #endif
  133. ;
  134.  
  135.  
  136. DLG_EXTERN int prev_field;
  137. DLG_EXTERN WPOINTER vhelp_window;
  138.  
  139. CWL_VOID write_button_shadow _PROTO_((int row, int col, int len));
  140. int show_help();
  141. CWL_VOID change_stats _PROTO_((FORMPTR, int, int));
  142. int display_choice _PROTO_((POPUP_MENU_PTR p, unsigned sel));
  143. int focus_it _PROTO_((FORMPTR,int *));
  144. int unfocus_it _PROTO_((FORMPTR,int *));
  145. POPUP_MENU_PTR popup_init();
  146.  
  147. DLG_EXTERN VBLOCKPTR v;
  148. DLG_EXTERN char **files;
  149. DLG_EXTERN POPUP_MENU_ENTRY_PTR dentry;
  150. DLG_EXTERN unsigned menu_colors2[5];
  151. DLG_EXTERN POPUP_MENU_PTR pop;
  152.