2 * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
13 #include <GraphicsDefs.h>
14 #include <SupportDefs.h>
17 #define APP_SIGNATURE "application/x-vnd.Haiku-StyledEdit"
19 const float TEXT_INSET
= 3.0;
21 // Messages for menu commands
24 const uint32 MENU_NEW
= 'MFnw';
25 const uint32 MENU_OPEN
= 'MFop';
26 const uint32 MENU_SAVE
= 'MSav';
27 const uint32 MENU_SAVEAS
= 'MEsa';
28 const uint32 MENU_RELOAD
= 'MFrl';
29 const uint32 MENU_CLOSE
= 'MFcl';
30 const uint32 MENU_PAGESETUP
= 'MFps';
31 const uint32 MENU_PRINT
= 'MFpr';
32 const uint32 MENU_QUIT
= 'MFqu';
35 const uint32 MENU_CLEAR
= 'MEcl';
36 const uint32 MENU_FIND
= 'MEfi';
37 const uint32 MENU_FIND_AGAIN
= 'MEfa';
38 const uint32 MENU_FIND_SELECTION
= 'MEfs';
39 const uint32 MENU_REPLACE
= 'MEre';
40 const uint32 MENU_REPLACE_SAME
= 'MErs';
42 const uint32 MSG_SEARCH
= 'msea';
43 const uint32 MSG_REPLACE
= 'msre';
44 const uint32 MSG_REPLACE_ALL
= 'mrea';
45 const uint32 MSG_HIDE_WINDOW
= 'mhdw';
46 const uint32 MSG_FIND_WINDOW_QUIT
= 'mfwq';
47 const uint32 MSG_REPLACE_WINDOW_QUIT
= 'mrwq';
50 const uint32 FONT_SIZE
= 'FMsi';
51 const uint32 FONT_FAMILY
= 'FFch';
52 const uint32 FONT_STYLE
= 'FSch';
53 const uint32 FONT_COLOR
= 'Fcol';
54 const uint32 kMsgSetItalic
= 'Fita';
55 const uint32 kMsgSetBold
= 'Fbld';
57 const rgb_color palette
[] = {
58 { 220, 0, 0, 255 }, // red
59 { 220, 73, 0, 255 }, // orange
60 { 220, 220, 0, 255 }, // yellow
61 { 59, 177, 0, 255 }, // green
62 { 60, 22, 0, 255 }, // brown
63 { 36, 71, 106, 255 }, // blue
64 { 0, 123, 186, 255 }, // cyan
65 { 0, 106, 115, 255 }, // teal
66 { 53, 53, 53, 255 }, // charcoal
67 { 137, 0, 72, 255 }, // magenta
68 { 0, 0, 0, 255 }, //black
69 { 255, 255, 255, 255 } // white
73 const uint32 ALIGN_LEFT
= 'ALle';
74 const uint32 ALIGN_CENTER
= 'ALce';
75 const uint32 ALIGN_RIGHT
= 'ALri';
76 const uint32 WRAP_LINES
= 'MDwr';
77 const uint32 SHOW_STATISTICS
= 'MDss';
79 // enables "edit" menuitems
80 const uint32 ENABLE_ITEMS
= 'ENit';
81 const uint32 DISABLE_ITEMS
= 'DIit';
82 const uint32 CHANGE_WINDOW
= 'CHwi';
83 const uint32 TEXT_CHANGED
= 'TEch';
85 // file panel constants
86 const uint32 OPEN_AS_ENCODING
= 'FPoe';
87 const uint32 SAVE_AS_ENCODING
= 'FPse';
88 const uint32 SAVE_THEN_QUIT
= 'FPsq';
91 const uint32 UPDATE_STATUS
= 'UPSt';
92 const uint32 UPDATE_STATUS_REF
= 'UPSr';
93 const uint32 UNLOCK_FILE
= 'UNLk';
94 const uint32 UPDATE_LINE_SELECTION
= 'UPls';