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