Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compi...
[reactos.git] / base / applications / wordpad / wordpad.h
1 /*
2 * Copyright 2004 by Krzysztof Foltman
3 * Copyright 2007-2008 by Alexander N. Sørnes <alex@thehandofagony.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #define MAX_STRING_LEN 255
21
22 #define TWIPS_PER_INCH 1440
23 #define CENTMM_PER_INCH 2540
24
25 #define ID_FILE_EXIT 1000
26 #define ID_FILE_OPEN 1001
27 #define ID_FILE_SAVE 1002
28 #define ID_FILE_NEW 1003
29 #define ID_FILE_SAVEAS 1004
30
31 #define ID_FILE_RECENT1 1005
32 #define ID_FILE_RECENT2 1006
33 #define ID_FILE_RECENT3 1007
34 #define ID_FILE_RECENT4 1008
35 #define ID_FILE_RECENT_SEPARATOR 1009
36
37 #define ID_PRINT 1010
38 #define ID_PREVIEW 1011
39 #define ID_PRINTSETUP 1012
40 #define ID_PRINT_QUICK 1013
41
42 #define ID_FIND 1014
43 #define ID_FIND_NEXT 1015
44 #define ID_REPLACE 1016
45
46 #define ID_PREVIEW_NEXTPAGE 1017
47 #define ID_PREVIEW_PREVPAGE 1018
48 #define ID_PREVIEW_NUMPAGES 1019
49
50 #define ID_ALIGN_LEFT 1100
51 #define ID_ALIGN_CENTER 1101
52 #define ID_ALIGN_RIGHT 1102
53
54 #define ID_BACK_1 1200
55 #define ID_BACK_2 1201
56
57 #define ID_EDIT_SELECTALL 1300
58 #define ID_EDIT_SELECTIONINFO 1301
59 #define ID_EDIT_READONLY 1302
60 #define ID_EDIT_MODIFIED 1303
61 #define ID_EDIT_CHARFORMAT 1304
62 #define ID_EDIT_PARAFORMAT 1305
63 #define ID_EDIT_DEFCHARFORMAT 1306
64 #define ID_EDIT_UNDO 1307
65 #define ID_EDIT_REDO 1308
66 #define ID_EDIT_GETTEXT 1309
67 #define ID_EDIT_COPY 1310
68 #define ID_EDIT_CUT 1311
69 #define ID_EDIT_PASTE 1312
70 #define ID_EDIT_CLEAR 1313
71 #define ID_BULLET 1314
72
73 #define ID_FONTSETTINGS 1315
74
75 #define ID_FORMAT_BOLD 1400
76 #define ID_FORMAT_ITALIC 1401
77 #define ID_FORMAT_UNDERLINE 1402
78
79 #define ID_TOGGLE_TOOLBAR 1500
80 #define ID_TOGGLE_FORMATBAR 1501
81 #define ID_TOGGLE_STATUSBAR 1502
82 #define ID_TOGGLE_RULER 1503
83
84 #define PREVIEW_BUTTONS 5
85
86 #define FILELIST_ENTRIES 4
87 #define FILELIST_ENTRY_LENGTH 33
88
89 #define BANDID_TOOLBAR 2
90 #define BANDID_FORMATBAR 3
91 #define BANDID_RULER 0
92 #define BANDID_STATUSBAR 1
93 #define BANDID_FONTLIST 4
94 #define BANDID_SIZELIST 5
95
96 #define BANDID_PREVIEW_BTN1 6
97 #define BANDID_PREVIEW_BTN2 7
98 #define BANDID_PREVIEW_BTN3 8
99 #define BANDID_PREVIEW_BTN4 9
100 #define BANDID_PREVIEW_BTN5 10
101 #define BANDID_PREVIEW_BUFFER 11
102
103 #define ID_WORDWRAP_NONE 0
104 #define ID_WORDWRAP_WINDOW 1
105 #define ID_WORDWRAP_MARGIN 2
106
107 #define ID_NEWFILE_ABORT 100
108
109 #define ID_TAB_ADD 100
110 #define ID_TAB_DEL 101
111 #define ID_TAB_EMPTY 102
112
113 #define IDC_PAGEFMT_TB 100
114 #define IDC_PAGEFMT_FB 101
115 #define IDC_PAGEFMT_RU 102
116 #define IDC_PAGEFMT_SB 103
117 #define IDC_PAGEFMT_WN 104
118 #define IDC_PAGEFMT_WW 105
119 #define IDC_PAGEFMT_WM 106
120 #define IDC_PAGEFMT_ID 107
121
122 #define ID_DATETIME 1600
123 #define ID_PARAFORMAT 1601
124 #define ID_TABSTOPS 1602
125
126 #define ID_ABOUT 1603
127 #define ID_VIEWPROPERTIES 1604
128
129 #define IDC_STATUSBAR 2000
130 #define IDC_EDITOR 2001
131 #define IDC_TOOLBAR 2002
132 #define IDC_FORMATBAR 2003
133 #define IDC_REBAR 2004
134 #define IDC_COMBO 2005
135 #define IDC_DATETIME 2006
136 #define IDC_NEWFILE 2007
137 #define IDC_PARA_LEFT 2008
138 #define IDC_PARA_RIGHT 2009
139 #define IDC_PARA_FIRST 2010
140 #define IDC_PARA_ALIGN 2011
141 #define IDC_TABSTOPS 2012
142 #define IDC_FONTLIST 2013
143 #define IDC_SIZELIST 2014
144 #define IDC_RULER 2015
145
146 #define IDD_DATETIME 2100
147 #define IDD_NEWFILE 2101
148 #define IDD_PARAFORMAT 2102
149 #define IDD_TABSTOPS 2103
150 #define IDD_FORMATOPTS 2104
151
152 #define IDM_MAINMENU 2200
153 #define IDM_POPUP 2201
154
155 #define IDB_TOOLBAR 100
156 #define IDB_FORMATBAR 101
157
158 #define IDI_WORDPAD 102
159 #define IDI_RTF 103
160 #define IDI_WRI 104
161 #define IDI_TXT 105
162
163 #define STRING_ALL_FILES 1400
164 #define STRING_TEXT_FILES_TXT 1401
165 #define STRING_TEXT_FILES_UNICODE_TXT 1402
166 #define STRING_RICHTEXT_FILES_RTF 1403
167
168 #define STRING_NEWFILE_RICHTEXT 1404
169 #define STRING_NEWFILE_TXT 1405
170 #define STRING_NEWFILE_TXT_UNICODE 1406
171
172 #define STRING_ALIGN_LEFT 1407
173 #define STRING_ALIGN_RIGHT 1408
174 #define STRING_ALIGN_CENTER 1409
175
176 #define STRING_PRINTER_FILES_PRN 1410
177
178 #define STRING_VIEWPROPS_TITLE 1411
179 #define STRING_VIEWPROPS_TEXT 1412
180 #define STRING_VIEWPROPS_RICHTEXT 1413
181
182 #define STRING_PREVIEW_PRINT 1414
183 #define STRING_PREVIEW_NEXTPAGE 1415
184 #define STRING_PREVIEW_PREVPAGE 1416
185 #define STRING_PREVIEW_TWOPAGES 1417
186 #define STRING_PREVIEW_ONEPAGE 1418
187 #define STRING_PREVIEW_CLOSE 1419
188
189 #define STRING_UNITS_CM 1420
190
191 #define STRING_DEFAULT_FILENAME 1700
192 #define STRING_PROMPT_SAVE_CHANGES 1701
193 #define STRING_SEARCH_FINISHED 1702
194 #define STRING_LOAD_RICHED_FAILED 1703
195 #define STRING_SAVE_LOSEFORMATTING 1704
196 #define STRING_INVALID_NUMBER 1705
197 #define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
198 #define STRING_WRITE_FAILED 1707
199 #define STRING_WRITE_ACCESS_DENIED 1708
200 #define STRING_OPEN_FAILED 1709
201 #define STRING_OPEN_ACCESS_DENIED 1710
202 #define STRING_PRINTING_NOT_IMPLEMENTED 1711
203
204 LPWSTR file_basename(LPWSTR);
205
206 void dialog_printsetup(HWND);
207 void dialog_print(HWND, LPWSTR);
208 void target_device(HWND, DWORD);
209 void print_quick(LPWSTR);
210 LRESULT preview_command(HWND, WPARAM);
211 void init_preview(HWND, LPWSTR);
212 void close_preview(HWND);
213 BOOL preview_isactive(void);
214 LRESULT print_preview(HWND);
215 void get_default_printer_opts(void);
216 void registry_set_pagemargins(HKEY);
217 void registry_read_pagemargins(HKEY);
218 LRESULT CALLBACK ruler_proc(HWND, UINT, WPARAM, LPARAM);
219 void redraw_ruler(HWND);
220
221 int reg_formatindex(WPARAM);
222 void registry_read_filelist(HWND);
223 void registry_read_options(void);
224 void registry_read_formatopts_all(DWORD[], DWORD[]);
225 void registry_read_winrect(RECT*);
226 void registry_read_maximized(DWORD*);
227 void registry_set_filelist(LPCWSTR, HWND);
228 void registry_set_formatopts_all(DWORD[]);
229 void registry_set_options(HWND);