3 TextEditor.mcc/TextEditor.mcc
4 TextEditor.mcc/MUIA_TextEditor_ActiveObjectOnClick
5 TextEditor.mcc/MUIA_TextEditor_AreaMarked
6 TextEditor.mcc/MUIA_TextEditor_AutoClip
7 TextEditor.mcc/MUIA_TextEditor_ColorMap
8 TextEditor.mcc/MUIA_TextEditor_Columns
9 TextEditor.mcc/MUIA_TextEditor_Contents
10 TextEditor.mcc/MUIA_TextEditor_ConvertTabs
11 TextEditor.mcc/MUIA_TextEditor_CursorPosition
12 TextEditor.mcc/MUIA_TextEditor_CursorX
13 TextEditor.mcc/MUIA_TextEditor_CursorY
14 TextEditor.mcc/MUIA_TextEditor_DoubleClickHook
15 TextEditor.mcc/MUIA_TextEditor_ExportHook
16 TextEditor.mcc/MUIA_TextEditor_ExportWrap
17 TextEditor.mcc/MUIA_TextEditor_FixedFont
18 TextEditor.mcc/MUIA_TextEditor_Flow
19 TextEditor.mcc/MUIA_TextEditor_HasChanged
20 TextEditor.mcc/MUIA_TextEditor_ImportHook
21 TextEditor.mcc/MUIA_TextEditor_ImportWrap
22 TextEditor.mcc/MUIA_TextEditor_InsertMode (not yet implemented...)
23 TextEditor.mcc/MUIA_TextEditor_InVirtualGroup
24 TextEditor.mcc/MUIA_TextEditor_KeyUpFocus
25 TextEditor.mcc/MUIA_TextEditor_Keywords
26 TextEditor.mcc/MUIA_TextEditor_MatchedKeyword
27 TextEditor.mcc/MUIA_TextEditor_PasteColors
28 TextEditor.mcc/MUIA_TextEditor_PasteStyles
29 TextEditor.mcc/MUIA_TextEditor_Pen
30 TextEditor.mcc/MUIA_TextEditor_Prop_DeltaFactor
31 TextEditor.mcc/MUIA_TextEditor_Prop_Entries
32 TextEditor.mcc/MUIA_TextEditor_Prop_First
33 TextEditor.mcc/MUIA_TextEditor_Prop_Visible
34 TextEditor.mcc/MUIA_TextEditor_Quiet
35 TextEditor.mcc/MUIA_TextEditor_ReadOnly
36 TextEditor.mcc/MUIA_TextEditor_RedoAvailable
37 TextEditor.mcc/MUIA_TextEditor_Rows
38 TextEditor.mcc/MUIA_TextEditor_Separator
39 TextEditor.mcc/MUIA_TextEditor_Slider
40 TextEditor.mcc/MUIA_TextEditor_StyleBold
41 TextEditor.mcc/MUIA_TextEditor_StyleItalic
42 TextEditor.mcc/MUIA_TextEditor_StyleUnderline
43 TextEditor.mcc/MUIA_TextEditor_TabSize
44 TextEditor.mcc/MUIA_TextEditor_TypeAndSpell
45 TextEditor.mcc/MUIA_TextEditor_UndoAvailable
46 TextEditor.mcc/MUIA_TextEditor_UndoLevels
47 TextEditor.mcc/MUIA_TextEditor_WrapBorder
48 TextEditor.mcc/MUIA_TextEditor_WrapMode
49 TextEditor.mcc/MUIA_TextEditor_WrapWords
50 TextEditor.mcc/MUIM_TextEditor_ARexxCmd
51 TextEditor.mcc/MUIM_TextEditor_BlockInfo
52 TextEditor.mcc/MUIM_TextEditor_ClearText
53 TextEditor.mcc/MUIM_TextEditor_SetBlock
54 TextEditor.mcc/MUIM_TextEditor_ExportBlock
55 TextEditor.mcc/MUIM_TextEditor_ExportText
56 TextEditor.mcc/MUIM_TextEditor_HandleError
57 TextEditor.mcc/MUIM_TextEditor_InsertText
58 TextEditor.mcc/MUIM_TextEditor_MacroBegin (not yet implemented...)
59 TextEditor.mcc/MUIM_TextEditor_MacroEnd (not yet implemented...)
60 TextEditor.mcc/MUIM_TextEditor_MacroExecute (not yet implemented...)
61 TextEditor.mcc/MUIM_TextEditor_MarkText
62 TextEditor.mcc/MUIM_TextEditor_QueryKeyAction
63 TextEditor.mcc/MUIM_TextEditor_Replace
64 TextEditor.mcc/MUIM_TextEditor_Search
65 \fTextEditor.mcc/TextEditor.mcc
67 *******************************************************************
68 Copyright (C) 2005-2014 TextEditor.mcc Open Source Team
69 $Id: MCC_TextEditor.doc 945 2014-01-26 09:03:06Z damato $
71 TextEditor.mcc is a multiline string gadget which holds most of the
72 functions of a normal text editor including some special function-
73 ality for importing/exporting text from/to special formats.
75 The gadget was originally written in 1997 by Allan Odgaard. As of
76 version 15.10, released in April 2005, the gadget is maintained by
77 the TextEditor.mcc Open Source team.
79 It is released and distributed under the terms of the GNU Lesser
80 General Public License (LGPL) and available free of charge.
82 Please visit http://www.sf.net/projects/texteditor-mcc/ for
83 the very latest version and information regarding TextEditor.mcc.
84 *******************************************************************
86 \fTextEditor.mcc/MUIA_TextEditor_ActiveObjectOnClick
89 MUIA_TextEditor_ActiveObjectOnClick -- [ISG], BOOL
92 This tag allows to set/get whether the texteditor object is
93 automatically set the MUIA_Window_ActiveObject object of the
94 window in case the user performs a mouse action (click/select)
95 in the texteditor. As a consequence, the texteditor will then
96 get the full keyboard focus and will eventually signal it's
97 active status by highlighting a marked area with the active
98 color rather than using the inactive marked color in inactive
102 Please note that depending on the MUIA_TextEditor_ReadOnly
103 setting, this attribute has different default values. In case
104 the texteditor is set to ReadOnly while initialized (OM_NEW)
105 this attribute will be set to FALSE as a default. In contrast,
106 when the object is in full write mode it will be set to TRUE
107 instead. However, during operation or in OM_NEW this behaviour
108 can be overrided by setting this attribute to another value.
111 MUIA_TextEditor_ReadOnly
113 \fTextEditor.mcc/MUIA_TextEditor_AreaMarked
116 MUIA_TextEditor_AreaMarked -- [..G], BOOL
119 This tag will be set to TRUE when text is marked, and back to
120 FALSE when nothing is marked. You can create a notify event
121 with this tag and let your cut/copy buttons become ghosted
122 when nothing is marked.
124 \fTextEditor.mcc/MUIA_TextEditor_AutoClip
127 MUIA_TextEditor_AutoClip -- [ISG], BOOL
130 When the gadget is in read only mode and the user marks some text,
131 then it will be automatically copied to the clipboard. With this
132 tag you can disable that behaviour, but think twice, because the
133 configured 'copy' key (which the user normally uses to copy text)
134 will only function when the gadget is active (or default) which
135 it won't automatically become in read only mode (when clicked).
137 \fTextEditor.mcc/MUIA_TextEditor_ColorMap
140 MUIA_TextEditor_ColorMap -- [IS.], LONG *
143 This is a map of allocated colors, which corresponds to the pen number
144 you set with MUIA_TextEditor_Pen. By default the map looks like this:
146 0 = Normal (user configured text/highlight color)
161 If you supply your own colormap, then pen value 0 will still be
162 "Normal", i.e. the first entry in your colormap has pen value 1.
163 This may seem a bit illogical, suggest an alternative if you want!
165 You are allowed to dynamically change the colormap; however, if you
166 change an entry which is on-screen, then it won't have any immediate
167 effect. The idea is that you should e.g. supply a colormap with 16
168 unused LONGs, allow the user to select a custom color, allocate that
169 color and store the screen pen value into the colormap. Now you can
170 use that entry as argument for MUIA_TextEditor_Pen.
172 Bear in mind that your application may change screen, so the best
173 place to allocate/free colors is in the MUIM_Show and MUIM_Hide
174 methods of the editor gadget. An example of this can be found in
177 Please keep in mind to convert pens allocated by MUI_ObtainPen() to
178 values usable by any kind of graphic functions (i.e. SetAPen()) by
179 using the MUIPEN() macro!
182 /* Create a cycle gadget which allows the user
183 * to mark his text with red, green and blue.
186 static LONG editor_cmap[3];
187 UBYTE *cycle_entries[] =
189 "Normal", "Red", "Green", "Blue", NULL
194 MUIA_Cycle_Entries, cycle_entries,
197 editor = TextEditorObject,
198 MUIA_TextEditor_ColorMap, editor_cmap,
203 DoMethod(cycle, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, editor, 3, MUIM_Set, MUIA_TextEditor_Pen, MUIV_TriggerValue);
204 DoMethod(editor, MUIM_Notify, MUIA_TextEditor_Pen, MUIV_EveryTime, cycle, 3, MUIM_Set, MUIA_Cycle_Active, MUIV_TriggerValue);
206 /* Subclass of TextEditor.mcc */
208 switch(msg->MethodID)
211 editor_cmap[0] = ObtainBestPenA(cm, 0xffffffff, 0, 0, NULL);
212 editor_cmap[1] = ObtainBestPenA(cm, 0, 0xffffffff, 0, NULL);
213 editor_cmap[2] = ObtainBestPenA(cm, 0, 0, 0xffffffff, NULL);
217 ReleasePen(cm, editor_cmap[0]);
218 ReleasePen(cm, editor_cmap[1]);
219 ReleasePen(cm, editor_cmap[2]);
228 \fTextEditor.mcc/MUIA_TextEditor_Columns
231 MUIA_TextEditor_Columns -- [I..], ULONG
234 Set the desired width, in characters.
239 \fTextEditor.mcc/MUIA_TextEditor_Contents
242 MUIA_TextEditor_Contents -- [IS.], APTR
245 Set the contents of this gadget. This should normally be a pointer to
246 a text buffer, but if you have supplied your own import hook, then you
247 can set this to anything you like, e.g. a filehandle. Passing NULL as
248 pointer will be treated as an empty text.
251 Setting a text content BEFORE the class has executed the MUIM_Setup
252 method will use the global default settings! This means that with active
253 TAB conversion TAB characters within the text will be converted using the
254 default TAB size of 4 spaces, no matter what the user has configured!
255 The better solution is to wait until MUIM_Setup has successully returned
256 and set the editor's initial content after that to ensure that the user
257 gets what he/she is expecting.
260 MUIA_TextEditor_ConvertTabs, MUIA_TextEditor_ImportHook
261 MUIM_TextEditor_InsertText
263 \fTextEditor.mcc/MUIA_TextEditor_ConvertTabs
266 MUIA_TextEditor_ConvertTabs -- [ISG], BOOL
269 When TRUE (default) TextEditor will convert tabs (\t) to the number
270 of spaces specified by the user configuration setting. If FALSE,
271 TextEditor will instead put pure \t characters and just display
275 Change of this attribute from TRUE to FALSE will cause update of
276 editor gadget (but cursor coordinates will be reset to zeroes).
281 \fTextEditor.mcc/MUIA_TextEditor_CursorPosition
284 MUIA_TextEditor_CursorPosition -- [..G], struct Rectangle *
287 If you need to open a window or similar, and want it to match the
288 position and/or dimensions of the cursor, then you can use this
289 tag to obtain the rectangle that the cursor is occupying.
292 struct Rectangle *crsr;
293 if(GetAttr(MUIA_TextEditor_CursorPosition, obj, &rect))
294 printf("Cursor at (%ldx%ld)\n", crsr->MinX, crsr->MinY);
297 The values are relative to the top left corner of the window, not the
300 You can't take notify on this tag.
303 MUIA_TextEditor_CursorX, MUIA_TextEditor_CursorY
305 \fTextEditor.mcc/MUIA_TextEditor_CursorX
308 MUIA_TextEditor_CursorX -- [ISG], ULONG
311 You can get or set the cursor's X position with this tag.
312 The first character on a line has position 0.
313 The position is not affected by the gadget's `autowrap' feature.
314 If you set a value higher than the length of the current line, then
315 it will be automatically truncated.
318 MUIA_TextEditor_CursorY
320 \fTextEditor.mcc/MUIA_TextEditor_CursorY
323 MUIA_TextEditor_CursorY -- [ISG], ULONG
326 You can get or set the cursor's Y position with this tag.
327 The first line has position 0.
328 The position is not affected by the gadget's `autowrap' feature.
329 If you set a value higher than the number of lines, then it will
330 be automatically truncated.
333 MUIA_TextEditor_CursorX
335 \fTextEditor.mcc/MUIA_TextEditor_DoubleClickHook
338 MUIA_TextEditor_DoubleClickHook -- [IS.], struct Hook *
341 If you use the gadget in read only mode, you may want a special
342 action to take place when the user double clicks certain words.
343 For example, an e-mail or news client using this gadget to show
344 mails might allow the user to click on an URL to lookup the link.
346 The hook will be called with A1 pointing to a ClickMessage, and A0
347 will point to the hook itself. Your hook should return TRUE if it
348 wants to stop the editor from blocking.
350 From V15.26 on the ClickMessage also contains the qualifiers being
351 pressed during the double click. Please note that SHIFT is not possible
352 as a custom qualifier, because SHIFT + mouse click is already handled
353 internally. However, all other qualifiers are of course possible.
356 /* This hook will test if the user double clicked an HTTP address */
358 BOOL URLHookCode (register __a1 struct ClickMessage *clickmsg)
360 UWORD pos = clickmsg->ClickPosition;
362 while(pos && *(clickmsg->LineContents+pos-1) != ' ' && *(clickmsg->LineContents+pos-1) != '<')
367 if(strncmp(clickmsg->LineContents+pos, "http:", 5))
371 LookupURL(clickmsg->LineContents+pos);
376 MUIA_TextEditor_ReadOnly, mui/TextEditor_mcc.h
378 \fTextEditor.mcc/MUIA_TextEditor_ExportHook
381 MUIA_TextEditor_ExportHook -- [IS.], struct Hook *
384 MUIV_TextEditor_ExportHook_Plain (default)
385 MUIV_TextEditor_ExportHook_EMail
386 MUIV_TextEditor_ExportHook_NoStyle
389 Depending on the inputs a different exporthook will be fired as soon
390 as MUIM_TextEditor_ExportText is used. The default is to export the
391 currently showed data as is. That means, that all text, including the
392 escape sequences for showing soft styles will be exported.
394 MUIV_TextEditor_ExportHook_Plain
395 Export all text as displayed, including ESC (\033) sequences
397 MUIV_TextEditor_ExportHook_EMail
398 Export all text, but convert the soft-style escape sequences into
399 the pseudo-standard text sequences like:
401 *bold* : for bold text
402 /italic/ : for italic text
403 _underline_ : for underlined text
404 #colored# : for colored/highlighted text
405 <tsb> : for a thick separator bar
406 <sb> : for a thin separator bar
408 MUIV_TextEditor_ExportHook_NoStyle
409 Export all text like the 'Plain' variant, but strip off all style
410 relevant ESC (\033) sequences. Also converts the escape sequences
411 for the thick and thin separator bar into <tsb> and <sb> like the
414 See MUIA_TextEditor_ImportHook for more information.
417 Even if this MUIA value seems to allow that you may specify your own
418 private export hook implementation, this is currently NOT supported
419 and should be considered highly experimental.
422 MUIA_TextEditor_ExportWrap
423 MUIM_TextEditor_ExportText
424 MUIA_TextEditor_ImportHook
426 \fTextEditor.mcc/MUIA_TextEditor_ExportWrap
429 MUIA_TextEditor_ExportWrap -- [ISG], ULONG
432 This attribute allows the built-in export hooks to perform hard
433 word wrapping while exporting text.
435 Zero means no wrap (default value).
438 Please note that MUIA_TextEditor_WrapMode doesn't have any effect
439 on the way the export function works. That means, setting
440 ExportWrap will always end up in hard word wrapping.
443 MUIA_TextEditor_ExportHook
444 MUIA_TextEditor_WrapBorder
445 MUIA_TextEditor_WrapMode
447 \fTextEditor.mcc/MUIA_TextEditor_FixedFont
450 MUIA_TextEditor_FixedFont -- [I.G], BOOL
453 Set this if you would like the editor to use a fixed width font.
455 \fTextEditor.mcc/MUIA_TextEditor_Flow
458 MUIA_TextEditor_Flow -- [.SG], UWORD
461 MUIV_TextEditor_Flow_Left
462 MUIV_TextEditor_Flow_Right
463 MUIV_TextEditor_Flow_Center
464 MUIV_TextEditor_Flow_Justified (not yet implemented)
467 Set/get the current paragraph's alignment.
469 If an area is marked while you set this attribute, then the new
470 alignment will be set for the complete area.
472 \fTextEditor.mcc/MUIA_TextEditor_HasChanged
475 MUIA_TextEditor_HasChanged -- [ISG], BOOL
478 This tag will show if the contents of the gadget have changed.
479 You can take notify on this tag, so that you can connect it with
480 a checkmark or text object.
482 You should set this tag to FALSE whenever you export the contents
483 of the gadget or overwrite them with something new.
485 Even if you have set up notification on this tag, you should
486 still get() it before you kill the text, because this makes it
487 possible to do some advanced testing to see if the text has
488 actually been modified, e.g. by checking the undo buffer, comparing
489 checksums or checking whether or not the text buffer is empty
490 (none of this is currently done, but it may be in the future).
492 The tag is currently not affected by:
493 MUIA_TextEditor_Contents, MUIM_TextEditor_ClearText
494 MUIM_TextEditor_Export, MUIM_TextEditor_Import
496 ... but comments are welcome :)
498 \fTextEditor.mcc/MUIA_TextEditor_ImportHook
501 MUIA_TextEditor_ImportHook -- [IS.], struct Hook *
504 MUIV_TextEditor_ImportHook_Plain (default)
505 MUIV_TextEditor_ImportHook_EMail
506 MUIV_TextEditor_ImportHook_MIME
507 MUIV_TextEditor_ImportHook_MIMEQuoted
510 Since this gadget allows different text styles, you can supply an
511 import hook to parse the text correctly.
513 The default import hook understands the following escape sequences.
514 They may appear at any position within the line:
516 <ESC> + u Set the soft style to underline.
517 <ESC> + b Set the soft style to bold.
518 <ESC> + i Set the soft style to italic.
519 <ESC> + n Set the soft style back to normal.
520 <ESC> + h Highlight the current line.
521 <ESC> + p[x] Change to color x, where x is taken from the colormap.
522 0 means normal. The color is reset for each new line.
524 The following sequences are only valid at the beginning of a line.
525 If they are placed elsewhere, the result is undefined (they might
528 <ESC> + l Left justify current and following lines.
529 <ESC> + r Right justify current and following lines.
530 <ESC> + c Center current and following lines.
531 <ESC> + [s:x] Create a separator. x is a bit combination of flags:
532 Placement (mutually exclusive):
537 8 = StrikeThru - Draw separator on top of text.
538 16 = Thick - Make separator extra thick.
541 MUIV_TextEditor_ImportHook_MIME:
543 This built-in hook will convert quoted-printables (e.g. "=E5") to
544 the ASCII representation, merge lines ending with a "=", wordwrap
545 the text (using the value set with MUIA_TextEditor_ImportWrap),
546 highlight all lines that start with ">", make real *bold*, /italic/,
547 _underline_ and #colored# text, and replace <sb> or <tsb> with a real
548 separator bar. It will stop parsing upon reaching a NULL byte.
550 The color used for #colored# text is colormap entry 6, which defaults
551 to MPEN_FILL. To override it, just supply a colormap with entry 6
552 set to whatever color you would like.
554 MUIV_TextEditor_ImportHook_MIMEQuoted:
556 Like the MIME import hook, but each line gets quoted and highlighted.
559 MUIV_TextEditor_ImportHook_EMail:
561 Like the MIME import hook, but it doesn't convert quoted printables.
563 Note, that the last three hooks also evaluate the escape sequences
564 described for the MUIV_TextEditor_ImportHook_Plain type. While it
565 never was documented there are some programs insisting on this
566 side effect of an old implementation. Hence starting with version
567 51.13 this behaviour had to be official supported.
570 You can of course create your own import hook - there is an external
571 file which describes the procedure.
574 Even if this MUIA value seems to allow that you may specify your own
575 private import hook implementation, this is currently NOT supported
576 and should be considered highly experimental.
579 MUIA_TextEditor_ColorMap,
580 MUIA_TextEditor_ExportHook
581 MUIA_TextEditor_ImportWrap
584 /* Here is how you can `easily' allow the
585 * user to set the pen of #colored# text
588 static LONG editor_cmap[1];
590 set(editor, MUIA_TextEditor_ColorMap, editor_cmap-6);
591 /* This saves a little memory :) */
594 /* Subclass of TextEditor.mcc */
596 switch(msg->MethodID)
599 editor_cmap[0] = MUI_ObtainPen(muiRenderInfo(obj), spec, flags);
603 MUI_ReleasePen(muiRenderInfo(obj), editor_cmap[0]);
608 \fTextEditor.mcc/MUIA_TextEditor_ImportWrap
611 MUIA_TextEditor_ImportWrap -- [ISG], ULONG
614 This attribute allows the built-in import hooks to perform automatic
615 word wrapping when importing text.
617 The built-in hooks accept a value between 4 and 1024.
621 Please note that MUIA_TextEditor_WrapMode doesn't have any effect
622 on the way the import function works. That means, setting
623 ImportWrap will always end up in hard word wrapping.
626 MUIA_TextEditor_ImportHook
627 MUIA_TextEditor_WrapBorder
628 MUIA_TextEditor_WrapMode
630 \fTextEditor.mcc/MUIA_TextEditor_InsertMode
633 MUIA_TextEditor_InsertMode -- [ISG], BOOL
636 Not yet implemented...
638 \fTextEditor.mcc/MUIA_TextEditor_InVirtualGroup
641 MUIA_TextEditor_InVirtualGroup -- [I..], BOOL
644 Set this to TRUE when the gadget is inside a virtual group.
645 The reason is cosmetical - the pattern will be relative to the
646 gadget instead of the window, since the gadget can be "moved" around.
648 \fTextEditor.mcc/MUIA_TextEditor_KeyUpFocus
651 MUIA_TextEditor_KeyUpFocus -- [ISG], Object *
654 Allows to specify a specific object that will be set as the new
655 window's default object in case the user pressed the UP cursor key and
656 the texteditor was already at the very first line.
658 \fTextEditor.mcc/MUIA_TextEditor_Keywords
661 MUIA_TextEditor_Keywords -- [IS.], STRPTR *
664 Allows to specify a comma separated string of keywords to check for
665 while the user is typing. If one of these keywords is found the
666 attribute MUIA_TextEditor_MatchedKeyword will be triggered with the
667 matched keyword as trigger value. The check will happen after typing
668 either a space or TAB or RETURN after a word.
671 set(editorgad, MUIA_TextEditor_Keywords, "foo,bar,baz");
674 MUIA_TextEditor_MatchedKeyword
676 \fTextEditor.mcc/TextEditor.mcc/MUIA_TextEditor_MatchedKeyword
679 MUIA_TextEditor_MatchedKeyword -- [..G], STRPTR
682 This attribute is used as a notification trigger only. It will be set to
683 the keyword which was found in the list of keywords provided by the
684 attribute MUIA_TextEditor_Keywords.
687 MUIA_TextEditor_Keywords
689 \fTextEditor.mcc/MUIA_TextEditor_PasteColors
692 MUIA_TextEditor_PasteColors -- [ISG], BOOL
695 Setting this tag to FALSE will ignore any color information upon pasting
696 a text clip from the clipboard.
699 MUIA_TextEditor_PasteStyles
701 \fTextEditor.mcc/MUIA_TextEditor_PasteStyles
704 MUIA_TextEditor_PasteStyles -- [ISG], BOOL
707 Setting this tag to FALSE will ignore any style information upon pasting
708 a text clip from the clipboard.
711 MUIA_TextEditor_PasteColors
713 \fTextEditor.mcc/MUIA_TextEditor_Pen
716 MUIA_TextEditor_Pen -- [.SG], UBYTE (do you need UWORD or ULONG?)
719 The value of this tag reflects the current render pen.
722 MUIA_TextEditor_ColorMap
724 \fTextEditor.mcc/MUIA_TextEditor_Prop_DeltaFactor
727 MUIA_TextEditor_Prop_DeltaFactor -- [..G], ULONG (OBSOLETE)
731 This tag can tell you how high a line is. This is useful when you set
732 the increment value of a slider, as MUIA_TextEditor_Prop_Entries holds
735 You shouldn't use this. Instead, use MUIA_TextEditor_Slider.
738 DoMethod(editorgad, MUIM_Notify,
739 MUIA_TextEditor_Prop_DeltaFactor, MUIV_EveryTime,
740 slider, 3, MUIM_Set, MUIA_Prop_DeltaFactor, MUIV_TriggerValue);
743 MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
744 MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_Entries
746 \fTextEditor.mcc/MUIA_TextEditor_Prop_Entries
749 MUIA_TextEditor_Prop_Entries -- [..G], ULONG (OBSOLETE)
753 This value is the total number of lines in the editor.
754 If you want a slider attached to the gadget, you should create
755 a notify on this attribute.
757 You shouldn't use this. Instead, use MUIA_TextEditor_Slider.
760 DoMethod(editorgad, MUIM_Notify,
761 MUIA_TextEditor_Prop_Entries, MUIV_EveryTime,
762 slider, 3, MUIM_Set, MUIA_Prop_Entries, MUIV_TriggerValue);
765 MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
766 MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_DeltaFactor
768 \fTextEditor.mcc/MUIA_TextEditor_Prop_First
771 MUIA_TextEditor_Prop_First -- [.SG], ULONG (OBSOLETE)
774 Get or set the first displayed line. The purpose of this attribute
775 is to allow connection between the editor gadget and a scrollbar.
779 DoMethod(editor, MUIM_Notify,
780 MUIA_TextEditor_Prop_First, MUIV_EveryTime,
781 slider, 3, MUIM_Set, MUIA_Prop_First, MUIV_TriggerValue);
783 DoMethod(slider, MUIM_Notify,
784 MUIA_Prop_First, MUIV_EveryTime,
785 editor, 3, MUIM_Set, MUIA_TextEditor_Prop_First, MUIV_TriggerValue);
788 MUIA_TextEditor_Prop_Visible, MUIA_TextEditor_Slider
789 MUIA_TextEditor_Prop_Entries, MUIA_TextEditor_Prop_DeltaFactor
791 \fTextEditor.mcc/MUIA_TextEditor_Prop_Visible
794 MUIA_TextEditor_Prop_Visible -- [..G], ULONG (OBSOLETE)
797 This value is the number of lines that currently fit in the window.
798 If you want a slider attached to the gadget, you should create a
799 notify on this attribute.
801 You shouldn't use this. Instead, use MUIA_TextEditor_Slider.
805 DoMethod(editorgad, MUIM_Notify,
806 MUIA_TextEditor_Prop_Visible, MUIV_EveryTime,
807 slider, 3, MUIM_Set, MUIA_Prop_Visible, MUIV_TriggerValue);
810 MUIA_TextEditor_Prop_Entries, MUIA_TextEditor_Slider
811 MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_DeltaFactor
813 \fTextEditor.mcc/MUIA_TextEditor_Quiet
816 MUIA_TextEditor_Quiet -- [ISG], BOOL
819 If you need to insert a lot of text "line by line", you should
820 set this tag to TRUE before starting, and then back to FALSE when
821 you are done adding text.
824 MUIM_TextEditor_InsertText
826 \fTextEditor.mcc/MUIA_TextEditor_ReadOnly
829 MUIA_TextEditor_ReadOnly -- [ISG], BOOL
832 Setting this tag to TRUE will make the text read-only.
833 This is very similar to what FloatText.mui provides, except
834 that this gadget offers blocking.
837 - there will be no cursor (only a normal TAB frame),
838 - TAB will activate the next gadget (instead of RCOMMAND+TAB),
839 - the frame will be set to a ReadListFrame (may change),
840 - there is no ARexx support, except "Copy".
842 However, the MUIA_TextEditor_StyleXXX tags are still
843 usable. In addition, due to backward compatibility when
844 setting the ReadOnly tag to TRUE via OM_SET,
845 MUIA_TextEditor_ActiveObjectOnClick will be set to FALSE.
846 This will prevent the object from getting the active object
847 of the window in case a user presses a mouse button in front
848 of a readonly texteditor object.
851 MUIA_TextEditor_StyleBold
852 MUIA_TextEditor_StyleItalic
853 MUIA_TextEditor_StyleUnderline
854 MUIA_TextEditor_ActiveObjectOnClick
856 \fTextEditor.mcc/MUIA_TextEditor_RedoAvailable
859 MUIA_TextEditor_RedoAvailable -- [..G], BOOL
862 This tag is set to TRUE when the user is able to redo his action(s)
863 (normally after an undo). You can create a notify on this tag and
864 let your redo button be ghosted when there is nothing to redo.
867 MUIA_TextEditor_UndoAvailable
869 \fTextEditor.mcc/MUIA_TextEditor_Rows
872 MUIA_TextEditor_Rows -- [I..], ULONG
875 Set the desired height, in lines.
878 MUIA_TextEditor_Columns
880 \fTextEditor.mcc/MUIA_TextEditor_Separator
883 MUIA_TextEditor_Separator -- [.SG], UWORD *
886 Each line can act as a separator.
888 A separator can be either thick or thin. It can be rendered over
889 the lines contents, or only on both sides of the contents. The
890 placement can be either top, middle or bottom.
892 This tag reflects the current line. See mui/TextEditor_mcc.h for
896 /* A simple way to let the user insert a separator is to create a
897 button or menu item with the following notify.
899 Note: The import hook should be set to
900 MUIV_TextEditor_ImportHook_Plain
901 when the notify is executed.
904 DoMethod(button, MUIM_Notify,
906 editor, 2, MUIM_TextEditor_InsertText, "\n\33c\33[s:2]\n");
908 \fTextEditor.mcc/MUIA_TextEditor_Slider
911 MUIA_TextEditor_Slider -- [IS.], Object *
914 You should give a pointer to a prop object to allow connection
915 between the editor gadget and the prop object.
917 The reason why you shouldn't set up notification yourself is that
918 the gadget needs to set two undocumented tags for the prop object.
921 MUIA_TextEditor_Prop_DeltaFactor, MUIA_TextEditor_Prop_Entries
922 MUIA_TextEditor_Prop_First, MUIA_TextEditor_Prop_Visible
924 \fTextEditor.mcc/MUIA_TextEditor_StyleBold
927 MUIA_TextEditor_StyleBold -- [.SG], BOOL
930 This tag shows whether the cursor or block is over bolded text or not.
931 You can set this tag to TRUE or FALSE if you want the style changed.
935 DoMethod(boldgad, MUIM_Notify,
936 MUIA_Selected, MUIV_EveryTime,
937 editor, 3, MUIM_NoNotifySet, MUIA_TextEditor_StyleBold, MUIV_TriggerValue);
939 DoMethod(editor, MUIM_Notify,
940 MUIA_TextEditor_StyleBold, MUIV_EveryTime,
941 boldgad, 3, MUIM_NoNotifySet, MUIA_Selected, MUIV_TriggerValue);
944 MUIA_TextEditor_StyleItalic, MUIA_TextEditor_StyleUnderline
946 \fTextEditor.mcc/MUIA_TextEditor_StyleItalic
949 MUIA_TextEditor_StyleItalic -- [.SG], BOOL
952 This tag shows whether the cursor or block is over text in italics
953 or not. You can set this tag to TRUE or FALSE if you want the
957 See MUIA_TextEditor_StyleBold
960 MUIA_TextEditor_StyleBold, MUIA_TextEditor_StyleUnderline
962 \fTextEditor.mcc/MUIA_TextEditor_StyleUnderline
965 MUIA_TextEditor_StyleUnderline -- [.SG], BOOL
968 This tag shows whether the cursor or block is over underlined text
969 or not. You can set this tag to TRUE or FALSE if you want the
973 See MUIA_TextEditor_StyleBold
976 MUIA_TextEditor_StyleBold, MUIA_TextEditor_StyleItalic
978 \fTextEditor.mcc/MUIA_TextEditor_TabSize
981 MUIA_TextEditor_TabSize -- [ISG], ULONG
984 MUIV_TextEditor_TabSize_Default
987 This tag overrides the global TAB size as configured by MUI prefs if
988 a specific number of spaces per TAB needs to be enforced.
989 Use MUIV_TextEditor_TabSize_Default to reset the value to the user
990 configured value. Valid values range from 2 to 12 spaces per TAB
992 Use this attribute with care as it contradicts the MUI philosophy to
993 let the user choose the settings.
996 MUIA_TextEditor_ConvertTabs
998 \fTextEditor.mcc/MUIA_TextEditor_TypeAndSpell
1001 MUIA_TextEditor_TypeAndSpell -- [.SG], BOOL
1004 This is a shortcut to the Type'n'spell switch that the user can
1005 set in the .mcp module. NEVER integrate this into the settings
1006 of your preferences.
1010 DoMethod(editor, MUIM_Notify,
1011 MUIA_TextEditor_TypeAndSpell, MUIV_EveryTime,
1012 toggle, 3, MUIM_Set, MUIA_Selected, MUIV_TriggerValue);
1013 DoMethod(toggle, MUIM_Notify,
1014 MUIA_Selected, MUIV_EveryTime,
1015 editor, 3, MUIM_Set, MUIA_TextEditor_TypeAndSpell, MUIV_TriggerValue);
1017 \fTextEditor.mcc/MUIA_TextEditor_UndoAvailable
1020 MUIA_TextEditor_UndoAvailable -- [..G], BOOL
1023 This tag is set to TRUE when the user is able to undo his action(s).
1024 You can create a notify on this tag and let your undo button be
1025 ghosted when there is nothing to undo.
1028 MUIA_TextEditor_RedoAvailable
1030 \fTextEditor.mcc/MUIA_TextEditor_UndoLevels
1033 MUIA_TextEditor_UndoLevels -- [ISG], ULONG
1036 Using this tag an application is able to override the global undo level
1037 setting. A value of zero will disable undo/redo completely. Upon OM_GET
1038 the current number of undo levels will be returned.
1041 MUIA_TextEditor_UndoAvailable
1042 MUIA_TextEditor_RedoAvailable
1044 \fTextEditor.mcc/MUIA_TextEditor_WrapBorder
1047 MUIA_TextEditor_WrapBorder -- [ISG], ULONG
1050 This attribute allows to define the number of characters in texteditor
1051 at which text should be wrapped to the next line (i.e. 'autowrap').
1053 However, the way wrapping is done depends on the actual 'WrapMode'
1054 that was specified by MUIA_TextEditor_WrapMode. In addition,
1055 MUIA_TextEditor_WrapWords will allow to set if TextEditor will wrap
1056 at word boundaries or not.
1058 Per default the WrapBorder is set to 0 which in fact disables the
1059 wrapping and depending on the set WrapMode, wrapping will either be
1060 completly ignored or wrapping will be done at the window limits,
1061 which is the default.
1064 MUIA_TextEditor_WrapMode
1065 MUIA_TextEditor_WrapWords
1066 MUIA_TextEditor_ExportWrap
1067 MUIA_TextEditor_ImportWrap
1069 \fTextEditor.mcc/MUIA_TextEditor_WrapMode
1072 MUIA_TextEditor_WrapMode -- [ISG], ULONG
1075 With this attribute, the way text wrapping is performed can be directly
1076 controlled if MUIA_TextEditor_WrapBorder was set > 0. There are two
1077 major ways of how wrapping can be performed. 'soft wrapping' and
1078 'hard wrapping'. Whereas soft wrapping refers to the process where lines
1079 will just be graphically wrapped to the next line, but are still be
1080 considered a single line. Hard wrapping in turn immediately inserts a
1081 newline character as soon as the cursor passed the specified amount of
1082 characters in one line and therefore seperate them in a 'hard' direct
1086 One of the following values:
1088 MUIV_TextEditor_WrapMode_NoWrap
1089 Wrapping is completly disabled, setting WrapBorder > 0 will
1090 have no effect. That means, the window will have to be resizes
1091 by the user to e.g. see or edit all text.
1093 MUIV_TextEditor_WrapMode_SoftWrap
1094 Enables soft wrapping of lines if WrapBorder > 0. That means,
1095 lines are being wrapped at the specified border in a way that
1096 they are still logically one line. This allows to e.g. dynamically
1097 reconcatenate lines. This should be considered the new preferred
1098 setting for new/revised applications. If WrapBorder == 0, soft
1099 wrapping will be performed at the current window limits.
1101 MUIV_TextEditor_WrapMode_HardWrap (default)
1102 Enables hard wrapping of lines if WrapBorder > 0. That means,
1103 lines are being wrapped at the specified border by directly
1104 inserting newline characters as soon as the cursor passes the
1105 specified border. While this mode is the default, due to
1106 historical reasons, it doesn't allow to directly reconcatenate
1107 lines if the user e.g. removes characters. If WrapBorder == 0,
1108 soft wrapping will be performed at the current window limits.
1111 Due to historical reasons the default is to hard wrap a line if the
1112 WrapBorder attribute is set > 0 and WrapMode is kept untouched.
1113 However, for new applications, soft wrapping should be considered the
1114 preferred setting as this mode is more intuitive and allows users of
1115 texteditor to directly concatenate lines if they e.g. remove
1116 characters while they are writing.
1119 MUIA_TextEditro_WrapBorder
1120 MUIA_TextEditor_ExportWrap
1121 MUIA_TextEditor_ImportWrap
1124 \fTextEditor.mcc/MUIA_TextEditor_WrapWords
1127 MUIA_TextEditor_WrapWords -- [ISG], BOOL
1130 When set to TRUE (default), wrapping will occur at word boundaries
1131 (e.g. space or tab). If FALSE TextEditor.mcc will wrap at any
1135 Change of this attribute will cause update of
1136 editor gadget (but cursor coordinates will be reset to zeroes).
1139 MUIA_TextEditor_WrapMode
1142 \fTextEditor.mcc/MUIM_TextEditor_ARexxCmd
1145 MUIM_TextEditor_ARexxCmd
1148 DoMethod(obj, MUIM_TextEditor_ARexxCmd, STRPTR command);
1151 If the user spends much of his time in the TextEditor gadget, he
1152 may want to have the gadget's functions integrated in the ARexx
1153 command set supplied by the program. This can easily be done with
1154 this method - simply call it with the command that the user has
1155 executed. If the method returns something else than FALSE, then
1156 the command has been used by the gadget; if it does return FALSE,
1157 then you should parse the command yourself.
1159 This method can also be used by you, to communicate with the gadget.
1161 The following commands are currently supported:
1168 GOTOLINE Template: /N/A
1169 GOTOCOLUMN Template: /N/A
1170 CURSOR Template: Up/S,Down/S,Left/S,Right/S
1172 COLUMN Template: /N/A
1173 NEXT Template: Word/S,Sentence/S,Paragraph/S,Page/S
1174 PREVIOUS Template: Word/S,Sentence/S,Paragraph/S,Page/S
1175 POSITION Template: SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
1176 SETBOOKMARK Template: /N/A
1177 GOTOBOOKMARK Template: /N/A
1185 GETCURSOR Template: Line/S,Column/S
1186 MARK Template: On/S,Off/S
1196 The method will return FALSE if it couldn't use the command.
1197 It will return TRUE if it did use the command, but the command
1198 didn't give a result back. It will return a pointer (STRPTR)
1199 when the command gives a result - you should return this pointer
1200 to the user (CreateArgString() it, and set it as the result, in
1201 the Rexx message). You must free the result yourself with FreeVec().
1203 \fTextEditor.mcc/MUIM_TextEditor_BlockInfo
1206 MUIM_TextEditor_BlockInfo
1209 DoMethod(obj, MUIM_TextEditor_BlockInfo, ULONG *startx, ULONG *starty,
1210 ULONG *stopx, ULONG *stopy);
1213 This method fills out the ULONG pointers with the start and stop
1214 position of the currently marked block.
1217 The method will return FALSE if no text has been marked.
1220 ULONG x1, y1, x2, y2;
1221 if(DoMethod(obj, MUIM_TextEditor_BlockInfo, &x1, &y1, &x2, &y2))
1226 \fTextEditor.mcc/MUIM_TextEditor_ClearText
1229 MUIM_TextEditor_ClearText
1232 DoMethod(obj, MUIM_TextEditor_ClearText);
1235 This will clear all the text in the gadget.
1237 \fTextEditor.mcc/MUIM_TextEditor_ExportBlock
1240 MUIM_TextEditor_ExportBlock
1243 DoMethod(obj, MUIM_TextEditor_ExportBlock, ULONG flags);
1245 DoMethod(obj, MUIM_TextEditor_ExportBlock,
1246 MUIF_TextEditor_ExportBlock_TakeBlock,
1247 ULONG startx, ULONG starty,
1248 ULONG stopx, ULONG stopy);
1251 This method exports portions of the current text via the active
1252 export hook and returns it in an AllocVec() allocated string.
1253 Depending on the supplied flags the method acts a bit different
1254 in what text it should export and which it should skip:
1257 Exports the currently marked text. If no text is marked, it
1258 will return an empty, but allocated string.
1259 (see MUIM_TextEditor_BlockInfo)
1261 MUIF_TextEditor_ExportBlock_FullLines:
1262 All complete lines with marked text will be exported, including
1263 non-marked characters as well. If no text is marked, then the
1264 line where the current cursor is on will be exported.
1266 MUIF_TextEditor_ExportBlock_TakeBlock:
1267 Passing this flag the method will accept 4 ULONG coordinates,
1268 startx, starty, stopx, stopy. Passing after this flag these
1269 coordinates permitts to retrieve a block of text without it is
1270 currently marked. useful to analize a block without user sees a
1271 similar behaviour marking a block.
1274 Depends on the export hook. The built-in hooks will return
1275 a pointer to a NUL-terminated buffer containing all the text.
1276 You must free this buffer with FreeVec() when you are done using it.
1277 Returns a NULL pointer if something went wrong.
1280 MUIA_TextEditor_ExportHook
1281 MUIM_TextEditor_InsertText
1282 MUIM_TextEditor_ExportText
1284 TextEditor.mcc/MUIM_TextEditor_SetBlock
1287 MUIM_TextEditor_SetBlock (v15.29)
1290 DoMethod(obj, MUIM_TextEditor_SetBlock,
1291 ULONG startx, ULONG starty,
1292 ULONG stopx, ULONG stopy,
1293 ULONG operation, ULONG value);
1296 This method performs a specific operation on a text block that
1297 is defined by four coordinates (startx,starty,stopx,stopy)
1298 (see MUIM_TextEditor_BlockInfo). The types of operations that
1299 can be performed are supplied via a flag variable 'operation'
1300 and an optional value for all operations can be supplied via
1303 For the start/stop values these special values can be used
1304 together with normal integer values:
1306 MUIV_TextEditor_SetBlock_Min:
1307 The value of the start/stop parameter where this special
1308 value is used will be set to the minimum available (e.g.
1309 start of line for startx).
1311 MUIV_TextEditor_SetBlock_Max:
1312 The value of the start/stop parameter where this special
1313 value is used will be set to the maximum available (e.g.
1314 end of line for stopx).
1316 Possible flags for the 'operation' variable are:
1318 MUIF_TextEditor_SetBlock_Color:
1319 The text block will be assigned a text color in accordance
1320 to the supplied color number in parameter 'value'.
1321 (see MUIA_TextEditor_ColorMap and MUIA_TextEditor_Pen).
1323 MUIF_TextEditor_SetBlock_StyleBold:
1324 Depending on the content of the 'value' (TRUE/FALSE) the
1325 selected text block will get the bold style added or
1328 MUIF_TextEditor_SetBlock_StyleItalic:
1329 Depending on the content of 'value' (TRUE/FALSE) the
1330 selected text block will get the italic style added or
1333 MUIF_TextEditor_SetBlock_StyleUnderline:
1334 Depending on the content of 'value' (TRUE/FALSE) the
1335 selected text block will get the underline style added or
1338 MUIF_TextEditor_SetBlock_Flow:
1339 Depending on the content of 'value' the selected text block
1340 will change it's alignment.
1341 (see MUIA_TextEditor_Flow for possible values)
1344 TRUE if operation succeeded, FALSE if it failed (e.g. invalid
1345 start or stop values have been specified)
1348 When combining multiple operations via flags, care have to be
1349 taken for the content of 'value'. E.g. it is not possible to
1350 have bold style added and italic style removed because of the
1351 global usage of the 'value' parameter. So for mutual exclusive
1352 operations you will have to call this method multiple times.
1355 MUIA_TextEditor_ExportBlock
1356 MUIM_TextEditor_BlockInfo
1357 MUIA_TextEditor_ColorMap
1359 MUIA_TextEditor_Flow
1361 \fTextEditor.mcc/MUIM_TextEditor_ExportText
1364 MUIM_TextEditor_ExportText
1367 DoMethod(obj, MUIM_TextEditor_ExportText);
1370 This will export the text using the current export hook.
1373 Depends on the export hook. The built-in hooks will return
1374 a pointer to a NUL-terminated buffer containing all the text.
1375 You must free this buffer with FreeVec() when you are done using it.
1376 Returns a NULL pointer if something went wrong.
1379 MUIA_TextEditor_ExportHook
1380 MUIM_TextEditor_InsertText
1381 MUIM_TextEditor_ExportBlock
1383 \fTextEditor.mcc/MUIM_TextEditor_HandleError
1386 MUIM_TextEditor_HandleError
1389 DoMethod(obj, MUIM_TextEditor_HandleError, ULONG errorcode);
1392 This method is not supported by the editor gadget itself. The idea
1393 is that you should subclass the gadget and implement your own error
1394 handler. The handler should just bring up a requester or write the
1395 error in a status line.
1397 The different errors are:
1399 Error_ClipboardIsEmpty: The clipboard doesn't hold any data.
1400 Error_ClipboardIsNotFTXT: The clipboard doesn't hold any text.
1401 Error_MacroBufferIsFull: Not yet used.
1402 Error_MemoryAllocationFailed: Not yet used.
1403 Error_NoAreaMarked: The user has tried to copy or cut, but
1404 hasn't marked anything.
1405 Error_NoMacroDefined: Not yet used.
1406 Error_NothingToRedo: There is nothing more to redo.
1407 Error_NothingToUndo: There is nothing more to undo.
1408 Error_NotEnoughUndoMem: The user has erased a block that is too
1409 big to be saved. This results in a lost
1411 Error_StringNotFound: Not yet used.
1416 \fTextEditor.mcc/MUIM_TextEditor_InsertText
1419 MUIM_TextEditor_InsertText
1422 DoMethod(obj, MUIM_TextEditor_InsertText, STRPTR text, LONG pos);
1425 This will insert the given text using the current import hook.
1426 The position of the inserted text can be:
1428 MUIV_TextEditor_InsertText_Cursor
1429 MUIV_TextEditor_InsertText_Top
1430 MUIV_TextEditor_InsertText_Bottom
1436 MUIM_TextEditor_ExportText
1438 \fTextEditor.mcc/MUIM_TextEditor_MacroBegin
1441 MUIM_TextEditor_MacroBegin
1444 DoMethod(obj, MUIM_TextEditor_MacroBegin);
1447 Not yet implemented...
1453 MUIM_TextEditor_MacroEnd, MUIM_TextEditor_MacroExecute
1455 \fTextEditor.mcc/MUIM_TextEditor_MacroEnd
1458 MUIM_TextEditor_MacroEnd
1461 DoMethod(obj, MUIM_TextEditor_MacroEnd);
1464 Not yet implemented...
1470 MUIM_TextEditor_MacroBegin, MUIM_TextEditor_MacroExecute
1472 \fTextEditor.mcc/MUIM_TextEditor_MacroExecute
1475 MUIM_TextEditor_MacroExecute
1478 DoMethod(obj, MUIM_TextEditor_MacroExecute);
1481 Not yet implemented...
1487 MUIM_TextEditor_MacroBegin, MUIM_TextEditor_MacroEnd
1489 \fTextEditor.mcc/MUIM_TextEditor_MarkText
1492 MUIM_TextEditor_MarkText
1495 DoMethod(obj, MUIM_TextEditor_MarkText, ULONG start_x,
1501 This method will mark (select) the given area specified by the
1502 start_x/stop_x,start_y/stop_y rectangular.
1505 - If start_y is set to MUIV_TextEditor_MarkText_None,
1506 then all previously marked text will be unmarked (Select None)
1508 - If stop_y is set to MUIV_TextEditor_MarkText_All,
1509 then all available text will be marked. (Select All)
1514 \fTextEditor.mcc/MUIM_TextEditor_QueryKeyAction
1517 MUIM_TextEditor_QueryKeyAction
1520 DoMethod(obj, MUIM_TextEditor_QueryKeyAction, ULONG keyAction);
1523 Searches through the internal key binding list of the texteditor
1524 object and returns the first found keybinding that satisfies the
1525 specified keyAction code.
1529 The action code (one of MUIV_TextEditor_KeyAction_#?) for which
1530 we search in the internal key bindings list.
1533 A pointer to a struct MUIP_TextEditor_KeyBinding which should NOT
1534 be modified and is for read-only purposes only.
1537 The 'code' member of the MUIP_TextEditor_KeyBinding structure
1538 is normally a direct RAWKEY value. However, to identify vanilla
1539 keys, an offset is added. This means that if the returned code
1540 value > 500, then the specified code is actually a vanilla key
1541 code and you have to substract 500 from the actual value to get
1542 the ASCII code of the character.
1544 \fTextEditor.mcc/MUIM_TextEditor_Replace
1547 MUIM_TextEditor_Replace
1550 DoMethod(obj, MUIM_TextEditor_Replace, STRPTR newstring, ULONG flags);
1553 This method replacea the marked area with the given string.
1554 Currently no flags are defined, so pass 0L for now.
1557 TRUE if the string was replaced. A failure is likely to be because
1558 nothing was marked when this method was invoked.
1560 \fTextEditor.mcc/MUIM_TextEditor_Search
1563 MUIM_TextEditor_Search
1566 DoMethod(obj, MUIM_TextEditor_Search, STRPTR string, ULONG flags);
1569 Search the text for the given string. The string must not exceed 120
1574 MUIF_TextEditor_Search_FromTop
1575 Normally the search starts at the cursor position - this flag will
1576 make it start at the beginning of the text.
1578 MUIF_TextEditor_Search_CaseSensitive
1579 If you want the search to be case sensitive, then set this flag.
1581 MUIF_TextEditor_Search_Backwards
1582 With this flag TextEditor will perform a backward search from
1586 TRUE if the string was found, otherwise FALSE.
1589 If the string is found, it will be automatically marked. Thus,
1590 in case you want to replace it, simply clear the marked string and