ReactOS  0.4.12-dev-18-gf469aca
wordpad.h
Go to the documentation of this file.
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 #pragma once
21 
22 #define MAX_STRING_LEN 255
23 
24 #define TWIPS_PER_INCH 1440
25 #define CENTMM_PER_INCH 2540
26 
27 #define ID_FILE_EXIT 1000
28 #define ID_FILE_OPEN 1001
29 #define ID_FILE_SAVE 1002
30 #define ID_FILE_NEW 1003
31 #define ID_FILE_SAVEAS 1004
32 
33 #define ID_FILE_RECENT1 1005
34 #define ID_FILE_RECENT2 1006
35 #define ID_FILE_RECENT3 1007
36 #define ID_FILE_RECENT4 1008
37 #define ID_FILE_RECENT_SEPARATOR 1009
38 
39 #define ID_PRINT 1010
40 #define ID_PREVIEW 1011
41 #define ID_PRINTSETUP 1012
42 #define ID_PRINT_QUICK 1013
43 
44 #define ID_FIND 1014
45 #define ID_FIND_NEXT 1015
46 #define ID_REPLACE 1016
47 
48 #define ID_PREVIEW_NEXTPAGE 1017
49 #define ID_PREVIEW_PREVPAGE 1018
50 #define ID_PREVIEW_NUMPAGES 1019
51 #define ID_PREVIEW_ZOOMIN 1020
52 #define ID_PREVIEW_ZOOMOUT 1021
53 
54 #define ID_ALIGN_LEFT 1100
55 #define ID_ALIGN_CENTER 1101
56 #define ID_ALIGN_RIGHT 1102
57 
58 #define ID_BACK_1 1200
59 #define ID_BACK_2 1201
60 
61 #define ID_EDIT_SELECTALL 1300
62 #define ID_EDIT_SELECTIONINFO 1301
63 #define ID_EDIT_READONLY 1302
64 #define ID_EDIT_MODIFIED 1303
65 #define ID_EDIT_CHARFORMAT 1304
66 #define ID_EDIT_PARAFORMAT 1305
67 #define ID_EDIT_DEFCHARFORMAT 1306
68 #define ID_EDIT_UNDO 1307
69 #define ID_EDIT_REDO 1308
70 #define ID_EDIT_GETTEXT 1309
71 #define ID_EDIT_COPY 1310
72 #define ID_EDIT_CUT 1311
73 #define ID_EDIT_PASTE 1312
74 #define ID_EDIT_CLEAR 1313
75 #define ID_BULLET 1314
76 
77 #define ID_FONTSETTINGS 1315
78 
79 #define ID_FORMAT_BOLD 1400
80 #define ID_FORMAT_ITALIC 1401
81 #define ID_FORMAT_UNDERLINE 1402
82 #define ID_FORMAT_COLOR 1403
83 
84 #define ID_TOGGLE_TOOLBAR 1500
85 #define ID_TOGGLE_FORMATBAR 1501
86 #define ID_TOGGLE_STATUSBAR 1502
87 #define ID_TOGGLE_RULER 1503
88 
89 #define PREVIEW_BUTTONS 7
90 
91 #define FILELIST_ENTRIES 4
92 #define FILELIST_ENTRY_LENGTH 33
93 
94 #define BANDID_TOOLBAR 2
95 #define BANDID_FORMATBAR 3
96 #define BANDID_RULER 0
97 #define BANDID_STATUSBAR 1
98 #define BANDID_FONTLIST 4
99 #define BANDID_SIZELIST 5
100 
101 #define BANDID_PREVIEW_BTN1 6
102 #define BANDID_PREVIEW_BTN2 7
103 #define BANDID_PREVIEW_BTN3 8
104 #define BANDID_PREVIEW_BTN4 9
105 #define BANDID_PREVIEW_BTN5 10
106 #define BANDID_PREVIEW_BTN6 11
107 #define BANDID_PREVIEW_BTN7 12
108 #define BANDID_PREVIEW_BUFFER 13
109 
110 #define ID_WORDWRAP_NONE 0
111 #define ID_WORDWRAP_WINDOW 1
112 #define ID_WORDWRAP_MARGIN 2
113 
114 #define ID_NEWFILE_ABORT 100
115 
116 #define ID_TAB_ADD 100
117 #define ID_TAB_DEL 101
118 #define ID_TAB_EMPTY 102
119 
120 #define IDC_PAGEFMT_TB 100
121 #define IDC_PAGEFMT_FB 101
122 #define IDC_PAGEFMT_RU 102
123 #define IDC_PAGEFMT_SB 103
124 #define IDC_PAGEFMT_WN 104
125 #define IDC_PAGEFMT_WW 105
126 #define IDC_PAGEFMT_WM 106
127 #define IDC_PAGEFMT_ID 107
128 
129 #define ID_DATETIME 1600
130 #define ID_PARAFORMAT 1601
131 #define ID_TABSTOPS 1602
132 
133 #define ID_ABOUT 1603
134 #define ID_VIEWPROPERTIES 1604
135 
136 #define ID_COLOR_FIRST 1800
137 #define ID_COLOR_BLACK 1800
138 #define ID_COLOR_MAROON 1801
139 #define ID_COLOR_GREEN 1802
140 #define ID_COLOR_OLIVE 1803
141 #define ID_COLOR_NAVY 1804
142 #define ID_COLOR_PURPLE 1805
143 #define ID_COLOR_TEAL 1806
144 #define ID_COLOR_GRAY 1807
145 #define ID_COLOR_SILVER 1808
146 #define ID_COLOR_RED 1809
147 #define ID_COLOR_LIME 1810
148 #define ID_COLOR_YELLOW 1811
149 #define ID_COLOR_BLUE 1812
150 #define ID_COLOR_FUCHSIA 1813
151 #define ID_COLOR_AQUA 1814
152 #define ID_COLOR_WHITE 1815
153 #define ID_COLOR_AUTOMATIC 1816
154 
155 #define IDC_STATUSBAR 2000
156 #define IDC_EDITOR 2001
157 #define IDC_TOOLBAR 2002
158 #define IDC_FORMATBAR 2003
159 #define IDC_REBAR 2004
160 #define IDC_COMBO 2005
161 #define IDC_DATETIME 2006
162 #define IDC_NEWFILE 2007
163 #define IDC_PARA_LEFT 2008
164 #define IDC_PARA_RIGHT 2009
165 #define IDC_PARA_FIRST 2010
166 #define IDC_PARA_ALIGN 2011
167 #define IDC_TABSTOPS 2012
168 #define IDC_FONTLIST 2013
169 #define IDC_SIZELIST 2014
170 #define IDC_RULER 2015
171 #define IDC_PREVIEW 2016
172 
173 #define IDD_DATETIME 2100
174 #define IDD_NEWFILE 2101
175 #define IDD_PARAFORMAT 2102
176 #define IDD_TABSTOPS 2103
177 #define IDD_FORMATOPTS 2104
178 
179 #define IDM_MAINMENU 2200
180 #define IDM_POPUP 2201
181 #define IDM_COLOR_POPUP 2202
182 
183 #define IDB_TOOLBAR 100
184 #define IDB_FORMATBAR 101
185 
186 #define IDI_WORDPAD 102
187 
188 #ifdef __REACTOS__
189 
190 #define IDI_RTFDOC 103
191 #define IDC_ZOOM 104
192 
193 #else
194 
195 #define IDC_ZOOM 103
196 
197 #endif
198 
199 #define STRING_ALL_FILES 1400
200 #define STRING_TEXT_FILES_TXT 1401
201 #define STRING_TEXT_FILES_UNICODE_TXT 1402
202 #define STRING_RICHTEXT_FILES_RTF 1403
203 
204 #define STRING_NEWFILE_RICHTEXT 1404
205 #define STRING_NEWFILE_TXT 1405
206 #define STRING_NEWFILE_TXT_UNICODE 1406
207 
208 #define STRING_PRINTER_FILES_PRN 1407
209 
210 #define STRING_ALIGN_LEFT 1416
211 #define STRING_ALIGN_RIGHT 1417
212 #define STRING_ALIGN_CENTER 1418
213 
214 #define STRING_VIEWPROPS_TITLE 1432
215 #define STRING_VIEWPROPS_TEXT 1433
216 #define STRING_VIEWPROPS_RICHTEXT 1434
217 
218 #define STRING_PREVIEW_PRINT 1448
219 #define STRING_PREVIEW_NEXTPAGE 1449
220 #define STRING_PREVIEW_PREVPAGE 1450
221 #define STRING_PREVIEW_TWOPAGES 1451
222 #define STRING_PREVIEW_ONEPAGE 1452
223 #define STRING_PREVIEW_ZOOMIN 1453
224 #define STRING_PREVIEW_ZOOMOUT 1454
225 #define STRING_PREVIEW_CLOSE 1455
226 #define STRING_PREVIEW_PAGE 1456
227 #define STRING_PREVIEW_PAGES 1457
228 
229 #define STRING_UNITS_CM 1458
230 #define STRING_UNITS_IN 1459
231 #define STRING_UNITS_INCH 1460
232 #define STRING_UNITS_PT 1461
233 
234 #define STRING_DEFAULT_FILENAME 1700
235 #define STRING_PROMPT_SAVE_CHANGES 1701
236 #define STRING_SEARCH_FINISHED 1702
237 #define STRING_LOAD_RICHED_FAILED 1703
238 #define STRING_SAVE_LOSEFORMATTING 1704
239 #define STRING_INVALID_NUMBER 1705
240 #define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
241 #define STRING_WRITE_FAILED 1707
242 #define STRING_WRITE_ACCESS_DENIED 1708
243 #define STRING_OPEN_FAILED 1709
244 #define STRING_OPEN_ACCESS_DENIED 1710
245 #define STRING_PRINTING_NOT_IMPLEMENTED 1711
246 #define STRING_MAX_TAB_STOPS 1712
247 
248 /* wordpad.c */
250 
251 /* print.c */
252 void dialog_printsetup(HWND);
253 void dialog_print(HWND, LPWSTR);
254 void target_device(HWND, DWORD);
255 void print_quick(HWND, LPWSTR);
257 void init_preview(HWND, LPWSTR);
258 void close_preview(HWND);
259 BOOL preview_isactive(void);
260 void get_default_printer_opts(void);
266 void redraw_ruler(HWND);
267 
268 /* registry.c */
271 void registry_read_options(void);
278 
279 /* olecallback.c */
void registry_read_pagemargins(HKEY)
Definition: print.c:90
void dialog_printsetup(HWND)
Definition: print.c:500
void registry_read_filelist(HWND)
Definition: registry.c:217
#define CALLBACK
Definition: compat.h:27
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static HWND hEditorWnd
Definition: wordpad.c:60
LPWSTR file_basename(LPWSTR)
Definition: wordpad.c:211
UINT_PTR WPARAM
Definition: windef.h:207
LRESULT CALLBACK ruler_proc(HWND, UINT, WPARAM, LPARAM)
Definition: print.c:412
LONG_PTR LPARAM
Definition: windef.h:208
void target_device(HWND, DWORD)
Definition: print.c:209
void registry_set_formatopts_all(DWORD[], DWORD[])
Definition: registry.c:419
void print_quick(HWND, LPWSTR)
Definition: print.c:539
void registry_read_options(void)
Definition: registry.c:335
void init_preview(HWND, LPWSTR)
Definition: print.c:737
void redraw_ruler(HWND)
Definition: print.c:288
void registry_read_winrect(RECT *)
Definition: registry.c:111
void dialog_print(HWND, LPWSTR)
Definition: print.c:551
BOOL preview_isactive(void)
Definition: print.c:781
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG HRESULT
Definition: typedefs.h:77
int reg_formatindex(WPARAM)
Definition: registry.c:330
void registry_read_formatopts_all(DWORD[], DWORD[])
Definition: registry.c:398
unsigned int UINT
Definition: ndis.h:50
void registry_set_filelist(LPCWSTR, HWND)
Definition: registry.c:269
unsigned long DWORD
Definition: ntddk_ex.h:95
void registry_read_previewpages(HKEY hKey)
Definition: print.c:105
void registry_set_previewpages(HKEY hKey)
Definition: print.c:99
void registry_set_options(HWND)
Definition: registry.c:83
void registry_read_maximized(DWORD *)
Definition: registry.c:124
LRESULT preview_command(HWND, WPARAM)
Definition: print.c:1205
void registry_set_pagemargins(HKEY)
Definition: print.c:85
void close_preview(HWND)
Definition: print.c:753
HRESULT setup_richedit_olecallback(HWND hEditorWnd)
Definition: olecallback.c:203
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
void get_default_printer_opts(void)
Definition: print.c:523