xref: /haiku/src/apps/stylededit/Constants.h (revision 2cad94c1c30b6223ad8c08710b26e071d32e9979)
1 /*
2  * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Mattias Sundblad
7  *		Andrew Bachmann
8  */
9 #ifndef CONSTANTS_H
10 #define CONSTANTS_H
11 
12 
13 #include <GraphicsDefs.h>
14 #include <SupportDefs.h>
15 
16 
17 #define APP_SIGNATURE  "application/x-vnd.Haiku-StyledEdit"
18 
19 const float TEXT_INSET = 3.0;
20 
21 // Messages for menu commands
22 
23 // file menu
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';
33 
34 // edit menu
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';
41 
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 
48 // "Font"-menu
49 const uint32 FONT_SIZE					= 'FMsi';
50 const uint32 FONT_FAMILY				= 'FFch';
51 const uint32 FONT_STYLE					= 'FSch';
52 const uint32 FONT_COLOR					= 'Fcol';
53 const uint32 kMsgSetItalic				= 'Fita';
54 const uint32 kMsgSetBold				= 'Fbld';
55 
56 const rgb_color palette[] = {
57 	{ 220, 0, 0, 255 },		// red
58 	{ 220, 73, 0, 255 },	// orange
59 	{ 220, 220, 0, 255 },	// yellow
60 	{ 59, 177, 0, 255 },	// green
61 	{ 60, 22, 0, 255 },		// brown
62 	{ 36, 71, 106, 255 },	// blue
63 	{ 0, 123, 186, 255 },	// cyan
64 	{ 0, 106, 115, 255 },	// teal
65 	{ 53, 53, 53, 255 },	// charcoal
66 	{ 137, 0, 72, 255 },	// magenta
67 	{ 0, 0, 0, 255 },		//black
68 	{ 255, 255, 255, 255 }	// white
69 };
70 
71 // "Document"-menu
72 const uint32 ALIGN_LEFT					= 'ALle';
73 const uint32 ALIGN_CENTER				= 'ALce';
74 const uint32 ALIGN_RIGHT				= 'ALri';
75 const uint32 WRAP_LINES					= 'MDwr';
76 const uint32 SHOW_STATISTICS			= 'MDss';
77 
78 // enables "edit" menuitems
79 const uint32 ENABLE_ITEMS				= 'ENit';
80 const uint32 DISABLE_ITEMS				= 'DIit';
81 const uint32 CHANGE_WINDOW				= 'CHwi';
82 const uint32 TEXT_CHANGED				= 'TEch';
83 
84 // file panel constants
85 const uint32 OPEN_AS_ENCODING			= 'FPoe';
86 const uint32 SAVE_AS_ENCODING			= 'FPse';
87 const uint32 SAVE_THEN_QUIT				= 'FPsq';
88 
89 // Update StatusView
90 const uint32 UPDATE_STATUS				= 'UPSt';
91 const uint32 UPDATE_STATUS_REF			= 'UPSr';
92 const uint32 UNLOCK_FILE				= 'UNLk';
93 const uint32 UPDATE_LINE_SELECTION		= 'UPls';
94 
95 #endif	// CONSTANTS_H
96 
97