home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / quot210s.zip / include / quoter.h < prev    next >
C/C++ Source or Header  |  1998-10-18  |  8KB  |  286 lines

  1. /*
  2.  * quoter.h
  3.  *
  4.  * Header file containing definitions for the Quoteriser's main
  5.  * program.
  6.  *
  7.  *      Created: 18th January, 1997
  8.  * Version 1.00: 9th April, 1997
  9.  * Version 2.00: 21st December, 1997
  10.  * Version 2.10: 18th October, 1998
  11.  *
  12.  * (C) 1997 Nicholas Paul Sheppard
  13.  *
  14.  * This file is distributed under the GNU General Public License. See the
  15.  * file copying.txt for details.
  16.  */
  17.  
  18.  
  19. #ifndef _QUOTERISER_QUOTER_H
  20. #define _QUOTERISER_QUOTER_H
  21.  
  22. #include "types.h"
  23.  
  24. /* icon */
  25. #define IDI_ICON        1
  26.  
  27. /* menu */
  28. #define IDM_MAIN        2
  29. #define IDM_FILE        20
  30. #define IDM_OPEN_QUOTES        200
  31. #define IDM_OPEN_AUTHORS    201
  32. #define IDM_REORG_QUOTES    202
  33. #define IDM_REORG_AUTHORS    203
  34. #define IDM_CLOSE_QUOTES    204
  35. #define IDM_CLOSE_AUTHORS    205
  36. #define IDM_SETTINGS        206
  37. #define IDM_EXIT        207
  38. #define IDM_USEDDB1        208
  39. #define IDM_EDIT        21
  40. #define IDM_COPY_TEXT        210
  41. #define IDM_COPY_METAFILE    211
  42. #define IDM_AUTHORS        22
  43. #define IDM_ADD_AUTHOR        220
  44. #define IDM_GET_AUTHOR        221
  45. #define IDM_GET_AUTHOR_ALL    2210
  46. #define IDM_GET_AUTHOR_DESC    2211
  47. #define IDM_GET_AUTHOR_NAME    2212
  48. #define IDM_DEL_AUTHOR        222
  49. #define IDM_DEL_AUTHOR_CURRENT    2220
  50. #define IDM_DEL_AUTHOR_ALL    2221
  51. #define IDM_EDIT_AUTHOR        223
  52. #define IDM_EDIT_AUTHOR_CURRENT    2230
  53. #define IDM_EDIT_AUTHOR_ALL    2231
  54. #define IDM_IMPORT_AUTHORS    224
  55. #define IDM_QUOTES        23
  56. #define IDM_ADD_QUOTE        230
  57. #define IDM_GET_QUOTE        231
  58. #define IDM_GET_QUOTE_ALL    2310
  59. #define IDM_GET_QUOTE_KEY    2311
  60. #define IDM_GET_QUOTE_TEXT    2312
  61. #define IDM_GET_QUOTE_NAME    2313
  62. #define IDM_DEL_QUOTE        232
  63. #define IDM_DEL_QUOTE_CURRENT    2320
  64. #define IDM_DEL_QUOTE_ALL    2321
  65. #define IDM_EDIT_QUOTE        233
  66. #define IDM_EDIT_QUOTE_CURRENT    2330
  67. #define IDM_EDIT_QUOTE_ALL    2331
  68. #define IDM_IMPORT_QUOTES    234
  69. #define IDM_QOTD        24
  70. #define IDM_HELP        29
  71. #define IDM_GENHELP        290
  72. #define IDM_LICENSE        298
  73. #define IDM_ABOUT        299
  74.  
  75. /* general strings */
  76. #define IDS_APPNAME        3000
  77. #define IDS_SEARCHING        3001
  78. #define IDS_SAMPLE        3002
  79.  
  80. /* error messages */
  81. #define IDS_OPENFAILED        3100
  82. #define IDS_SPAWNFAILED        3101
  83. #define IDS_NOMEM        3102
  84. #define IDS_THREADFAILED    3103
  85. #define IDS_NOCODE        3104
  86. #define IDS_NOTEXT        3105
  87. #define IDS_BADRX        3106
  88.  
  89. /* window titles */
  90. #define IDS_TITLE_QS_KEY    3200
  91. #define IDS_TITLE_QS_TEXT    3201
  92. #define IDS_TITLE_AS_DESC    3202
  93. #define IDS_TITLE_AS_NAME    3203
  94. #define IDS_TITLE_QCODE        3204
  95. #define IDS_TITLE_ACODE        3205
  96. #define IDS_TITLE_FONT        3206
  97. #define IDS_TITLE_OPEN        3207
  98. #define IDS_TITLE_BROWSE    3208
  99. #define IDS_TITLE_ADDA        3209
  100. #define IDS_TITLE_EDITA        3210
  101. #define IDS_TITLE_ADDQ        3211
  102. #define IDS_TITLE_EDITQ        3212
  103.  
  104. /* questions for the user */
  105. #define IDS_MAKENEWDB        3300
  106. #define IDS_REPLACECODE        3301
  107. #define IDS_DEFAULT        3302
  108.  
  109. /* information strings */
  110. #define IDS_NOQUOTES        3400
  111. #define IDS_NOAUTHORS        3401
  112.  
  113. /* message box titles */
  114. #define IDS_ERROR        3500
  115. #define IDS_CONFIRM        3501
  116. #define IDS_RETRY        3502
  117.  
  118. /* intro dialogue box */
  119. #define IDD_INTRO        40
  120. #define IDL_INTRO_NAME        4001
  121. #define IDL_INTRO_COPYRIGHT    4002
  122. #define IDL_INTRO_DECLARATION    4003
  123. #define IDL_INTRO_LICENSE    4004
  124. #define IDC_INTRO_OKAY        4005
  125.  
  126. /* about dialogue box */
  127. #define IDD_ABOUT        41
  128. #define IDL_ABOUT_NAME        4100
  129. #define IDL_ABOUT_VERSION    4101
  130. #define IDL_ABOUT_COPYRIGHT    4102
  131. #define IDC_ABOUT_OKAY        4103
  132.  
  133. /* settings dialogue box */
  134. #define IDD_SETTINGS        42
  135. #define IDL_SET_EDITOR        4200
  136. #define IDC_SET_EDITOR        4201
  137. #define IDL_SET_EDPARAMS    4202
  138. #define IDC_SET_EDPARAMS    4203
  139. #define IDL_SET_DATAPATH    4204
  140. #define IDC_SET_DATAPATH    4205
  141. #define IDL_SET_DOCPATH        4206
  142. #define IDC_SET_DOCPATH        4207
  143. #define IDL_SET_BROWSER        4208
  144. #define IDC_SET_BROWSER        4209
  145. #define IDL_SET_BROWSERPARAMS    4210
  146. #define IDC_SET_BROWSERPARAMS    4211
  147. #define IDC_SET_FONT        4212
  148. #define IDC_SET_OKAY        4213
  149. #define IDC_SET_DEFAULT        4214
  150. #define IDC_SET_CANCEL        4215
  151.  
  152. /* edit quote dialogue box */
  153. #define IDD_EDITQUOTE        43
  154. #define IDL_EDITQ_CODE        4300
  155. #define IDC_EDITQ_CODE        4301
  156. #define IDL_EDITQ_SOURCE    4302
  157. #define IDC_EDITQ_SOURCE    4303
  158. #define IDL_EDITQ_ACODE        4304
  159. #define IDC_EDITQ_ACODE        4305
  160. #define IDC_EDITQ_ABROWSE    4306
  161. #define IDL_EDITQ_KEYWORDS    4307
  162. #define IDC_EDITQ_KEYWORDS    4308
  163. #define IDC_EDITQ_TEXT        4309
  164. #define IDC_EDITQ_OKAY        4310
  165. #define IDC_EDITQ_CANCEL    4311
  166.  
  167. /* edit author dialogue box */
  168. #define IDD_EDITAUTHOR        44
  169. #define IDL_EDITA_CODE        4400
  170. #define IDC_EDITA_CODE        4401
  171. #define IDL_EDITA_SURNAME    4402
  172. #define IDC_EDITA_SURNAME    4403
  173. #define IDL_EDITA_GNAME        4404
  174. #define IDC_EDITA_GNAME        4405
  175. #define IDL_EDITA_BORN        4406
  176. #define IDC_EDITA_BORN        4407
  177. #define IDL_EDITA_DIED        4408
  178. #define IDC_EDITA_DIED        4409
  179. #define IDC_EDITA_DESC        4410
  180. #define IDC_EDITA_OKAY        4411
  181. #define IDC_EDITA_CANCEL    4412
  182.  
  183. /* choose code dialogue box */
  184. #define IDD_CHOOSECODE        45
  185. #define IDC_CODE_CODE        4501
  186. #define IDC_CODE_OKAY        4502
  187. #define IDC_CODE_CANCEL        4503
  188. #define IDL_CODE_COUNT        4504
  189. #define IDC_CODE_COUNT        4505
  190.  
  191. /* get text dialogue box */
  192. #define IDD_GETTEXT        46
  193. #define IDL_GETTEXT_TEXT    4600
  194. #define IDC_GETTEXT_TEXT    4601
  195. #define IDC_GETTEXT_OKAY    4602
  196. #define IDC_GETTEXT_CANCEL    4603
  197.  
  198. /* quote-of-the-day dialogue box */
  199. #define IDD_QOTD        47
  200. #define IDL_QOTD_QDB        4700
  201. #define IDC_QOTD_QDB        4701
  202. #define IDC_QOTD_QDB_BROWSE    4702
  203. #define IDL_QOTD_ADB        4703
  204. #define IDC_QOTD_ADB        4704
  205. #define IDC_QOTD_ADB_BROWSE    4705
  206. #define IDC_QOTD_OKAY        4706
  207. #define IDC_QOTD_CANCEL        4707
  208.  
  209. /* import database dialogue box */
  210. #define IDD_IMPORT        48
  211. #define IDL_IMPORT_SOURCE    4800
  212. #define IDC_IMPORT_SOURCE    4801
  213. #define IDC_IMPORT_BROWSE    4802
  214. #define IDC_IMPORT_REPLACE    4803
  215. #define IDC_IMPORT_REPLACE_ALL    4804
  216. #define IDC_IMPORT_REPLACE_NO    4805
  217. #define IDC_IMPORT_REPLACE_ASK    4806
  218. #define IDC_IMPORT_OKAY        4807
  219. #define IDC_IMPORT_CANCEL    4808
  220.  
  221. /* timers */
  222. #define IDT_INTRO        60
  223.  
  224. /* messages to pass to EditQuoteBox and EditAuthorBox */
  225. #define Q_ADD        0
  226. #define Q_EDIT        1
  227.  
  228. /* some standard window control styles */
  229. #define TEXT_CENTRE    SS_TEXT | DT_CENTER | DT_VCENTER | WS_VISIBLE
  230. #define TEXT_RIGHT    SS_TEXT | DT_RIGHT | DT_VCENTER | WS_VISIBLE
  231. #define TEXT_LEFT    SS_TEXT | DT_LEFT | DT_VCENTER | WS_VISIBLE
  232. #define EF_STD        ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | WS_VISIBLE | WS_TABSTOP
  233. #define GB_STD        SS_GROUPBOX | DT_LEFT | DT_TOP | WS_VISIBLE | WS_GROUP
  234. #define RADIO_STD    BS_AUTORADIOBUTTON | WS_VISIBLE | WS_TABSTOP
  235.  
  236. /* variables in quoter.c */
  237. extern HAB hab;
  238. extern HWND hwndMain;
  239. extern HWND hwndVertScroll;
  240. extern PROGSTATE ps;
  241.  
  242. /* variables in settings.c */
  243. extern PROFILE prf;
  244.  
  245. /* functions in quoter.c */
  246. MRESULT EXPENTRY MainWinProc(HWND, ULONG, MPARAM, MPARAM);
  247. MRESULT EXPENTRY IntroBoxProc(HWND, ULONG, MPARAM, MPARAM);
  248. MRESULT EXPENTRY AboutBoxProc(HWND, ULONG, MPARAM, MPARAM);
  249. MRESULT EXPENTRY GetTextBox(HWND, ULONG, MPARAM, MPARAM);
  250.  
  251. /* functions in qdlg.c */
  252. MRESULT EXPENTRY ChooseQuoteBox(HWND, ULONG, MPARAM, MPARAM);
  253. MRESULT EXPENTRY EditQuoteBox(HWND, ULONG, MPARAM, MPARAM);
  254. MRESULT EXPENTRY ImportQuotesBox(HWND, ULONG, MPARAM, MPARAM);
  255. BOOL MenuOpenQuotes(HWND, char *);
  256. BOOL MenuAddQuote(HWND);
  257. BOOL MenuEditQuote(HWND, int);
  258. void MenuDelQuote(HWND, int);
  259. BOOL MenuGetQuoteAll(HWND);
  260. BOOL MenuGetQuoteKeyword(HWND);
  261. BOOL MenuGetQuoteText(HWND);
  262. BOOL MenuGetQuoteName(HWND);
  263.  
  264. /* functions in adlg.c */
  265. MRESULT EXPENTRY ChooseAuthorBox(HWND, ULONG, MPARAM, MPARAM);
  266. MRESULT EXPENTRY EditAuthorBox(HWND, ULONG, MPARAM, MPARAM);
  267. MRESULT EXPENTRY ImportAuthorsBox(HWND, ULONG, MPARAM, MPARAM);
  268. BOOL MenuOpenAuthors(HWND, char *);
  269. BOOL MenuAddAuthor(HWND);
  270. BOOL MenuEditAuthor(HWND, int);
  271. void MenuDelAuthor(HWND, int);
  272. BOOL MenuGetAuthorAll(HWND);
  273. BOOL MenuGetAuthorDesc(HWND);
  274. BOOL MenuGetAuthorName(HWND);
  275.  
  276. /* functions in settings.c */
  277. MRESULT EXPENTRY SettingsBox(HWND, ULONG, MPARAM, MPARAM);
  278. MRESULT EXPENTRY QuoteOfTheDayBox(HWND, ULONG, MPARAM, MPARAM);
  279. void GetINISettings(void);
  280. void SetINISettings(void);
  281. void SetUsedDB(char *, char *);
  282. void GetWindowPosition(HWND);
  283. void SaveWindowPosition(HWND);
  284.  
  285. #endif
  286.