home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / NOTEPAD2.ZIP / NOTEPAD.H < prev    next >
Text File  |  1989-02-08  |  3KB  |  133 lines

  1. #include "mle.h"
  2.  
  3. /****** Resource IDs *****/
  4.  
  5. #define IDR_NP    255
  6. #define IDR_PREV  263
  7.  
  8. /****** Menu command IDs *****/
  9. /* (by convention, hi byte is menu index, lo byte is dispatch table index) */
  10.  
  11. /* File menu */
  12.  
  13. #define SUB_FILE    0x0000
  14. #define CMD_NEW     0x0000
  15. #define CMD_OPEN    0x0001
  16. #define CMD_SAVE    0x0002
  17. #define CMD_SAVEAS  0x0003
  18. #define CMD_PRINT   0x0009
  19. #define CMD_ABOUT   0x000a
  20. #define CMD_EXIT    0x0010
  21.  
  22. /* Edit menu */
  23. #define SUB_EDIT    0x0100
  24. #define CMD_UNDO    0x0104
  25. #define CMD_CUT     0x0105
  26. #define CMD_COPY    0x0106
  27. #define CMD_PASTE   0x0107
  28. #define CMD_CLEAR   0x0108
  29. #define CMD_SELECTALL 0x010b
  30. #define CMD_DATETIME 0x0111
  31.  
  32. /* Search menu */
  33. #define SUB_SEARCH  0x0200
  34. #define CMD_FIND    0x020c
  35. #define CMD_REPLACE 0x020d
  36. #define CMD_NEXTSRCH 0x020e
  37.  
  38. /* Options menu */
  39. #define SUB_OPTIONS    0x0300
  40. #define CMD_WRAPTOGGLE 0x030f
  41. /*
  42. #define CMD_FIXEDFONT  0x0312    -- now unused
  43. */
  44. #define CMD_SETTAB     0x0313
  45.  
  46. #define CMD_QUERYFONT  0x0314
  47.  
  48. #define SUB_FONTS 0x0400
  49. #define SUB_SIZES 0x0500
  50. #define SUB_HELP  0x0600
  51. /* Number of menu commands */
  52. #define CCMDS       (7+7+3+4)
  53.  
  54. /********************* Message Strings *********************/
  55.  
  56. /*  Message string id's */
  57. #define MS_STRNOTFOU 1
  58. #define MS_UNTITLED  2
  59. #define MS_DOC       3
  60. #define MS_OPENFILE  4
  61. #define MS_DFLEXT    5
  62. #define MS_SAVEAS    6
  63. #define MS_APPNAME   7
  64. #define MS_SAVEERR    8
  65. #define MS_LOADERR    9
  66.  
  67. /*  Number of message strings */
  68. #define MS_COUNT 9
  69. #define MS_MAXMSGSIZE 70
  70.  
  71. /*  Search Key information */
  72. #define NP_KEYSIZE 80
  73.  
  74. #define MAXFILENAMESZ 255
  75. #define NP_TITLESIZE MS_MAXMSGSIZE
  76. #define NP_PROFILESIZE NP_KEYSIZE
  77.  
  78. /*  ID for edit window within client area */
  79. #define NP_EDITWINDOWID 1
  80.  
  81. #ifndef RC_INVOKED
  82.  
  83. /******************** KMP Search info */
  84.  
  85. typedef int STATE;
  86.  
  87. typedef struct _COMPILEDKEY {
  88.         char key[NP_KEYSIZE+2];
  89.         STATE fail[NP_KEYSIZE+2];
  90.         STATE final;
  91. } COMPILEDKEY;
  92. typedef COMPILEDKEY *PCOMPILEDKEY;
  93.  
  94. /************* GLOBAL VARIABLES         */
  95.  
  96. extern HAB  hab;
  97. extern HWND hwndNP;
  98. extern HWND hwndNPFrame;
  99. extern HWND hwndNPMenu;
  100. extern HWND hwndNPEdit;
  101.  
  102. extern char *szClientMsg;
  103.  
  104. extern BOOL fWordWrapOn;
  105. extern char szFileName[];
  106. extern char szLoadFileName[];
  107. extern BOOL fInitLoad;
  108. extern BOOL fInitError;
  109. extern char szTitle[];
  110. extern BOOL fNamed;
  111. extern BOOL fChanged;
  112.  
  113. extern PCOMPILEDKEY pckSearchKey;
  114. extern BOOL fKeySet;
  115.  
  116. extern char szMsgs[MS_COUNT+1][MS_MAXMSGSIZE];
  117.  
  118. extern HHEAP hhAppHeap;
  119.  
  120. #endif
  121.  
  122. #define EDM_INIT  WM_USER+0
  123.  
  124. /********************* Previewer Window Stuff *********************/
  125.  
  126. #define PCMD_REFRESH     0x0000
  127. #define PCMD_FORWARD     0x0001
  128. #define PCMD_START       0x0002
  129.  
  130. /* Number of menu commands */
  131. #define CPCMDS       (3)
  132.  
  133.