arch/cpu.resource: remove dead code
[AROS.git] / workbench / classes / zune / texteditor / include / mui / TextEditor_mcc.h
blobbe9101e7b6c8ca06ef3c57480cf60a9a0bdd340b
1 #ifndef TEXTEDITOR_MCC_H
2 #define TEXTEDITOR_MCC_H
4 /***************************************************************************
6 TextEditor.mcc - Textediting MUI Custom Class
7 Copyright (C) 1997-2000 Allan Odgaard
8 Copyright (C) 2005-2014 TextEditor.mcc Open Source Team
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc
22 $Id$
24 ***************************************************************************/
26 #ifndef EXEC_TYPES_H
27 #include <exec/types.h>
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #if !defined(__AROS__) && defined(__PPC__)
35 #if defined(__GNUC__)
36 #pragma pack(2)
37 #elif defined(__VBCC__)
38 #pragma amiga-align
39 #endif
40 #endif
42 /***********************************************************************/
44 // STACKED ensures proper alignment on AROS 64 bit systems
45 #if !defined(__AROS__) && !defined(STACKED)
46 #define STACKED
47 #endif
49 /***********************************************************************/
51 #define MUIC_TextEditor "TextEditor.mcc"
53 #if defined(__AROS__) && !defined(NO_INLINE_STDARG)
54 #define TextEditorObject MUIOBJMACRO_START(MUIC_TextEditor)
55 #else
56 #define TextEditorObject MUI_NewObject(MUIC_TextEditor
57 #endif
59 #define TextEditor_Dummy (0xad000000UL)
61 #define MUIA_TextEditor_Contents (TextEditor_Dummy + 0x02)
62 #define MUIA_TextEditor_CursorX (TextEditor_Dummy + 0x04)
63 #define MUIA_TextEditor_CursorY (TextEditor_Dummy + 0x05)
64 #define MUIA_TextEditor_DoubleClickHook (TextEditor_Dummy + 0x06)
65 #define MUIA_TextEditor_TypeAndSpell (TextEditor_Dummy + 0x07)
66 #define MUIA_TextEditor_ExportHook (TextEditor_Dummy + 0x08)
67 #define MUIA_TextEditor_ExportWrap (TextEditor_Dummy + 0x09)
68 #define MUIA_TextEditor_FixedFont (TextEditor_Dummy + 0x0a)
69 #define MUIA_TextEditor_Flow (TextEditor_Dummy + 0x0b)
70 #define MUIA_TextEditor_HasChanged (TextEditor_Dummy + 0x0c)
71 #define MUIA_TextEditor_Prop_DeltaFactor (TextEditor_Dummy + 0x0d)
72 #define MUIA_TextEditor_ImportHook (TextEditor_Dummy + 0x0e)
73 #define MUIA_TextEditor_InsertMode (TextEditor_Dummy + 0x0f)
74 #define MUIA_TextEditor_ImportWrap (TextEditor_Dummy + 0x10)
75 #define MUIA_TextEditor_KeyBindings (TextEditor_Dummy + 0x11)
76 #define MUIA_TextEditor_UndoAvailable (TextEditor_Dummy + 0x12)
77 #define MUIA_TextEditor_RedoAvailable (TextEditor_Dummy + 0x13)
78 #define MUIA_TextEditor_AreaMarked (TextEditor_Dummy + 0x14)
79 #define MUIA_TextEditor_Prop_Entries (TextEditor_Dummy + 0x15)
80 #define MUIA_TextEditor_Prop_Visible (TextEditor_Dummy + 0x16)
81 #define MUIA_TextEditor_Quiet (TextEditor_Dummy + 0x17)
82 #define MUIA_TextEditor_NumLock (TextEditor_Dummy + 0x18)
83 #define MUIA_TextEditor_ReadOnly (TextEditor_Dummy + 0x19)
84 #define MUIA_TextEditor_Slider (TextEditor_Dummy + 0x1a)
85 #define MUIA_TextEditor_InVirtualGroup (TextEditor_Dummy + 0x1b)
86 #define MUIA_TextEditor_StyleBold (TextEditor_Dummy + 0x1c)
87 #define MUIA_TextEditor_StyleItalic (TextEditor_Dummy + 0x1d)
88 #define MUIA_TextEditor_StyleUnderline (TextEditor_Dummy + 0x1e)
89 #define MUIA_TextEditor_Prop_First (TextEditor_Dummy + 0x20)
90 #define MUIA_TextEditor_WrapBorder (TextEditor_Dummy + 0x21)
91 #define MUIA_TextEditor_Separator (TextEditor_Dummy + 0x2c)
92 #define MUIA_TextEditor_Pen (TextEditor_Dummy + 0x2e)
93 #define MUIA_TextEditor_ColorMap (TextEditor_Dummy + 0x2f)
94 #define MUIA_TextEditor_MultiColorQuoting (TextEditor_Dummy + 0x31)
95 #define MUIA_TextEditor_Rows (TextEditor_Dummy + 0x32)
96 #define MUIA_TextEditor_Columns (TextEditor_Dummy + 0x33)
97 #define MUIA_TextEditor_AutoClip (TextEditor_Dummy + 0x34)
98 #define MUIA_TextEditor_CursorPosition (TextEditor_Dummy + 0x35)
99 #define MUIA_TextEditor_KeyUpFocus (TextEditor_Dummy + 0x36)
100 #define MUIA_TextEditor_UndoLevels (TextEditor_Dummy + 0x38)
101 #define MUIA_TextEditor_WrapMode (TextEditor_Dummy + 0x39)
102 #define MUIA_TextEditor_ActiveObjectOnClick (TextEditor_Dummy + 0x3a)
103 #define MUIA_TextEditor_PasteStyles (TextEditor_Dummy + 0x3b)
104 #define MUIA_TextEditor_PasteColors (TextEditor_Dummy + 0x3c)
105 #define MUIA_TextEditor_ConvertTabs (TextEditor_Dummy + 0x3d)
106 #define MUIA_TextEditor_WrapWords (TextEditor_Dummy + 0x3e)
107 #define MUIA_TextEditor_TabSize (TextEditor_Dummy + 0x3f)
108 #define MUIA_TextEditor_Keywords (TextEditor_Dummy + 0x40)
109 #define MUIA_TextEditor_MatchedKeyword (TextEditor_Dummy + 0x41)
111 #define MUIM_TextEditor_HandleError (TextEditor_Dummy + 0x1f)
112 #define MUIM_TextEditor_AddKeyBindings (TextEditor_Dummy + 0x22)
113 #define MUIM_TextEditor_ARexxCmd (TextEditor_Dummy + 0x23)
114 #define MUIM_TextEditor_ClearText (TextEditor_Dummy + 0x24)
115 #define MUIM_TextEditor_ExportText (TextEditor_Dummy + 0x25)
116 #define MUIM_TextEditor_InsertText (TextEditor_Dummy + 0x26)
117 #define MUIM_TextEditor_MacroBegin (TextEditor_Dummy + 0x27)
118 #define MUIM_TextEditor_MacroEnd (TextEditor_Dummy + 0x28)
119 #define MUIM_TextEditor_MacroExecute (TextEditor_Dummy + 0x29)
120 #define MUIM_TextEditor_Replace (TextEditor_Dummy + 0x2a)
121 #define MUIM_TextEditor_Search (TextEditor_Dummy + 0x2b)
122 #define MUIM_TextEditor_MarkText (TextEditor_Dummy + 0x2c)
123 #define MUIM_TextEditor_QueryKeyAction (TextEditor_Dummy + 0x2d)
124 #define MUIM_TextEditor_SetBlock (TextEditor_Dummy + 0x2e)
125 #define MUIM_TextEditor_BlockInfo (TextEditor_Dummy + 0x30)
126 #define MUIM_TextEditor_ExportBlock (TextEditor_Dummy + 0x37)
128 struct MUIP_TextEditor_ARexxCmd { STACKED ULONG MethodID; STACKED STRPTR command; };
129 struct MUIP_TextEditor_BlockInfo { STACKED ULONG MethodID; STACKED LONG *startx; STACKED LONG *starty; STACKED LONG *stopx; STACKED LONG *stopy; };
130 struct MUIP_TextEditor_ClearText { STACKED ULONG MethodID; };
131 struct MUIP_TextEditor_ExportBlock { STACKED ULONG MethodID; STACKED ULONG flags; STACKED LONG startx; STACKED LONG starty; STACKED LONG stopx; STACKED LONG stopy; };
132 struct MUIP_TextEditor_ExportText { STACKED ULONG MethodID; };
133 struct MUIP_TextEditor_HandleError { STACKED ULONG MethodID; STACKED ULONG errorcode; }; /* See below for error codes */
134 struct MUIP_TextEditor_InsertText { STACKED ULONG MethodID; STACKED STRPTR text; STACKED LONG pos; }; /* See below for positions */
135 struct MUIP_TextEditor_Replace { STACKED ULONG MethodID; STACKED STRPTR NewString; STACKED ULONG Flags; };
136 struct MUIP_TextEditor_Search { STACKED ULONG MethodID; STACKED STRPTR SearchString; STACKED ULONG Flags; };
137 struct MUIP_TextEditor_MarkText { STACKED ULONG MethodID; STACKED LONG start_crsr_x; STACKED LONG start_crsr_y; STACKED LONG stop_crsr_x; STACKED LONG stop_crsr_y; };
138 struct MUIP_TextEditor_QueryKeyAction { STACKED ULONG MethodID; STACKED ULONG keyAction; };
139 struct MUIP_TextEditor_SetBlock { STACKED ULONG MethodID; STACKED LONG startx; STACKED LONG starty; STACKED LONG stopx; STACKED LONG stopy; STACKED ULONG operation; STACKED ULONG value; };
141 #define MUIV_TextEditor_ExportHook_Plain 0x00000000UL
142 #define MUIV_TextEditor_ExportHook_EMail 0x00000001UL
143 #define MUIV_TextEditor_ExportHook_NoStyle 0x00000002UL
145 #define MUIV_TextEditor_Flow_Left 0x00000000UL
146 #define MUIV_TextEditor_Flow_Center 0x00000001UL
147 #define MUIV_TextEditor_Flow_Right 0x00000002UL
148 #define MUIV_TextEditor_Flow_Justified 0x00000003UL
150 #define MUIV_TextEditor_ImportHook_Plain 0x00000000UL
151 #define MUIV_TextEditor_ImportHook_EMail 0x00000002UL
152 #define MUIV_TextEditor_ImportHook_MIME 0x00000003UL
153 #define MUIV_TextEditor_ImportHook_MIMEQuoted 0x00000004UL
155 #define MUIV_TextEditor_InsertText_Cursor 0x00000000UL
156 #define MUIV_TextEditor_InsertText_Top 0x00000001UL
157 #define MUIV_TextEditor_InsertText_Bottom 0x00000002UL
159 /* Values for MUIA_TextEditor_WrapMode */
160 #define MUIV_TextEditor_WrapMode_NoWrap 0x00000000UL
161 #define MUIV_TextEditor_WrapMode_SoftWrap 0x00000001UL
162 #define MUIV_TextEditor_WrapMode_HardWrap 0x00000002UL
164 /* Values for MUIA_TextEditor_TabSize */
165 #define MUIV_TextEditor_TabSize_Default 0
167 /* Values for MUIM_TextEditor_MarkText */
168 #define MUIV_TextEditor_MarkText_All (-1)
169 #define MUIV_TextEditor_MarkText_None (-1)
171 /* Values for MUIM_TextEditor_SetBlock */
172 #define MUIV_TextEditor_SetBlock_Min (-1)
173 #define MUIV_TextEditor_SetBlock_Max (-2)
175 /* Flags for MUIM_TextEditor_Search */
176 #define MUIF_TextEditor_Search_FromTop (1 << 0)
177 #define MUIF_TextEditor_Search_Next (1 << 1)
178 #define MUIF_TextEditor_Search_CaseSensitive (1 << 2)
179 #define MUIF_TextEditor_Search_DOSPattern (1 << 3)
180 #define MUIF_TextEditor_Search_Backwards (1 << 4)
182 /* Flags for MUIM_TextEditor_ExportBlock */
183 #define MUIF_TextEditor_ExportBlock_FullLines (1 << 0)
184 #define MUIF_TextEditor_ExportBlock_TakeBlock (1 << 1)
186 /* Flags for MUIM_TextEditor_SetBlock */
187 #define MUIF_TextEditor_SetBlock_Color (1 << 0)
188 #define MUIF_TextEditor_SetBlock_StyleBold (1 << 1)
189 #define MUIF_TextEditor_SetBlock_StyleItalic (1 << 2)
190 #define MUIF_TextEditor_SetBlock_StyleUnderline (1 << 3)
191 #define MUIF_TextEditor_SetBlock_Flow (1 << 4)
193 /* Error codes given as argument to MUIM_TextEditor_HandleError */
194 #define Error_ClipboardIsEmpty 0x01
195 #define Error_ClipboardIsNotFTXT 0x02
196 #define Error_MacroBufferIsFull 0x03
197 #define Error_MemoryAllocationFailed 0x04
198 #define Error_NoAreaMarked 0x05
199 #define Error_NoMacroDefined 0x06
200 #define Error_NothingToRedo 0x07
201 #define Error_NothingToUndo 0x08
202 #define Error_NotEnoughUndoMem 0x09 /* This will cause all the stored undos to be freed */
203 #define Error_StringNotFound 0x0a
204 #define Error_NoBookmarkInstalled 0x0b
205 #define Error_BookmarkHasBeenLost 0x0c
207 struct ClickMessage
209 STACKED STRPTR LineContents; /* This field is ReadOnly!!! */
210 STACKED ULONG ClickPosition;
211 STACKED ULONG Qualifier; /* V15.26+, a possible qualifier that was pressed during the double click */
214 /* Definitions for Separator type */
215 #define LNSB_Top 0 /* Mutual exclude: */
216 #define LNSB_Middle 1 /* Placement of */
217 #define LNSB_Bottom 2 /* the separator */
218 #define LNSB_StrikeThru 3 /* Let separator go thru the textfont */
219 #define LNSB_Thick 4 /* Extra thick separator */
221 #define LNSF_None 0
222 #define LNSF_Top (1<<LNSB_Top)
223 #define LNSF_Middle (1<<LNSB_Middle)
224 #define LNSF_Bottom (1<<LNSB_Bottom)
225 #define LNSF_StrikeThru (1<<LNSB_StrikeThru)
226 #define LNSF_Thick (1<<LNSB_Thick)
228 /* Keyaction definitions */
229 #define MUIV_TextEditor_KeyAction_Up 0x00
230 #define MUIV_TextEditor_KeyAction_Down 0x01
231 #define MUIV_TextEditor_KeyAction_Left 0x02
232 #define MUIV_TextEditor_KeyAction_Right 0x03
233 #define MUIV_TextEditor_KeyAction_PageUp 0x04
234 #define MUIV_TextEditor_KeyAction_PageDown 0x05
235 #define MUIV_TextEditor_KeyAction_StartOfLine 0x06
236 #define MUIV_TextEditor_KeyAction_EndOfLine 0x07
237 #define MUIV_TextEditor_KeyAction_Top 0x08
238 #define MUIV_TextEditor_KeyAction_Bottom 0x09
239 #define MUIV_TextEditor_KeyAction_PrevWord 0x0a
240 #define MUIV_TextEditor_KeyAction_NextWord 0x0b
241 #define MUIV_TextEditor_KeyAction_PrevLine 0x0c
242 #define MUIV_TextEditor_KeyAction_NextLine 0x0d
243 #define MUIV_TextEditor_KeyAction_PrevSentence 0x0e
244 #define MUIV_TextEditor_KeyAction_NextSentence 0x0f
245 #define MUIV_TextEditor_KeyAction_SuggestWord 0x10
246 #define MUIV_TextEditor_KeyAction_Backspace 0x11
247 #define MUIV_TextEditor_KeyAction_Delete 0x12
248 #define MUIV_TextEditor_KeyAction_Return 0x13
249 #define MUIV_TextEditor_KeyAction_Tab 0x14
250 #define MUIV_TextEditor_KeyAction_Cut 0x15
251 #define MUIV_TextEditor_KeyAction_Copy 0x16
252 #define MUIV_TextEditor_KeyAction_Paste 0x17
253 #define MUIV_TextEditor_KeyAction_Undo 0x18
254 #define MUIV_TextEditor_KeyAction_Redo 0x19
255 #define MUIV_TextEditor_KeyAction_DelBOL 0x1a
256 #define MUIV_TextEditor_KeyAction_DelEOL 0x1b
257 #define MUIV_TextEditor_KeyAction_DelBOW 0x1c
258 #define MUIV_TextEditor_KeyAction_DelEOW 0x1d
259 #define MUIV_TextEditor_KeyAction_NextGadget 0x1e
260 #define MUIV_TextEditor_KeyAction_GotoBookmark1 0x1f
261 #define MUIV_TextEditor_KeyAction_GotoBookmark2 0x20
262 #define MUIV_TextEditor_KeyAction_GotoBookmark3 0x21
263 #define MUIV_TextEditor_KeyAction_SetBookmark1 0x22
264 #define MUIV_TextEditor_KeyAction_SetBookmark2 0x23
265 #define MUIV_TextEditor_KeyAction_SetBookmark3 0x24
266 #define MUIV_TextEditor_KeyAction_DelLine 0x25
267 #define MUIV_TextEditor_KeyAction_SelectAll 0x26
268 #define MUIV_TextEditor_KeyAction_SelectNone 0x27
270 /* result structure for MUIM_TextEditor_QueryKeyAction */
271 struct MUIP_TextEditor_Keybinding
273 STACKED const UWORD code; // the RAWKEY code read only
274 STACKED const ULONG qualifier; // the Qualifier flags read only
275 STACKED const UWORD action; // the keyaction read only
278 #if !defined(__AROS__) && defined(__PPC__)
279 #if defined(__GNUC__)
280 #pragma pack()
281 #elif defined(__VBCC__)
282 #pragma default-align
283 #endif
284 #endif
286 #ifdef __cplusplus
288 #endif
290 #endif /* TEXTEDITOR_MCC_H */