1/*
2 * Copyright 2002-2020, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Mattias Sundblad
7 *		Andrew Bachmann
8 *		Pascal R. G. Abresch
9 */
10#ifndef CONSTANTS_H
11#define CONSTANTS_H
12
13
14#include <GraphicsDefs.h>
15#include <SupportDefs.h>
16
17
18#define APP_SIGNATURE  "application/x-vnd.Haiku-StyledEdit"
19
20const float TEXT_INSET = 3.0;
21
22// Messages for menu commands
23
24// file menu
25const uint32 MENU_NEW					= 'MFnw';
26const uint32 MENU_OPEN					= 'MFop';
27const uint32 MENU_SAVE					= 'MSav';
28const uint32 MENU_SAVEAS				= 'MEsa';
29const uint32 MENU_RELOAD				= 'MFrl';
30const uint32 MENU_CLOSE					= 'MFcl';
31const uint32 MENU_PAGESETUP				= 'MFps';
32const uint32 MENU_PRINT					= 'MFpr';
33const uint32 MENU_QUIT					= 'MFqu';
34
35// edit menu
36const uint32 MENU_CLEAR					= 'MEcl';
37const uint32 MENU_FIND					= 'MEfi';
38const uint32 MENU_FIND_AGAIN			= 'MEfa';
39const uint32 MENU_FIND_SELECTION		= 'MEfs';
40const uint32 MENU_REPLACE				= 'MEre';
41const uint32 MENU_REPLACE_SAME			= 'MErs';
42
43const uint32 MSG_SEARCH					= 'msea';
44const uint32 MSG_REPLACE				= 'msre';
45const uint32 MSG_REPLACE_ALL			= 'mrea';
46const uint32 MSG_HIDE_WINDOW			= 'mhdw';
47const uint32 MSG_FIND_WINDOW_QUIT		= 'mfwq';
48const uint32 MSG_REPLACE_WINDOW_QUIT	= 'mrwq';
49
50// "Font"-menu
51const uint32 FONT_SIZE					= 'FMsi';
52const uint32 FONT_FAMILY				= 'FFch';
53const uint32 FONT_STYLE					= 'FSch';
54const uint32 FONT_COLOR					= 'Fcol';
55const uint32 kMsgSetItalic				= 'Fita';
56const uint32 kMsgSetBold				= 'Fbld';
57const uint32 kMsgSetUnderline			= 'Fuln';
58const uint32 kMsgSetFontDown			= 'Fsdw';
59const uint32 kMsgSetFontUp				= 'Fsup';
60
61const rgb_color palette[] = {
62	{ 220, 0, 0, 255 },		// red
63	{ 220, 73, 0, 255 },	// orange
64	{ 220, 220, 0, 255 },	// yellow
65	{ 59, 177, 0, 255 },	// green
66	{ 60, 22, 0, 255 },		// brown
67	{ 36, 71, 106, 255 },	// blue
68	{ 0, 123, 186, 255 },	// cyan
69	{ 0, 106, 115, 255 },	// teal
70	{ 53, 53, 53, 255 },	// charcoal
71	{ 137, 0, 72, 255 },	// magenta
72	{ 0, 0, 0, 255 },		//black
73	{ 255, 255, 255, 255 }	// white
74};
75
76// "Document"-menu
77const uint32 ALIGN_LEFT					= 'ALle';
78const uint32 ALIGN_CENTER				= 'ALce';
79const uint32 ALIGN_RIGHT				= 'ALri';
80const uint32 WRAP_LINES					= 'MDwr';
81const uint32 SHOW_STATISTICS			= 'MDss';
82
83// enables "edit" menuitems
84const uint32 ENABLE_ITEMS				= 'ENit';
85const uint32 DISABLE_ITEMS				= 'DIit';
86const uint32 CHANGE_WINDOW				= 'CHwi';
87const uint32 TEXT_CHANGED				= 'TEch';
88
89// file panel constants
90const uint32 OPEN_AS_ENCODING			= 'FPoe';
91const uint32 SAVE_AS_ENCODING			= 'FPse';
92const uint32 SAVE_THEN_QUIT				= 'FPsq';
93
94// Update StatusView
95const uint32 UPDATE_STATUS				= 'UPSt';
96const uint32 UPDATE_STATUS_REF			= 'UPSr';
97const uint32 UNLOCK_FILE				= 'UNLk';
98const uint32 UPDATE_LINE_SELECTION		= 'UPls';
99
100// fontSize constant
101const int32 fontSizes[] = {9, 10, 11, 12, 14, 18, 24, 36, 48, 72};
102
103#endif	// CONSTANTS_H
104
105