blob: 7172939d87b22459388ec3794d96126ee8752dc3 [file] [log] [blame]
Alexandre Julliard02e90081998-01-04 17:49:09 +00001/*
Marcel Baura43295d1998-10-18 14:11:42 +00002 * Notepad (notepad.h)
Alexandre Julliard02e90081998-01-04 17:49:09 +00003 *
Marcel Baura43295d1998-10-18 14:11:42 +00004 * Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
5 * To be distributed under the Wine License
Alexandre Julliard02e90081998-01-04 17:49:09 +00006 */
7
8#define MAX_STRING_LEN 255
9#define MAX_PATHNAME_LEN 1024
10#define MAX_LANGUAGE_NUMBER (NP_LAST_LANGUAGE - NP_FIRST_LANGUAGE)
11
Marcel Baur03287451999-02-14 11:28:37 +000012#define HELPFILE "notepad.hlp"
13#define LOGPREFIX ".LOG"
Alexandre Julliard02e90081998-01-04 17:49:09 +000014#define DEFAULTICON OIC_WINEICON
15
16/* hide the following from winerc */
17#ifndef RC_INVOKED
18
Marcel Baur03287451999-02-14 11:28:37 +000019#include "commdlg.h"
20
Alexandre Julliard02e90081998-01-04 17:49:09 +000021typedef struct
22{
23 HANDLE hInstance;
24 HWND hMainWnd;
Marcel Baur03287451999-02-14 11:28:37 +000025 HWND hFindReplaceDlg;
Alexandre Julliard02e90081998-01-04 17:49:09 +000026 HICON hMainIcon;
27 HICON hDefaultIcon;
28 HMENU hMainMenu;
29 HMENU hFileMenu;
30 HMENU hEditMenu;
31 HMENU hSearchMenu;
32 HMENU hLanguageMenu;
33 HMENU hHelpMenu;
34 LPCSTR lpszIniFile;
35 LPCSTR lpszIcoFile;
36 LPCSTR lpszLanguage;
37 UINT wStringTableOffset;
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000038 BOOL bWrapLongLines;
Alexandre Julliard54c27111998-03-29 19:44:57 +000039 CHAR szFindText[MAX_PATHNAME_LEN];
Marcel Baur03287451999-02-14 11:28:37 +000040 CHAR szReplaceText[MAX_PATHNAME_LEN];
Alexandre Julliard54c27111998-03-29 19:44:57 +000041 CHAR szFileName[MAX_PATHNAME_LEN];
Alexandre Julliarddadf78f1998-05-17 17:13:43 +000042 CHAR szMarginTop[MAX_PATHNAME_LEN];
43 CHAR szMarginBottom[MAX_PATHNAME_LEN];
44 CHAR szMarginLeft[MAX_PATHNAME_LEN];
45 CHAR szMarginRight[MAX_PATHNAME_LEN];
46 CHAR szHeader[MAX_PATHNAME_LEN];
47 CHAR szFooter[MAX_PATHNAME_LEN];
Marcel Baur03287451999-02-14 11:28:37 +000048
49 FINDREPLACE find;
50 WORD nCommdlgFindReplaceMsg;
51 CHAR Buffer[12000];
Alexandre Julliard02e90081998-01-04 17:49:09 +000052} NOTEPAD_GLOBALS;
53
54extern NOTEPAD_GLOBALS Globals;
55
56/* function prototypes */
57
Mike McCormack0e2d0e02000-07-23 14:22:47 +000058void TrashBuffer(void);
59void LoadBufferFromFile(LPCSTR lpFileName);
60
Alexandre Julliard02e90081998-01-04 17:49:09 +000061/* class names */
62
Alexandre Julliard03468f71998-02-15 19:40:49 +000063/* Resource names */
64extern CHAR STRING_MENU_Xx[];
65extern CHAR STRING_PAGESETUP_Xx[];
Alexandre Julliard02e90081998-01-04 17:49:09 +000066
Alexandre Julliard03468f71998-02-15 19:40:49 +000067#define STRINGID(id) (0x##id + Globals.wStringTableOffset)
Alexandre Julliard02e90081998-01-04 17:49:09 +000068
69#else /* RC_INVOKED */
70
Alexandre Julliard03468f71998-02-15 19:40:49 +000071#define STRINGID(id) id
Alexandre Julliard02e90081998-01-04 17:49:09 +000072
73#endif
74
75/* string table index */
Alexandre Julliarddadf78f1998-05-17 17:13:43 +000076#define IDS_LANGUAGE_ID STRINGID(00)
77#define IDS_LANGUAGE_MENU_ITEM STRINGID(01)
78#define IDS_NOTEPAD STRINGID(02)
79#define IDS_TEXT_FILES_TXT STRINGID(03)
80#define IDS_ALL_FILES STRINGID(04)
81#define IDS_ERROR STRINGID(05)
82#define IDS_WARNING STRINGID(06)
83#define IDS_INFO STRINGID(07)
84#define IDS_TOOLARGE STRINGID(08)
85#define IDS_NOTEXT STRINGID(09)
Marcel Baur03287451999-02-14 11:28:37 +000086#define IDS_NOTSAVED STRINGID(0A)
87#define IDS_NOTFOUND STRINGID(0B)
88#define IDS_OUT_OF_MEMORY STRINGID(0C)
89#define IDS_UNTITLED STRINGID(0D)
Alexandre Julliard02e90081998-01-04 17:49:09 +000090
Ulrich Weigand97d05c82000-01-29 22:07:03 +000091#define IDS_PAGESETUP_HEADERVALUE STRINGID(0E)
92#define IDS_PAGESETUP_FOOTERVALUE STRINGID(0F)
93#define IDS_PAGESETUP_LEFTVALUE STRINGID(10)
94#define IDS_PAGESETUP_RIGHTVALUE STRINGID(11)
95#define IDS_PAGESETUP_TOPVALUE STRINGID(12)
96#define IDS_PAGESETUP_BOTTOMVALUE STRINGID(13)
Marcel Baura43295d1998-10-18 14:11:42 +000097
Alexandre Julliard02e90081998-01-04 17:49:09 +000098/* main menu */
99
100#define NP_FILE_NEW 100
101#define NP_FILE_OPEN 101
102#define NP_FILE_SAVE 102
103#define NP_FILE_SAVEAS 103
104#define NP_FILE_PRINT 104
105#define NP_FILE_PAGESETUP 105
106#define NP_FILE_PRINTSETUP 106
107#define NP_FILE_EXIT 107
108
109#define NP_EDIT_UNDO 200
110#define NP_EDIT_CUT 201
111#define NP_EDIT_COPY 202
112#define NP_EDIT_PASTE 203
113#define NP_EDIT_DELETE 204
114#define NP_EDIT_SELECTALL 205
115#define NP_EDIT_TIMEDATE 206
116#define NP_EDIT_WRAP 207
117
118#define NP_SEARCH_SEARCH 300
119#define NP_SEARCH_NEXT 301
120
121#define NP_FIRST_LANGUAGE 400
122#define NP_LAST_LANGUAGE 499
123
124#define NP_HELP_CONTENTS 500
125#define NP_HELP_SEARCH 501
126#define NP_HELP_ON_HELP 502
127#define NP_HELP_LICENSE 503
128#define NP_HELP_NO_WARRANTY 504
129#define NP_HELP_ABOUT_WINE 505
130
131
132/* Dialog `Page Setup' */
133
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000134#define NP_PAGESETUP_HEAD 1000
135#define NP_PAGESETUP_HEAD_TXT 1001
136#define NP_PAGESETUP_TAIL 1002
137#define NP_PAGESETUP_TAIL_TXT 1003
Marcel Baura43295d1998-10-18 14:11:42 +0000138#define NP_PAGESETUP_LEFT 1004
139#define NP_PAGESETUP_LEFT_TXT 1005
140#define NP_PAGESETUP_RIGHT 1006
141#define NP_PAGESETUP_RIGHT_TXT 1007
142#define NP_PAGESETUP_TOP 1008
143#define NP_PAGESETUP_TOP_TXT 1009
144#define NP_PAGESETUP_BOTTOM 1010
145#define NP_PAGESETUP_BOTTOM_TXT 1011
146#define NP_HELP 1012
147#define NP_PAGESETUP_MARGIN 1013
Alexandre Julliard02e90081998-01-04 17:49:09 +0000148
149/* Local Variables: */
150/* c-file-style: "GNU" */
151/* End: */