Import of codesetslib
[cake.git] / workbench / libs / codesetslib / include / mui / TextEditor_mcc.h
blob99b3fe60d0772e3d476448f5d38fdb48e3116ca6
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 by 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 $VER: TextEditor_mcc.h v15.10 (09.04.2005)
24 ***************************************************************************/
26 #ifndef EXEC_TYPES_H
27 #include <exec/types.h>
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #ifdef __GNUC__
35 #ifdef __PPC__
36 #pragma pack(2)
37 #endif
38 #elif defined(__VBCC__)
39 #pragma amiga-align
40 #endif
42 #define MUIC_TextEditor "TextEditor.mcc"
43 #define TextEditorObject MUI_NewObject(MUIC_TextEditor
45 #define TextEditor_Dummy (0xad000000)
47 #define MUIA_TextEditor_AreaMarked (TextEditor_Dummy + 0x14)
48 #define MUIA_TextEditor_ColorMap (TextEditor_Dummy + 0x2f)
49 #define MUIA_TextEditor_Contents (TextEditor_Dummy + 0x02)
50 #define MUIA_TextEditor_CursorX (TextEditor_Dummy + 0x04)
51 #define MUIA_TextEditor_CursorY (TextEditor_Dummy + 0x05)
52 #define MUIA_TextEditor_DoubleClickHook (TextEditor_Dummy + 0x06)
53 #define MUIA_TextEditor_ExportHook (TextEditor_Dummy + 0x08)
54 #define MUIA_TextEditor_ExportWrap (TextEditor_Dummy + 0x09)
55 #define MUIA_TextEditor_FixedFont (TextEditor_Dummy + 0x0a)
56 #define MUIA_TextEditor_Flow (TextEditor_Dummy + 0x0b)
57 #define MUIA_TextEditor_HasChanged (TextEditor_Dummy + 0x0c)
58 #define MUIA_TextEditor_HorizontalScroll (TextEditor_Dummy + 0x2d) /* Private and experimental! */
59 #define MUIA_TextEditor_ImportHook (TextEditor_Dummy + 0x0e)
60 #define MUIA_TextEditor_ImportWrap (TextEditor_Dummy + 0x10)
61 #define MUIA_TextEditor_InsertMode (TextEditor_Dummy + 0x0f)
62 #define MUIA_TextEditor_InVirtualGroup (TextEditor_Dummy + 0x1b)
63 #define MUIA_TextEditor_KeyBindings (TextEditor_Dummy + 0x11)
64 #define MUIA_TextEditor_MultiColorQuoting (TextEditor_Dummy + 0x31)
65 #define MUIA_TextEditor_NumLock (TextEditor_Dummy + 0x18)
66 #define MUIA_TextEditor_Pen (TextEditor_Dummy + 0x2e)
67 #define MUIA_TextEditor_PopWindow_Open (TextEditor_Dummy + 0x03) /* Private!!! */
68 #define MUIA_TextEditor_Prop_DeltaFactor (TextEditor_Dummy + 0x0d)
69 #define MUIA_TextEditor_Prop_Entries (TextEditor_Dummy + 0x15)
70 #define MUIA_TextEditor_Prop_First (TextEditor_Dummy + 0x20)
71 #define MUIA_TextEditor_Prop_Release (TextEditor_Dummy + 0x01) /* Private!!! */
72 #define MUIA_TextEditor_Prop_Visible (TextEditor_Dummy + 0x16)
73 #define MUIA_TextEditor_Quiet (TextEditor_Dummy + 0x17)
74 #define MUIA_TextEditor_ReadOnly (TextEditor_Dummy + 0x19)
75 #define MUIA_TextEditor_RedoAvailable (TextEditor_Dummy + 0x13)
76 #define MUIA_TextEditor_Separator (TextEditor_Dummy + 0x2c)
77 #define MUIA_TextEditor_Slider (TextEditor_Dummy + 0x1a)
78 #define MUIA_TextEditor_StyleBold (TextEditor_Dummy + 0x1c)
79 #define MUIA_TextEditor_StyleItalic (TextEditor_Dummy + 0x1d)
80 #define MUIA_TextEditor_StyleUnderline (TextEditor_Dummy + 0x1e)
81 #define MUIA_TextEditor_TypeAndSpell (TextEditor_Dummy + 0x07)
82 #define MUIA_TextEditor_UndoAvailable (TextEditor_Dummy + 0x12)
83 #define MUIA_TextEditor_WrapBorder (TextEditor_Dummy + 0x21)
84 #define MUIA_TextEditor_Rows (TextEditor_Dummy + 0x32)
85 #define MUIA_TextEditor_Columns (TextEditor_Dummy + 0x33)
86 #define MUIA_TextEditor_AutoClip (TextEditor_Dummy + 0x34)
87 #define MUIA_TextEditor_CursorPosition (TextEditor_Dummy + 0x35)
88 #define MUIA_TextEditor_KeyUpFocus (TextEditor_Dummy + 0x36)
90 #define MUIM_TextEditor_AddKeyBindings (TextEditor_Dummy + 0x22)
91 #define MUIM_TextEditor_ARexxCmd (TextEditor_Dummy + 0x23)
92 #define MUIM_TextEditor_BlockInfo (TextEditor_Dummy + 0x30)
93 #define MUIM_TextEditor_ClearText (TextEditor_Dummy + 0x24)
94 #define MUIM_TextEditor_ExportText (TextEditor_Dummy + 0x25)
95 #define MUIM_TextEditor_HandleError (TextEditor_Dummy + 0x1f)
96 #define MUIM_TextEditor_InsertText (TextEditor_Dummy + 0x26)
97 #define MUIM_TextEditor_MacroBegin (TextEditor_Dummy + 0x27)
98 #define MUIM_TextEditor_MacroEnd (TextEditor_Dummy + 0x28)
99 #define MUIM_TextEditor_MacroExecute (TextEditor_Dummy + 0x29)
100 #define MUIM_TextEditor_MarkText (TextEditor_Dummy + 0x2c)
101 #define MUIM_TextEditor_Replace (TextEditor_Dummy + 0x2a)
102 #define MUIM_TextEditor_Search (TextEditor_Dummy + 0x2b)
104 struct MUIP_TextEditor_ARexxCmd { ULONG MethodID; STRPTR command; };
105 struct MUIP_TextEditor_BlockInfo { ULONG MethodID; ULONG *startx; ULONG *starty; ULONG *stopx; ULONG *stopy; };
106 struct MUIP_TextEditor_ClearText { ULONG MethodID; };
107 struct MUIP_TextEditor_ExportText { ULONG MethodID; };
108 struct MUIP_TextEditor_HandleError { ULONG MethodID; ULONG errorcode; }; /* See below for error codes */
109 struct MUIP_TextEditor_InsertText { ULONG MethodID; STRPTR text; LONG pos; }; /* See below for positions */
110 struct MUIP_TextEditor_MarkText { ULONG MethodID; ULONG start_crsr_x; ULONG start_crsr_y; ULONG stop_crsr_x; ULONG stop_crsr_y; };
111 struct MUIP_TextEditor_Search { ULONG MethodID; STRPTR SearchString; ULONG Flags; };
112 struct MUIP_TextEditor_Replace { ULONG MethodID; STRPTR NewString; ULONG Flags; };
114 #define MUIV_TextEditor_ExportHook_Plain 0x00000000
115 #define MUIV_TextEditor_ExportHook_EMail 0x00000001
117 #define MUIV_TextEditor_Flow_Left 0x00000000
118 #define MUIV_TextEditor_Flow_Center 0x00000001
119 #define MUIV_TextEditor_Flow_Right 0x00000002
120 #define MUIV_TextEditor_Flow_Justified 0x00000003
122 #define MUIV_TextEditor_ImportHook_Plain 0x00000000
123 #define MUIV_TextEditor_ImportHook_EMail 0x00000002
124 #define MUIV_TextEditor_ImportHook_MIME 0x00000003
125 #define MUIV_TextEditor_ImportHook_MIMEQuoted 0x00000004
127 #define MUIV_TextEditor_InsertText_Cursor 0x00000000
128 #define MUIV_TextEditor_InsertText_Top 0x00000001
129 #define MUIV_TextEditor_InsertText_Bottom 0x00000002
131 #define MUIV_TextEditor_LengthHook_Plain 0x00000000
132 #define MUIV_TextEditor_LengthHook_ANSI 0x00000001
133 #define MUIV_TextEditor_LengthHook_HTML 0x00000002
134 #define MUIV_TextEditor_LengthHook_MAIL 0x00000003
136 /* Flags for MUIM_TextEditor_Search */
137 #define MUIF_TextEditor_Search_FromTop (1 << 0)
138 #define MUIF_TextEditor_Search_Next (1 << 1)
139 #define MUIF_TextEditor_Search_CaseSensitive (1 << 2)
140 #define MUIF_TextEditor_Search_DOSPattern (1 << 3)
141 #define MUIF_TextEditor_Search_Backwards (1 << 4)
143 /* Error codes given as argument to MUIM_TextEditor_HandleError */
144 #define Error_ClipboardIsEmpty 0x01
145 #define Error_ClipboardIsNotFTXT 0x02
146 #define Error_MacroBufferIsFull 0x03
147 #define Error_MemoryAllocationFailed 0x04
148 #define Error_NoAreaMarked 0x05
149 #define Error_NoMacroDefined 0x06
150 #define Error_NothingToRedo 0x07
151 #define Error_NothingToUndo 0x08
152 #define Error_NotEnoughUndoMem 0x09 /* This will cause all the stored undos to be freed */
153 #define Error_StringNotFound 0x0a
154 #define Error_NoBookmarkInstalled 0x0b
155 #define Error_BookmarkHasBeenLost 0x0c
157 struct ClickMessage
159 STRPTR LineContents; /* This field is ReadOnly!!! */
160 ULONG ClickPosition;
163 /* Definitions for Separator type */
165 #define LNSB_Top 0 /* Mutual exclude: */
166 #define LNSB_Middle 1 /* Placement of */
167 #define LNSB_Bottom 2 /* the separator */
168 #define LNSB_StrikeThru 3 /* Let separator go thru the textfont */
169 #define LNSB_Thick 4 /* Extra thick separator */
171 #define LNSF_Top (1<<LNSB_Top)
172 #define LNSF_Middle (1<<LNSB_Middle)
173 #define LNSF_Bottom (1<<LNSB_Bottom)
174 #define LNSF_StrikeThru (1<<LNSB_StrikeThru)
175 #define LNSF_Thick (1<<LNSB_Thick)
177 #ifdef __GNUC__
178 #ifdef __PPC__
179 #pragma pack()
180 #endif
181 #elif defined(__VBCC__)
182 #pragma default-align
183 #endif
185 #ifdef __cplusplus
187 #endif
189 #endif /* TEXTEDITOR_MCC_H */