2006-02-14 14:48:29 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2004 by Krzysztof Foltman
|
2008-01-14 00:36:23 +01:00
|
|
|
* Copyright 2007-2008 by Alexander N. Sørnes <alex@thehandofagony.com>
|
2006-02-14 14:48:29 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-02-14 14:48:29 +01:00
|
|
|
*/
|
|
|
|
|
2007-11-11 01:06:46 +01:00
|
|
|
#define MAX_STRING_LEN 255
|
|
|
|
|
2008-01-14 00:36:23 +01:00
|
|
|
#define TWIPS_PER_CM 567
|
|
|
|
|
2006-02-14 14:48:29 +01:00
|
|
|
#define ID_FILE_EXIT 1000
|
|
|
|
#define ID_FILE_OPEN 1001
|
|
|
|
#define ID_FILE_SAVE 1002
|
|
|
|
#define ID_FILE_NEW 1003
|
2007-05-31 15:38:51 +02:00
|
|
|
#define ID_FILE_SAVEAS 1004
|
2006-02-14 14:48:29 +01:00
|
|
|
|
2007-07-18 15:41:57 +02:00
|
|
|
#define ID_FILE_RECENT1 1005
|
|
|
|
#define ID_FILE_RECENT2 1006
|
|
|
|
#define ID_FILE_RECENT3 1007
|
|
|
|
#define ID_FILE_RECENT4 1008
|
|
|
|
#define ID_FILE_RECENT_SEPARATOR 1009
|
2007-02-24 21:00:08 +01:00
|
|
|
|
2007-07-18 15:41:57 +02:00
|
|
|
#define ID_PRINT 1010
|
|
|
|
#define ID_PREVIEW 1011
|
2007-08-23 01:38:08 +02:00
|
|
|
#define ID_PRINTSETUP 1012
|
2007-08-23 15:00:44 +02:00
|
|
|
#define ID_PRINT_QUICK 1013
|
2007-07-18 15:41:57 +02:00
|
|
|
|
2007-08-23 15:00:44 +02:00
|
|
|
#define ID_FIND 1014
|
|
|
|
#define ID_FIND_NEXT 1015
|
2007-08-26 15:01:44 +02:00
|
|
|
#define ID_REPLACE 1016
|
2007-02-24 21:00:08 +01:00
|
|
|
|
2007-08-26 15:01:44 +02:00
|
|
|
#define ID_PREVIEW_NEXTPAGE 1017
|
|
|
|
#define ID_PREVIEW_PREVPAGE 1018
|
2008-03-27 01:39:05 +01:00
|
|
|
#define ID_PREVIEW_NUMPAGES 1019
|
2007-08-23 15:09:49 +02:00
|
|
|
|
2006-02-14 14:48:29 +01:00
|
|
|
#define ID_ALIGN_LEFT 1100
|
|
|
|
#define ID_ALIGN_CENTER 1101
|
|
|
|
#define ID_ALIGN_RIGHT 1102
|
|
|
|
|
|
|
|
#define ID_BACK_1 1200
|
|
|
|
#define ID_BACK_2 1201
|
|
|
|
|
|
|
|
#define ID_EDIT_SELECTALL 1300
|
|
|
|
#define ID_EDIT_SELECTIONINFO 1301
|
|
|
|
#define ID_EDIT_READONLY 1302
|
|
|
|
#define ID_EDIT_MODIFIED 1303
|
|
|
|
#define ID_EDIT_CHARFORMAT 1304
|
|
|
|
#define ID_EDIT_PARAFORMAT 1305
|
|
|
|
#define ID_EDIT_DEFCHARFORMAT 1306
|
|
|
|
#define ID_EDIT_UNDO 1307
|
|
|
|
#define ID_EDIT_REDO 1308
|
|
|
|
#define ID_EDIT_GETTEXT 1309
|
|
|
|
#define ID_EDIT_COPY 1310
|
|
|
|
#define ID_EDIT_CUT 1311
|
2007-02-25 14:38:50 +01:00
|
|
|
#define ID_EDIT_PASTE 1312
|
2007-02-25 14:39:58 +01:00
|
|
|
#define ID_EDIT_CLEAR 1313
|
2007-07-20 18:38:08 +02:00
|
|
|
#define ID_BULLET 1314
|
2006-02-14 14:48:29 +01:00
|
|
|
|
2007-08-25 16:54:02 +02:00
|
|
|
#define ID_FONTSETTINGS 1315
|
|
|
|
|
2006-02-14 14:48:29 +01:00
|
|
|
#define ID_FORMAT_BOLD 1400
|
|
|
|
#define ID_FORMAT_ITALIC 1401
|
|
|
|
#define ID_FORMAT_UNDERLINE 1402
|
|
|
|
|
2007-06-06 11:10:47 +02:00
|
|
|
#define ID_TOGGLE_TOOLBAR 1500
|
2007-06-06 13:28:26 +02:00
|
|
|
#define ID_TOGGLE_FORMATBAR 1501
|
|
|
|
#define ID_TOGGLE_STATUSBAR 1502
|
2008-01-14 00:36:23 +01:00
|
|
|
#define ID_TOGGLE_RULER 1503
|
2007-06-06 11:10:47 +02:00
|
|
|
|
2008-03-27 01:39:05 +01:00
|
|
|
#define PREVIEW_BUTTONS 5
|
2007-08-23 15:09:49 +02:00
|
|
|
|
2007-07-18 15:41:57 +02:00
|
|
|
#define FILELIST_ENTRIES 4
|
|
|
|
#define FILELIST_ENTRY_LENGTH 33
|
|
|
|
|
2007-08-22 22:41:25 +02:00
|
|
|
#define BANDID_TOOLBAR 2
|
|
|
|
#define BANDID_FORMATBAR 3
|
|
|
|
#define BANDID_RULER 0
|
|
|
|
#define BANDID_STATUSBAR 1
|
2007-08-24 15:46:09 +02:00
|
|
|
#define BANDID_FONTLIST 4
|
2007-08-24 19:45:54 +02:00
|
|
|
#define BANDID_SIZELIST 5
|
2007-08-22 22:41:25 +02:00
|
|
|
|
2007-08-24 19:45:54 +02:00
|
|
|
#define BANDID_PREVIEW_BTN1 6
|
|
|
|
#define BANDID_PREVIEW_BTN2 7
|
|
|
|
#define BANDID_PREVIEW_BTN3 8
|
|
|
|
#define BANDID_PREVIEW_BTN4 9
|
2008-03-27 01:39:05 +01:00
|
|
|
#define BANDID_PREVIEW_BTN5 10
|
|
|
|
#define BANDID_PREVIEW_BUFFER 11
|
2007-08-23 15:09:49 +02:00
|
|
|
|
2007-08-23 15:08:41 +02:00
|
|
|
#define ID_WORDWRAP_NONE 0
|
|
|
|
#define ID_WORDWRAP_WINDOW 1
|
|
|
|
#define ID_WORDWRAP_MARGIN 2
|
|
|
|
|
2007-07-18 22:27:15 +02:00
|
|
|
#define ID_NEWFILE_ABORT 100
|
|
|
|
|
2007-08-23 01:27:50 +02:00
|
|
|
#define ID_TAB_ADD 100
|
|
|
|
#define ID_TAB_DEL 101
|
|
|
|
#define ID_TAB_EMPTY 102
|
|
|
|
|
2007-08-23 15:08:41 +02:00
|
|
|
#define IDC_PAGEFMT_TB 100
|
|
|
|
#define IDC_PAGEFMT_FB 101
|
2008-01-14 00:36:23 +01:00
|
|
|
#define IDC_PAGEFMT_RU 102
|
|
|
|
#define IDC_PAGEFMT_SB 103
|
|
|
|
#define IDC_PAGEFMT_WW 104
|
|
|
|
#define IDC_PAGEFMT_WM 105
|
|
|
|
#define IDC_PAGEFMT_ID 106
|
2007-08-23 15:08:41 +02:00
|
|
|
|
2007-07-18 15:50:21 +02:00
|
|
|
#define ID_DATETIME 1600
|
2007-08-23 01:15:17 +02:00
|
|
|
#define ID_PARAFORMAT 1601
|
2007-08-23 01:27:50 +02:00
|
|
|
#define ID_TABSTOPS 1602
|
2007-07-18 15:50:21 +02:00
|
|
|
|
2007-08-23 15:05:40 +02:00
|
|
|
#define ID_ABOUT 1603
|
2007-08-23 15:08:41 +02:00
|
|
|
#define ID_VIEWPROPERTIES 1604
|
2007-08-23 15:05:40 +02:00
|
|
|
|
2006-02-14 14:48:29 +01:00
|
|
|
#define IDC_STATUSBAR 2000
|
|
|
|
#define IDC_EDITOR 2001
|
|
|
|
#define IDC_TOOLBAR 2002
|
2007-06-06 13:28:26 +02:00
|
|
|
#define IDC_FORMATBAR 2003
|
|
|
|
#define IDC_REBAR 2004
|
|
|
|
#define IDC_COMBO 2005
|
2007-07-18 15:50:21 +02:00
|
|
|
#define IDC_DATETIME 2006
|
2007-07-18 22:27:15 +02:00
|
|
|
#define IDC_NEWFILE 2007
|
2007-08-23 01:15:17 +02:00
|
|
|
#define IDC_PARA_LEFT 2008
|
|
|
|
#define IDC_PARA_RIGHT 2009
|
|
|
|
#define IDC_PARA_FIRST 2010
|
|
|
|
#define IDC_PARA_ALIGN 2011
|
2007-08-23 01:27:50 +02:00
|
|
|
#define IDC_TABSTOPS 2012
|
2007-08-24 15:46:09 +02:00
|
|
|
#define IDC_FONTLIST 2013
|
2007-08-24 19:45:54 +02:00
|
|
|
#define IDC_SIZELIST 2014
|
2008-01-14 00:36:23 +01:00
|
|
|
#define IDC_RULER 2015
|
2007-07-18 15:50:21 +02:00
|
|
|
|
|
|
|
#define IDD_DATETIME 2100
|
2007-07-18 22:27:15 +02:00
|
|
|
#define IDD_NEWFILE 2101
|
2007-08-23 01:15:17 +02:00
|
|
|
#define IDD_PARAFORMAT 2102
|
2007-08-23 01:27:50 +02:00
|
|
|
#define IDD_TABSTOPS 2103
|
2007-08-23 15:08:41 +02:00
|
|
|
#define IDD_FORMATOPTS 2104
|
2006-02-14 14:48:29 +01:00
|
|
|
|
2007-11-04 12:34:03 +01:00
|
|
|
#define IDM_MAINMENU 2200
|
|
|
|
#define IDM_POPUP 2201
|
2007-08-23 15:05:23 +02:00
|
|
|
|
2007-07-18 15:50:43 +02:00
|
|
|
#define IDB_TOOLBAR 100
|
|
|
|
#define IDB_FORMATBAR 101
|
2007-02-25 14:40:27 +01:00
|
|
|
|
2007-07-18 15:50:43 +02:00
|
|
|
#define IDI_WORDPAD 102
|
2007-08-25 20:41:30 +02:00
|
|
|
#define IDI_RTF 103
|
|
|
|
#define IDI_WRI 104
|
|
|
|
#define IDI_TXT 105
|
2007-05-29 22:19:36 +02:00
|
|
|
|
2007-02-25 14:40:27 +01:00
|
|
|
#define STRING_ALL_FILES 1400
|
|
|
|
#define STRING_TEXT_FILES_TXT 1401
|
2007-07-18 21:59:24 +02:00
|
|
|
#define STRING_TEXT_FILES_UNICODE_TXT 1402
|
|
|
|
#define STRING_RICHTEXT_FILES_RTF 1403
|
|
|
|
|
2007-07-18 22:27:15 +02:00
|
|
|
#define STRING_NEWFILE_RICHTEXT 1404
|
|
|
|
#define STRING_NEWFILE_TXT 1405
|
|
|
|
#define STRING_NEWFILE_TXT_UNICODE 1406
|
|
|
|
|
2007-08-23 01:15:17 +02:00
|
|
|
#define STRING_ALIGN_LEFT 1407
|
|
|
|
#define STRING_ALIGN_RIGHT 1408
|
|
|
|
#define STRING_ALIGN_CENTER 1409
|
|
|
|
|
2007-08-23 01:36:29 +02:00
|
|
|
#define STRING_PRINTER_FILES_PRN 1410
|
|
|
|
|
2007-08-23 15:08:41 +02:00
|
|
|
#define STRING_VIEWPROPS_TITLE 1411
|
|
|
|
#define STRING_VIEWPROPS_TEXT 1412
|
|
|
|
#define STRING_VIEWPROPS_RICHTEXT 1413
|
|
|
|
|
2007-08-23 15:09:49 +02:00
|
|
|
#define STRING_PREVIEW_PRINT 1414
|
|
|
|
#define STRING_PREVIEW_NEXTPAGE 1415
|
|
|
|
#define STRING_PREVIEW_PREVPAGE 1416
|
2008-03-27 01:39:05 +01:00
|
|
|
#define STRING_PREVIEW_TWOPAGES 1417
|
|
|
|
#define STRING_PREVIEW_ONEPAGE 1418
|
|
|
|
#define STRING_PREVIEW_CLOSE 1419
|
2007-08-23 15:09:49 +02:00
|
|
|
|
2008-03-27 01:39:05 +01:00
|
|
|
#define STRING_UNITS_CM 1420
|
2007-08-23 01:15:17 +02:00
|
|
|
|
2007-07-18 21:59:24 +02:00
|
|
|
#define STRING_DEFAULT_FILENAME 1700
|
|
|
|
#define STRING_PROMPT_SAVE_CHANGES 1701
|
|
|
|
#define STRING_SEARCH_FINISHED 1702
|
|
|
|
#define STRING_LOAD_RICHED_FAILED 1703
|
|
|
|
#define STRING_SAVE_LOSEFORMATTING 1704
|
2007-08-23 01:15:17 +02:00
|
|
|
#define STRING_INVALID_NUMBER 1705
|
2007-10-16 15:07:31 +02:00
|
|
|
#define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
|
2008-07-11 20:38:50 +02:00
|
|
|
#define STRING_WRITE_FAILED 1707
|
|
|
|
#define STRING_WRITE_ACCESS_DENIED 1708
|
2007-11-11 01:06:46 +01:00
|
|
|
|
2007-12-12 09:36:41 +01:00
|
|
|
LPWSTR file_basename(LPWSTR);
|
|
|
|
|
2007-11-11 01:06:46 +01:00
|
|
|
void dialog_printsetup(HWND);
|
|
|
|
void dialog_print(HWND, LPWSTR);
|
|
|
|
void target_device(HWND, DWORD);
|
|
|
|
void print_quick(LPWSTR);
|
|
|
|
LRESULT preview_command(HWND, WPARAM, LPARAM);
|
|
|
|
void init_preview(HWND, LPWSTR);
|
|
|
|
void close_preview(HWND);
|
|
|
|
BOOL preview_isactive(void);
|
|
|
|
LRESULT print_preview(HWND);
|
|
|
|
void get_default_printer_opts(void);
|
|
|
|
void registry_set_pagemargins(HKEY);
|
|
|
|
void registry_read_pagemargins(HKEY);
|
2008-01-14 00:36:23 +01:00
|
|
|
LRESULT CALLBACK ruler_proc(HWND, UINT, WPARAM, LPARAM);
|
|
|
|
void redraw_ruler(HWND);
|
2007-12-12 09:36:41 +01:00
|
|
|
|
|
|
|
int reg_formatindex(WPARAM);
|
|
|
|
void registry_read_filelist(HWND);
|
|
|
|
void registry_read_options(void);
|
|
|
|
void registry_read_formatopts_all(DWORD[], DWORD[]);
|
|
|
|
void registry_read_winrect(RECT*);
|
2008-07-03 18:51:17 +02:00
|
|
|
void registry_read_maximized(DWORD*);
|
2007-12-12 09:36:41 +01:00
|
|
|
void registry_set_filelist(LPCWSTR, HWND);
|
|
|
|
void registry_set_formatopts_all(DWORD[]);
|
|
|
|
void registry_set_options(HWND);
|