1 /***************************************************************************
3 TextEditor.mcc - Textediting MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005 by TextEditor.mcc Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc
21 ***************************************************************************/
25 #include <clib/alib_protos.h>
26 #include <devices/inputevent.h>
27 #include <libraries/asl.h>
28 #include <libraries/mui.h>
29 #include <proto/exec.h>
30 #include <proto/intuition.h>
31 #include <proto/muimaster.h>
38 #define MUIM_Mccprefs_RegisterGadget 0x80424828 // V20
45 #include "TextEditor_mcc.h"
47 char *FunctionName (UWORD func
)
54 name
= GetStr(MSG_Function_Up
);
58 name
= GetStr(MSG_Function_Down
);
62 name
= GetStr(MSG_Function_Left
);
66 name
= GetStr(MSG_Function_Right
);
70 name
= GetStr(MSG_Function_PrvPage
);
74 name
= GetStr(MSG_Function_NxtPage
);
78 name
= GetStr(MSG_Function_BOL
);
82 name
= GetStr(MSG_Function_EOL
);
86 name
= GetStr(MSG_Function_Top
);
90 name
= GetStr(MSG_Function_Bottom
);
94 name
= GetStr(MSG_Function_PrvWord
);
98 name
= GetStr(MSG_Function_NxtWord
);
102 name
= GetStr(MSG_Function_PrvPara
);
106 name
= GetStr(MSG_Function_NxtPara
);
109 case mPreviousSentence
:
110 name
= GetStr(MSG_Function_PrvSent
);
114 name
= GetStr(MSG_Function_NxtSent
);
118 name
= GetStr(MSG_Function_SuggestSpelling
);
122 name
= GetStr(MSG_Function_Backspace
);
126 name
= GetStr(MSG_Function_Delete
);
130 name
= GetStr(MSG_Function_Return
);
134 name
= GetStr(MSG_Function_Tab
);
138 name
= GetStr(MSG_Function_Cut
);
142 name
= GetStr(MSG_Function_Copy
);
146 name
= GetStr(MSG_Function_Paste
);
150 name
= GetStr(MSG_Function_Undo
);
154 name
= GetStr(MSG_Function_Redo
);
158 name
= GetStr(MSG_Function_DelEOL
);
162 name
= GetStr(MSG_Function_DelBOL
);
166 name
= GetStr(MSG_Function_DelEOW
);
170 name
= GetStr(MSG_Function_DelBOW
);
174 name
= GetStr(MSG_Function_DelLine
);
178 name
= GetStr(MSG_Function_NextGadget
);
182 name
= GetStr(MSG_Function_GotoBookmark1
);
186 name
= GetStr(MSG_Function_GotoBookmark2
);
190 name
= GetStr(MSG_Function_GotoBookmark3
);
194 name
= GetStr(MSG_Function_SetBookmark1
);
198 name
= GetStr(MSG_Function_SetBookmark2
);
202 name
= GetStr(MSG_Function_SetBookmark3
);
211 #define ARRAY_SIZE(X) (sizeof(X)/sizeof(X[0]))
212 /* compile time assert to cause a linker error. DO NOT CHANGE! */
213 void __FAIL_ON_ME(void);
214 #define _ASSERT(EXP) ((void) ((EXP) ? 0 : __FAIL_ON_ME()))
216 static Object
*PrefsObject(struct InstData_MCP
*data
)
218 static const void *titles
[] = {
220 MSG_Page_Keybindings
,
221 MSG_Page_SpellChecker
,
224 static const void *functions
[] = {
229 MSG_Function_PrvPage
,
230 MSG_Function_NxtPage
,
235 MSG_Function_PrvWord
,
236 MSG_Function_NxtWord
,
237 MSG_Function_PrvPara
,
238 MSG_Function_NxtPara
,
239 MSG_Function_PrvSent
,
240 MSG_Function_NxtSent
,
241 MSG_Function_SuggestSpelling
,
242 MSG_Function_Backspace
,
255 MSG_Function_NextGadget
,
256 MSG_Function_GotoBookmark1
,
257 MSG_Function_GotoBookmark2
,
258 MSG_Function_GotoBookmark3
,
259 MSG_Function_SetBookmark1
,
260 MSG_Function_SetBookmark2
,
261 MSG_Function_SetBookmark3
,
264 static const void *cycleentries
[] = {
272 _ASSERT( ARRAY_SIZE(data
->gTitles
) == (ARRAY_SIZE(titles
)+1) );
273 for(i
=0; i
<ARRAY_SIZE(titles
); i
++)
274 data
->gTitles
[i
] = GetStr((APTR
)titles
[i
]);
275 data
->gTitles
[ARRAY_SIZE(titles
)] = NULL
;
277 _ASSERT( ARRAY_SIZE(data
->functions
) == (ARRAY_SIZE(functions
)+1) );
278 for(i
=0; i
<ARRAY_SIZE(functions
); i
++)
279 data
->functions
[i
] = GetStr((APTR
)functions
[i
]);
280 data
->functions
[ARRAY_SIZE(functions
)] = NULL
;
282 _ASSERT( ARRAY_SIZE(data
->execution
) == 3 );
283 data
->execution
[0] = GetStr(MSG_Execution_CLI
);
284 data
->execution
[1] = GetStr(MSG_Execution_ARexx
);
285 data
->execution
[2] = NULL
;
287 _ASSERT( ARRAY_SIZE(data
->cycleentries
) == (ARRAY_SIZE(cycleentries
)+1) );
288 for(i
=0; i
<ARRAY_SIZE(cycleentries
); i
++)
289 data
->cycleentries
[i
] = GetStr((APTR
)cycleentries
[i
]);
290 data
->cycleentries
[ARRAY_SIZE(cycleentries
)] = NULL
;
292 data
->obj
= CreatePrefsGroup(data
);
295 set(data
->normalfont
, MUIA_String_AdvanceOnCR
, TRUE
);
296 set(data
->fixedfont
, MUIA_String_AdvanceOnCR
, TRUE
);
298 DoMethod(data
->blockqual
, MUIM_MultiSet
, MUIA_CycleChain
, TRUE
,
299 data
->blockqual
, data
->tabsize
, data
->smooth
,
300 data
->normalfont
, data
->fixedfont
, data
->textcolor
, data
->frame
,
301 data
->highlightcolor
, data
->background
, data
->cursorcolor
,
302 data
->markedcolor
, data
->cursorwidth
, data
->deletekey
,
303 data
->blinkspeed
, data
->suggestcmd
, data
->lookupcmd
,
304 data
->typenspell
, data
->undosize
, data
->LookupExeType
,
305 data
->SuggestExeType
, data
->CheckWord
, data
->insertkey
,
306 data
->separatorshadow
, data
->separatorshine
, NULL
);
312 ULONG
New(REG(a0
, struct IClass
*cl
), REG(a2
, Object
*obj
), REG(a1
, struct opSet
*msg
))
314 if((obj
= (Object
*)DoSuperMethodA(cl
, obj
, (Msg
)msg
)))
316 struct InstData_MCP
*data
= INST_DATA(cl
, obj
);
318 // create the main prefs object
319 Object
*prefsobject
= PrefsObject(data
);
321 if((data
->CfgObj
= prefsobject
))
323 DoMethod(obj
, OM_ADDMEMBER
, prefsobject
);
325 if(MUIMasterBase
->lib_Version
>= 20)
327 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->LookupExeType
, MUICFG_TextEditor_LookupCmd
, 1, GetStr(MSG_Label_LookupCmd
));
328 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->lookupcmd
, MUICFG_TextEditor_LookupCmd
, 1, GetStr(MSG_Label_LookupCmd
));
329 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->SuggestExeType
, MUICFG_TextEditor_SuggestCmd
, 1, GetStr(MSG_Label_SuggestCmd
));
330 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->suggestcmd
, MUICFG_TextEditor_SuggestCmd
, 1, GetStr(MSG_Label_SuggestCmd
));
331 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->keybindings
, MUICFG_TextEditor_Keybindings
, 1, GetStr(MSG_Page_Keybindings
));
332 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->frame
, MUICFG_TextEditor_Frame
, 1, GetStr(MSG_Label_Frame
));
333 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->background
, MUICFG_TextEditor_Background
, 1, GetStr(MSG_Label_Background
));
334 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->blinkspeed
, MUICFG_TextEditor_BlinkSpeed
, 1, GetStr(MSG_Label_BlinkSpeed
));
335 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->blockqual
, MUICFG_TextEditor_BlockQual
, 1, GetStr(MSG_Label_BlkQual
));
336 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->cursorcolor
, MUICFG_TextEditor_CursorColor
, 1, GetStr(MSG_Label_Cursor
));
337 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->cursorwidth
, MUICFG_TextEditor_CursorWidth
, 1, GetStr(MSG_Label_Width
));
338 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->fixedfont
, MUICFG_TextEditor_FixedFont
, 1, GetStr(MSG_Label_Fixed
));
339 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->highlightcolor
, MUICFG_TextEditor_HighlightColor
, 1, GetStr(MSG_Label_Highlight
));
340 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->markedcolor
, MUICFG_TextEditor_MarkedColor
, 1, GetStr(MSG_Label_Selected
));
341 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->normalfont
, MUICFG_TextEditor_NormalFont
, 1, GetStr(MSG_Label_Normal
));
342 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->smooth
, MUICFG_TextEditor_Smooth
, 1, GetStr(MSG_Label_Smooth
));
343 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->typenspell
, MUICFG_TextEditor_TypeNSpell
, 1, GetStr(MSG_ConfigMenu_TypeNSpell
));
344 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->CheckWord
, MUICFG_TextEditor_CheckWord
, 1, GetStr(MSG_ConfigMenu_CheckWord
));
345 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->tabsize
, MUICFG_TextEditor_TabSize
, 1, GetStr(MSG_Label_TabSize
));
346 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->undosize
, MUICFG_TextEditor_UndoSize
, 1, GetStr(MSG_Label_UndoLevel
));
347 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->textcolor
, MUICFG_TextEditor_TextColor
, 1, GetStr(MSG_Label_Text
));
348 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->separatorshine
, MUICFG_TextEditor_SeparatorShine
, 1, GetStr(MSG_Label_SeparatorShine
));
349 DoMethod(obj
, MUIM_Mccprefs_RegisterGadget
, data
->separatorshadow
, MUICFG_TextEditor_SeparatorShadow
, 1, GetStr(MSG_Label_SeparatorShadow
));
352 set(data
->frame
, MUIA_Disabled
, TRUE
);
357 CoerceMethod(cl
, obj
, OM_DISPOSE
);
362 ULONG
Dispose(REG(a0
, struct IClass
*cl
), REG(a2
, Object
*obj
), REG(a1
, Msg msg
))
364 struct InstData_MCP
*data
= INST_DATA(cl
, obj
);
365 Object
*editpopup
= data
->editpopup
;
369 DoMethod(obj
, OM_REMMEMBER
, data
->CfgObj
);
370 MUI_DisposeObject(data
->CfgObj
);
374 MUI_DisposeObject(editpopup
);
376 return(DoSuperMethodA(cl
, obj
, msg
));
379 ULONG
GadgetsToConfig(REG(a0
, struct IClass
*cl
), REG(a2
, Object
*obj
), REG(a1
, struct MUIP_Settingsgroup_GadgetsToConfig
*msg
))
381 struct InstData_MCP
*data
= INST_DATA(cl
, obj
);
383 // separate variable for getting pointers, as we can't store them as LONGs
386 // first save the config version
387 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_ConfigVersion
);
389 ExportKeys(msg
->configdata
, data
);
391 get(data
->frame
, MUIA_Framedisplay_Spec
, &cfg_data_ptr
);
392 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_FrameSpec
), MUICFG_TextEditor_Frame
);
394 get(data
->background
, MUIA_Imagedisplay_Spec
, &cfg_data_ptr
);
395 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_ImageSpec
), MUICFG_TextEditor_Background
);
397 get(data
->blinkspeed
, MUIA_Numeric_Value
, &cfg_data
);
398 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_BlinkSpeed
);
400 get(data
->blockqual
, MUIA_Cycle_Active
, &cfg_data
);
401 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_BlockQual
);
403 get(data
->cursorcolor
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
404 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_CursorColor
);
406 get(data
->cursorwidth
, MUIA_Numeric_Value
, &cfg_data
);
407 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_CursorWidth
);
409 get(data
->fixedfont
, MUIA_String_Contents
, &cfg_data_ptr
);
410 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, strlen((char *)cfg_data_ptr
)+1, MUICFG_TextEditor_FixedFont
);
412 get(data
->frame
, MUIA_Framedisplay_Spec
, &cfg_data_ptr
);
413 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_FrameSpec
), MUICFG_TextEditor_Frame
);
415 get(data
->highlightcolor
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
416 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_HighlightColor
);
418 get(data
->markedcolor
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
419 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_MarkedColor
);
421 get(data
->normalfont
, MUIA_String_Contents
, &cfg_data_ptr
);
422 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, strlen((char *)cfg_data_ptr
)+1, MUICFG_TextEditor_NormalFont
);
427 get(data
->LookupExeType
, MUIA_Cycle_Active
, buffer
);
428 get(data
->lookupcmd
, MUIA_String_Contents
, &cfg_data_ptr
);
429 CopyMem((APTR
)cfg_data_ptr
, &buffer
[1], 256);
430 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, buffer
, strlen((char *)cfg_data_ptr
)+5, MUICFG_TextEditor_LookupCmd
);
432 get(data
->SuggestExeType
, MUIA_Cycle_Active
, buffer
);
433 get(data
->suggestcmd
, MUIA_String_Contents
, &cfg_data_ptr
);
434 CopyMem((APTR
)cfg_data_ptr
, &buffer
[1], 256);
435 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, buffer
, strlen((char *)cfg_data_ptr
)+5, MUICFG_TextEditor_SuggestCmd
);
438 get(data
->smooth
, MUIA_Selected
, &cfg_data
);
439 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_Smooth
);
441 get(data
->typenspell
, MUIA_Selected
, &cfg_data
);
442 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_TypeNSpell
);
444 get(data
->CheckWord
, MUIA_Selected
, &cfg_data
);
445 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_CheckWord
);
447 get(data
->tabsize
, MUIA_Numeric_Value
, &cfg_data
);
448 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_TabSize
);
450 get(data
->undosize
, MUIA_Numeric_Value
, &cfg_data
);
451 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, &cfg_data
, sizeof(LONG
), MUICFG_TextEditor_UndoSize
);
453 get(data
->textcolor
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
454 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_TextColor
);
456 get(data
->separatorshine
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
457 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_SeparatorShine
);
459 get(data
->separatorshadow
, MUIA_Pendisplay_Spec
, &cfg_data_ptr
);
460 DoMethod(msg
->configdata
, MUIM_Dataspace_Add
, cfg_data_ptr
, sizeof(struct MUI_PenSpec
), MUICFG_TextEditor_SeparatorShadow
);
465 ULONG
ConfigToGadgets(REG(a0
, struct IClass
*cl
), REG(a2
, Object
*obj
), REG(a1
, struct MUIP_Settingsgroup_ConfigToGadgets
*msg
))
467 struct InstData_MCP
*data
= INST_DATA(cl
, obj
);
470 /* if(cfg_data = (APTR)DoMethod(msg->configdata, MUIM_Dataspace_Find, MUICFG_TextEditor_ConfigVersion))
471 kprintf("Config version: %ld\n", *((ULONG *)cfg_data));
472 else kprintf("Obsolete config\n");
474 ImportKeys(msg
->configdata
, data
);
476 if((cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_LookupCmd
)))
478 set(data
->LookupExeType
, MUIA_Cycle_Active
, *(ULONG
*)cfg_data
);
479 set(data
->lookupcmd
, MUIA_String_Contents
, (ULONG
*)cfg_data
+1);
483 set(data
->LookupExeType
, MUIA_Cycle_Active
, 0);
484 set(data
->lookupcmd
, MUIA_String_Contents
, "");
487 if((cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_SuggestCmd
)))
489 set(data
->SuggestExeType
, MUIA_Cycle_Active
, *(ULONG
*)cfg_data
);
490 set(data
->suggestcmd
, MUIA_String_Contents
, (ULONG
*)cfg_data
+1);
494 set(data
->SuggestExeType
, MUIA_Cycle_Active
, 1);
495 set(data
->suggestcmd
, MUIA_String_Contents
, "\"Open('f', 'T:Matches', 'W');WriteLn('f', '%s');Close('f')");
498 set(data
->frame
, MUIA_Framedisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_Frame
)) ? cfg_data
: "302200");
499 set(data
->background
, MUIA_Imagedisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_Background
)) ? cfg_data
: "2:m2");
500 set(data
->blinkspeed
, MUIA_Numeric_Value
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_BlinkSpeed
)) ? *(ULONG
*)cfg_data
: 0);
501 set(data
->blockqual
, MUIA_Cycle_Active
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_BlockQual
)) ? *(ULONG
*)cfg_data
: 0);
502 set(data
->cursorcolor
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_CursorColor
)) ? cfg_data
: "m0");
503 set(data
->cursorwidth
, MUIA_Numeric_Value
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_CursorWidth
)) ? *(ULONG
*)cfg_data
: 6);
504 set(data
->fixedfont
, MUIA_String_Contents
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_FixedFont
)) ? cfg_data
: "");
505 set(data
->highlightcolor
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_HighlightColor
)) ? cfg_data
: "m0");
506 set(data
->markedcolor
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_MarkedColor
)) ? cfg_data
: "m6");
507 set(data
->normalfont
, MUIA_String_Contents
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_NormalFont
)) ? cfg_data
: "");
508 set(data
->smooth
, MUIA_Selected
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_Smooth
)) ? *(ULONG
*)cfg_data
: TRUE
);
509 set(data
->typenspell
, MUIA_Selected
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_TypeNSpell
)) ? *(ULONG
*)cfg_data
: FALSE
);
510 set(data
->CheckWord
, MUIA_Selected
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_CheckWord
)) ? *(ULONG
*)cfg_data
: FALSE
);
511 set(data
->tabsize
, MUIA_Numeric_Value
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_TabSize
)) ? *(ULONG
*)cfg_data
: 4);
512 set(data
->undosize
, MUIA_Numeric_Value
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_UndoSize
)) ? *(ULONG
*)cfg_data
: 500);
513 set(data
->textcolor
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_TextColor
)) ? cfg_data
: "m5");
514 set(data
->separatorshine
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_SeparatorShine
)) ? cfg_data
: "m1");
515 set(data
->separatorshadow
, MUIA_Pendisplay_Spec
, (cfg_data
= (void *)DoMethod(msg
->configdata
, MUIM_Dataspace_Find
, MUICFG_TextEditor_SeparatorShadow
)) ? cfg_data
: "m3");