├── .gitattributes ├── ChangeLog ├── include ├── SDI_lib.h ├── SDI_stdarg.h ├── SDI_compiler.h ├── libraries │ ├── mui.h │ └── muiaros.h ├── fd │ ├── mccclass_lib.fd │ └── muimaster_lib.fd ├── clib │ ├── mccclass_protos.h │ └── muimaster_protos.h ├── sfd │ ├── mccclass_lib.sfd │ └── muimaster_lib.sfd ├── inline │ ├── mccclass.h │ ├── muimaster.h │ └── muimaster_protos.h ├── interfaces │ ├── mccclass.i │ ├── mccclass.h │ └── muimaster.h ├── pragmas │ ├── mccclass_pragmas.h │ └── muimaster_pragmas.h ├── inline4 │ ├── mccclass.h │ └── muimaster.h ├── xml │ ├── mccclass.xml │ └── muimaster.xml ├── defines │ └── mccclass.h ├── newmouse.h ├── mui │ ├── HotkeyString_mcc.h │ ├── NBitmap_mcc.h │ └── BetterString_mcc.h ├── amiga-align.h ├── default-align.h ├── shellstart.c ├── muiextra.h ├── proto │ ├── mccclass.h │ └── muimaster.h ├── mcc_common.h ├── mccclass_68k.c └── ppcinline │ └── muimaster.h ├── mcp ├── mmakefile.src ├── images │ ├── icon32.png │ └── icon8.iff ├── extrasrc │ ├── GetHead.c │ ├── GetTail.c │ ├── GetSucc.c │ └── GetPred.c ├── C_h.sd ├── vastubs.c ├── C_c.sd ├── version.h ├── icon.h ├── Makefile.dep ├── Dispatcher.c ├── Keybindings.c ├── TextEditor_mcp.h ├── Preference.c └── library.c ├── demo ├── Toolstrip.ilbm ├── Toolstrip_G.ilbm ├── TextEditor-Demo-Toolbar.c ├── rexx │ ├── CountWords.TEd │ ├── Reformat.Rexx │ ├── MakeFormalLetter.TEd │ └── ImageDimensions.TEd ├── mmakefile.src └── vastubs.c ├── dist ├── MCC_TextEditor.info └── MCC_TextEditor │ ├── Demos.info │ ├── Docs.info │ ├── Install-MCC │ ├── ReadMe.info │ ├── COPYING.info │ ├── ChangeLog.info │ ├── Install-MCC.info │ ├── ReadMe.mui.info │ ├── Demos │ └── TextEditor-Demo.info │ ├── Docs │ └── MCC_TextEditor.guide.info │ └── ReadMe.mui ├── doc ├── MCC_TextEditor.guide └── MCC_TextEditor.readme ├── .gitignore ├── mmakefile.src ├── .tx └── config ├── tools ├── update_copyright.sh ├── bumprev.sh └── mkrelease.sh ├── mcc ├── extrasrc │ ├── FreeVecPooled.c │ ├── GetHead.c │ ├── GetTail.c │ ├── GetSucc.c │ ├── AllocVecPooled.c │ ├── GetPred.c │ └── MoveList.c ├── mmakefile.src ├── vastubs.c ├── ExportText.c ├── version.h ├── Grow.c ├── CaseConversion.c ├── AllocBitMap.c ├── ExportBlock.c ├── Keybindings.c ├── ImportText.c ├── SetBlock.c ├── Search.c └── library.c ├── Makefile ├── .github └── workflows │ ├── purge_artifacts.sh │ └── ci.yml └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * -crlf 2 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/ChangeLog -------------------------------------------------------------------------------- /include/SDI_lib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/include/SDI_lib.h -------------------------------------------------------------------------------- /mcp/mmakefile.src: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/mcp/mmakefile.src -------------------------------------------------------------------------------- /demo/Toolstrip.ilbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/demo/Toolstrip.ilbm -------------------------------------------------------------------------------- /demo/Toolstrip_G.ilbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/demo/Toolstrip_G.ilbm -------------------------------------------------------------------------------- /include/SDI_stdarg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/include/SDI_stdarg.h -------------------------------------------------------------------------------- /mcp/images/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/mcp/images/icon32.png -------------------------------------------------------------------------------- /mcp/images/icon8.iff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/mcp/images/icon8.iff -------------------------------------------------------------------------------- /include/SDI_compiler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/include/SDI_compiler.h -------------------------------------------------------------------------------- /include/libraries/mui.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/include/libraries/mui.h -------------------------------------------------------------------------------- /dist/MCC_TextEditor.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor.info -------------------------------------------------------------------------------- /doc/MCC_TextEditor.guide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/doc/MCC_TextEditor.guide -------------------------------------------------------------------------------- /include/libraries/muiaros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/include/libraries/muiaros.h -------------------------------------------------------------------------------- /demo/TextEditor-Demo-Toolbar.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/demo/TextEditor-Demo-Toolbar.c -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Demos.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Demos.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Docs.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Docs.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Install-MCC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Install-MCC -------------------------------------------------------------------------------- /dist/MCC_TextEditor/ReadMe.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/ReadMe.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/COPYING.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/COPYING.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/ChangeLog.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/ChangeLog.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Install-MCC.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Install-MCC.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/ReadMe.mui.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/ReadMe.mui.info -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.catalog 2 | bin_* 3 | .obj_* 4 | mcp/locale.* 5 | /release 6 | /MCC_TextEditor-*.lha 7 | /MCC_TextEditor-*.readme 8 | -------------------------------------------------------------------------------- /include/fd/mccclass_lib.fd: -------------------------------------------------------------------------------- 1 | *"class.mcc" 2 | ##base _MCCClassBase 3 | ##bias 30 4 | ##public 5 | MCC_Query(which)(d0) 6 | ##end 7 | -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Demos/TextEditor-Demo.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Demos/TextEditor-Demo.info -------------------------------------------------------------------------------- /dist/MCC_TextEditor/Docs/MCC_TextEditor.guide.info: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amiga-mui/texteditor/HEAD/dist/MCC_TextEditor/Docs/MCC_TextEditor.guide.info -------------------------------------------------------------------------------- /include/clib/mccclass_protos.h: -------------------------------------------------------------------------------- 1 | #ifndef MCCCLASS_PROTOS_H 2 | #define MCCCLASS_PROTOS_H 3 | 4 | #ifndef EXEC_TYPES_H 5 | #include 6 | #endif 7 | 8 | ULONG MCC_Query(LONG which); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /include/sfd/mccclass_lib.sfd: -------------------------------------------------------------------------------- 1 | ==id $Id$ 2 | ==base _MCCClassBase 3 | ==basetype struct Library * 4 | ==libname mccclass.library 5 | ==bias 30 6 | ==public 7 | ==include 8 | ULONG MCC_Query(LONG which) (d0) 9 | ==end 10 | -------------------------------------------------------------------------------- /mmakefile.src: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | include $(TOP)/config/make.cfg 3 | 4 | #MM- workbench-classes-zune : workbench-classes-zune-texteditor 5 | 6 | #MM- workbench-classes-zune-texteditor : workbench-classes-zune-betterstring \ 7 | #MM workbench-classes-zune-texteditor-class \ 8 | #MM workbench-classes-zune-texteditor-mcp 9 | -------------------------------------------------------------------------------- /include/inline/mccclass.h: -------------------------------------------------------------------------------- 1 | #ifndef _INLINE_MCCCLASS_H 2 | #define _INLINE_MCCCLASS_H 3 | 4 | #ifndef __INLINE_MACROS_H 5 | #include 6 | #endif 7 | 8 | #ifndef MCCCLASS_BASE_NAME 9 | #define MCCCLASS_BASE_NAME MCCClassBase 10 | #endif 11 | 12 | #define MCC_Query(which) \ 13 | LP1(0x1e, ULONG, MCC_Query, LONG, which, d0, \ 14 | , MCCCLASS_BASE_NAME) 15 | 16 | #endif /* _INLINE_MCCCLASS_H */ 17 | -------------------------------------------------------------------------------- /demo/rexx/CountWords.TEd: -------------------------------------------------------------------------------- 1 | /* Count words in the current document */ 2 | 3 | Address 'TEXTEDITOR-DEMO.1' 4 | Options Results 5 | 6 | Words = 0 7 | GotoLine '-1' 8 | GetCursor Line 9 | Lines = RESULT 10 | GotoLine 0 11 | 12 | Say "Contents:" 13 | 14 | Do While(Lines >= 0) 15 | GetLine 16 | Contents = RESULT 17 | Contents = Left(Contents, Length(contents)-1) 18 | Words = Words+Words(Contents) 19 | Say Contents 20 | Lines = Lines-1 21 | Line 1 22 | End 23 | 24 | Say "Number of words: " || Words 25 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = bs: bosnian, ca: catalan, cs: czech, da: danish, de: german, el: greek, en_GB: english-british, es: spanish, fi: finnish, fr: french, hu: hungarian, hr: croatian, it: italian, nl: dutch, no: norwegian, pl: polish, pt: portuguese, pt_BR: portuguese-brazil, ru: russian, sk: slovak, sl: slovenian, sr: serbian, sv: swedish, tr: turkish 4 | 5 | [texteditor-mcc.trunk] 6 | file_filter = mcp/locale/.po 7 | source_file = mcp/locale/TextEditor_mcp.pot 8 | source_lang = en 9 | -------------------------------------------------------------------------------- /include/interfaces/mccclass.i: -------------------------------------------------------------------------------- 1 | #ifndef MCCCLASS_INTERFACE_DEF_H 2 | #define MCCCLASS_INTERFACE_DEF_H 3 | /* 4 | ** This file is machine generated from idltool 5 | ** Do not edit 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | STRUCTURE MCCClassIFace, InterfaceData_SIZE 13 | FPTR IMCCClass_Obtain 14 | FPTR IMCCClass_Release 15 | FPTR IMCCClass_Expunge 16 | FPTR IMCCClass_Clone 17 | FPTR IMCCClass_MCC_Query 18 | LABEL MCCClassIFace_SIZE 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/pragmas/mccclass_pragmas.h: -------------------------------------------------------------------------------- 1 | #ifndef POS /* private */ 2 | #ifndef _INCLUDE_PRAGMA_MCCCLASS_LIB_H 3 | #define _INCLUDE_PRAGMA_MCCCLASS_LIB_H 4 | 5 | #ifndef CLIB_MCCCLASS_PROTOS_H 6 | #include 7 | #endif 8 | 9 | #if defined(AZTEC_C) || defined(__MAXON__) || defined(__STORM__) 10 | #pragma amicall(MCCClassBase, 0x01e, MCC_Query(d0)) 11 | #endif 12 | #if defined(_DCC) || defined(__SASC) 13 | #pragma libcall MCCClassBase MCC_Query 01e 001 14 | #endif 15 | 16 | #endif /* _INCLUDE_PRAGMA_MCCCLASS_LIB_H */ 17 | #endif /* private */ 18 | -------------------------------------------------------------------------------- /include/inline4/mccclass.h: -------------------------------------------------------------------------------- 1 | #ifndef INLINE4_MCCCLASS_H 2 | #define INLINE4_MCCCLASS_H 3 | 4 | /* 5 | ** This file was auto generated by idltool 50.10. 6 | ** 7 | ** It provides compatibility to OS3 style library 8 | ** calls by substituting functions. 9 | ** 10 | ** Do not edit manually. 11 | */ 12 | 13 | #ifndef EXEC_TYPES_H 14 | #include 15 | #endif 16 | #ifndef EXEC_EXEC_H 17 | #include 18 | #endif 19 | #ifndef EXEC_INTERFACES_H 20 | #include 21 | #endif 22 | 23 | 24 | /* Inline macros for Interface "main" */ 25 | #define MCC_Query(which) IMCCClass->MCC_Query(which) 26 | 27 | #endif /* INLINE4_MCCCLASS_H */ 28 | -------------------------------------------------------------------------------- /tools/update_copyright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # simply bumps the year in all copyright and header files to the latest one 4 | # 5 | # WARNING: This script will run over ALL files regardless if they are text 6 | # or binary files and search for the copyright notice and replace it 7 | # immediately. So you need to be aware of that 8 | # 9 | 10 | YEAR=`date +%Y` 11 | 12 | # walk through the whole directory this script is called in and search 13 | # for files which we will try to update the Copyright notice 14 | find . \( -not -path "*/.git/*" -not -name "update_copyright.sh" \) -type f \ 15 | -exec sed -i "s/Copyright (C) 2005-.*TextEditor\.mcc Open Source Team/Copyright (C) 2005-${YEAR} TextEditor.mcc Open Source Team/g" {} \; 16 | -------------------------------------------------------------------------------- /include/xml/mccclass.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | exec/types.h 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo/rexx/Reformat.Rexx: -------------------------------------------------------------------------------- 1 | /* Reformat a paragraph */ 2 | 3 | Options Results 4 | 5 | Position SOL 6 | SetBookmark 3 7 | Line 1 8 | GetLine 9 | LineContents = RESULT 10 | MoreLines = 1 11 | 12 | Do While ((LineContents ~= '0a'x) & (Left(LineContents,1) ~= ' ') & (MoreLines ~= 0)) 13 | 14 | Position SOL 15 | Backspace 16 | Text ' ' 17 | 18 | GetCursor Line 19 | CurrentLine = RESULT 20 | Line 1 21 | GetCursor Line 22 | if(RESULT = CurrentLine) Then MoreLines = 0 23 | 24 | GetLine 25 | LineContents = RESULT 26 | 27 | End 28 | 29 | GotoBookmark 3 30 | GotoColumn 80 31 | GetCursor Column 32 | ColumnNr = RESULT 33 | 34 | Do While (ColumnNr = 80) 35 | 36 | Previous Word 37 | Backspace 38 | Text '0a'x 39 | GotoColumn 80 40 | GetCursor Column 41 | ColumnNr = RESULT 42 | 43 | End 44 | 45 | Cursor Right 46 | -------------------------------------------------------------------------------- /include/defines/mccclass.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header (sfdc 1.4)! Do not edit! */ 2 | 3 | #ifndef _INLINE_MCCCLASS_H 4 | #define _INLINE_MCCCLASS_H 5 | 6 | #ifndef _SFDC_VARARG_DEFINED 7 | #define _SFDC_VARARG_DEFINED 8 | #ifdef __HAVE_IPTR_ATTR__ 9 | typedef APTR _sfdc_vararg __attribute__((iptr)); 10 | #else 11 | typedef ULONG _sfdc_vararg; 12 | #endif /* __HAVE_IPTR_ATTR__ */ 13 | #endif /* _SFDC_VARARG_DEFINED */ 14 | 15 | #ifndef AROS_LIBCALL_H 16 | #include 17 | #endif /* !AROS_LIBCALL_H */ 18 | 19 | #ifndef MCCCLASS_BASE_NAME 20 | #define MCCCLASS_BASE_NAME MCCClassBase 21 | #endif /* !MCCCLASS_BASE_NAME */ 22 | 23 | #define MCC_Query(___which) \ 24 | AROS_LC1(ULONG, MCC_Query, \ 25 | AROS_LCA(LONG, (___which), D0), \ 26 | struct Library *, MCCCLASS_BASE_NAME, 5, Mccclass) 27 | 28 | #endif /* !_INLINE_MCCCLASS_H */ 29 | -------------------------------------------------------------------------------- /include/interfaces/mccclass.h: -------------------------------------------------------------------------------- 1 | #ifndef MCCCLASS_INTERFACE_DEF_H 2 | #define MCCCLASS_INTERFACE_DEF_H 3 | 4 | /* 5 | ** This file was machine generated by idltool 50.10. 6 | ** Do not edit 7 | */ 8 | 9 | #ifndef EXEC_TYPES_H 10 | #include 11 | #endif 12 | #ifndef EXEC_EXEC_H 13 | #include 14 | #endif 15 | #ifndef EXEC_INTERFACES_H 16 | #include 17 | #endif 18 | 19 | 20 | struct MCCClassIFace 21 | { 22 | struct InterfaceData Data; 23 | 24 | ULONG APICALL (*Obtain)(struct MCCClassIFace *Self); 25 | ULONG APICALL (*Release)(struct MCCClassIFace *Self); 26 | void APICALL (*Expunge)(struct MCCClassIFace *Self); 27 | struct Interface * APICALL (*Clone)(struct MCCClassIFace *Self); 28 | ULONG APICALL (*MCC_Query)(struct MCCClassIFace *Self, LONG which); 29 | }; 30 | 31 | #endif /* MCCCLASS_INTERFACE_DEF_H */ 32 | -------------------------------------------------------------------------------- /tools/bumprev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # a simple shell script which allows to bump the LIB_REVISION and LIB_DATE information 4 | # found in a specified source code file 5 | # 6 | 7 | if [ "$1" = "all" ]; then 8 | find . -maxdepth 2 -name "version.h" -exec $0 {} \; 9 | else 10 | if [ -e $1 ]; then 11 | foundrev=`grep "#define LIB_REVISION " $1` 12 | if [ $? -eq 0 ]; then 13 | founddate=`grep "#define LIB_DATE " $1` 14 | if [ $? -eq 0 ]; then 15 | newrev=`echo $foundrev | awk '{ print $1" "$2" "$3+1 }'` 16 | curdate=`date +%d.%m.%Y` 17 | newdate=`echo "#define LIB_DATE \"${curdate}\""` 18 | sed -i "s/${foundrev}/${newrev}/g" $1 19 | sed -i "s/${founddate}/${newdate}/g" $1 20 | echo "bumped $1" 21 | fi 22 | fi 23 | fi 24 | fi 25 | -------------------------------------------------------------------------------- /demo/mmakefile.src: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | include $(TOP)/config/make.cfg 3 | 4 | #MM workbench-classes-zune-texteditor-demo : includes linklibs \ 5 | #MM workbench-classes-zune-texteditor \ 6 | #MM workbench-classes-zune-texteditor-rexx 7 | 8 | FILES := TextEditor-Demo vastubs 9 | TARGETDIR := $(AROS_TESTS)/Zune/TextEditor 10 | 11 | # We need to use -idirafter, so that we 12 | # *don't* pick up the project's local MUI headers. 13 | USER_INCLUDES := -idirafter $(SRCDIR)/$(CURDIR)/../include 14 | USER_CFLAGS := -DNO_INLINE_STDARG 15 | 16 | %build_prog mmake=workbench-classes-zune-texteditor-demo progname=TextEditor-Demo \ 17 | files=$(FILES) targetdir=$(TARGETDIR) \ 18 | uselibs="amiga mui" 19 | 20 | #MM workbench-classes-zune-texteditor-rexx 21 | %copy_dir_recursive mmake=workbench-classes-zune-texteditor-rexx src=rexx \ 22 | dst=$(AROS_TESTS)/Zune/TextEditor/rexx 23 | 24 | %common 25 | -------------------------------------------------------------------------------- /include/newmouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Include file for the NewMouse standard way of handling wheeled mice. 3 | * 4 | * Copyright (c) 1999 by Alessandro Zumo. All Rights Reserved. 5 | */ 6 | 7 | #ifndef NEWMOUSE_H 8 | #define NEWMOUSE_H 9 | 10 | #ifndef IECLASS_NEWMOUSE 11 | #define IECLASS_NEWMOUSE (0x16) /* IECLASS_MAX + 1 as of V40 */ 12 | #endif 13 | 14 | /* These are issued both under IECLASS_NEWMOUSE and IECLASS_RAWKEY */ 15 | /* by the NewMouse driver */ 16 | 17 | #ifndef NM_WHEEL_UP 18 | #define NM_WHEEL_UP (0x7A) 19 | #endif 20 | 21 | #ifndef NM_WHEEL_DOWN 22 | #define NM_WHEEL_DOWN (0x7B) 23 | #endif 24 | 25 | #ifndef NM_WHEEL_LEFT 26 | #define NM_WHEEL_LEFT (0x7C) 27 | #endif 28 | 29 | #ifndef NM_WHEEL_RIGHT 30 | #define NM_WHEEL_RIGHT (0x7D) 31 | #endif 32 | 33 | #ifndef NM_BUTTON_FOURTH 34 | #define NM_BUTTON_FOURTH (0x7E) 35 | #endif 36 | 37 | #endif /* NEWMOUSE_H */ 38 | -------------------------------------------------------------------------------- /demo/rexx/MakeFormalLetter.TEd: -------------------------------------------------------------------------------- 1 | /* lala */ 2 | 3 | 4 | call addlib("rexxreqtools.library", 0, -30, 0) 5 | Options Results 6 | 7 | LF = '0a'x 8 | Esc = '1b'x 9 | 10 | Name = rtgetstring("", , "Enter your full name:", ,) 11 | 12 | 13 | if Name ~= "" Then Do 14 | 15 | Clear 16 | Text LF || LF || Esc || '[s:2]' || Esc || 'cA nice letter example:' || LF 17 | Text Esc || 'r' || Date() || LF 18 | Text Esc || 'l Dear ' || Name || LF || LF || 'Thank you for your interest in ' || Esc || 'bMotorola' || Esc || 'n Semiconductor Product Sector products and services.' || LF || LF || 'Enclosed are the documents you requested. We currently have over 2,300 databooks, datasheets and reference materials in stock to assist in your search for information regarding Motorola SPS products.' 19 | Text ' [...]' || LF || LF 20 | Text 'ohh, and ' || Esc || 'b' || Esc || 'p[7]' || Word(Name, 1) || Esc || 'p[0]' || Esc || "n - Don't be a stranger :-)" || LF 21 | Text LF || LF || ' Sincerely,' || LF || LF || ' Literature Distribution Center for Motorola SPS' || LF 22 | Text Esc || '[s:2]' || LF 23 | 24 | End 25 | -------------------------------------------------------------------------------- /include/fd/muimaster_lib.fd: -------------------------------------------------------------------------------- 1 | ##base _MUIMasterBase 2 | ##bias 30 3 | ##public 4 | MUI_NewObjectA(par1,last)(a0,a1) 5 | *tagcall-A 6 | MUI_DisposeObject(last)(a0) 7 | MUI_RequestA(par1,par2,par3,par4,par5,par6,last)(d0,d1,d2,a0,a1,a2,a3) 8 | *tagcall-A 9 | MUI_AllocAslRequest(par1,last)(d0,a0) 10 | *tagcall+Tags 11 | MUI_AslRequest(par1,last)(a0,a1) 12 | *tagcall+Tags 13 | MUI_FreeAslRequest(last)(a0) 14 | MUI_Error()() 15 | MUI_SetError(last)(d0) 16 | MUI_GetClass(last)(a0) 17 | MUI_FreeClass(last)(a0) 18 | MUI_RequestIDCMP(par1,last)(a0,d0) 19 | MUI_RejectIDCMP(par1,last)(a0,d0) 20 | MUI_Redraw(par1,last)(a0,d0) 21 | MUI_CreateCustomClass(par1,par2,par3,par4,last)(a0,a1,a2,d0,a3) 22 | MUI_DeleteCustomClass(last)(a0) 23 | MUI_MakeObjectA(par1,last)(d0,a0) 24 | *tagcall-A 25 | MUI_Layout(par1,par2,par3,par4,par5,last)(a0,d0,d1,d2,d3,d4) 26 | ##bias 156 27 | MUI_ObtainPen(par1,par2,last)(a0,a1,d0) 28 | MUI_ReleasePen(par1,last)(a0,d0) 29 | MUI_AddClipping(par1,par2,par3,par4,last)(a0,d0,d1,d2,d3) 30 | MUI_RemoveClipping(par1,last)(a0,a1) 31 | MUI_AddClipRegion(par1,last)(a0,a1) 32 | MUI_RemoveClipRegion(par1,last)(a0,a1) 33 | MUI_BeginRefresh(par1,last)(a0,d0) 34 | MUI_EndRefresh(par1,last)(a0,d0) 35 | ##end 36 | -------------------------------------------------------------------------------- /dist/MCC_TextEditor/ReadMe.mui: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------ 2 | MUI - MagicUserInterface 3 | 4 | Version 3.8 5 | 6 | (c) Copyright 1992-97, Stefan Stuntz 7 | ------------------------------------------------------------------------ 8 | 9 | MUI is an object oriented system to create and maintain graphical user 10 | interfaces. From a programmers point of view, using MUI saves a lot of 11 | time and makes life much easier. Thinking about complicated terms like 12 | window resizing or font sensitivity is simply not neccesary. 13 | 14 | On the other hand, users of MUI based applications have the ability to 15 | customize nearly every pixel of a programs interface according to their 16 | personal taste. 17 | 18 | Please click on the Install-MUI icon to install MUI on your system or to 19 | update from previous versions. Latest news and support can be found on 20 | Internet at www.sasg.com. 21 | 22 | *********** 23 | 24 | Attention 25 | 26 | If you're still not registered for MUI, check the new and unique 27 | shareware lottery and great discounts at www.sasg.com. Give it a try! 28 | -------------------------------------------------------------------------------- /mcc/extrasrc/FreeVecPooled.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #define DEBUG_USE_MALLOC_REDEFINE 1 26 | #include "Debug.h" 27 | 28 | void FreeVecPooled(APTR pool, APTR mem) 29 | { 30 | ULONG *memptr, length; 31 | 32 | ENTER(); 33 | 34 | UNMEMTRACK("AllocVecPooled", mem); 35 | memptr = &((ULONG *)mem)[-1]; 36 | length = *memptr; 37 | 38 | FreePooled(pool, memptr, length); 39 | 40 | LEAVE(); 41 | } 42 | -------------------------------------------------------------------------------- /mcc/extrasrc/GetHead.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetHead() 30 | // get the head element of a list 31 | 32 | struct Node *GetHead(struct List *list) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(list != NULL && IsListEmpty(list) == FALSE) 39 | result = list->lh_Head; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcp/extrasrc/GetHead.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetHead() 30 | // get the head element of a list 31 | 32 | struct Node *GetHead(struct List *list) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(list != NULL && IsListEmpty(list) == FALSE) 39 | result = list->lh_Head; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcc/extrasrc/GetTail.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetTail() 30 | // get the tail element of a list 31 | 32 | struct Node *GetTail(struct List *list) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(list != NULL && IsListEmpty(list) == FALSE) 39 | result = list->lh_TailPred; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcp/extrasrc/GetTail.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetTail() 30 | // get the tail element of a list 31 | 32 | struct Node *GetTail(struct List *list) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(list != NULL && IsListEmpty(list) == FALSE) 39 | result = list->lh_TailPred; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcc/extrasrc/GetSucc.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetSucc() 30 | // get a node's sucessor 31 | 32 | struct Node *GetSucc(struct Node *node) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(node != NULL && node->ln_Succ != NULL && node->ln_Succ->ln_Succ != NULL) 39 | result = node->ln_Succ; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcp/extrasrc/GetSucc.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetSucc() 30 | // get a node's sucessor 31 | 32 | struct Node *GetSucc(struct Node *node) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(node != NULL && node->ln_Succ != NULL && node->ln_Succ->ln_Succ != NULL) 39 | result = node->ln_Succ; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcc/extrasrc/AllocVecPooled.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #define DEBUG_USE_MALLOC_REDEFINE 1 26 | #include "Debug.h" 27 | 28 | APTR AllocVecPooled(APTR pool, ULONG length) 29 | { 30 | ULONG *mem; 31 | 32 | ENTER(); 33 | 34 | length += sizeof(ULONG); 35 | if((mem = AllocPooled(pool, length)) != NULL) 36 | { 37 | *mem++ = length; 38 | MEMTRACK("AllocVecPooled", mem, length); 39 | } 40 | 41 | RETURN(mem); 42 | return(mem); 43 | } 44 | -------------------------------------------------------------------------------- /mcc/extrasrc/GetPred.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetPred() 30 | // get a node's predecessor 31 | 32 | struct Node *GetPred(struct Node *node) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(node != NULL && node->ln_Pred != NULL && node->ln_Pred->ln_Pred != NULL) 39 | result = node->ln_Pred; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcp/extrasrc/GetPred.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "SDI_compiler.h" 26 | 27 | #include "Debug.h" 28 | 29 | // GetPred() 30 | // get a node's predecessor 31 | 32 | struct Node *GetPred(struct Node *node) 33 | { 34 | struct Node *result = NULL; 35 | 36 | ENTER(); 37 | 38 | if(node != NULL && node->ln_Pred != NULL && node->ln_Pred->ln_Pred != NULL) 39 | result = node->ln_Pred; 40 | 41 | RETURN(result); 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /mcc/mmakefile.src: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | include $(TOP)/config/make.cfg 3 | 4 | #MM workbench-classes-zune-texteditor-class : includes linklibs \ 5 | #MM workbench-libs-rexxsyslib 6 | 7 | # We need to use -idirafter, so that we 8 | # *don't* pick up the project's local MUI headers. 9 | USER_INCLUDES := -idirafter $(SRCDIR)/$(CURDIR)/../include -I$(SRCDIR)/$(CURDIR)/../mcp 10 | 11 | FILES := library \ 12 | AllocBitMap \ 13 | AllocFunctions \ 14 | BlockOperators \ 15 | CaseConversion \ 16 | ClipboardServer \ 17 | ColorOperators \ 18 | Dispatcher \ 19 | EditorStuff \ 20 | ExportHook \ 21 | ExportBlock \ 22 | ExportText \ 23 | GetSetAttrs \ 24 | Grow \ 25 | HandleARexx \ 26 | HandleInput \ 27 | InitConfig \ 28 | ImportHook \ 29 | ImportText \ 30 | Keybindings \ 31 | Methods \ 32 | MixedFunctions \ 33 | Navigation \ 34 | Pointer \ 35 | PrintLineWithStyles \ 36 | Search \ 37 | SetBlock \ 38 | SpellChecker \ 39 | StyleOperators \ 40 | UndoFunctions \ 41 | NewGfx \ 42 | Debug 43 | 44 | %build_module_simple mmake=workbench-classes-zune-texteditor-class \ 45 | modname=TextEditor modtype=mcc \ 46 | files=$(FILES) uselibs="rexxsyslib amiga mui rom m" 47 | 48 | 49 | #MM includes-copy 50 | 51 | INCLUDE_FILES := ../include/mui/TextEditor_mcc.h 52 | %copy_includes path=mui dir=../include/mui 53 | 54 | %common 55 | -------------------------------------------------------------------------------- /include/mui/HotkeyString_mcc.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | BetterString.mcc - A better String gadget MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2009 by BetterString.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/ 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef HOTKEYSTRING_MCC_H 24 | #define HOTKEYSTRING_MCC_H 25 | 26 | #ifndef EXEC_TYPES_H 27 | #include 28 | #endif 29 | 30 | #define MUIC_HotkeyString "HotkeyString.mcc" 31 | #if defined(__AROS__) && !defined(NO_INLINE_STDARG) 32 | #define HotkeyStringObject MUIOBJMACRO_START(MUIC_HotkeyString) 33 | #else 34 | #define HotkeyStringObject MUI_NewObject(MUIC_HotkeyString 35 | #endif 36 | 37 | #define MUIA_HotkeyString_Snoop 0xad001000 38 | #define MUIA_HotkeyString_IX 0xad001002 /* V12 IS. */ 39 | 40 | #endif /* HOTKEYSTRING_MCC_H */ 41 | -------------------------------------------------------------------------------- /include/amiga-align.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | YAM - Yet Another Mailer 4 | Copyright (C) 1995-2000 by Marcel Beck 5 | Copyright (C) 2000-2006 by YAM Open Source Team 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program 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 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | YAM Official Support Site : http://www.yam.ch 22 | YAM OpenSource project : http://sourceforge.net/projects/yamos/ 23 | 24 | $Id$ 25 | 26 | ***************************************************************************/ 27 | 28 | /* 29 | ** Special include file for setting a global 30 | ** pragma to align structures to 68k 31 | ** 32 | ** This is needed by AmigaOS4 or MorphOS or every PPC 33 | ** because alignment on PPC is different. 34 | */ 35 | #if defined(__PPC__) 36 | #if defined(__GNUC__) 37 | #pragma pack(2) 38 | #elif defined(__VBCC__) 39 | #pragma amiga-align 40 | #endif 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /include/default-align.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | YAM - Yet Another Mailer 4 | Copyright (C) 1995-2000 by Marcel Beck 5 | Copyright (C) 2000-2006 by YAM Open Source Team 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program 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 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | 21 | YAM Official Support Site : http://www.yam.ch 22 | YAM OpenSource project : http://sourceforge.net/projects/yamos/ 23 | 24 | $Id$ 25 | 26 | ***************************************************************************/ 27 | 28 | /* 29 | ** Special include file for setting a global 30 | ** pragma to unalign structures to 68k 31 | ** 32 | ** This is needed by AmigaOS4 or MorphOS or every PPC 33 | ** because alignment on PPC is different. 34 | */ 35 | #if defined(__PPC__) 36 | #if defined(__GNUC__) 37 | #pragma pack() 38 | #elif defined(__VBCC__) 39 | #pragma default-align 40 | #endif 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /include/shellstart.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | /* 24 | * The system (and compiler) rely on a symbol named _start which marks 25 | * the beginning of execution of an ELF file. To prevent others from 26 | * executing this library, and to keep the compiler/linker happy, we 27 | * define an empty _start symbol here. 28 | * 29 | * On the classic system (pre-AmigaOS4) this was usually done by 30 | * moveq #0,d0 31 | * rts 32 | * 33 | */ 34 | 35 | #if defined(__amigaos3__) 36 | asm(".text\n\ 37 | .even\n\ 38 | .globl _start\n\ 39 | _start:\n\ 40 | moveq #20,d0\n\ 41 | rts"); 42 | #else 43 | LONG _start(void) 44 | { 45 | return RETURN_FAIL; 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /mcp/C_h.sd: -------------------------------------------------------------------------------- 1 | ##stringtype C 2 | ##shortstrings 3 | /*************************************************************************** 4 | 5 | TextEditor.mcc - Textediting MUI Custom Class 6 | Copyright (C) 1997-2000 Allan Odgaard 7 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 20 | 21 | $Id$ 22 | 23 | ***************************************************************************/ 24 | 25 | /* 26 | * If this file is named 'locale.h' it is automatically 27 | * generated by 'FlexCat' from C_h.sd. PLEASE DO NOT EDIT!!! 28 | */ 29 | 30 | #ifndef %b_LOCALE_H 31 | #define %b_LOCALE_H 32 | 33 | // catalog translation functions 34 | extern const char *tr(const void *); 35 | extern BOOL OpenCat(void); 36 | extern void CloseCat(void); 37 | 38 | // const pointers to internal strings 39 | extern const void* const _%i; 40 | 41 | // substiting defines to directly use MSG_XXXXX strings 42 | #define MSG_Space ((const void* const)1) 43 | #define %i ((const void* const)&_%i) 44 | 45 | #endif /* %b_LOCALE_H */ 46 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # 3 | # TextEditor.mcc - Textediting MUI Custom Class 4 | # Copyright (C) 1997-2000 Allan Odgaard 5 | # Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | # 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. 11 | # 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. 16 | # 17 | # TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | # 19 | # $Id$ 20 | # 21 | #***************************************************************************/ 22 | 23 | .PHONY: all 24 | all: mcc mcp demo 25 | 26 | .PHONY: mcc 27 | mcc: 28 | @$(MAKE) -C mcc 29 | 30 | .PHONY: mcp 31 | mcp: 32 | @$(MAKE) -C mcp 33 | 34 | .PHONY: demo 35 | demo: 36 | @$(MAKE) -C demo 37 | 38 | .PHONY: clean 39 | clean: 40 | @$(MAKE) -C mcc clean 41 | @$(MAKE) -C mcp clean 42 | @$(MAKE) -C demo clean 43 | 44 | .PHONY: distclean 45 | distclean: 46 | @$(MAKE) -C mcc distclean 47 | @$(MAKE) -C mcp distclean 48 | @$(MAKE) -C demo distclean 49 | 50 | .PHONY: install 51 | install: 52 | @$(MAKE) -C mcc install 53 | @$(MAKE) -C mcp install 54 | @$(MAKE) -C demo install 55 | 56 | .PHONY: bumprev 57 | bumprev: 58 | @sh tools/bumprev.sh all 59 | 60 | .PHONY: release 61 | release: 62 | @sh tools/mkrelease.sh 63 | -------------------------------------------------------------------------------- /demo/vastubs.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG)) 24 | #if defined(_M68000) || defined(__M68000) || defined(__mc68000) 25 | 26 | #include 27 | 28 | /* FIX V45 breakage... */ 29 | #if INCLUDE_VERSION < 45 30 | #define MY_CONST_STRPTR CONST_STRPTR 31 | #else 32 | #define MY_CONST_STRPTR CONST STRPTR 33 | #endif 34 | 35 | #include 36 | 37 | APTR NewObject( struct IClass *classPtr, CONST_STRPTR classID, Tag tag1, ... ) 38 | { return NewObjectA(classPtr, classID, (struct TagItem *)&tag1); } 39 | ULONG SetAttrs( APTR object, ULONG tag1, ... ) 40 | { return SetAttrsA(object, (struct TagItem *)&tag1); } 41 | 42 | #else 43 | #error "VARGS stubs are only save on m68k systems!" 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /mcp/vastubs.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG)) 24 | #if defined(_M68000) || defined(__M68000) || defined(__mc68000) 25 | 26 | #include 27 | 28 | /* FIX V45 breakage... */ 29 | #if INCLUDE_VERSION < 45 30 | #define MY_CONST_STRPTR CONST_STRPTR 31 | #else 32 | #define MY_CONST_STRPTR CONST STRPTR 33 | #endif 34 | 35 | #include 36 | 37 | APTR NewObject( struct IClass *classPtr, CONST_STRPTR classID, Tag tag1, ... ) 38 | { return NewObjectA(classPtr, classID, (struct TagItem *)&tag1); } 39 | ULONG SetAttrs( APTR object, ULONG tag1, ... ) 40 | { return SetAttrsA(object, (struct TagItem *)&tag1); } 41 | 42 | #else 43 | #error "VARGS stubs are only save on m68k systems!" 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /include/muiextra.h: -------------------------------------------------------------------------------- 1 | #ifndef MUIA_Framedisplay_Spec 2 | #define MUIA_Framedisplay_Spec 0x80421794UL // V11 isg struct MUI_FrameSpec 3 | #endif 4 | #ifndef MUIA_Imagedisplay_Spec 5 | #define MUIA_Imagedisplay_Spec 0x8042a547UL // V11 isg struct MUI_ImageSpec 6 | #endif 7 | #ifndef MUIA_Imageadjust_Type 8 | #define MUIA_Imageadjust_Type 0x80422f2bUL // V11 i.. LONG 9 | #endif 10 | #ifndef MUIA_Prop_Release 11 | #define MUIA_Prop_Release 0x80429839UL 12 | #endif 13 | #ifndef MUIA_Prop_DeltaFactor 14 | #define MUIA_Prop_DeltaFactor 0x80427C5EUL 15 | #endif 16 | #ifndef MUIA_Prop_DoSmooth 17 | #define MUIA_Prop_DoSmooth 0x804236ceUL // V4 i.. LONG 18 | #endif 19 | #ifndef MUIM_GoActive 20 | #define MUIM_GoActive 0x8042491aUL 21 | #endif 22 | #ifndef MUIM_GoInactive 23 | #define MUIM_GoInactive 0x80422c0cUL 24 | #endif 25 | #ifndef MUIM_Mccprefs_RegisterGadget 26 | #define MUIM_Mccprefs_RegisterGadget 0x80424828UL // V20 27 | #endif 28 | #ifndef MUIA_Text_Copy 29 | #define MUIA_Text_Copy 0x80427727UL /* V20 i.. BOOL */ 30 | #endif 31 | #ifndef MBQ_MUI_MAXMAX 32 | #define MBQ_MUI_MAXMAX (10000) /* use this for unlimited MaxWidth/Height */ 33 | #endif 34 | #ifndef PopframeObject 35 | #define PopframeObject MUI_NewObject(MUIC_Popframe 36 | #endif 37 | #ifndef PopimageObject 38 | #define PopimageObject MUI_NewObject("Popimage.mui" 39 | #endif 40 | #ifndef CrawlingObject 41 | #define CrawlingObject MUI_NewObject("Crawling.mcc" 42 | #endif 43 | #ifndef MUII_PopFont 44 | #define MUII_PopFont 42 45 | #endif 46 | 47 | struct MUI_ImageSpec 48 | { 49 | char buf[128]; 50 | }; 51 | 52 | #if !defined(__AROS__) 53 | struct MUI_FrameSpec 54 | { 55 | char buf[128]; 56 | }; 57 | #endif 58 | -------------------------------------------------------------------------------- /mcc/extrasrc/MoveList.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | #include 25 | 26 | #include "SDI_compiler.h" 27 | 28 | #include "Debug.h" 29 | 30 | // MoveList() 31 | // append all nodes from one list to another 32 | 33 | void MoveList(struct List *to, struct List *from) 34 | { 35 | ENTER(); 36 | 37 | if(to != NULL && from != NULL && IsListEmpty(from) == FALSE) 38 | { 39 | // connect tail node of "to" to the head node of "from" 40 | to->lh_TailPred->ln_Succ = from->lh_Head; 41 | to->lh_TailPred->ln_Succ->ln_Pred = to->lh_TailPred; 42 | 43 | // connect tail node of "from" to "to" as tail 44 | to->lh_TailPred = from->lh_TailPred; 45 | to->lh_TailPred->ln_Succ = (struct Node *)&to->lh_Tail; 46 | 47 | // clean "from" list 48 | NewList(from); 49 | } 50 | 51 | LEAVE(); 52 | } 53 | -------------------------------------------------------------------------------- /include/proto/mccclass.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_MCCCLASS_H 2 | #define PROTO_MCCCLASS_H 3 | 4 | /* 5 | ** $Id$ 6 | ** Includes Release 50.1 7 | ** 8 | ** Prototype/inline/pragma header file combo 9 | ** 10 | ** (C) Copyright 2003-2004 Amiga, Inc. 11 | ** All Rights Reserved 12 | */ 13 | 14 | #ifndef EXEC_TYPES_H 15 | #include 16 | #endif 17 | 18 | /****************************************************************************/ 19 | 20 | #ifndef __NOLIBBASE__ 21 | //extern struct Library * MCCClassBase; 22 | #endif /* __NOLIBBASE__ */ 23 | 24 | /****************************************************************************/ 25 | 26 | #ifdef __amigaos4__ 27 | #include 28 | #ifdef __USE_INLINE__ 29 | #include 30 | #endif /* __USE_INLINE__ */ 31 | #ifndef CLIB_MCCCLASS_PROTOS_H 32 | #define CLIB_MCCCLASS_PROTOS_H 1 33 | #endif /* CLIB_MCCCLASS_PROTOS_H */ 34 | #ifndef __NOGLOBALIFACE__ 35 | // extern struct MCCClassIFace *IMCCClass; 36 | #endif /* __NOGLOBALIFACE__ */ 37 | #else /* __amigaos4__ */ 38 | #ifndef CLIB_MCCCLASS_PROTOS_H 39 | #include 40 | #endif /* CLIB_MCCCLASS_PROTOS_H */ 41 | #if defined(__GNUC__) 42 | #ifdef __AROS__ 43 | #include 44 | #else 45 | #ifndef __PPC__ 46 | #include 47 | #else 48 | #include 49 | #endif /* __PPC__ */ 50 | #endif /* __AROS__ */ 51 | #elif defined(__VBCC__) 52 | #ifndef __PPC__ 53 | #include 54 | #endif /* __PPC__ */ 55 | #else 56 | #include 57 | #endif /* __GNUC__ */ 58 | #endif /* __amigaos4__ */ 59 | 60 | /****************************************************************************/ 61 | 62 | #endif /* PROTO_MCCCLASS_H */ 63 | -------------------------------------------------------------------------------- /.github/workflows/purge_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Customize those three lines with your repository and credentials: 4 | REPO=https://api.github.com/repos/${GITHUB_REPOSITORY} 5 | GITHUB_USER=${GITHUB_REPOSITORY%%/*} 6 | GITHUB_TOKEN=${1} 7 | 8 | # Number of most recent versions to keep for each artifact: 9 | KEEP=4 10 | 11 | # A shortcut to call GitHub API. 12 | ghapi() { curl --silent --location --user $GITHUB_USER:$GITHUB_TOKEN "$@"; } 13 | 14 | # A temporary file which receives HTTP response headers. 15 | TMPFILE=/tmp/tmp.$$ 16 | 17 | # An associative array, key: artifact name, value: number of artifacts of that name. 18 | declare -A ARTCOUNT 19 | 20 | # Process all artifacts on this repository, loop on returned "pages". 21 | URL=$REPO/actions/artifacts 22 | while [[ -n "$URL" ]]; do 23 | 24 | # Get current page, get response headers in a temporary file. 25 | JSON=$(ghapi --dump-header $TMPFILE "$URL") 26 | 27 | # Get URL of next page. Will be empty if we are at the last page. 28 | URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*.*//') 29 | rm -f ${TMPFILE} 30 | 31 | # Number of artifacts on this page: 32 | COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') )) 33 | 34 | # Loop on all artifacts on this page. 35 | for ((i=0; $i < $COUNT; i++)); do 36 | 37 | # Get name of artifact and count instances of this name. 38 | STR=$(jq <<<$JSON -r ".artifacts[$i].name?") 39 | name=${STR%%-*}-${STR##*-} 40 | ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1)) 41 | 42 | printf "Found '%s' #%d, " $STR ${ARTCOUNT[$name]} 43 | # Check if we must delete this one. 44 | if [[ ${ARTCOUNT[$name]} -gt $KEEP ]]; then 45 | id=$(jq <<<$JSON -r ".artifacts[$i].id?") 46 | size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") )) 47 | printf "deleting %d bytes\n" $size 48 | ghapi -X DELETE $REPO/actions/artifacts/$id 49 | else 50 | printf "OK\n" 51 | fi 52 | done 53 | done 54 | 55 | exit 0 56 | -------------------------------------------------------------------------------- /include/mcc_common.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005 by TextEditor Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor_mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include "SDI_compiler.h" 24 | #include "SDI_hook.h" 25 | #include "SDI_lib.h" 26 | #include "SDI_stdarg.h" 27 | 28 | #ifdef __amigaos4__ 29 | 30 | #include 31 | 32 | /* redefine some defines to allow complexer macro use later on */ 33 | #define DoMethod IDoMethod 34 | #define DoMethodA IDoMethodA 35 | #define DoSuperMethod IDoSuperMethod 36 | #define DoSuperMethodA IDoSuperMethodA 37 | #define SetSuperAttrs ISetSuperAttrs 38 | #define CoerceMethod ICoerceMethod 39 | #define CoerceMethodA ICoerceMethodA 40 | #define CallHookA CallHookPkt 41 | 42 | #ifdef OpenWindowTags 43 | #undef OpenWindowTags 44 | #define OpenWindowTags IIntuition->OpenWindowTags 45 | #endif 46 | 47 | #ifdef NewObject 48 | #undef NewObject 49 | #define NewObject IIntuition->NewObject 50 | #endif 51 | 52 | #define GETINTERFACE(iface, base) (iface = (APTR)GetInterface((struct Library *)(base), "main", 1L, NULL)) 53 | #define DROPINTERFACE(iface) (DropInterface((struct Interface *)iface), iface = NULL) 54 | 55 | #else 56 | 57 | #include 58 | 59 | #define GETINTERFACE(iface, base) TRUE 60 | #define DROPINTERFACE(iface) 61 | 62 | #endif /* ! __amigaos4__ */ 63 | -------------------------------------------------------------------------------- /demo/rexx/ImageDimensions.TEd: -------------------------------------------------------------------------------- 1 | /** 2 | ** ImageDimensions.CEd V1.0 (31-Aug-97) For CygnusEd & Visage 3 | ** 4 | ** This script will paste the width and height for the image 5 | ** specified within an tag. 6 | ** Bind it to a hotkey, and press that key while 7 | ** the cursor is placed inside an tag. 8 | ** This doesn't work for pictures given an absolute path, 9 | ** like http://... but you probably knew that ;^) 10 | ** 11 | ** 12 | ** For feedback write Allan Odgaard 13 | **/ 14 | 15 | /* Please customize this line */ 16 | Visage = "Duff's:Graphics/Visage" 17 | 18 | /* The rest should work without your interference :-) */ 19 | Options Results 20 | 21 | Address 'TEXTEDITOR-DEMO.1' 22 | 23 | Path = 'Data:Homepage' 24 | GetCursor Column; CursorX = RESULT 25 | GetCursor Line; LineNr = RESULT 26 | GetLine; Line = RESULT 27 | 28 | EndTag = Right(Line, Length(Line)-CursorX) 29 | EndTagPos = Pos(">", EndTag) 30 | 31 | If(EndTagPos > 0) Then 32 | Do 33 | Line = Upper(Left(Line, EndTagPos+CursorX)) 34 | StartTagPos = Pos("GMI<", Reverse(Line)) 35 | If(StartTagPos > 0) Then 36 | Do 37 | Tag = Right(Line, StartTagPos+3) 38 | PicturePos = Pos("SRC=", Tag) 39 | If(PicturePos > 0) Then 40 | Do 41 | Name = Right(Tag, Length(Tag)-PicturePos-3) 42 | 43 | If(Left(Name, 1) = '"') Then 44 | Parse Var Name '"' FileName '"' rest 45 | Else 46 | Do 47 | Parse Var Name FileName '>' rest 48 | Parse Var FileName FileName ' ' rest 49 | End 50 | 51 | If(Right(Path, 1) = ':') Then 52 | File = Path || FileName 53 | Else File = Path || '/' || FileName 54 | 55 | Address Command Visage '>T:ImgDimensions "'File'" Info' 56 | If(RC = 0) Then 57 | Do 58 | Open('Size','T:ImgDimensions','Read') 59 | Info = ReadLn('Size') 60 | Info = ReadLn('Size') 61 | Info = Right(Info, Length(Info)-10) 62 | Close('Size') 63 | 64 | Parse Var Info width 'x' height 'x' rest 65 | 66 | GotoLine LineNr 67 | GotoColumn Length(Line)-StartTagPos+1 68 | Text '" Width=' || width || ' Height=' || height || '"' 69 | End 70 | End 71 | End 72 | End 73 | -------------------------------------------------------------------------------- /mcc/vastubs.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG)) 24 | #if defined(_M68000) || defined(__M68000) || defined(__mc68000) 25 | 26 | #include 27 | 28 | /* FIX V45 breakage... */ 29 | #if INCLUDE_VERSION < 45 30 | #define MY_CONST_STRPTR CONST_STRPTR 31 | #else 32 | #define MY_CONST_STRPTR CONST STRPTR 33 | #endif 34 | 35 | #include 36 | 37 | APTR NewObject( struct IClass *classPtr, CONST_STRPTR classID, Tag tag1, ... ) 38 | { return NewObjectA(classPtr, classID, (struct TagItem *)&tag1); } 39 | ULONG SetAttrs( APTR object, ULONG tag1, ... ) 40 | { return SetAttrsA(object, (struct TagItem *)&tag1); } 41 | void SetWindowPointer( struct Window *win, Tag tag1, ... ) 42 | { SetWindowPointerA(win, (struct TagItem *)&tag1); } 43 | 44 | #include 45 | LONG SystemTags( CONST_STRPTR command, ULONG tag1type, ... ) 46 | { return SystemTagList(command, (struct TagItem *)&tag1type); } 47 | struct Process *CreateNewProcTags( ULONG tag1, ... ) 48 | { return CreateNewProc((struct TagItem *)&tag1); } 49 | 50 | #include 51 | VOID SetRPAttrs( struct RastPort *rp, Tag tag1, ... ) 52 | { SetRPAttrsA(rp, (struct TagItem *)&tag1); } 53 | 54 | #else 55 | #error "VARGS stubs are only save on m68k systems!" 56 | #endif 57 | #endif 58 | -------------------------------------------------------------------------------- /include/mui/NBitmap_mcc.h: -------------------------------------------------------------------------------- 1 | #ifndef NBITMAP_MCC_H 2 | #define NBITMAP_MCC_H 3 | 4 | /*************************************************************************** 5 | 6 | NBitmap.mcc - New Bitmap MUI Custom Class 7 | Copyright (C) 2006 by Daniel Allsopp 8 | Copyright (C) 2007-2009 by NList Open Source Team 9 | 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. 14 | 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. 19 | 20 | NList classes Support Site: http://www.sf.net/projects/nlist-classes 21 | 22 | $Id$ 23 | 24 | ***************************************************************************/ 25 | 26 | #ifndef EXEC_TYPES_H 27 | #include 28 | #endif 29 | 30 | #define MUIC_NBitmap "NBitmap.mcc" 31 | #if defined(__AROS__) && !defined(NO_INLINE_STDARG) 32 | #define NBitmapObject MUIOBJMACRO_START(MUIC_NBitmap) 33 | #else 34 | #define NBitmapObject MUI_NewObject(MUIC_NBitmap 35 | #endif 36 | 37 | /* attributes */ 38 | #define MUIA_NBitmap_Type 0xa94f0000UL 39 | #define MUIA_NBitmap_Label 0xa94f0001UL 40 | #define MUIA_NBitmap_Button 0xa94f0002UL 41 | #define MUIA_NBitmap_Normal 0xa94f0003UL 42 | #define MUIA_NBitmap_Ghosted 0xa94f0004UL 43 | #define MUIA_NBitmap_Selected 0xa94f0005UL 44 | #define MUIA_NBitmap_Width 0xa94f0006UL 45 | #define MUIA_NBitmap_Height 0xa94f0007UL 46 | #define MUIA_NBitmap_MaxWidth 0xa94f0008UL 47 | #define MUIA_NBitmap_MaxHeight 0xa94f0009UL 48 | #define MUIA_NBitmap_CLUT 0xa94f000aUL 49 | #define MUIA_NBitmap_Alpha 0xa94f000bUL 50 | 51 | /* source types */ 52 | #define MUIV_NBitmap_Type_File 0 53 | #define MUIV_NBitmap_Type_DTObject 1 54 | #define MUIV_NBitmap_Type_CLUT8 2 55 | #define MUIV_NBitmap_Type_RGB24 3 56 | #define MUIV_NBitmap_Type_ARGB32 4 57 | 58 | 59 | /* macros */ 60 | #define NBitmapFile(filename) NBitmapObject, \ 61 | MUIA_NBitmap_Type, MUIV_NBitmap_Type_File, \ 62 | MUIA_NBitmap_Normal, (filename), \ 63 | End 64 | 65 | #endif /* NBITMAP_MCC_H */ 66 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | pull_request: 5 | workflow_dispatch: 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-20.04 10 | timeout-minutes: 480 11 | 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | platform: [os4, os3, mos, aros-ppc, aros-i386, aros-x86_64] 16 | build: [release, debug] 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | 21 | - name: setup dependencies 22 | run: | 23 | sudo dpkg --add-architecture i386 24 | sudo apt-get update -y -qq || true 25 | sudo apt-get -qq install libc6:i386 26 | sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4 27 | 28 | - name: setup env 29 | run : | 30 | echo "GITHUB_SHA7=$(echo ${GITHUB_SHA::7})" >>$GITHUB_ENV 31 | 32 | - name: install adtools build env 33 | run: | 34 | DOWNLOAD_PATH=https://github.com/adtools/adtools/releases/download/20170213 35 | curl -L ${DOWNLOAD_PATH}/adtools-utils.tar.bz2 | sudo tar xj -C / 36 | if [[ ${{ matrix.platform }} =~ os3 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-m68k-amigaos.tar.bz2 | sudo tar xj -C / ; fi 37 | if [[ ${{ matrix.platform }} =~ os4 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-amigaos.tar.bz2 | sudo tar xj -C / ; fi 38 | if [[ ${{ matrix.platform }} =~ mos ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-morphos.tar.bz2 | sudo tar xj -C / ; fi 39 | if [[ ${{ matrix.platform }} =~ aros-ppc ]]; then curl -L ${DOWNLOAD_PATH}/adtools-ppc-aros.tar.bz2 | sudo tar xj -C / ; fi 40 | if [[ ${{ matrix.platform }} =~ aros-i386 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-i386-aros.tar.bz2 | sudo tar xj -C / ; fi 41 | if [[ ${{ matrix.platform }} =~ aros-x86_64 ]]; then curl -L ${DOWNLOAD_PATH}/adtools-x86_64-aros.tar.bz2 | sudo tar xj -C / ; fi 42 | 43 | - name: cleanup old action artifacts 44 | run: .github/workflows/purge_artifacts.sh ${{ secrets.GITHUB_TOKEN }} 45 | 46 | #- name: remote debug tmate session 47 | # uses: mxschmitt/action-tmate@v1 48 | # if: matrix.platform == 'os4' 49 | 50 | - name: build [${{ matrix.platform }}, ${{ matrix.build }}] 51 | timeout-minutes: 480 52 | run: | 53 | export PATH=/usr/local/amiga/bin:/opt/m68k-amigaos/bin:/opt/ppc-amigaos/bin:/opt/ppc-morphos/bin:${PATH} 54 | if [[ ${{ matrix.build }} =~ release ]]; then make -j1 OS=${{ matrix.platform }} DEBUG= ; fi 55 | if [[ ${{ matrix.build }} =~ debug ]]; then make -j1 OS=${{ matrix.platform }} ; fi 56 | -------------------------------------------------------------------------------- /mcp/C_c.sd: -------------------------------------------------------------------------------- 1 | ##stringtype C 2 | ##shortstrings 3 | /*************************************************************************** 4 | 5 | TextEditor.mcc - Textediting MUI Custom Class 6 | Copyright (C) 1997-2000 Allan Odgaard 7 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 20 | 21 | $Id$ 22 | 23 | ***************************************************************************/ 24 | 25 | /* 26 | * If this file is named 'locale.c' it is automatically 27 | * generated by 'FlexCat' from C_c.sd. PLEASE DO NOT EDIT!!! 28 | */ 29 | 30 | #include 31 | 32 | #include "SDI_compiler.h" 33 | #include "Debug.h" 34 | 35 | struct FC_Type { const long ID; const char * const Str; }; 36 | 37 | const struct FC_Type _%i = { %d, %s }; 38 | 39 | static struct Catalog *TE_Catalog = NULL; 40 | 41 | /*** Catalog functions ***/ 42 | /// tr() 43 | const char *tr(const void *fcstr) 44 | { 45 | const char *defaultstr = ((struct FC_Type *)fcstr)->Str; 46 | 47 | if(LocaleBase) 48 | return (const char *)GetCatalogStr(TE_Catalog, ((struct FC_Type *)fcstr)->ID, (STRPTR)defaultstr); 49 | 50 | return defaultstr; 51 | } 52 | /// 53 | /// CloseCat() 54 | void CloseCat(void) 55 | { 56 | ENTER(); 57 | 58 | if(TE_Catalog) 59 | { 60 | CloseCatalog(TE_Catalog); 61 | TE_Catalog = NULL; 62 | } 63 | 64 | LEAVE(); 65 | } 66 | /// 67 | /// OpenCat(void) 68 | BOOL OpenCat(void) 69 | { 70 | static const struct TagItem tags[] = { 71 | { OC_BuiltInLanguage, (IPTR)%l }, 72 | { OC_Version, %v }, 73 | { TAG_DONE, 0 } 74 | }; 75 | 76 | ENTER(); 77 | 78 | if(LocaleBase && TE_Catalog == NULL) 79 | TE_Catalog = OpenCatalogA(NULL, (STRPTR)"%b.catalog", (struct TagItem *)&tags[0]); 80 | 81 | RETURN((BOOL)(TE_Catalog != NULL)); 82 | return (BOOL)(TE_Catalog != NULL); 83 | } 84 | /// 85 | -------------------------------------------------------------------------------- /include/proto/muimaster.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_MUIMASTER_H 2 | #define PROTO_MUIMASTER_H 3 | 4 | /*************************************************************************** 5 | 6 | Magic User Interface - MUI 7 | Copyright (C) 1992-2008 by Stefan Stuntz 8 | All Rights Reserved. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | 14 | IN NO EVENT WILL THE AUTHORS BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, 15 | OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY CLAIM ARISING OUT OF THE 16 | INFORMATION PRESENTED HEREIN, EVEN IF IT HAS BEEN ADVISED OF THE 17 | POSSIBILITIES OF SUCH DAMAGES. 18 | 19 | ***************************************************************************/ 20 | 21 | #ifndef EXEC_TYPES_H 22 | #include 23 | #endif 24 | #ifndef INTUITION_CLASSES_H 25 | #include 26 | #endif 27 | #ifndef UTILITY_TAGITEM_H 28 | #include 29 | #endif 30 | #ifndef LIBRARIES_MUI_H 31 | #include 32 | #endif 33 | 34 | /****************************************************************************/ 35 | 36 | #ifndef __NOLIBBASE__ 37 | extern struct Library * MUIMasterBase; 38 | #endif /* __NOLIBBASE__ */ 39 | 40 | /****************************************************************************/ 41 | 42 | #ifdef __amigaos4__ 43 | #include 44 | #ifdef __USE_INLINE__ 45 | #include 46 | #endif /* __USE_INLINE__ */ 47 | #ifndef CLIB_MUIMASTER_PROTOS_H 48 | #define CLIB_MUIMASTER_PROTOS_H 1 49 | #endif /* CLIB_MUIMASTER_PROTOS_H */ 50 | #ifndef __NOGLOBALIFACE__ 51 | extern struct MUIMasterIFace *IMUIMaster; 52 | #endif /* __NOGLOBALIFACE__ */ 53 | #else /* __amigaos4__ */ 54 | #ifndef CLIB_MUIMASTER_PROTOS_H 55 | #include 56 | #endif /* CLIB_MUIMASTER_PROTOS_H */ 57 | #if defined(__GNUC__) 58 | #ifdef __AROS__ 59 | #include 60 | #else 61 | #ifndef __PPC__ 62 | #include 63 | #else 64 | #include 65 | #endif /* __PPC__ */ 66 | #endif /* __AROS__ */ 67 | #elif defined(__VBCC__) 68 | #ifndef __PPC__ 69 | #include 70 | #endif /* __PPC__ */ 71 | #else 72 | #include 73 | #endif /* __GNUC__ */ 74 | #endif /* __amigaos4__ */ 75 | 76 | /****************************************************************************/ 77 | 78 | #endif /* PROTO_MUIMASTER_H */ 79 | -------------------------------------------------------------------------------- /mcc/ExportText.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// mExportText() 31 | IPTR mExportText(struct IClass *cl, Object *obj, UNUSED struct MUIP_TextEditor_ExportText *msg) 32 | { 33 | struct InstData *data = INST_DATA(cl, obj); 34 | struct line_node *node; 35 | struct Hook *exportHook = data->ExportHook; 36 | LONG wraplen = data->ExportWrap; 37 | struct ExportMessage emsg; 38 | void *user_data = NULL; 39 | 40 | ENTER(); 41 | 42 | // clear the export message 43 | memset(&emsg, 0, sizeof(struct ExportMessage)); 44 | 45 | node = GetFirstLine(&data->linelist); 46 | while(node != NULL) 47 | { 48 | struct line_node *next = GetNextLine(node); 49 | 50 | emsg.UserData = user_data; 51 | emsg.Contents = node->line.Contents; 52 | emsg.Length = node->line.Length; 53 | emsg.Styles = node->line.Styles; 54 | emsg.Colors = node->line.Colors; 55 | emsg.Highlight = node->line.Highlight; 56 | emsg.Flow = node->line.Flow; 57 | emsg.Separator = node->line.Separator; 58 | emsg.ExportWrap = wraplen; 59 | emsg.Last = next == NULL; 60 | 61 | // to make sure that for the last line we don't export the additional, 62 | // artificial newline '\n' we reduce the passed length value by one. 63 | if(next == NULL && emsg.Contents[node->line.Length-1] == '\n') 64 | emsg.Length--; 65 | 66 | // call the ExportHook and exit immediately if it returns NULL 67 | if((user_data = (void*)CallHookPkt(exportHook, NULL, &emsg)) == NULL) 68 | break; 69 | 70 | node = next; 71 | } 72 | 73 | RETURN((IPTR)user_data); 74 | return (IPTR)user_data; 75 | } 76 | 77 | /// 78 | -------------------------------------------------------------------------------- /include/sfd/muimaster_lib.sfd: -------------------------------------------------------------------------------- 1 | ==id $Id$ 2 | ==base _MUIMasterBase 3 | ==basetype struct Library * 4 | ==libname muimaster.library 5 | ==bias 30 6 | ==public 7 | ==include 8 | ==include 9 | ==include 10 | ==include 11 | Object * MUI_NewObjectA(const char * par1, struct TagItem * last) (a0,a1) 12 | ==varargs 13 | Object * MUI_NewObject(const char * par1, Tag last, ...) (a0,a1) 14 | VOID MUI_DisposeObject(Object * last) (a0) 15 | LONG MUI_RequestA(APTR par1, APTR par2, LONGBITS par3, const char * par4, const char * par5, const char * par6, APTR last) (d0,d1,d2,a0,a1,a2,a3) 16 | ==varargs 17 | LONG MUI_Request(APTR par1, APTR par2, LONGBITS par3, const char * par4, const char * par5, const char * par6, ULONG tag1, ...) (d0,d1,d2,a0,a1,a2,a3) 18 | APTR MUI_AllocAslRequest(unsigned long par1, struct TagItem * last) (d0,a0) 19 | ==varargs 20 | APTR MUI_AllocAslRequestTags(unsigned long par1, Tag last, ...) (d0,a0) 21 | BOOL MUI_AslRequest(APTR par1, struct TagItem * last) (a0,a1) 22 | ==varargs 23 | BOOL MUI_AslRequestTags(APTR par1, Tag last, ...) (a0,a1) 24 | VOID MUI_FreeAslRequest(APTR last) (a0) 25 | LONG MUI_Error() () 26 | LONG MUI_SetError(LONG last) (d0) 27 | struct IClass * MUI_GetClass(const char * last) (a0) 28 | VOID MUI_FreeClass(struct IClass * last) (a0) 29 | VOID MUI_RequestIDCMP(Object * par1, ULONG last) (a0,d0) 30 | VOID MUI_RejectIDCMP(Object * par1, ULONG last) (a0,d0) 31 | VOID MUI_Redraw(Object * par1, ULONG last) (a0,d0) 32 | struct MUI_CustomClass * MUI_CreateCustomClass(struct Library * par1, const char * par2, 33 | struct MUI_CustomClass * par3, int par4, APTR last) (a0,a1,a2,d0,a3) 34 | BOOL MUI_DeleteCustomClass(struct MUI_CustomClass * last) (a0) 35 | Object * MUI_MakeObjectA(LONG par1, ULONG * last) (d0,a0) 36 | ==varargs 37 | Object * MUI_MakeObject(LONG par1, ULONG tag1, ...) (d0,a0) 38 | BOOL MUI_Layout(Object * par1, LONG par2, LONG par3, LONG par4, LONG par5, ULONG last) (a0,d0,d1,d2,d3,d4) 39 | ==reserve 4 40 | LONG MUI_ObtainPen(struct MUI_RenderInfo * par1, struct MUI_PenSpec * par2, ULONG last) (a0,a1,d0) 41 | VOID MUI_ReleasePen(struct MUI_RenderInfo * par1, LONG last) (a0,d0) 42 | APTR MUI_AddClipping(struct MUI_RenderInfo * par1, WORD par2, WORD par3, WORD par4, 43 | WORD last) (a0,d0,d1,d2,d3) 44 | VOID MUI_RemoveClipping(struct MUI_RenderInfo * par1, APTR last) (a0,a1) 45 | APTR MUI_AddClipRegion(struct MUI_RenderInfo * par1, struct Region * last) (a0,a1) 46 | VOID MUI_RemoveClipRegion(struct MUI_RenderInfo * par1, APTR last) (a0,a1) 47 | BOOL MUI_BeginRefresh(struct MUI_RenderInfo * par1, ULONG last) (a0,d0) 48 | VOID MUI_EndRefresh(struct MUI_RenderInfo * par1, ULONG last) (a0,d0) 49 | ==end 50 | -------------------------------------------------------------------------------- /include/mccclass_68k.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** This file was automatically generated by fdtrans 51.14. 3 | ** Do not edit it by hand. Instead, edit the sfd file 4 | ** that was used to generate this file 5 | */ 6 | 7 | #ifdef __USE_INLINE__ 8 | #undef __USE_INLINE__ 9 | #endif 10 | #ifndef __NOGLOBALIFACE__ 11 | #define __NOGLOBALIFACE__ 12 | #endif 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | 22 | static inline int8 convert_int8 (uint32 x) { return x; } 23 | static inline int16 convert_int16(uint32 x) { return x; } 24 | 25 | 26 | STATIC struct Library * stub_OpenPPC(ULONG *regarray) 27 | { 28 | struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; 29 | struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); 30 | struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary; 31 | 32 | return Self->Open(0); 33 | } 34 | STATIC CONST struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_OpenPPC }; 35 | 36 | STATIC APTR stub_ClosePPC(ULONG *regarray) 37 | { 38 | struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; 39 | struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); 40 | struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary; 41 | 42 | return Self->Close(); 43 | } 44 | STATIC CONST struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_ClosePPC }; 45 | 46 | STATIC APTR stub_ExpungePPC(ULONG *regarray __attribute__((unused))) 47 | { 48 | return NULL; 49 | } 50 | STATIC CONST struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_ExpungePPC }; 51 | 52 | STATIC ULONG stub_ReservedPPC(ULONG *regarray __attribute__((unused))) 53 | { 54 | return 0UL; 55 | } 56 | STATIC CONST struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC }; 57 | 58 | static ULONG stub_MCC_QueryPPC(ULONG *regarray) 59 | { 60 | struct Library *Base = (struct Library *) regarray[REG68K_A6/4]; 61 | struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize); 62 | struct MCCClassIFace *Self = (struct MCCClassIFace *) ExtLib->MainIFace; 63 | 64 | return Self->MCC_Query( 65 | (LONG)regarray[0] 66 | ); 67 | } 68 | STATIC CONST struct EmuTrap stub_MCC_Query = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_MCC_QueryPPC }; 69 | 70 | CONST CONST_APTR VecTable68K[] = 71 | { 72 | &stub_Open, 73 | &stub_Close, 74 | &stub_Expunge, 75 | &stub_Reserved, 76 | &stub_MCC_Query, 77 | (CONST_APTR)-1 78 | }; 79 | -------------------------------------------------------------------------------- /include/pragmas/muimaster_pragmas.h: -------------------------------------------------------------------------------- 1 | #ifndef __STORM__ 2 | 3 | #pragma libcall MUIMasterBase MUI_NewObjectA 1e 9802 4 | #ifdef __SASC_60 5 | #pragma tagcall MUIMasterBase MUI_NewObject 1e 9802 6 | #endif 7 | #pragma libcall MUIMasterBase MUI_DisposeObject 24 801 8 | #pragma libcall MUIMasterBase MUI_RequestA 2a BA9821007 9 | #ifdef __SASC_60 10 | #pragma tagcall MUIMasterBase MUI_Request 2a BA9821007 11 | #endif 12 | #pragma libcall MUIMasterBase MUI_AllocAslRequest 30 8002 13 | #ifdef __SASC_60 14 | #pragma tagcall MUIMasterBase MUI_AllocAslRequestTags 30 8002 15 | #endif 16 | #pragma libcall MUIMasterBase MUI_AslRequest 36 9802 17 | #ifdef __SASC_60 18 | #pragma tagcall MUIMasterBase MUI_AslRequestTags 36 9802 19 | #endif 20 | #pragma libcall MUIMasterBase MUI_FreeAslRequest 3c 801 21 | #pragma libcall MUIMasterBase MUI_Error 42 0 22 | #pragma libcall MUIMasterBase MUI_SetError 48 001 23 | #pragma libcall MUIMasterBase MUI_GetClass 4e 801 24 | #pragma libcall MUIMasterBase MUI_FreeClass 54 801 25 | #pragma libcall MUIMasterBase MUI_RequestIDCMP 5a 0802 26 | #pragma libcall MUIMasterBase MUI_RejectIDCMP 60 0802 27 | #pragma libcall MUIMasterBase MUI_Redraw 66 0802 28 | #pragma libcall MUIMasterBase MUI_CreateCustomClass 6c B0A9805 29 | #pragma libcall MUIMasterBase MUI_DeleteCustomClass 72 801 30 | #pragma libcall MUIMasterBase MUI_MakeObjectA 78 8002 31 | #ifdef __SASC_60 32 | #pragma tagcall MUIMasterBase MUI_MakeObject 78 8002 33 | #endif 34 | #pragma libcall MUIMasterBase MUI_Layout 7e 43210806 35 | #pragma libcall MUIMasterBase MUI_ObtainPen 9c 09803 36 | #pragma libcall MUIMasterBase MUI_ReleasePen a2 0802 37 | #pragma libcall MUIMasterBase MUI_AddClipping a8 3210805 38 | #pragma libcall MUIMasterBase MUI_RemoveClipping ae 9802 39 | #pragma libcall MUIMasterBase MUI_AddClipRegion b4 9802 40 | #pragma libcall MUIMasterBase MUI_RemoveClipRegion ba 9802 41 | #pragma libcall MUIMasterBase MUI_BeginRefresh c0 0802 42 | #pragma libcall MUIMasterBase MUI_EndRefresh c6 0802 43 | 44 | #ifdef __MAXON__ 45 | #pragma amicall(MUIMasterBase,0x1e,MUI_NewObjectA(a0,a1)) 46 | #pragma amicall(MUIMasterBase,0x24,MUI_DisposeObject(a0)) 47 | #pragma amicall(MUIMasterBase,0x2a,MUI_RequestA(d0,d1,d2,a0,a1,a2,a3)) 48 | #pragma amicall(MUIMasterBase,0x30,MUI_AllocAslRequest(d0,a0)) 49 | #pragma amicall(MUIMasterBase,0x36,MUI_AslRequest(a0,a1)) 50 | #pragma amicall(MUIMasterBase,0x3c,MUI_FreeAslRequest(a0)) 51 | #pragma amicall(MUIMasterBase,0x42,MUI_Error()) 52 | #pragma amicall(MUIMasterBase,0x48,MUI_SetError(d0)) 53 | #pragma amicall(MUIMasterBase,0x4e,MUI_GetClass(a0)) 54 | #pragma amicall(MUIMasterBase,0x54,MUI_FreeClass(a0)) 55 | #pragma amicall(MUIMasterBase,0x5a,MUI_RequestIDCMP(a0,d0)) 56 | #pragma amicall(MUIMasterBase,0x60,MUI_RejectIDCMP(a0,d0)) 57 | #pragma amicall(MUIMasterBase,0x66,MUI_Redraw(a0,d0)) 58 | #endif 59 | 60 | #else 61 | 62 | #ifndef _INCLUDE_PRAGMA_MUIMASTER_LIB_H 63 | #include 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /mcc/version.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef _VERSION_H_ 24 | #define _VERSION_H_ 25 | 26 | // transforms a define into a string 27 | #define STR(x) STR2(x) 28 | #define STR2(x) #x 29 | 30 | // for setting all necessary version information 31 | #define LIB_VERSION 15 32 | #define LIB_REVISION 56 33 | #define LIB_DATE "31.08.2021" 34 | #define LIB_COPYRIGHT "Copyright (C) 2005-2021 TextEditor.mcc Open Source Team" 35 | 36 | // set the LIB_REV_STRING 37 | #define LIB_REV_STRING STR(LIB_VERSION) "." STR(LIB_REVISION) 38 | 39 | // identify the system we are compiling for 40 | #if defined(__amigaos4__) 41 | #define SYSTEM "AmigaOS4" 42 | #define SYSTEMSHORT "OS4" 43 | #elif defined(__MORPHOS__) 44 | #define SYSTEM "MorphOS" 45 | #define SYSTEMSHORT "MOS" 46 | #elif defined(__AROS__) 47 | #define SYSTEM "AROS" 48 | #define SYSTEMSHORT SYSTEM 49 | #elif defined(__AMIGA__) 50 | #define SYSTEM "AmigaOS3" 51 | #define SYSTEMSHORT "OS3" 52 | #else 53 | #warning "Unsupported System - check SYSTEM define" 54 | #define SYSTEM "???" 55 | #define SYSTEMSHORT "???" 56 | #endif 57 | 58 | // identify the CPU model 59 | #if defined(__PPC__) || defined(__powerpc__) 60 | #define CPU "PPC" 61 | #elif defined(_M68060) || defined(__M68060) || defined(__mc68060) 62 | #define CPU "m68060" 63 | #elif defined(_M68040) || defined(__M68040) || defined(__mc68040) 64 | #define CPU "m68040" 65 | #elif defined(_M68030) || defined(__M68030) || defined(__mc68030) 66 | #define CPU "m68030" 67 | #elif defined(_M68020) || defined(__M68020) || defined(__mc68020) 68 | #define CPU "m68k" 69 | #elif defined(_M68000) || defined(__M68000) || defined(__mc68000) 70 | #define CPU "m68000" 71 | #elif defined(__i386__) 72 | #define CPU "x86" 73 | #elif defined(__x86_64__) 74 | #define CPU "x86_64" 75 | #elif defined(__arm__) 76 | #define CPU "ARM" 77 | #else 78 | #warning "Unsupported CPU model - check CPU define" 79 | #define CPU "???" 80 | #endif 81 | 82 | #endif // _VERSION_H_ 83 | -------------------------------------------------------------------------------- /mcp/version.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef _VERSION_H_ 24 | #define _VERSION_H_ 25 | 26 | // transforms a define into a string 27 | #define STR(x) STR2(x) 28 | #define STR2(x) #x 29 | 30 | // for setting all necessary version information 31 | #define LIB_VERSION 15 32 | #define LIB_REVISION 56 33 | #define LIB_DATE "31.08.2021" 34 | #define LIB_COPYRIGHT "Copyright (C) 2005-2021 TextEditor.mcc Open Source Team" 35 | 36 | // set the LIB_REV_STRING 37 | #define LIB_REV_STRING STR(LIB_VERSION) "." STR(LIB_REVISION) 38 | 39 | // identify the system we are compiling for 40 | #if defined(__amigaos4__) 41 | #define SYSTEM "AmigaOS4" 42 | #define SYSTEMSHORT "OS4" 43 | #elif defined(__MORPHOS__) 44 | #define SYSTEM "MorphOS" 45 | #define SYSTEMSHORT "MOS" 46 | #elif defined(__AROS__) 47 | #define SYSTEM "AROS" 48 | #define SYSTEMSHORT SYSTEM 49 | #elif defined(__AMIGA__) 50 | #define SYSTEM "AmigaOS3" 51 | #define SYSTEMSHORT "OS3" 52 | #else 53 | #warning "Unsupported System - check SYSTEM define" 54 | #define SYSTEM "???" 55 | #define SYSTEMSHORT "???" 56 | #endif 57 | 58 | // identify the CPU model 59 | #if defined(__PPC__) || defined(__powerpc__) 60 | #define CPU "PPC" 61 | #elif defined(_M68060) || defined(__M68060) || defined(__mc68060) 62 | #define CPU "m68060" 63 | #elif defined(_M68040) || defined(__M68040) || defined(__mc68040) 64 | #define CPU "m68040" 65 | #elif defined(_M68030) || defined(__M68030) || defined(__mc68030) 66 | #define CPU "m68030" 67 | #elif defined(_M68020) || defined(__M68020) || defined(__mc68020) 68 | #define CPU "m68k" 69 | #elif defined(_M68000) || defined(__M68000) || defined(__mc68000) 70 | #define CPU "m68000" 71 | #elif defined(__i386__) 72 | #define CPU "x86" 73 | #elif defined(__x86_64__) 74 | #define CPU "x86_64" 75 | #elif defined(__arm__) 76 | #define CPU "ARM" 77 | #else 78 | #warning "Unsupported CPU model - check CPU define" 79 | #define CPU "???" 80 | #endif 81 | 82 | #endif // _VERSION_H_ 83 | -------------------------------------------------------------------------------- /mcc/Grow.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// InitGrow() 31 | // Initialize a grow structure 32 | void InitGrow(struct Grow *grow, APTR pool, int itemSize) 33 | { 34 | ENTER(); 35 | 36 | grow->array = NULL; 37 | grow->itemSize = itemSize; 38 | grow->itemCount = 0; 39 | grow->maxItemCount = 0; 40 | grow->pool = pool; 41 | 42 | LEAVE(); 43 | } 44 | 45 | /// 46 | /// FreeGrow() 47 | // Free the allocated memory of a grow structure and reinitialize it 48 | void FreeGrow(struct Grow *grow) 49 | { 50 | ENTER(); 51 | 52 | if(grow->array != NULL) 53 | FreeVecPooled(grow->pool, grow->array); 54 | 55 | grow->array = NULL; 56 | grow->itemCount = 0; 57 | grow->maxItemCount = 0; 58 | 59 | LEAVE(); 60 | } 61 | 62 | /// 63 | /// AddToGrow() 64 | // Adds a new item to the given grow structure. 65 | void AddToGrow(struct Grow *grow, void *newItem) 66 | { 67 | ENTER(); 68 | 69 | if(grow->itemCount+1 > grow->maxItemCount) 70 | { 71 | char *new_array; 72 | 73 | // we reserve 8 new items 74 | if((new_array = AllocVecPooled(grow->pool, (grow->maxItemCount+8) * grow->itemSize)) != NULL) 75 | { 76 | // Copy old contents into new array 77 | if(grow->array != NULL) 78 | { 79 | memcpy(new_array, grow->array, grow->itemCount * grow->itemSize); 80 | FreeVecPooled(grow->pool, grow->array); 81 | } 82 | 83 | grow->array = new_array; 84 | grow->maxItemCount += 8; 85 | } 86 | } 87 | 88 | // copy the new item to the grow structure only if there is space left 89 | if(grow->itemCount < grow->maxItemCount) 90 | { 91 | memcpy(&grow->array[grow->itemCount * grow->itemSize], newItem, grow->itemSize); 92 | grow->itemCount++; 93 | } 94 | 95 | LEAVE(); 96 | } 97 | 98 | /// 99 | /// RemoveFromGrow() 100 | // Remove the last item from a grow structure 101 | void RemoveFromGrow(struct Grow *grow) 102 | { 103 | ENTER(); 104 | 105 | if(grow->itemCount > 0) 106 | grow->itemCount--; 107 | 108 | LEAVE(); 109 | } 110 | 111 | /// 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TextEditor.mcc 2 | 3 | [![Build](https://github.com/amiga-mui/texteditor/workflows/CI/badge.svg)](https://github.com/amiga-mui/texteditor/actions) 4 | 5 | TextEditor.mcc is a multiline string gadget for Amiga systems which offers most 6 | of the common features you can find in a typical text editor, but embedded in a 7 | MUI custom class. It is used by a wide range of well-known MUI based applications like 8 | [YAM](https://github.com/jens-maus/yam) or [SimpleMail](https://github.com/sba1/simplemail) 9 | as the main text editing gadget. 10 | 11 | TextEditor.mcc is available for AmigaOS3, AmigaOS4, MorphOS and AROS. 12 | 13 | ## Features 14 | 15 | Its main features are: 16 | 17 | * Text can be colored (limited syntax highlighting) 18 | * WYSIWYG for bold, italic and underline soft styles 19 | * Multi-level undo & redo 20 | * Lines with different alignments (left, right, centered) 21 | * Ability to insert thick or thin separators with an optional title 22 | * Easy marking either using the mouse or keyboard 23 | * Full clipboard support, offering very fast cut & paste routines 24 | * Light text highlighting for e-mail based on an opening ">" character 25 | * Support for external spellcheckers, including type'n'spell and word guessing 26 | * Configurable keys, colors, cursor types, blink speed, and much more 27 | * Ability to have a bitmap as a background 28 | * Support for proportional fonts with floating word wrap, as well as antialiased fonts 29 | * Pixel smooth scrolling 30 | * Possibility to attach a horizontal- and vertical scroll bar 31 | * AREXX interface for scripted programming 32 | 33 | ## Downloads/Releases 34 | 35 | All releases up to the most current ones can be downloaded from our 36 | [central releases management](https://github.com/amiga-mui/texteditor/releases). 37 | 38 | ## Bug Reports / Enhancement Requests 39 | 40 | To report bugs use the [bug/issue tracker](https://github.com/amiga-mui/texteditor/issues). 41 | 42 | ## Manual Installation 43 | 44 | 1. Extract the archive to a temporary directory. 45 | ``` 46 | > cd RAM: 47 | > lha x MCC_TextEditor.lha 48 | ``` 49 | 50 | 2. Go to the `MCC_TextEditor/Libs/MUI/` directory where `` is the directory 51 | matching the operating system you want to install TexiEditor.mcc for: 52 | ``` 53 | > cd MCC_TextEditor/Libs/MUI/AmigaOS4 54 | ``` 55 | 56 | 3. copy all `#?.mcc` and `#?.mcp` files found in that `` directory to the 57 | global `MUI:Libs/mui/` directory on your system partition: 58 | ``` 59 | > copy #?.mcc MUI:Libs/mui/ 60 | > copy #?.mcp MUI:Libs/mui/ 61 | ``` 62 | 63 | 4. reboot and enjoy the new version ;) 64 | 65 | ## License / Copyright 66 | 67 | TextEditor.mcc was originally written in 1997 and is Copyright (C) 1997-2000 by Allan Odgaard. 68 | As of version 15.10, released in April 2005, the gadget is maintained and 69 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team. 70 | 71 | TextEditor is distributed and licensed under the GNU Lesser General Public License Version 2.1. 72 | See [COPYING](COPYING) for more detailed information. 73 | 74 | ## Authors 75 | 76 | * Allan Odgaard 77 | * Alper Sönmez 78 | * Gianfranco Gignina 79 | * Ilkka Lehtoranta 80 | * Jens Maus 81 | * Nicolas Rybkin 82 | * Sebastian Bauer 83 | * Thore Böckelmann 84 | -------------------------------------------------------------------------------- /doc/MCC_TextEditor.readme: -------------------------------------------------------------------------------- 1 | Short: TextEditor custom class for MUI 2 | Author: TextEditor.mcc Open Source Team 3 | Uploader: Jens Maus 4 | Type: dev/mui 5 | Version: 15.56 6 | Replaces: dev/mui/MCC_TextEditor-15.55.lha 7 | Requires: AmigaOS 3.0+, MorphOS or AROS, MUI 3.8+, 68020+/PPC604e+ 8 | Architecture: ppc-amigaos >= 4.0.0; m68k-amigaos >= 3.0; ppc-morphos >= 1.4.2; i386-aros; ppc-aros; x86_64-aros 9 | 10 | ABOUT TextEditor.mcc 11 | ******************** 12 | 13 | TextEditor.mcc is a multiline string gadget which offers most of the common 14 | features you can find in a typical text editor, but embedded in a MUI custom 15 | class. It is used by a wide range of well-known MUI based applications like 16 | YAM or SimpleMail as the main text editing gadget. Its main features are: 17 | 18 | - Text can be colored (limited syntax highlighting) 19 | - WYSIWYG for bold, italic and underline soft styles 20 | - Multi-level undo & redo 21 | - Lines with different alignments (left, right, centered) 22 | - Ability to insert thick or thin separators with an optional title 23 | - Easy marking either using the mouse or keyboard 24 | - Full clipboard support, offering very fast cut & paste routines 25 | - Light text highlighting for e-mail based on an opening ">" character 26 | - Support for external spellcheckers, including type'n'spell and word 27 | guessing 28 | - Configurable keys, colors, cursor types, blink speed, and much more 29 | - Ability to have a bitmap as a background 30 | - Support for proportional fonts with floating word wrap, as well as 31 | antialiased fonts 32 | - Horizontal scrolling in no word wrap mode. 33 | - Support for very long lines (more than 50000 chars in a single line). 34 | - Pixel smooth scrolling 35 | - AREXX interface for scripted programming 36 | 37 | TextEditor is available for AmigaOS3, AmigaOS4, MorphOS and AROS. 38 | 39 | Manual Installation 40 | ~~~~~~~~~~~~~~~~~~~ 41 | 1) Extract the archive to a temporary directory. 42 | 43 | > cd RAM: 44 | > lha x MCC_TextEditor.lha 45 | 46 | 2) Go to the "MCC_TextEditor/Libs/MUI/" directory where is the directory 47 | matching the operating system you want to install TextEditor.mcc for: 48 | 49 | > cd MCC_TextEditor/Libs/MUI/AmigaOS4 50 | 51 | 3) copy all #?.mcc and #?.mcp files found in that directory to the 52 | global "MUI:libs/mui/" directory on your system partition: 53 | 54 | > copy #?.mcc MUI:Libs/mui/ 55 | > copy #?.mcp MUI:Libs/mui/ 56 | 57 | 4) reboot and enjoy the new version ;) 58 | 59 | LEGALESE 60 | ******** 61 | 62 | TextEditor.mcc was originally written in 1997 and is Copyright (C) 1997-2000 63 | by Allan Odgaard. As of version 15.10, released in April 2005, the gadget is 64 | maintained and Copyright (C) 2005-2021 TextEditor.mcc Open Source Team. 65 | 66 | TextEditor.mcc is distributed under the GNU Lesser General Public License 67 | (LGPL) and the development is hosted at github.com: 68 | 69 | https://github.com/amiga-mui/texteditor 70 | 71 | Please consult the included "COPYING" file for more detailed information 72 | about the licensing of the gadget and its source code. 73 | 74 | 75 | CHANGES SINCE THE LAST RELEASE 76 | ****************************** 77 | 78 | Please refer to the included ChangeLog in the archive for a detailed information 79 | on the changes since the last public release. 80 | -------------------------------------------------------------------------------- /mcp/icon.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #if !defined(__MORPHOS__) 26 | // uncompressed ARGB data 27 | #if defined(__AROS__) 28 | extern const uint8_t icon32[]; 29 | #else 30 | extern const uint32_t icon32[]; 31 | #endif 32 | 33 | #define ICON32_WIDTH 24 34 | #define ICON32_HEIGHT 20 35 | #define ICON32_DEPTH 32 36 | #else 37 | // bzip2 compressed ARGB data 38 | extern const uint8_t icon32[]; 39 | #endif 40 | 41 | #ifdef USE_ICON8_COLORS 42 | const ULONG icon8_colors[24] = 43 | { 44 | 0x00000000,0x00000000,0x00000000, 45 | 0x43434343,0x5b5b5b5b,0x97979797, 46 | 0x7b7b7b7b,0x7b7b7b7b,0x7b7b7b7b, 47 | 0x86868686,0x90909090,0x8b8b8b8b, 48 | 0xafafafaf,0xafafafaf,0xafafafaf, 49 | 0x00000000,0x00000000,0x00000000, 50 | 0xffffffff,0x9b9b9b9b,0x9b9b9b9b, 51 | 0xffffffff,0xffffffff,0xffffffff, 52 | }; 53 | #endif 54 | 55 | #define ICON8_WIDTH 24 56 | #define ICON8_HEIGHT 14 57 | #define ICON8_DEPTH 3 58 | #define ICON8_COMPRESSION 0 59 | #define ICON8_MASKING 2 60 | 61 | #ifdef USE_ICON8_HEADER 62 | const struct BitMapHeader icon8_header = 63 | { 23, 14, 364, 388, 3, 2, 0, 0, 0, 14, 14, 23, 14 }; 64 | #endif 65 | 66 | #ifdef USE_ICON8_BODY 67 | const UBYTE icon8_body[168] = { 68 | 0x00,0x00,0x16,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x60,0x3c, 69 | 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x1c,0x00,0x00,0xf0,0x68,0x00,0x00,0x60, 70 | 0x30,0x00,0x00,0x60,0x38,0x00,0x01,0xd8,0xd0,0x00,0x00,0xf0,0x60,0x00,0x00, 71 | 0xf0,0x70,0x00,0x03,0xad,0xa0,0x00,0x01,0xe8,0xc0,0x00,0x01,0xf8,0xe0,0x00, 72 | 0x07,0x57,0x40,0x00,0x03,0xd5,0x80,0x00,0x03,0xff,0xc0,0x00,0x0e,0xae,0x84, 73 | 0x00,0x07,0xab,0x18,0x00,0x07,0xff,0x80,0x00,0x1d,0x5d,0xa8,0x00,0x0f,0x56, 74 | 0x54,0x00,0x0f,0xf7,0x80,0x00,0x3a,0xb2,0x40,0x00,0x1e,0xad,0xb0,0x00,0x1f, 75 | 0xee,0x40,0x00,0x75,0x4c,0x20,0x00,0x3d,0x52,0x80,0x00,0x3f,0xf5,0x40,0x00, 76 | 0xea,0x98,0xb0,0x00,0x7a,0x84,0xa0,0x00,0x7f,0xf3,0xe0,0x00,0xd5,0x55,0x58, 77 | 0x00,0xf5,0x55,0x50,0x00,0xff,0xff,0xf0,0x00,0xaa,0xaa,0xac,0x00,0xea,0xaa, 78 | 0xa8,0x00,0xff,0xff,0xf8,0x00,0x00,0x00,0x02,0x00,0x2a,0xaa,0xa8,0x00,0x55, 79 | 0x55,0x54,0x00, }; 80 | #endif 81 | 82 | #ifdef USE_ICON8_BITMAP 83 | const struct BitMap icon8_bitmap = 84 | { 85 | 4, 14, 0, ICON8_DEPTH, 0, 86 | { (UBYTE *)icon8_body+(0*14*4), 87 | (UBYTE *)icon8_body+(1*14*4), 88 | (UBYTE *)icon8_body+(2*14*4), 89 | NULL, NULL, NULL, NULL, NULL } 90 | }; 91 | #endif 92 | -------------------------------------------------------------------------------- /mcc/CaseConversion.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "private.h" 26 | #include "Debug.h" 27 | 28 | /// MangleCharacters() 29 | static void MangleCharacters(struct InstData *data, char (*change)(char c)) 30 | { 31 | LONG startx; 32 | LONG stopx; 33 | LONG _startx; 34 | struct line_node *startline; 35 | struct line_node *stopline; 36 | struct line_node *_startline; 37 | struct marking newblock; 38 | 39 | ENTER(); 40 | 41 | if(Enabled(data)) 42 | { 43 | NiceBlock(&data->blockinfo, &newblock); 44 | startx = newblock.startx; 45 | stopx = newblock.stopx; 46 | startline = newblock.startline; 47 | stopline = newblock.stopline; 48 | } 49 | else 50 | { 51 | startx = data->CPos_X; 52 | stopx = startx+1; 53 | startline = data->actualline; 54 | stopline = startline; 55 | 56 | newblock.enabled = FALSE; 57 | newblock.startline = startline; 58 | newblock.stopline = stopline; 59 | newblock.startx = startx; 60 | newblock.stopx = stopx; 61 | } 62 | 63 | AddToUndoBuffer(data, ET_DELETEBLOCK, &newblock); 64 | AddToUndoBuffer(data, ET_PASTEBLOCK, &newblock); 65 | 66 | _startx = startx; 67 | _startline = startline; 68 | 69 | while(startline != GetNextLine(stopline)) 70 | { 71 | while(startline->line.Contents[startx] != '\n') 72 | { 73 | if(startx == stopx && startline == stopline) 74 | break; 75 | 76 | startline->line.Contents[startx] = change(startline->line.Contents[startx]); 77 | 78 | startx++; 79 | } 80 | startx = 0; 81 | startline = GetNextLine(startline); 82 | } 83 | 84 | data->HasChanged = TRUE; 85 | data->ContentsChanged = TRUE; 86 | data->ChangeEvent = TRUE; 87 | RedrawArea(data, _startx, _startline, stopx, stopline); 88 | 89 | LEAVE(); 90 | } 91 | 92 | /// 93 | /// ChangeToUpper() 94 | static char ChangeToUpper(char c) 95 | { 96 | return ToUpper(c); 97 | } 98 | 99 | /// 100 | /// Key_ToUpper() 101 | void Key_ToUpper(struct InstData *data) 102 | { 103 | MangleCharacters(data, ChangeToUpper); 104 | } 105 | 106 | /// 107 | /// ChangeToLower() 108 | static char ChangeToLower(char c) 109 | { 110 | return ToLower(c); 111 | } 112 | 113 | /// 114 | /// Key_ToLower() 115 | void Key_ToLower(struct InstData *data) 116 | { 117 | MangleCharacters(data, ChangeToLower); 118 | } 119 | 120 | /// 121 | -------------------------------------------------------------------------------- /mcc/AllocBitMap.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "SDI_compiler.h" 28 | 29 | #include "private.h" 30 | #include "Debug.h" 31 | 32 | #if 0 33 | #define USE_OS3 (1) 34 | #else 35 | #define USE_OS3 (((struct Library *)GfxBase)->lib_Version >= 39) 36 | #endif 37 | 38 | /// MUIG_AllocBitMap() 39 | struct BitMap * SAVEDS ASM MUIG_AllocBitMap(REG(d0, LONG width), REG(d1, LONG height), REG(d2, LONG depth), REG(d3, LONG flags), REG(a0, struct BitMap *friend)) 40 | { 41 | struct BitMap *bm = NULL; 42 | 43 | ENTER(); 44 | 45 | #if defined(__amigaos4__) 46 | bm = AllocBitMap(width,height,depth,flags,friend); 47 | #elif defined(__MORPHOS__) || defined(__AROS__) 48 | bm = AllocBitMap(width,height,depth,flags | BMF_MINPLANES | BMF_DISPLAYABLE, friend); 49 | #else 50 | if(USE_OS3) 51 | { 52 | if(friend != NULL) 53 | { 54 | // FindSemaphore() must be called in Forbid()den state 55 | Forbid(); 56 | if(FindSemaphore((char *)"cybergraphics.library") != NULL && 57 | (GetBitMapAttr(friend,BMA_FLAGS) & BMF_INTERLEAVED) == 0) 58 | flags |= BMF_MINPLANES; 59 | else 60 | friend = NULL; 61 | Permit(); 62 | } 63 | 64 | bm = AllocBitMap(width,height,depth,flags,friend); 65 | } 66 | else 67 | { 68 | if((bm = (struct BitMap *)AllocVec(sizeof(*bm), MEMF_CLEAR)) != NULL) 69 | { 70 | int i, plsize=RASSIZE(width,height); 71 | 72 | InitBitMap(bm,depth,width,height); 73 | 74 | if((bm->Planes[0] = AllocVec(plsize*depth,(flags & BMF_CLEAR) ? MEMF_CHIP|MEMF_CLEAR : MEMF_CHIP))) // !!! 75 | { 76 | for(i=1;iPlanes[i] = (PLANEPTR)(((ULONG)bm->Planes[i-1]) + plsize); 78 | } 79 | else 80 | { 81 | FreeVec(bm); 82 | bm = NULL; 83 | } 84 | } 85 | } 86 | #endif 87 | 88 | RETURN(bm); 89 | return bm; 90 | } 91 | 92 | /// 93 | /// MUIG_FreeBitMap() 94 | void SAVEDS ASM MUIG_FreeBitMap(REG(a0, struct BitMap *bm)) 95 | { 96 | ENTER(); 97 | 98 | #if defined(__amigaos4__) || defined(__MORPHOS__) || defined(__AROS__) 99 | FreeBitMap(bm); 100 | #else 101 | WaitBlit(); /* OCS/AGA need this before FreeBitMap() call */ 102 | 103 | if(USE_OS3) 104 | { 105 | FreeBitMap(bm); 106 | } 107 | else 108 | { 109 | FreeVec(bm->Planes[0]); 110 | FreeVec(bm); 111 | } 112 | #endif 113 | 114 | LEAVE(); 115 | } 116 | 117 | /// 118 | -------------------------------------------------------------------------------- /include/clib/muimaster_protos.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIB_MUIMASTER_PROTOS_H 2 | #define CLIB_MUIMASTER_PROTOS_H 3 | 4 | #ifndef EXEC_TYPES_H 5 | #include 6 | #endif 7 | #ifndef INTUITION_CLASSES_H 8 | #include 9 | #endif 10 | #ifndef UTILITY_TAGITEM_H 11 | #include 12 | #endif 13 | #ifndef LIBRARIES_MUI_H 14 | #include 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /****************************************/ 22 | /* functions to be used in applications */ 23 | /****************************************/ 24 | 25 | Object *MUI_NewObjectA (const char *classname,struct TagItem *tags); 26 | Object *MUI_NewObject (const char *classname,Tag tag1,...); 27 | Object *MUI_MakeObjectA (LONG type,ULONG *params); 28 | Object *MUI_MakeObject (LONG type,...); 29 | VOID MUI_DisposeObject (Object *obj); 30 | LONG MUI_RequestA (APTR app,APTR win,LONGBITS flags,const char *title,const char *gadgets,const char *format,APTR params); 31 | LONG MUI_Request (APTR app,APTR win,LONGBITS flags,const char *title,const char *gadgets,const char *format,...); 32 | LONG MUI_Error (VOID); 33 | APTR MUI_AllocAslRequest (unsigned long reqType, struct TagItem *tagList); 34 | APTR MUI_AllocAslRequestTags(unsigned long reqType, Tag Tag1, ...); 35 | VOID MUI_FreeAslRequest (APTR requester ); 36 | BOOL MUI_AslRequest (APTR requester, struct TagItem *tagList); 37 | BOOL MUI_AslRequestTags (APTR requester, Tag Tag1, ...); 38 | 39 | /******************************************/ 40 | /* functions to be used in custom classes */ 41 | /******************************************/ 42 | 43 | LONG MUI_SetError (LONG num); 44 | struct IClass * MUI_GetClass (const char *classname); 45 | VOID MUI_FreeClass (struct IClass *classptr); 46 | VOID MUI_RequestIDCMP (Object *obj,ULONG flags); 47 | VOID MUI_RejectIDCMP (Object *obj,ULONG flags); 48 | VOID MUI_Redraw (Object *obj,ULONG flags); 49 | APTR MUI_AddClipping (struct MUI_RenderInfo *mri,WORD left,WORD top,WORD width,WORD height); 50 | VOID MUI_RemoveClipping (struct MUI_RenderInfo *mri,APTR handle); 51 | APTR MUI_AddClipRegion (struct MUI_RenderInfo *mri,struct Region *r); 52 | VOID MUI_RemoveClipRegion (struct MUI_RenderInfo *mri,APTR handle); 53 | BOOL MUI_BeginRefresh (struct MUI_RenderInfo *mri,ULONG flags); 54 | VOID MUI_EndRefresh (struct MUI_RenderInfo *mri,ULONG flags); 55 | struct MUI_CustomClass *MUI_CreateCustomClass(struct Library *base,const char *supername,struct MUI_CustomClass *supermcc,int datasize,APTR dispatcher); 56 | BOOL MUI_DeleteCustomClass(struct MUI_CustomClass *mcc); 57 | LONG MUI_ObtainPen (struct MUI_RenderInfo *mri,struct MUI_PenSpec *spec,ULONG flags); 58 | VOID MUI_ReleasePen (struct MUI_RenderInfo *mri,LONG pen); 59 | 60 | /*************************************************************/ 61 | /* layout function, use only in custom layout callback hook! */ 62 | /*************************************************************/ 63 | 64 | BOOL MUI_Layout(Object *obj,LONG left,LONG top,LONG width,LONG height,ULONG flags); 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif /* CLIB_MUIMASTER_PROTOS_H */ 71 | -------------------------------------------------------------------------------- /include/inline4/muimaster.h: -------------------------------------------------------------------------------- 1 | #ifndef INLINE4_MUIMASTER_H 2 | #define INLINE4_MUIMASTER_H 3 | 4 | /* 5 | ** This file was auto generated by idltool 50.10. 6 | ** 7 | ** It provides compatibility to OS3 style library 8 | ** calls by substituting functions. 9 | ** 10 | ** Do not edit manually. 11 | */ 12 | 13 | #ifndef EXEC_TYPES_H 14 | #include 15 | #endif 16 | #ifndef EXEC_EXEC_H 17 | #include 18 | #endif 19 | #ifndef EXEC_INTERFACES_H 20 | #include 21 | #endif 22 | 23 | #ifndef INTUITION_CLASSES_H 24 | #include 25 | #endif 26 | #ifndef UTILITY_TAGITEM_H 27 | #include 28 | #endif 29 | #ifndef LIBRARIES_MUI_H 30 | #include 31 | #endif 32 | 33 | /* Inline macros for Interface "main" */ 34 | #define MUI_NewObjectA(par1, last) IMUIMaster->MUI_NewObjectA(par1, last) 35 | #define MUI_NewObject IMUIMaster->MUI_NewObject 36 | #define MUI_DisposeObject(last) IMUIMaster->MUI_DisposeObject(last) 37 | #define MUI_RequestA(par1, par2, par3, par4, par5, par6, last) IMUIMaster->MUI_RequestA(par1, par2, par3, par4, par5, par6, last) 38 | #if !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) 39 | #define MUI_Request(par1, par2, par3, par4, par5, ...) IMUIMaster->MUI_Request(par1, par2, par3, par4, par5, __VA_ARGS__) 40 | #endif 41 | #define MUI_AllocAslRequest(par1, last) IMUIMaster->MUI_AllocAslRequest(par1, last) 42 | #if !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) 43 | #define MUI_AllocAslRequestTags(...) IMUIMaster->MUI_AllocAslRequestTags(__VA_ARGS__) 44 | #endif 45 | #define MUI_AslRequest(par1, last) IMUIMaster->MUI_AslRequest(par1, last) 46 | #if !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) 47 | #define MUI_AslRequestTags(...) IMUIMaster->MUI_AslRequestTags(__VA_ARGS__) 48 | #endif 49 | #define MUI_FreeAslRequest(last) IMUIMaster->MUI_FreeAslRequest(last) 50 | #define MUI_Error() IMUIMaster->MUI_Error() 51 | #define MUI_SetError(last) IMUIMaster->MUI_SetError(last) 52 | #define MUI_GetClass(last) IMUIMaster->MUI_GetClass(last) 53 | #define MUI_FreeClass(last) IMUIMaster->MUI_FreeClass(last) 54 | #define MUI_RequestIDCMP(par1, last) IMUIMaster->MUI_RequestIDCMP(par1, last) 55 | #define MUI_RejectIDCMP(par1, last) IMUIMaster->MUI_RejectIDCMP(par1, last) 56 | #define MUI_Redraw(par1, last) IMUIMaster->MUI_Redraw(par1, last) 57 | #define MUI_CreateCustomClass(par1, par2, par3, par4, last) IMUIMaster->MUI_CreateCustomClass(par1, par2, par3, par4, last) 58 | #define MUI_DeleteCustomClass(last) IMUIMaster->MUI_DeleteCustomClass(last) 59 | #define MUI_MakeObjectA(par1, last) IMUIMaster->MUI_MakeObjectA(par1, last) 60 | #if !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) 61 | #define MUI_MakeObject(...) IMUIMaster->MUI_MakeObject(__VA_ARGS__) 62 | #endif 63 | #define MUI_Layout(par1, par2, par3, par4, par5, last) IMUIMaster->MUI_Layout(par1, par2, par3, par4, par5, last) 64 | #define MUI_ObtainPen(par1, par2, last) IMUIMaster->MUI_ObtainPen(par1, par2, last) 65 | #define MUI_ReleasePen(par1, last) IMUIMaster->MUI_ReleasePen(par1, last) 66 | #define MUI_AddClipping(par1, par2, par3, par4, last) IMUIMaster->MUI_AddClipping(par1, par2, par3, par4, last) 67 | #define MUI_RemoveClipping(par1, last) IMUIMaster->MUI_RemoveClipping(par1, last) 68 | #define MUI_AddClipRegion(par1, last) IMUIMaster->MUI_AddClipRegion(par1, last) 69 | #define MUI_RemoveClipRegion(par1, last) IMUIMaster->MUI_RemoveClipRegion(par1, last) 70 | #define MUI_BeginRefresh(par1, last) IMUIMaster->MUI_BeginRefresh(par1, last) 71 | #define MUI_EndRefresh(par1, last) IMUIMaster->MUI_EndRefresh(par1, last) 72 | 73 | #endif /* INLINE4_MUIMASTER_H */ 74 | -------------------------------------------------------------------------------- /mcp/Makefile.dep: -------------------------------------------------------------------------------- 1 | # AUTOGENERATED! DO NOT EDIT!!! 2 | $(OBJDIR)/CreatePrefsGroup.o: CreatePrefsGroup.c ../include/libraries/mui.h \ 3 | ../include/mui/BetterString_mcc.h ../include/mui/HotkeyString_mcc.h \ 4 | ../include/mui/TextEditor_mcc.h ../include/proto/muimaster.h \ 5 | ../include/interfaces/muimaster.h ../include/inline4/muimaster.h \ 6 | private.h TextEditor_mcp.h ../include/mcc_common.h \ 7 | ../include/SDI_compiler.h ../include/SDI_hook.h ../include/SDI_lib.h \ 8 | ../include/SDI_stdarg.h Debug.h ../include/amiga-align.h \ 9 | ../include/default-align.h locale.h ../include/muiextra.h version.h \ 10 | ../include/SDI_hook.h 11 | $(OBJDIR)/Debug.o: Debug.c ../include/SDI_compiler.h private.h \ 12 | ../include/mui/TextEditor_mcc.h TextEditor_mcp.h \ 13 | ../include/libraries/mui.h ../include/mcc_common.h \ 14 | ../include/SDI_compiler.h ../include/SDI_hook.h ../include/SDI_lib.h \ 15 | ../include/SDI_stdarg.h Debug.h ../include/amiga-align.h \ 16 | ../include/default-align.h version.h 17 | $(OBJDIR)/Dispatcher.o: Dispatcher.c ../include/libraries/mui.h \ 18 | ../include/proto/muimaster.h ../include/interfaces/muimaster.h \ 19 | ../include/inline4/muimaster.h locale.h private.h \ 20 | ../include/mui/TextEditor_mcc.h TextEditor_mcp.h \ 21 | ../include/mcc_common.h ../include/SDI_compiler.h ../include/SDI_hook.h \ 22 | ../include/SDI_lib.h ../include/SDI_stdarg.h Debug.h \ 23 | ../include/amiga-align.h ../include/default-align.h \ 24 | ../include/SDI_compiler.h ../include/SDI_hook.h 25 | $(OBJDIR)/icon.o: icon.c 26 | $(OBJDIR)/Keybindings.o: Keybindings.c private.h ../include/mui/TextEditor_mcc.h \ 27 | TextEditor_mcp.h ../include/libraries/mui.h ../include/mcc_common.h \ 28 | ../include/SDI_compiler.h ../include/SDI_hook.h ../include/SDI_lib.h \ 29 | ../include/SDI_stdarg.h Debug.h ../include/amiga-align.h \ 30 | ../include/default-align.h 31 | $(OBJDIR)/KeyStorage.o: KeyStorage.c ../include/libraries/mui.h \ 32 | ../include/mui/HotkeyString_mcc.h ../include/proto/muimaster.h \ 33 | ../include/interfaces/muimaster.h ../include/inline4/muimaster.h \ 34 | private.h ../include/mui/TextEditor_mcc.h TextEditor_mcp.h \ 35 | ../include/mcc_common.h ../include/SDI_compiler.h ../include/SDI_hook.h \ 36 | ../include/SDI_lib.h ../include/SDI_stdarg.h Debug.h \ 37 | ../include/amiga-align.h ../include/default-align.h \ 38 | ../include/newmouse.h 39 | $(OBJDIR)/library.o: library.c ../include/libraries/mui.h \ 40 | ../include/proto/muimaster.h ../include/interfaces/muimaster.h \ 41 | ../include/inline4/muimaster.h private.h \ 42 | ../include/mui/TextEditor_mcc.h TextEditor_mcp.h \ 43 | ../include/mcc_common.h ../include/SDI_compiler.h ../include/SDI_hook.h \ 44 | ../include/SDI_lib.h ../include/SDI_stdarg.h Debug.h \ 45 | ../include/amiga-align.h ../include/default-align.h version.h locale.h \ 46 | icon.h ../include/mui/NBitmap_mcc.h ../include/mccinit.c 47 | $(OBJDIR)/locale.o: locale.c ../include/SDI_compiler.h Debug.h 48 | $(OBJDIR)/ObjectCreator.o: ObjectCreator.c ../include/libraries/mui.h \ 49 | ../include/proto/muimaster.h ../include/interfaces/muimaster.h \ 50 | ../include/inline4/muimaster.h ../include/mui/TextEditor_mcc.h locale.h \ 51 | private.h TextEditor_mcp.h ../include/mcc_common.h \ 52 | ../include/SDI_compiler.h ../include/SDI_hook.h ../include/SDI_lib.h \ 53 | ../include/SDI_stdarg.h Debug.h ../include/amiga-align.h \ 54 | ../include/default-align.h ../include/muiextra.h 55 | $(OBJDIR)/Preference.o: Preference.c ../include/libraries/mui.h \ 56 | ../include/proto/muimaster.h ../include/interfaces/muimaster.h \ 57 | ../include/inline4/muimaster.h locale.h private.h \ 58 | ../include/mui/TextEditor_mcc.h TextEditor_mcp.h \ 59 | ../include/mcc_common.h ../include/SDI_compiler.h ../include/SDI_hook.h \ 60 | ../include/SDI_lib.h ../include/SDI_stdarg.h Debug.h \ 61 | ../include/amiga-align.h ../include/default-align.h \ 62 | ../include/SDI_hook.h 63 | $(OBJDIR)/vastubs.o: vastubs.c 64 | # AUTOGENERATED! DO NOT EDIT!!! 65 | -------------------------------------------------------------------------------- /tools/mkrelease.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ############################################################################ 4 | # 5 | # TextEditor.mcc - Textediting MUI Custom Class 6 | # Copyright (C) 1997-2000 Allan Odgaard 7 | # Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 8 | # 9 | # This library is free software; you can redistribute it and/or 10 | # modify it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 20 | # 21 | # $Id$ 22 | # 23 | ############################################################################ 24 | 25 | # TextEditor.mcc release build script 26 | # invoke this script as "./mkrelease.sh" to build the release archives 27 | 28 | rm -rf "release" 29 | mkdir -p "release" 30 | mkdir -p "release/MCC_TextEditor" 31 | mkdir -p "release/MCC_TextEditor/Demos" 32 | mkdir -p "release/MCC_TextEditor/Demos/Rexx" 33 | mkdir -p "release/MCC_TextEditor/Developer" 34 | mkdir -p "release/MCC_TextEditor/Developer/Autodocs" 35 | mkdir -p "release/MCC_TextEditor/Developer/Autodocs/MCC" 36 | mkdir -p "release/MCC_TextEditor/Developer/C" 37 | mkdir -p "release/MCC_TextEditor/Developer/C/Examples" 38 | mkdir -p "release/MCC_TextEditor/Developer/C/include" 39 | mkdir -p "release/MCC_TextEditor/Developer/C/include/mui" 40 | mkdir -p "release/MCC_TextEditor/Docs" 41 | mkdir -p "release/MCC_TextEditor/Libs" 42 | mkdir -p "release/MCC_TextEditor/Libs/MUI" 43 | mkdir -p "release/MCC_TextEditor/Locale" 44 | mkdir -p "release/MCC_TextEditor/Locale/Catalogs" 45 | 46 | make -C mcc release 47 | make -C mcp release 48 | make -C demo release 49 | 50 | for os in os3 os4 mos aros-i386 aros-ppc aros-x86_64; do 51 | case $os in 52 | os3) fullsys="AmigaOS3";; 53 | os4) fullsys="AmigaOS4";; 54 | mos) fullsys="MorphOS";; 55 | aros-i386) fullsys="AROS-i386";; 56 | aros-ppc) fullsys="AROS-ppc";; 57 | aros-x86_64) fullsys="AROS-x86_64";; 58 | esac 59 | mkdir -p "release/MCC_TextEditor/Libs/MUI/$fullsys" 60 | cp -a demo/bin_$os/TextEditor-Demo "release/MCC_TextEditor/Demos/TextEditor-Demo-$fullsys" 61 | cp -a dist/MCC_TextEditor/Demos/TextEditor-Demo.info "release/MCC_TextEditor/Demos/TextEditor-Demo-$fullsys.info" 62 | cp -a mcc/bin_$os/TextEditor.mcc "release/MCC_TextEditor/Libs/MUI/$fullsys/" 63 | cp -a mcp/bin_$os/TextEditor.mcp -a "release/MCC_TextEditor/Libs/MUI/$fullsys/" 64 | done 65 | 66 | make -C mcp catalogs 67 | for language in `ls mcp/locale/*.catalog`; do 68 | catalog=$(basename "$language") 69 | lang="${catalog%.*}" 70 | mkdir -p "release/MCC_TextEditor/Locale/Catalogs/${lang}" 71 | cp -a ${language} "release/MCC_TextEditor/Locale/Catalogs/${lang}/TextEditor_mcp.catalog" 72 | done 73 | 74 | cp -a -R dist/* "release/" 75 | rm "release/MCC_TextEditor/Demos/TextEditor-Demo.info" 76 | cp -a ChangeLog COPYING "release/MCC_TextEditor/" 77 | cp -a doc/MCC_TextEditor.readme "release/MCC_TextEditor/ReadMe" 78 | cp -a demo/*.ilbm "release/MCC_TextEditor/Demos/" 79 | cp -a -R demo/rexx/* "release/MCC_TextEditor/Demos/Rexx/" 80 | cp -a doc/MCC_TextEditor.doc "release/MCC_TextEditor/Developer/Autodocs/MCC/" 81 | cp -a demo/*.c "release/MCC_TextEditor/Developer/C/Examples/" 82 | cp -a demo/Makefile "release/MCC_TextEditor/Developer/C/Examples/" 83 | cp -a include/mui/TextEditor_mcc.h "release/MCC_TextEditor/Developer/C/include/mui/" 84 | cp -a doc/MCC_TextEditor.guide "release/MCC_TextEditor/Docs/" 85 | cp -a mcp/locale/TextEditor_mcp.pot "release/MCC_TextEditor/Locale/" 86 | 87 | releasever=`grep "#define LIB_VERSION" mcc/version.h | awk '{ print $3 }'` 88 | releaserev=`grep "#define LIB_REVISION" mcc/version.h | awk '{ print $3 }'` 89 | 90 | echo " MK MCC_TextEditor-$releasever.$releaserev.lha" 91 | find release -nowarn -name ".git" -exec rm -rf {} \; 2>/dev/null 92 | cd release 93 | rm -f ../MCC_TextEditor-$releasever.$releaserev.lha 94 | lha -ao5q ../MCC_TextEditor-$releasever.$releaserev.lha * 95 | cp MCC_TextEditor/ReadMe ../MCC_TextEditor-$releasever.$releaserev.readme 96 | cd .. 97 | -------------------------------------------------------------------------------- /include/interfaces/muimaster.h: -------------------------------------------------------------------------------- 1 | #ifndef MUIMASTER_INTERFACE_DEF_H 2 | #define MUIMASTER_INTERFACE_DEF_H 3 | 4 | /* 5 | ** This file was machine generated by idltool 50.10. 6 | ** Do not edit 7 | */ 8 | 9 | #ifndef EXEC_TYPES_H 10 | #include 11 | #endif 12 | #ifndef EXEC_EXEC_H 13 | #include 14 | #endif 15 | #ifndef EXEC_INTERFACES_H 16 | #include 17 | #endif 18 | 19 | #ifndef INTUITION_CLASSES_H 20 | #include 21 | #endif 22 | #ifndef UTILITY_TAGITEM_H 23 | #include 24 | #endif 25 | #ifndef LIBRARIES_MUI_H 26 | #include 27 | #endif 28 | 29 | struct MUIMasterIFace 30 | { 31 | struct InterfaceData Data; 32 | 33 | ULONG APICALL (*Obtain)(struct MUIMasterIFace *Self); 34 | ULONG APICALL (*Release)(struct MUIMasterIFace *Self); 35 | void APICALL (*Expunge)(struct MUIMasterIFace *Self); 36 | struct Interface * APICALL (*Clone)(struct MUIMasterIFace *Self); 37 | Object * APICALL (*MUI_NewObjectA)(struct MUIMasterIFace *Self, const char * par1, struct TagItem * last); 38 | Object * APICALL (*MUI_NewObject)(struct MUIMasterIFace *Self, const char * par1, ...); 39 | VOID APICALL (*MUI_DisposeObject)(struct MUIMasterIFace *Self, Object * last); 40 | LONG APICALL (*MUI_RequestA)(struct MUIMasterIFace *Self, APTR par1, APTR par2, LONGBITS par3, const char * par4, const char * par5, const char * par6, APTR last); 41 | LONG APICALL (*MUI_Request)(struct MUIMasterIFace *Self, APTR par1, APTR par2, LONGBITS par3, const char * par4, const char * par5, const char * par6, ...); 42 | APTR APICALL (*MUI_AllocAslRequest)(struct MUIMasterIFace *Self, unsigned long par1, struct TagItem * last); 43 | APTR APICALL (*MUI_AllocAslRequestTags)(struct MUIMasterIFace *Self, unsigned long par1, ...); 44 | BOOL APICALL (*MUI_AslRequest)(struct MUIMasterIFace *Self, APTR par1, struct TagItem * last); 45 | BOOL APICALL (*MUI_AslRequestTags)(struct MUIMasterIFace *Self, APTR par1, ...); 46 | VOID APICALL (*MUI_FreeAslRequest)(struct MUIMasterIFace *Self, APTR last); 47 | LONG APICALL (*MUI_Error)(struct MUIMasterIFace *Self); 48 | LONG APICALL (*MUI_SetError)(struct MUIMasterIFace *Self, LONG last); 49 | struct IClass * APICALL (*MUI_GetClass)(struct MUIMasterIFace *Self, const char * last); 50 | VOID APICALL (*MUI_FreeClass)(struct MUIMasterIFace *Self, struct IClass * last); 51 | VOID APICALL (*MUI_RequestIDCMP)(struct MUIMasterIFace *Self, Object * par1, ULONG last); 52 | VOID APICALL (*MUI_RejectIDCMP)(struct MUIMasterIFace *Self, Object * par1, ULONG last); 53 | VOID APICALL (*MUI_Redraw)(struct MUIMasterIFace *Self, Object * par1, ULONG last); 54 | struct MUI_CustomClass * APICALL (*MUI_CreateCustomClass)(struct MUIMasterIFace *Self, struct Library * par1, const char * par2, struct MUI_CustomClass * par3, int par4, APTR last); 55 | BOOL APICALL (*MUI_DeleteCustomClass)(struct MUIMasterIFace *Self, struct MUI_CustomClass * last); 56 | Object * APICALL (*MUI_MakeObjectA)(struct MUIMasterIFace *Self, LONG par1, ULONG * last); 57 | Object * APICALL (*MUI_MakeObject)(struct MUIMasterIFace *Self, LONG par1, ...); 58 | BOOL APICALL (*MUI_Layout)(struct MUIMasterIFace *Self, Object * par1, LONG par2, LONG par3, LONG par4, LONG par5, ULONG last); 59 | void APICALL (*Reserved1)(struct MUIMasterIFace *Self); 60 | void APICALL (*Reserved2)(struct MUIMasterIFace *Self); 61 | void APICALL (*Reserved3)(struct MUIMasterIFace *Self); 62 | void APICALL (*Reserved4)(struct MUIMasterIFace *Self); 63 | LONG APICALL (*MUI_ObtainPen)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, struct MUI_PenSpec * par2, ULONG last); 64 | VOID APICALL (*MUI_ReleasePen)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, LONG last); 65 | APTR APICALL (*MUI_AddClipping)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, WORD par2, WORD par3, WORD par4, WORD last); 66 | VOID APICALL (*MUI_RemoveClipping)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, APTR last); 67 | APTR APICALL (*MUI_AddClipRegion)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, struct Region * last); 68 | VOID APICALL (*MUI_RemoveClipRegion)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, APTR last); 69 | BOOL APICALL (*MUI_BeginRefresh)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, ULONG last); 70 | VOID APICALL (*MUI_EndRefresh)(struct MUIMasterIFace *Self, struct MUI_RenderInfo * par1, ULONG last); 71 | }; 72 | 73 | #endif /* MUIMASTER_INTERFACE_DEF_H */ 74 | -------------------------------------------------------------------------------- /mcc/ExportBlock.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// mExportBlock() 31 | IPTR mExportBlock(struct IClass *cl, Object *obj, struct MUIP_TextEditor_ExportBlock *msg) 32 | { 33 | struct InstData *data = INST_DATA(cl, obj); 34 | struct line_node *node; 35 | struct Hook *exportHook = data->ExportHook; 36 | LONG wraplen = data->ExportWrap; 37 | struct ExportMessage emsg; 38 | struct marking newblock; 39 | ULONG flags = msg->flags; 40 | void *user_data = NULL; 41 | 42 | ENTER(); 43 | 44 | // get information about marked text 45 | if(data->blockinfo.enabled == TRUE) 46 | NiceBlock(&data->blockinfo, &newblock); 47 | else 48 | { 49 | newblock.startline = data->actualline; 50 | newblock.startx = data->CPos_X; 51 | newblock.stopline = data->actualline; 52 | newblock.stopx = data->CPos_X; 53 | } 54 | 55 | if(isFlagSet(flags, MUIF_TextEditor_ExportBlock_TakeBlock)) 56 | { 57 | if(msg->starty <= data->totallines) 58 | newblock.startline = LineNode(data, msg->starty+1); 59 | 60 | if(msg->startx <= (newblock.startline)->line.Length) 61 | newblock.startx = msg->startx; 62 | 63 | if(msg->stopx <= (newblock.startline)->line.Length) 64 | newblock.stopx = msg->stopx; 65 | 66 | if(msg->stopy <= data->totallines) 67 | newblock.stopline = LineNode(data, msg->stopy+1); 68 | } 69 | 70 | node = newblock.startline; 71 | 72 | // clear the export message 73 | memset(&emsg, 0, sizeof(emsg)); 74 | 75 | // now we export all selected/marked lines with 76 | // the currently active export hook 77 | while(node != NULL) 78 | { 79 | struct line_node *next = GetNextLine(node); 80 | 81 | emsg.UserData = user_data; 82 | emsg.Contents = node->line.Contents; 83 | emsg.Length = node->line.Length; 84 | emsg.Styles = node->line.Styles; 85 | emsg.Colors = node->line.Colors; 86 | emsg.Highlight = node->line.Highlight; 87 | emsg.Flow = node->line.Flow; 88 | emsg.Separator = node->line.Separator; 89 | emsg.ExportWrap = wraplen; 90 | emsg.Last = next == NULL || node == newblock.stopline; 91 | 92 | // to make sure that for the last line we don't export the additional, 93 | // artificial newline '\n' we reduce the passed length value by one. 94 | if(next == NULL && emsg.Contents[node->line.Length-1] == '\n') 95 | emsg.Length--; 96 | 97 | // see if we have to skip some chars at the front or 98 | // back of the current line node 99 | if(isFlagClear(flags, MUIF_TextEditor_ExportBlock_FullLines)) 100 | { 101 | if(node == newblock.startline) 102 | emsg.SkipFront = newblock.startx; 103 | else 104 | emsg.SkipFront = 0; 105 | 106 | if(node == newblock.stopline) 107 | emsg.SkipBack = emsg.Length-newblock.stopx; 108 | else 109 | emsg.SkipBack = 0; 110 | } 111 | 112 | // call the ExportHook and exit immediately if it returns NULL 113 | if((user_data = (void*)CallHookPkt(exportHook, NULL, &emsg)) == NULL) 114 | break; 115 | 116 | // check if the current node was the last one which 117 | // was marked, and if so we go and stop our export here 118 | if(node == newblock.stopline) 119 | break; 120 | 121 | node = next; 122 | } 123 | 124 | RETURN((IPTR)user_data); 125 | return (IPTR)user_data; 126 | } 127 | 128 | /// 129 | 130 | -------------------------------------------------------------------------------- /mcp/Dispatcher.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #include "locale.h" 33 | #include "private.h" 34 | 35 | #include "SDI_compiler.h" 36 | #include "SDI_hook.h" 37 | 38 | // the main mcp dispatcher 39 | DISPATCHER(_DispatcherP) 40 | { 41 | switch(msg->MethodID) 42 | { 43 | case OM_NEW: return(New(cl, obj, (APTR)msg)); 44 | case OM_DISPOSE: return(Dispose(cl, obj, (APTR)msg)); 45 | case MUIM_Settingsgroup_ConfigToGadgets: return(ConfigToGadgets(cl, obj, (APTR)msg)); 46 | case MUIM_Settingsgroup_GadgetsToConfig: return(GadgetsToConfig(cl, obj, (APTR)msg)); 47 | } 48 | 49 | return(DoSuperMethodA(cl, obj, msg)); 50 | } 51 | 52 | DISPATCHER(Text_Dispatcher) 53 | { 54 | switch(msg->MethodID) 55 | { 56 | case OM_SET: 57 | { 58 | struct opSet *set_msg = (struct opSet *)msg; 59 | struct TagItem *tag; 60 | 61 | if((tag = FindTagItem(MUIA_UserData, set_msg->ops_AttrList))) 62 | set(obj, MUIA_Text_Contents, FunctionName(tag->ti_Data)); 63 | } 64 | break; 65 | } 66 | 67 | return(DoSuperMethodA(cl, obj, msg)); 68 | } 69 | 70 | DISPATCHER(WidthSlider_Dispatcher) 71 | { 72 | if(msg->MethodID == MUIM_Numeric_Stringify) 73 | { 74 | struct MUIP_Numeric_Stringify *smsg = (struct MUIP_Numeric_Stringify *)msg; 75 | 76 | if(smsg->value == 1) 77 | return (IPTR)tr(MSG_SliderText_MinWidth); 78 | 79 | if(smsg->value == 6) 80 | return (IPTR)tr(MSG_SliderText_MaxWidth); 81 | } 82 | 83 | return(DoSuperMethodA(cl, obj, msg)); 84 | } 85 | 86 | DISPATCHER(SpeedSlider_Dispatcher) 87 | { 88 | if(msg->MethodID == MUIM_Numeric_Stringify) 89 | { 90 | struct MUIP_Numeric_Stringify *smsg = (struct MUIP_Numeric_Stringify *)msg; 91 | 92 | if(smsg->value == 0) 93 | return (IPTR)tr(MSG_SliderText_MinSpeed); 94 | else 95 | { 96 | static char buf[20]; 97 | 98 | snprintf(buf, sizeof(buf), "%d ms", (int)smsg->value*25); 99 | 100 | return (IPTR)buf; 101 | } 102 | } 103 | 104 | return(DoSuperMethodA(cl, obj, msg)); 105 | } 106 | 107 | struct MUI_CustomClass *widthslider_mcc = NULL; 108 | struct MUI_CustomClass *speedslider_mcc = NULL; 109 | struct MUI_CustomClass *text_mcc = NULL; 110 | 111 | BOOL CreateSubClasses(void) 112 | { 113 | if((widthslider_mcc = MUI_CreateCustomClass(NULL, "Slider.mui", NULL, 0, ENTRY(WidthSlider_Dispatcher)))) 114 | { 115 | if((speedslider_mcc = MUI_CreateCustomClass(NULL, "Slider.mui", NULL, 0, ENTRY(SpeedSlider_Dispatcher)))) 116 | { 117 | if((text_mcc = MUI_CreateCustomClass(NULL, "Text.mui", NULL, 0, ENTRY(Text_Dispatcher)))) 118 | { 119 | if(LIB_VERSION_IS_AT_LEAST(MUIMasterBase, 20, 0)) 120 | { 121 | // set up unique names for our custom classes 122 | widthslider_mcc->mcc_Class->cl_ID = (ClassID)MUIC_TextEditor_mcp "/widthslider"; 123 | speedslider_mcc->mcc_Class->cl_ID = (ClassID)MUIC_TextEditor_mcp "/speedslider"; 124 | text_mcc->mcc_Class->cl_ID = (ClassID)MUIC_TextEditor_mcp "/text"; 125 | } 126 | 127 | return TRUE; 128 | } 129 | } 130 | } 131 | 132 | return FALSE; 133 | } 134 | 135 | void DeleteSubClasses(void) 136 | { 137 | if(text_mcc) 138 | { 139 | MUI_DeleteCustomClass(text_mcc); 140 | text_mcc = NULL; 141 | } 142 | 143 | if(speedslider_mcc) 144 | { 145 | MUI_DeleteCustomClass(speedslider_mcc); 146 | speedslider_mcc = NULL; 147 | } 148 | 149 | if(widthslider_mcc) 150 | { 151 | MUI_DeleteCustomClass(widthslider_mcc); 152 | widthslider_mcc = NULL; 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /mcc/Keybindings.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "private.h" 26 | 27 | // our default keybindings (every rawkey value with +500 is a vanilla key specification) 28 | const struct te_key default_keybindings[] = 29 | { 30 | { RAWKEY_CRSRUP, 0, MUIV_TextEditor_KeyAction_Up }, 31 | { RAWKEY_CRSRUP, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevLine }, 32 | { RAWKEY_CRSRUP, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageUp }, 33 | { RAWKEY_CRSRUP, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Top }, 34 | { RAWKEY_CRSRDOWN, 0, MUIV_TextEditor_KeyAction_Down }, 35 | { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextLine }, 36 | { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageDown }, 37 | { RAWKEY_CRSRDOWN, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Bottom }, 38 | { RAWKEY_CRSRRIGHT, 0, MUIV_TextEditor_KeyAction_Right }, 39 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_NextWord }, 40 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_EndOfLine }, 41 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextSentence }, 42 | { RAWKEY_CRSRLEFT, 0, MUIV_TextEditor_KeyAction_Left }, 43 | { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PrevWord }, 44 | { RAWKEY_CRSRLEFT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_StartOfLine }, 45 | { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevSentence }, 46 | 47 | { 8+500, 0, MUIV_TextEditor_KeyAction_Backspace }, 48 | { 0x7f+500, 0, MUIV_TextEditor_KeyAction_Delete }, 49 | { 13+500, 0, MUIV_TextEditor_KeyAction_Return }, 50 | { 13+500, IEQUALIFIER_NUMERICPAD, MUIV_TextEditor_KeyAction_Return }, 51 | { 9+500, 0, MUIV_TextEditor_KeyAction_Tab }, 52 | { 'x'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Cut }, 53 | { 'c'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Copy }, 54 | { 'v'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Paste }, 55 | { 'z'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Undo }, 56 | { 'z'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_Redo }, 57 | { RAWKEY_HELP, IEQUALIFIER_COMMAND, MUIV_TextEditor_KeyAction_SuggestWord }, 58 | 59 | { 8+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelBOL }, 60 | { 8+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelBOL }, 61 | { 0x7f+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelEOL }, 62 | { 0x7f+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelEOL }, 63 | { 8+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelBOW }, 64 | { 0x7f+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelEOW }, 65 | { 'x'+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelLine }, 66 | { 0x9+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_NextGadget }, 67 | 68 | { '1'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark1 }, 69 | { '2'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark2 }, 70 | { '3'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark3 }, 71 | 72 | { '1'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark1 }, 73 | { '2'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark2 }, 74 | { '3'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark3 }, 75 | 76 | { RAWKEY_PAGEUP, 0, MUIV_TextEditor_KeyAction_PageUp }, 77 | { RAWKEY_PAGEDOWN, 0, MUIV_TextEditor_KeyAction_PageDown }, 78 | { RAWKEY_HOME, 0, MUIV_TextEditor_KeyAction_Top }, 79 | { RAWKEY_END, 0, MUIV_TextEditor_KeyAction_Bottom }, 80 | 81 | { 'a'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_SelectAll }, 82 | { 'a'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SelectNone }, 83 | { -1, 0, 0 } 84 | }; 85 | -------------------------------------------------------------------------------- /mcp/Keybindings.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include "private.h" 26 | 27 | // our default keybindings (every rawkey value with +500 is a vanilla key specification) 28 | const struct te_key default_keybindings[48] = 29 | { 30 | { RAWKEY_CRSRUP, 0, MUIV_TextEditor_KeyAction_Up }, 31 | { RAWKEY_CRSRUP, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevLine }, 32 | { RAWKEY_CRSRUP, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageUp }, 33 | { RAWKEY_CRSRUP, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Top }, 34 | { RAWKEY_CRSRDOWN, 0, MUIV_TextEditor_KeyAction_Down }, 35 | { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextLine }, 36 | { RAWKEY_CRSRDOWN, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PageDown }, 37 | { RAWKEY_CRSRDOWN, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_Bottom }, 38 | { RAWKEY_CRSRRIGHT, 0, MUIV_TextEditor_KeyAction_Right }, 39 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_NextWord }, 40 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_EndOfLine }, 41 | { RAWKEY_CRSRRIGHT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_NextSentence }, 42 | { RAWKEY_CRSRLEFT, 0, MUIV_TextEditor_KeyAction_Left }, 43 | { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_PrevWord }, 44 | { RAWKEY_CRSRLEFT, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_StartOfLine }, 45 | { RAWKEY_CRSRLEFT, IEQUALIFIER_ALT | IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_PrevSentence }, 46 | 47 | { 8+500, 0, MUIV_TextEditor_KeyAction_Backspace }, 48 | { 0x7f+500, 0, MUIV_TextEditor_KeyAction_Delete }, 49 | { 13+500, 0, MUIV_TextEditor_KeyAction_Return }, 50 | { 13+500, IEQUALIFIER_NUMERICPAD, MUIV_TextEditor_KeyAction_Return }, 51 | { 9+500, 0, MUIV_TextEditor_KeyAction_Tab }, 52 | { 'x'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Cut }, 53 | { 'c'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Copy }, 54 | { 'v'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Paste }, 55 | { 'z'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_Undo }, 56 | { 'z'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_Redo }, 57 | { RAWKEY_HELP, IEQUALIFIER_COMMAND, MUIV_TextEditor_KeyAction_SuggestWord }, 58 | 59 | { 8+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelBOL }, 60 | { 8+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelBOL }, 61 | { 0x7f+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelEOL }, 62 | { 0x7f+500, IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_DelEOL }, 63 | { 8+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelBOW }, 64 | { 0x7f+500, IEQUALIFIER_ALT, MUIV_TextEditor_KeyAction_DelEOW }, 65 | { 'x'+500, IEQUALIFIER_CONTROL, MUIV_TextEditor_KeyAction_DelLine }, 66 | { 0x9+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_NextGadget }, 67 | 68 | { '1'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark1 }, 69 | { '2'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark2 }, 70 | { '3'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SetBookmark3 }, 71 | 72 | { '1'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark1 }, 73 | { '2'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark2 }, 74 | { '3'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_GotoBookmark3 }, 75 | 76 | { RAWKEY_PAGEUP, 0, MUIV_TextEditor_KeyAction_PageUp }, 77 | { RAWKEY_PAGEDOWN, 0, MUIV_TextEditor_KeyAction_PageDown }, 78 | { RAWKEY_HOME, 0, MUIV_TextEditor_KeyAction_Top }, 79 | { RAWKEY_END, 0, MUIV_TextEditor_KeyAction_Bottom }, 80 | 81 | { 'a'+500, IEQUALIFIER_RCOMMAND, MUIV_TextEditor_KeyAction_SelectAll }, 82 | { 'a'+500, IEQUALIFIER_RCOMMAND | IEQUALIFIER_SHIFT, MUIV_TextEditor_KeyAction_SelectNone }, 83 | { -1, 0, 0 } 84 | }; 85 | -------------------------------------------------------------------------------- /mcc/ImportText.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// ImportText() 31 | /*********************************************************************** 32 | Import the given 0 terminated text by invoking the given import Hook 33 | for every line 34 | ***********************************************************************/ 35 | BOOL ImportText(struct InstData *data, const char *contents, struct Hook *importHook, LONG wraplength, struct MinList *lines) 36 | { 37 | struct line_node *line; 38 | 39 | ENTER(); 40 | 41 | // make sure we start with an empty list of lines 42 | InitLines(lines); 43 | 44 | if((line = AllocVecPooled(data->mypool, sizeof(struct line_node))) != NULL) 45 | { 46 | struct ImportMessage im; 47 | 48 | memset(line, 0, sizeof(*line)); 49 | 50 | im.Data = contents; 51 | im.ImportWrap = wraplength; 52 | im.PoolHandle = data->mypool; 53 | im.ConvertTabs = data->ConvertTabs; 54 | im.TabSize = data->TabSize; 55 | 56 | while(TRUE) 57 | { 58 | struct line_node *new_line; 59 | 60 | im.linenode = &line->line; 61 | 62 | // invoke the hook, it will return NULL in case it is finished or 63 | // an error occured 64 | im.Data = (char*)CallHookPkt(importHook, NULL, &im); 65 | 66 | if(im.Data == NULL) 67 | { 68 | if(line->line.Contents != NULL) 69 | { 70 | // add the last imported line to the list 71 | AddLine(lines, line); 72 | } 73 | else 74 | { 75 | // free the line node if it didn't contain any contents 76 | if(ContainsLines(lines) == FALSE) 77 | { 78 | FreeVecPooled(data->mypool, line); 79 | } 80 | else 81 | { 82 | // if the line has nor predecessor it was obviously the first line 83 | // so we prepare a "fake" line_node to let the textEditor clear our 84 | // text 85 | if(Init_LineNode(data, line, "\n") == TRUE) 86 | AddLine(lines, line); 87 | else 88 | FreeVecPooled(data->mypool, line); 89 | } 90 | } 91 | 92 | // bail out 93 | break; 94 | } 95 | 96 | // add the imported line to the list 97 | AddLine(lines, line); 98 | 99 | if((new_line = AllocVecPooled(data->mypool, sizeof(struct line_node))) == NULL) 100 | break; 101 | 102 | // inherit the flow from the current line for the next line, 103 | // but only if the clearFlow variable is not set 104 | if(line->line.clearFlow == FALSE) 105 | new_line->line.Flow = line->line.Flow; 106 | 107 | line = new_line; 108 | } 109 | } 110 | 111 | RETURN(ContainsLines(lines)); 112 | return ContainsLines(lines); 113 | } 114 | 115 | /// 116 | /// ReimportText 117 | // export and reimport the current text with modified TAB size or TAB conversion 118 | BOOL ReimportText(struct IClass *cl, Object *obj) 119 | { 120 | struct InstData *data = INST_DATA(cl, obj); 121 | BOOL result = FALSE; 122 | struct Hook *ExportHookCopy; 123 | char *buff; 124 | 125 | ENTER(); 126 | 127 | // use the plain export hook 128 | ExportHookCopy = data->ExportHook; 129 | data->ExportHook = &ExportHookPlain; 130 | 131 | if((buff = (char *)mExportText(cl, obj, NULL)) != NULL) 132 | { 133 | struct MinList newlines; 134 | 135 | if(ImportText(data, buff, data->ImportHook, data->ImportWrap, &newlines) == TRUE) 136 | { 137 | FreeTextMem(data, &data->linelist); 138 | MoveLines(&data->linelist, &newlines); 139 | ResetDisplay(data); 140 | ResetUndoBuffer(data); 141 | result = TRUE; 142 | } 143 | 144 | FreeVec(buff); 145 | } 146 | 147 | // restore the former export hook 148 | data->ExportHook = ExportHookCopy; 149 | 150 | RETURN(result); 151 | return result; 152 | } 153 | 154 | /// 155 | -------------------------------------------------------------------------------- /include/mui/BetterString_mcc.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | BetterString.mcc - A better String gadget MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2009 by BetterString.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/ 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef BETTERSTRING_MCC_H 24 | #define BETTERSTRING_MCC_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #ifndef EXEC_TYPES_H 31 | #include 32 | #endif 33 | 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 41 | 42 | /***********************************************************************/ 43 | 44 | // STACKED ensures proper alignment on AROS 64 bit systems 45 | #if !defined(__AROS__) && !defined(STACKED) 46 | #define STACKED 47 | #endif 48 | 49 | /***********************************************************************/ 50 | 51 | #define MUIC_BetterString "BetterString.mcc" 52 | 53 | #if defined(__AROS__) && !defined(NO_INLINE_STDARG) 54 | #define BetterStringObject MUIOBJMACRO_START(MUIC_BetterString) 55 | #else 56 | #define BetterStringObject MUI_NewObject(MUIC_BetterString 57 | #endif 58 | 59 | // attributes 60 | #define MUIA_BetterString_SelectSize 0xad001001 61 | #define MUIA_BetterString_StayActive 0xad001003 62 | #define MUIA_BetterString_Columns 0xad001005 63 | #define MUIA_BetterString_NoInput 0xad001007 64 | #define MUIA_BetterString_KeyUpFocus 0xad001008 65 | #define MUIA_BetterString_KeyDownFocus 0xad001009 66 | #define MUIA_BetterString_InactiveContents 0xad00100a 67 | #define MUIA_BetterString_NoShortcuts 0xad00100c 68 | #define MUIA_BetterString_SelectOnActive 0xad00100d 69 | 70 | // methods 71 | #define MUIM_BetterString_Insert 0xad001002 72 | #define MUIM_BetterString_ClearSelected 0xad001004 73 | #define MUIM_BetterString_FileNameStart 0xad001006 74 | #define MUIM_BetterString_DoAction 0xad00100b 75 | 76 | // values for MUIM_BetterString_Insert 77 | #define MUIV_BetterString_Insert_StartOfString 0x00000000 78 | #define MUIV_BetterString_Insert_EndOfString 0xfffffffe 79 | #define MUIV_BetterString_Insert_BufferPos 0xffffffff 80 | 81 | // result values of MUIM_BetterString_FileNameStart 82 | #define MUIR_BetterString_FileNameStart_Volume -1 83 | 84 | // values for MUIM_BetterString_DoAction 85 | enum MUIV_BetterString_DoActions 86 | { 87 | MUIV_BetterString_DoAction_Cut = 1, 88 | MUIV_BetterString_DoAction_Copy = 2, 89 | MUIV_BetterString_DoAction_Paste = 3, 90 | MUIV_BetterString_DoAction_SelectAll = 4, 91 | MUIV_BetterString_DoAction_SelectNone = 5, 92 | MUIV_BetterString_DoAction_Undo = 6, 93 | MUIV_BetterString_DoAction_Redo = 7, 94 | MUIV_BetterString_DoAction_Revert = 8, 95 | MUIV_BetterString_DoAction_ToggleCase = 9, 96 | MUIV_BetterString_DoAction_ToggleCaseWord = 10, 97 | MUIV_BetterString_DoAction_IncreaseNum = 11, 98 | MUIV_BetterString_DoAction_DecreaseNum = 12, 99 | MUIV_BetterString_DoAction_HexToDec = 13, 100 | MUIV_BetterString_DoAction_DecToHex = 14, 101 | MUIV_BetterString_DoAction_NextFileComp = 15, 102 | MUIV_BetterString_DoAction_PrevFileComp = 16, 103 | MUIV_BetterString_DoAction_Delete = 17 104 | }; 105 | 106 | // parameter structures for methods 107 | struct MUIP_BetterString_Insert { STACKED ULONG MethodID; STACKED STRPTR text; STACKED LONG pos; }; 108 | struct MUIP_BetterString_ClearSelected { STACKED ULONG MethodID; }; 109 | struct MUIP_BetterString_FileNameStart { STACKED ULONG MethodID; STACKED STRPTR buffer; STACKED LONG pos; }; 110 | struct MUIP_BetterString_DoAction { STACKED ULONG MethodID; STACKED enum MUIV_BetterString_DoActions action; }; 111 | 112 | #if !defined(__AROS__) && defined(__PPC__) 113 | #if defined(__GNUC__) 114 | #pragma pack() 115 | #elif defined(__VBCC__) 116 | #pragma default-align 117 | #endif 118 | #endif 119 | 120 | #ifdef __cplusplus 121 | } 122 | #endif 123 | 124 | #endif /* BETTERSTRING_MCC_H */ 125 | -------------------------------------------------------------------------------- /mcp/TextEditor_mcp.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef MUI_TEXTEDITOR_MCP_H 24 | #define MUI_TEXTEDITOR_MCP_H 25 | 26 | #ifndef LIBRARIES_MUI_H 27 | #include 28 | #endif 29 | 30 | #include 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | #if !defined(__AROS__) && defined(__PPC__) 37 | #if defined(__GNUC__) 38 | #pragma pack(2) 39 | #elif defined(__VBCC__) 40 | #pragma amiga-align 41 | #endif 42 | #endif 43 | 44 | #define MUIC_TextEditor_mcp "TextEditor.mcp" 45 | #define TextEditorMcpObject MUI_NewObject(MUIC_TextEditor_mcp 46 | 47 | #define MUICFG_TextEditor_Background 0xad000051UL 48 | #define MUICFG_TextEditor_BlinkSpeed 0xad000052UL 49 | #define MUICFG_TextEditor_BlockQual 0xad000053UL 50 | #define MUICFG_TextEditor_CheckWord 0xad000050UL 51 | #define MUICFG_TextEditor_CursorColor 0xad000054UL 52 | #define MUICFG_TextEditor_CursorTextColor 0xad000055UL /* UNUSED */ 53 | #define MUICFG_TextEditor_CursorWidth 0xad000056UL 54 | #define MUICFG_TextEditor_FixedFont 0xad000057UL 55 | #define MUICFG_TextEditor_Frame 0xad000058UL 56 | #define MUICFG_TextEditor_HighlightColor 0xad000059UL 57 | #define MUICFG_TextEditor_MarkedColor 0xad00005aUL 58 | #define MUICFG_TextEditor_NormalFont 0xad00005bUL 59 | #define MUICFG_TextEditor_SetMaxPen 0xad00005cUL /* OBSOLETE */ 60 | #define MUICFG_TextEditor_Smooth 0xad00005dUL 61 | #define MUICFG_TextEditor_TabSize 0xad00005eUL 62 | #define MUICFG_TextEditor_TextColor 0xad00005fUL 63 | #define MUICFG_TextEditor_UndoSize 0xad000060UL 64 | #define MUICFG_TextEditor_TypeNSpell 0xad000061UL 65 | #define MUICFG_TextEditor_LookupCmd 0xad000062UL /* OBSOLETE */ 66 | #define MUICFG_TextEditor_SuggestCmd 0xad000063UL /* OBSOLETE */ 67 | #define MUICFG_TextEditor_Keybindings 0xad000064UL 68 | #define MUICFG_TextEditor_SuggestKey 0xad000065UL /* OBSOLETE */ 69 | #define MUICFG_TextEditor_SeparatorShine 0xad000066UL 70 | #define MUICFG_TextEditor_SeparatorShadow 0xad000067UL 71 | #define MUICFG_TextEditor_ConfigVersion 0xad000068UL 72 | #define MUICFG_TextEditor_InactiveCursor 0xad000069UL 73 | #define MUICFG_TextEditor_SelectPointer 0xad00006aUL 74 | #define MUICFG_TextEditor_InactiveColor 0xad00006bUL 75 | #define MUICFG_TextEditor_LookupExeType 0xad00006cUL 76 | #define MUICFG_TextEditor_LookupCommand 0xad00006dUL 77 | #define MUICFG_TextEditor_SuggestExeType 0xad00006eUL 78 | #define MUICFG_TextEditor_SuggestCommand 0xad00006fUL 79 | 80 | #define CFG_TextEditor_Background_Def "2:m2" 81 | #define CFG_TextEditor_BlinkSpeed_Def 0 82 | #define CFG_TextEditor_BlockQual_Def 0 83 | #define CFG_TextEditor_CheckWord_Def FALSE 84 | #define CFG_TextEditor_CursorColor_Def "m0" 85 | #define CFG_TextEditor_CursorWidth_Def 6 86 | #define CFG_TextEditor_FixedFont_Def "" 87 | #define CFG_TextEditor_Frame_Def "302222" 88 | #define CFG_TextEditor_HighlightColor_Def "m0" 89 | #define CFG_TextEditor_MarkedColor_Def "m6" 90 | #define CFG_TextEditor_NormalFont_Def "" 91 | #define CFG_TextEditor_Smooth_Def TRUE 92 | #define CFG_TextEditor_TabSize_Def 4 93 | #define CFG_TextEditor_TextColor_Def "m5" 94 | #define CFG_TextEditor_UndoSize_Def 500 95 | #define CFG_TextEditor_TypeNSpell_Def FALSE 96 | #define CFG_TextEditor_SeparatorShine_Def "m1" 97 | #define CFG_TextEditor_SeparatorShadow_Def "m3" 98 | #define CFG_TextEditor_InactiveCursor_Def TRUE 99 | #define CFG_TextEditor_SelectPointer_Def TRUE 100 | #define CFG_TextEditor_InactiveColor_Def "m3" 101 | #define CFG_TextEditor_LookupExeType_Def 0 102 | #define CFG_TextEditor_LookupCommand_Def "" 103 | #define CFG_TextEditor_SuggestExeType_Def 1 104 | #define CFG_TextEditor_SuggestCommand_Def "\"Open('f', 'T:Matches', 'W');WriteLn('f', '%s');Close('f')" 105 | 106 | #if !defined(__AROS__) && defined(__PPC__) 107 | #if defined(__GNUC__) 108 | #pragma pack(2) 109 | #elif defined(__VBCC__) 110 | #pragma amiga-align 111 | #endif 112 | #endif 113 | 114 | #ifdef __cplusplus 115 | } 116 | #endif 117 | 118 | #endif /* MUI_TEXTEDITOR_MCP_H */ 119 | -------------------------------------------------------------------------------- /mcc/SetBlock.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// mSetBlock() 31 | IPTR mSetBlock(struct InstData *data, struct MUIP_TextEditor_SetBlock *msg) 32 | { 33 | BOOL result = TRUE; 34 | struct marking newblock; 35 | 36 | ENTER(); 37 | 38 | // initialize newblock 39 | newblock.enabled = FALSE; 40 | 41 | // now we check&set the start variables to their corresponding values 42 | if(msg->starty == MUIV_TextEditor_SetBlock_Min) 43 | newblock.startline = LineNode(data, 1); 44 | else if(msg->starty == MUIV_TextEditor_SetBlock_Max) 45 | newblock.startline = LineNode(data, data->totallines+1); 46 | else if(msg->starty >= 0 && msg->starty <= data->totallines) 47 | newblock.startline = LineNode(data, msg->starty+1); 48 | else 49 | result = FALSE; 50 | 51 | if((LONG)msg->startx == MUIV_TextEditor_SetBlock_Min) 52 | newblock.startx = 0; 53 | else if(newblock.startline != NULL) 54 | { 55 | if(msg->startx == MUIV_TextEditor_SetBlock_Max) 56 | newblock.startx = (newblock.startline)->line.Length; 57 | else if(msg->startx >= 0 && msg->startx <= (newblock.startline)->line.Length) 58 | newblock.startx = msg->startx; 59 | else 60 | result = FALSE; 61 | } 62 | else 63 | result = FALSE; 64 | 65 | // now we check&set the stop variables to their corresponding values 66 | if(msg->stopy == MUIV_TextEditor_SetBlock_Min) 67 | newblock.stopline = LineNode(data, 1); 68 | else if(msg->stopy == MUIV_TextEditor_SetBlock_Max) 69 | newblock.stopline = LineNode(data, data->totallines+1); 70 | else if(msg->stopy >= 0 && msg->stopy <= data->totallines) 71 | newblock.stopline = LineNode(data, msg->stopy+1); 72 | else 73 | result = FALSE; 74 | 75 | if(msg->stopx == MUIV_TextEditor_SetBlock_Min) 76 | newblock.stopx = 0; 77 | else if(newblock.stopline != NULL) 78 | { 79 | if(msg->stopx == MUIV_TextEditor_SetBlock_Max) 80 | newblock.stopx = (newblock.stopline)->line.Length; 81 | else if(msg->stopx >= 0 && msg->stopx <= (newblock.stopline)->line.Length) 82 | newblock.stopx = msg->stopx; 83 | else 84 | result = FALSE; 85 | } 86 | else 87 | result = FALSE; 88 | 89 | // check if valid values had been specified for our start/stop values 90 | if(result == TRUE) 91 | { 92 | // enable the block during the color/style changes 93 | newblock.enabled = TRUE; 94 | 95 | if(isFlagSet(msg->operation, MUIF_TextEditor_SetBlock_Color)) 96 | { 97 | struct TEColor color; 98 | 99 | color.color = msg->value; 100 | color.isRGB = ((msg->value & 0xff000000) == 0xff000000) ? TRUE : FALSE; 101 | if(data->rgbMode == TRUE && IsRGBColor(&color) == FALSE && isFlagSet(data->flags, FLG_SetupDone)) 102 | { 103 | color.color = ConvertSinglePenToRGB(data, color.color); 104 | color.isRGB = TRUE; 105 | } 106 | 107 | AddColor(data, &newblock, &color); 108 | } 109 | 110 | if(isFlagSet(msg->operation, MUIF_TextEditor_SetBlock_StyleBold)) 111 | { 112 | AddStyle(data, &newblock, BOLD, msg->value != 0); 113 | } 114 | 115 | if(isFlagSet(msg->operation, MUIF_TextEditor_SetBlock_StyleItalic)) 116 | { 117 | AddStyle(data, &newblock, ITALIC, msg->value != 0); 118 | } 119 | 120 | if(isFlagSet(msg->operation, MUIF_TextEditor_SetBlock_StyleUnderline)) 121 | { 122 | AddStyle(data, &newblock, UNDERLINE, msg->value != 0); 123 | } 124 | 125 | // disable the block again 126 | newblock.enabled = FALSE; 127 | 128 | if(isFlagSet(msg->operation, MUIF_TextEditor_SetBlock_Flow)) 129 | { 130 | LONG start, lines = 0; 131 | struct marking newblock2; 132 | struct line_node *startline; 133 | 134 | data->Flow = msg->value; 135 | 136 | NiceBlock(&newblock, &newblock2); 137 | startline = newblock2.startline; 138 | start = LineToVisual(data, startline); 139 | 140 | do 141 | { 142 | lines += startline->visual; 143 | startline->line.Flow = msg->value; 144 | startline = GetNextLine(startline); 145 | } 146 | while(startline != GetNextLine(newblock2.stopline)); 147 | 148 | if(start < 1) 149 | start = 1; 150 | 151 | if(start-1+lines > data->maxlines) 152 | lines = data->maxlines-(start-1); 153 | 154 | DumpText(data, data->visual_y+start-1, start-1, start-1+lines, TRUE); 155 | } 156 | } 157 | 158 | RETURN(result); 159 | return result; 160 | } 161 | 162 | /// 163 | -------------------------------------------------------------------------------- /include/inline/muimaster.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef _INLINE_MUIMASTER_H 4 | #define _INLINE_MUIMASTER_H 5 | 6 | #ifndef __INLINE_MACROS_H 7 | #include 8 | #endif /* !__INLINE_MACROS_H */ 9 | 10 | #ifndef MUIMASTER_BASE_NAME 11 | #define MUIMASTER_BASE_NAME MUIMasterBase 12 | #endif /* !MUIMASTER_BASE_NAME */ 13 | 14 | #define MUI_AddClipRegion(mri, region) \ 15 | LP2(0xb4, APTR, MUI_AddClipRegion, struct MUI_RenderInfo *, mri, a0, struct Region *, region, a1, \ 16 | , MUIMASTER_BASE_NAME) 17 | 18 | #define MUI_AddClipping(mri, l, t, w, h) \ 19 | LP5(0xa8, APTR, MUI_AddClipping, struct MUI_RenderInfo *, mri, a0, WORD, l, d0, WORD, t, d1, WORD, w, d2, WORD, h, d3, \ 20 | , MUIMASTER_BASE_NAME) 21 | 22 | #define MUI_AllocAslRequest(type, tags) \ 23 | LP2(0x30, APTR, MUI_AllocAslRequest, unsigned long, type, d0, struct TagItem *, tags, a0, \ 24 | , MUIMASTER_BASE_NAME) 25 | 26 | #ifndef NO_INLINE_STDARG 27 | #define MUI_AllocAslRequestTags(a0, tags...) \ 28 | ({ULONG _tags[] = { tags }; MUI_AllocAslRequest((a0), (struct TagItem *)_tags);}) 29 | #endif /* !NO_INLINE_STDARG */ 30 | 31 | #define MUI_AslRequest(req, tags) \ 32 | LP2(0x36, BOOL, MUI_AslRequest, APTR, req, a0, struct TagItem *, tags, a1, \ 33 | , MUIMASTER_BASE_NAME) 34 | 35 | #ifndef NO_INLINE_STDARG 36 | #define MUI_AslRequestTags(a0, tags...) \ 37 | ({ULONG _tags[] = { tags }; MUI_AslRequest((a0), (struct TagItem *)_tags);}) 38 | #endif /* !NO_INLINE_STDARG */ 39 | 40 | #define MUI_BeginRefresh(mri, flags) \ 41 | LP2(0xc0, BOOL, MUI_BeginRefresh, struct MUI_RenderInfo *, mri, a0, ULONG, flags, d0, \ 42 | , MUIMASTER_BASE_NAME) 43 | 44 | #define MUI_CreateCustomClass(base, supername, supermcc, datasize, dispatcher) \ 45 | LP5(0x6c, struct MUI_CustomClass *, MUI_CreateCustomClass, struct Library *, base, a0, const char *, supername, a1, struct MUI_CustomClass *, supermcc, a2, int, datasize, d0, APTR, dispatcher, a3, \ 46 | , MUIMASTER_BASE_NAME) 47 | 48 | #define MUI_DeleteCustomClass(mcc) \ 49 | LP1(0x72, BOOL, MUI_DeleteCustomClass, struct MUI_CustomClass *, mcc, a0, \ 50 | , MUIMASTER_BASE_NAME) 51 | 52 | #define MUI_DisposeObject(obj) \ 53 | LP1NR(0x24, MUI_DisposeObject, Object *, obj, a0, \ 54 | , MUIMASTER_BASE_NAME) 55 | 56 | #define MUI_EndRefresh(mri, flags) \ 57 | LP2NR(0xc6, MUI_EndRefresh, struct MUI_RenderInfo *, mri, a0, ULONG, flags, d0, \ 58 | , MUIMASTER_BASE_NAME) 59 | 60 | #define MUI_Error() \ 61 | LP0(0x42, LONG, MUI_Error, \ 62 | , MUIMASTER_BASE_NAME) 63 | 64 | #define MUI_FreeAslRequest(req) \ 65 | LP1NR(0x3c, MUI_FreeAslRequest, APTR, req, a0, \ 66 | , MUIMASTER_BASE_NAME) 67 | 68 | #define MUI_FreeClass(cl) \ 69 | LP1NR(0x54, MUI_FreeClass, struct IClass *, cl, a0, \ 70 | , MUIMASTER_BASE_NAME) 71 | 72 | #define MUI_GetClass(name) \ 73 | LP1(0x4e, struct IClass *, MUI_GetClass, const char *, name, a0, \ 74 | , MUIMASTER_BASE_NAME) 75 | 76 | #define MUI_Layout(obj, l, t, w, h, flags) \ 77 | LP6(0x7e, BOOL, MUI_Layout, Object *, obj, a0, LONG, l, d0, LONG, t, d1, LONG, w, d2, LONG, h, d3, ULONG, flags, d4, \ 78 | , MUIMASTER_BASE_NAME) 79 | 80 | #define MUI_MakeObjectA(type, params) \ 81 | LP2(0x78, Object *, MUI_MakeObjectA, LONG, type, d0, ULONG *, params, a0, \ 82 | , MUIMASTER_BASE_NAME) 83 | 84 | #ifndef NO_INLINE_STDARG 85 | #define MUI_MakeObject(a0, tags...) \ 86 | ({ULONG _tags[] = { tags }; MUI_MakeObjectA((a0), (ULONG *)_tags);}) 87 | #endif /* !NO_INLINE_STDARG */ 88 | 89 | #define MUI_NewObjectA(class, tags) \ 90 | LP2(0x1e, Object *, MUI_NewObjectA, const char *, class, a0, struct TagItem *, tags, a1, \ 91 | , MUIMASTER_BASE_NAME) 92 | 93 | #ifndef NO_INLINE_STDARG 94 | #define MUI_NewObject(a0, tags...) \ 95 | ({ULONG _tags[] = { tags }; MUI_NewObjectA((a0), (struct TagItem *)_tags);}) 96 | #endif /* !NO_INLINE_STDARG */ 97 | 98 | #define MUI_ObtainPen(mri, spec, flags) \ 99 | LP3(0x9c, LONG, MUI_ObtainPen, struct MUI_RenderInfo *, mri, a0, struct MUI_PenSpec *, spec, a1, ULONG, flags, d0, \ 100 | , MUIMASTER_BASE_NAME) 101 | 102 | #define MUI_Redraw(obj, flags) \ 103 | LP2NR(0x66, MUI_Redraw, Object *, obj, a0, ULONG, flags, d0, \ 104 | , MUIMASTER_BASE_NAME) 105 | 106 | #define MUI_RejectIDCMP(obj, flags) \ 107 | LP2NR(0x60, MUI_RejectIDCMP, Object *, obj, a0, ULONG, flags, d0, \ 108 | , MUIMASTER_BASE_NAME) 109 | 110 | #define MUI_ReleasePen(mri, pen) \ 111 | LP2NR(0xa2, MUI_ReleasePen, struct MUI_RenderInfo *, mri, a0, LONG, pen, d0, \ 112 | , MUIMASTER_BASE_NAME) 113 | 114 | #define MUI_RemoveClipRegion(mri, region) \ 115 | LP2NR(0xba, MUI_RemoveClipRegion, struct MUI_RenderInfo *, mri, a0, APTR, region, a1, \ 116 | , MUIMASTER_BASE_NAME) 117 | 118 | #define MUI_RemoveClipping(mri, h) \ 119 | LP2NR(0xae, MUI_RemoveClipping, struct MUI_RenderInfo *, mri, a0, APTR, h, a1, \ 120 | , MUIMASTER_BASE_NAME) 121 | 122 | #define MUI_RequestA(app, win, flags, title, gadgets, format, params) \ 123 | LP7(0x2a, LONG, MUI_RequestA, APTR, app, d0, APTR, win, d1, LONGBITS, flags, d2, const char *, title, a0, const char *, gadgets, a1, const char *, format, a2, APTR, params, a3, \ 124 | , MUIMASTER_BASE_NAME) 125 | 126 | #ifndef NO_INLINE_STDARG 127 | #define MUI_Request(a0, a1, a2, a3, a4, a5, tags...) \ 128 | ({ULONG _tags[] = { tags }; MUI_RequestA((a0), (a1), (a2), (a3), (a4), (a5), (APTR)_tags);}) 129 | #endif /* !NO_INLINE_STDARG */ 130 | 131 | #define MUI_RequestIDCMP(obj, flags) \ 132 | LP2NR(0x5a, MUI_RequestIDCMP, Object *, obj, a0, ULONG, flags, d0, \ 133 | , MUIMASTER_BASE_NAME) 134 | 135 | #define MUI_SetError(errnum) \ 136 | LP1(0x48, LONG, MUI_SetError, LONG, errnum, d0, \ 137 | , MUIMASTER_BASE_NAME) 138 | 139 | #endif /* !_INLINE_MUIMASTER_H */ 140 | -------------------------------------------------------------------------------- /include/inline/muimaster_protos.h: -------------------------------------------------------------------------------- 1 | #ifndef _VBCCINLINE_MUIMASTER_H 2 | #define _VBCCINLINE_MUIMASTER_H 3 | 4 | Object * __MUI_NewObjectA(__reg("a0") const char * a0arg, __reg("a1") struct TagItem * tags, __reg("a6") void *)="\tjsr\t-30(a6)"; 5 | #define MUI_NewObjectA(a0arg, tags) __MUI_NewObjectA((a0arg), (tags), MUIMasterBase) 6 | 7 | VOID __MUI_DisposeObject(__reg("a0") Object * obj, __reg("a6") void *)="\tjsr\t-36(a6)"; 8 | #define MUI_DisposeObject(obj) __MUI_DisposeObject((obj), MUIMasterBase) 9 | 10 | LONG __MUI_RequestA(__reg("d0") APTR app, __reg("d1") APTR win, __reg("d2") LONGBITS flags, __reg("a0") const char * title, __reg("a1") const char * gadgets, __reg("a2") const char * format, __reg("a3") APTR params, __reg("a6") void *)="\tjsr\t-42(a6)"; 11 | #define MUI_RequestA(app, win, flags, title, gadgets, format, params) __MUI_RequestA((app), (win), (flags), (title), (gadgets), (format), (params), MUIMasterBase) 12 | 13 | APTR __MUI_AllocAslRequest(__reg("d0") unsigned long type, __reg("a0") struct TagItem * tags, __reg("a6") void *)="\tjsr\t-48(a6)"; 14 | #define MUI_AllocAslRequest(type, tags) __MUI_AllocAslRequest((type), (tags), MUIMasterBase) 15 | 16 | BOOL __MUI_AslRequest(__reg("a0") APTR req, __reg("a1") struct TagItem * tags, __reg("a6") void *)="\tjsr\t-54(a6)"; 17 | #define MUI_AslRequest(req, tags) __MUI_AslRequest((req), (tags), MUIMasterBase) 18 | 19 | VOID __MUI_FreeAslRequest(__reg("a0") APTR req, __reg("a6") void *)="\tjsr\t-60(a6)"; 20 | #define MUI_FreeAslRequest(req) __MUI_FreeAslRequest((req), MUIMasterBase) 21 | 22 | LONG __MUI_Error(__reg("a6") void *)="\tjsr\t-66(a6)"; 23 | #define MUI_Error() __MUI_Error(MUIMasterBase) 24 | 25 | LONG __MUI_SetError(__reg("d0") LONG errnum, __reg("a6") void *)="\tjsr\t-72(a6)"; 26 | #define MUI_SetError(errnum) __MUI_SetError((errnum), MUIMasterBase) 27 | 28 | struct IClass * __MUI_GetClass(__reg("a0") const char * name, __reg("a6") void *)="\tjsr\t-78(a6)"; 29 | #define MUI_GetClass(name) __MUI_GetClass((name), MUIMasterBase) 30 | 31 | VOID __MUI_FreeClass(__reg("a0") struct IClass * cl, __reg("a6") void *)="\tjsr\t-84(a6)"; 32 | #define MUI_FreeClass(cl) __MUI_FreeClass((cl), MUIMasterBase) 33 | 34 | VOID __MUI_RequestIDCMP(__reg("a0") Object * obj, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-90(a6)"; 35 | #define MUI_RequestIDCMP(obj, flags) __MUI_RequestIDCMP((obj), (flags), MUIMasterBase) 36 | 37 | VOID __MUI_RejectIDCMP(__reg("a0") Object * obj, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-96(a6)"; 38 | #define MUI_RejectIDCMP(obj, flags) __MUI_RejectIDCMP((obj), (flags), MUIMasterBase) 39 | 40 | VOID __MUI_Redraw(__reg("a0") Object * obj, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-102(a6)"; 41 | #define MUI_Redraw(obj, flags) __MUI_Redraw((obj), (flags), MUIMasterBase) 42 | 43 | struct MUI_CustomClass * __MUI_CreateCustomClass(__reg("a0") struct Library * base, __reg("a1") const char * supername, __reg("a2") struct MUI_CustomClass * supermcc, __reg("d0") int datasize, __reg("a3") APTR dispatcher, __reg("a6") void *)="\tjsr\t-108(a6)"; 44 | #define MUI_CreateCustomClass(base, supername, supermcc, datasize, dispatcher) __MUI_CreateCustomClass((base), (supername), (supermcc), (datasize), (dispatcher), MUIMasterBase) 45 | 46 | BOOL __MUI_DeleteCustomClass(__reg("a0") struct MUI_CustomClass * mcc, __reg("a6") void *)="\tjsr\t-114(a6)"; 47 | #define MUI_DeleteCustomClass(mcc) __MUI_DeleteCustomClass((mcc), MUIMasterBase) 48 | 49 | Object * __MUI_MakeObjectA(__reg("d0") LONG type, __reg("a0") ULONG * params, __reg("a6") void *)="\tjsr\t-120(a6)"; 50 | #define MUI_MakeObjectA(type, params) __MUI_MakeObjectA((type), (params), MUIMasterBase) 51 | 52 | BOOL __MUI_Layout(__reg("a0") Object * obj, __reg("d0") LONG l, __reg("d1") LONG t, __reg("d2") LONG w, __reg("d3") LONG h, __reg("d4") ULONG flags, __reg("a6") void *)="\tjsr\t-126(a6)"; 53 | #define MUI_Layout(obj, l, t, w, h, flags) __MUI_Layout((obj), (l), (t), (w), (h), (flags), MUIMasterBase) 54 | 55 | LONG __MUI_ObtainPen(__reg("a0") struct MUI_RenderInfo * mri, __reg("a1") struct MUI_PenSpec * spec, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-156(a6)"; 56 | #define MUI_ObtainPen(mri, spec, flags) __MUI_ObtainPen((mri), (spec), (flags), MUIMasterBase) 57 | 58 | VOID __MUI_ReleasePen(__reg("a0") struct MUI_RenderInfo * mri, __reg("d0") LONG pen, __reg("a6") void *)="\tjsr\t-162(a6)"; 59 | #define MUI_ReleasePen(mri, pen) __MUI_ReleasePen((mri), (pen), MUIMasterBase) 60 | 61 | APTR __MUI_AddClipping(__reg("a0") struct MUI_RenderInfo * mri, __reg("d0") WORD l, __reg("d1") WORD t, __reg("d2") WORD w, __reg("d3") WORD h, __reg("a6") void *)="\tjsr\t-168(a6)"; 62 | #define MUI_AddClipping(mri, l, t, w, h) __MUI_AddClipping((mri), (l), (t), (w), (h), MUIMasterBase) 63 | 64 | VOID __MUI_RemoveClipping(__reg("a0") struct MUI_RenderInfo * mri, __reg("a1") APTR h, __reg("a6") void *)="\tjsr\t-174(a6)"; 65 | #define MUI_RemoveClipping(mri, h) __MUI_RemoveClipping((mri), (h), MUIMasterBase) 66 | 67 | APTR __MUI_AddClipRegion(__reg("a0") struct MUI_RenderInfo * mri, __reg("a1") struct Region * region, __reg("a6") void *)="\tjsr\t-180(a6)"; 68 | #define MUI_AddClipRegion(mri, region) __MUI_AddClipRegion((mri), (region), MUIMasterBase) 69 | 70 | VOID __MUI_RemoveClipRegion(__reg("a0") struct MUI_RenderInfo * mri, __reg("a1") APTR region, __reg("a6") void *)="\tjsr\t-186(a6)"; 71 | #define MUI_RemoveClipRegion(mri, region) __MUI_RemoveClipRegion((mri), (region), MUIMasterBase) 72 | 73 | BOOL __MUI_BeginRefresh(__reg("a0") struct MUI_RenderInfo * mri, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-192(a6)"; 74 | #define MUI_BeginRefresh(mri, flags) __MUI_BeginRefresh((mri), (flags), MUIMasterBase) 75 | 76 | VOID __MUI_EndRefresh(__reg("a0") struct MUI_RenderInfo * mri, __reg("d0") ULONG flags, __reg("a6") void *)="\tjsr\t-198(a6)"; 77 | #define MUI_EndRefresh(mri, flags) __MUI_EndRefresh((mri), (flags), MUIMasterBase) 78 | 79 | #endif /* _VBCCINLINE_MUIMASTER_H */ 80 | -------------------------------------------------------------------------------- /mcp/Preference.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include "locale.h" 35 | #include "private.h" 36 | 37 | #include "SDI_hook.h" 38 | 39 | #if defined(__amigaos4__) 40 | struct Library *IntuitionBase = NULL; 41 | struct Library *MUIMasterBase = NULL; 42 | struct Library *LocaleBase = NULL; 43 | struct Library *UtilityBase = NULL; 44 | #elif defined(__MORPHOS__) 45 | struct IntuitionBase *IntuitionBase = NULL; 46 | struct Library *MUIMasterBase = NULL; 47 | struct Library *LocaleBase = NULL; 48 | struct Library *UtilityBase = NULL; 49 | #else 50 | struct IntuitionBase *IntuitionBase = NULL; 51 | struct Library *MUIMasterBase = NULL; 52 | struct LocaleBase *LocaleBase = NULL; 53 | struct Library *UtilityBase = NULL; 54 | #endif 55 | 56 | #if defined(__amigaos4__) 57 | struct IntuitionIFace *IIntuition = NULL; 58 | struct MUIMasterIFace *IMUIMaster = NULL; 59 | struct LocaleIFace *ILocale = NULL; 60 | struct UtilityIFace *IUtility = NULL; 61 | #endif 62 | 63 | extern DISPATCHERPROTO(_DispatcherP); 64 | 65 | int main(void) 66 | { 67 | if((UtilityBase = OpenLibrary("utility.library", 38)) && 68 | GETINTERFACE(IUtility, UtilityBase)) 69 | { 70 | if((IntuitionBase = (APTR)OpenLibrary("intuition.library", 38)) && 71 | GETINTERFACE(IIntuition, IntuitionBase)) 72 | { 73 | if((LocaleBase = (APTR)OpenLibrary("locale.library", 38)) && 74 | GETINTERFACE(ILocale, LocaleBase)) 75 | { 76 | OpenCat(); 77 | 78 | #if defined(DEBUG) 79 | SetupDebug(); 80 | #endif 81 | 82 | if((MUIMasterBase = OpenLibrary(MUIMASTER_NAME, MUIMASTER_VMIN)) && 83 | GETINTERFACE(IMUIMaster, MUIMasterBase)) 84 | { 85 | Object *app = NULL; 86 | Object *window = NULL; 87 | struct MUI_CustomClass *mcc = NULL; 88 | 89 | if(CreateSubClasses()) 90 | mcc = MUI_CreateCustomClass(NULL, "Group.mui", NULL, sizeof(struct InstData_MCP), ENTRY(_DispatcherP)); 91 | 92 | if(mcc) 93 | { 94 | app = MUI_NewObject("Application.mui", 95 | MUIA_Application_Author, "Allan Odgaard", 96 | MUIA_Application_Base, "TextEditor-Prefs", 97 | MUIA_Application_Copyright, "(C)1997 Allan Odgaard", 98 | MUIA_Application_Description, "Preference for TextEditor.mcc", 99 | MUIA_Application_Title, "TextEditor-Prefs", 100 | MUIA_Application_Version, "$VER: TextEditor-Prefs V1.0 (18-Feb-97)", 101 | 102 | MUIA_Application_Window, 103 | window = MUI_NewObject("Window.mui", 104 | MUIA_Window_Title, "TextEditor-Prefs", 105 | MUIA_Window_RootObject, 106 | MUI_NewObject("Group.mui", 107 | MUIA_Background, MUII_PageBack, 108 | MUIA_Frame, MUIV_Frame_Text, 109 | MUIA_InnerBottom, 11, 110 | MUIA_InnerLeft, 6, 111 | MUIA_InnerRight, 6, 112 | MUIA_InnerTop, 11, 113 | 114 | // Child, RectangleObject, End, 115 | Child, NewObject(mcc->mcc_Class, NULL, TAG_DONE), 116 | 117 | TAG_DONE ), 118 | TAG_DONE ), 119 | TAG_DONE ); 120 | } 121 | 122 | if(app) 123 | { 124 | unsigned long sigs; 125 | 126 | DoMethod(window, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit); 127 | set(window, MUIA_Window_Open, TRUE); 128 | while((LONG)DoMethod(app, MUIM_Application_NewInput, &sigs) != (LONG)MUIV_Application_ReturnID_Quit) 129 | { 130 | if(sigs) 131 | { 132 | sigs = Wait(sigs | SIGBREAKF_CTRL_C); 133 | if(sigs & SIGBREAKF_CTRL_C) 134 | break; 135 | } 136 | } 137 | 138 | MUI_DisposeObject(app); 139 | 140 | if(mcc) 141 | MUI_DeleteCustomClass(mcc); 142 | 143 | DeleteSubClasses(); 144 | } 145 | 146 | DROPINTERFACE(IMUIMaster); 147 | CloseLibrary(MUIMasterBase); 148 | } 149 | 150 | CloseCat(); 151 | 152 | DROPINTERFACE(ILocale); 153 | CloseLibrary((struct Library *)LocaleBase); 154 | } 155 | 156 | DROPINTERFACE(IIntuition); 157 | CloseLibrary((struct Library *)IntuitionBase); 158 | } 159 | 160 | DROPINTERFACE(IUtility); 161 | CloseLibrary(UtilityBase); 162 | } 163 | 164 | return 0; 165 | } 166 | -------------------------------------------------------------------------------- /mcc/Search.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | #include 23 | 24 | #include 25 | #include 26 | 27 | #include "private.h" 28 | #include "Debug.h" 29 | 30 | /// SimpleMarkText() 31 | static void SimpleMarkText(struct InstData *data, LONG startx, struct line_node *startline, LONG stopx, struct line_node *stopline) 32 | { 33 | ENTER(); 34 | 35 | if(Enabled(data)) 36 | { 37 | data->blockinfo.enabled = FALSE; 38 | MarkText(data, data->blockinfo.startx, data->blockinfo.startline, data->blockinfo.stopx, data->blockinfo.stopline); 39 | } 40 | // else 41 | { 42 | SetCursor(data, data->CPos_X, data->actualline, FALSE); 43 | } 44 | 45 | data->blockinfo.startline = startline; 46 | data->blockinfo.startx = startx; 47 | data->blockinfo.stopline = data->actualline = stopline; 48 | data->blockinfo.stopx = data->CPos_X = stopx; 49 | data->blockinfo.enabled = TRUE; 50 | 51 | ScrollIntoDisplay(data); 52 | MarkText(data, startx, startline, stopx, stopline); 53 | 54 | LEAVE(); 55 | } 56 | 57 | /// 58 | 59 | static LONG Native_strncmp (STRPTR str1, STRPTR str2, LONG len) { return strncmp(str1, str2, len); } 60 | static LONG Utility_strnicmp (STRPTR str1, STRPTR str2, LONG len) { return Strnicmp(str1, str2, len); } 61 | 62 | /// mSearch() 63 | IPTR mSearch(UNUSED struct IClass *cl, Object *obj, struct MUIP_TextEditor_Search *msg) 64 | { 65 | struct InstData *data = INST_DATA(cl, obj); 66 | STRPTR str = msg->SearchString; 67 | LONG len = strlen(str), step = 0; 68 | 69 | ENTER(); 70 | 71 | if(len > 0 && len <= 120) 72 | { 73 | BYTE map[256]; 74 | LONG (*StrCmp)(STRPTR, STRPTR, LONG); 75 | LONG cursor; 76 | struct line_node *line; 77 | 78 | // if the FromTop flag is set we start the search right from the top 79 | if(isFlagSet(msg->Flags, MUIF_TextEditor_Search_FromTop)) 80 | { 81 | cursor = 0; 82 | line = GetFirstLine(&data->linelist); 83 | } 84 | else 85 | { 86 | cursor = data->CPos_X; 87 | line = data->actualline; 88 | } 89 | 90 | memset(map, len, 256); 91 | 92 | // if a casesensitive search is requested we use a different 93 | // compare function. 94 | if(isFlagSet(msg->Flags, MUIF_TextEditor_Search_CaseSensitive)) 95 | { 96 | StrCmp = Native_strncmp; 97 | 98 | while(*str) 99 | map[(int)*str++] = step--; 100 | } 101 | else 102 | { 103 | StrCmp = Utility_strnicmp; 104 | while(*str) 105 | { 106 | map[ToLower(*str)] = step; 107 | map[ToUpper(*str++)] = step--; 108 | } 109 | } 110 | 111 | if(isFlagSet(msg->Flags, MUIF_TextEditor_Search_Backwards)) 112 | { 113 | //D(DBF_STARTUP, "MUIF_TextEditor_Search_Backwards search=%s\n", msg->SearchString); 114 | if(Enabled(data)) 115 | cursor -= len; 116 | 117 | while(line != NULL) 118 | { 119 | LONG lenTmp = len; 120 | STRPTR contents = line->line.Contents + cursor - lenTmp+1; 121 | STRPTR lower = line->line.Contents; 122 | 123 | while(contents >= lower) 124 | { 125 | //D(DBF_STARTUP, "MUIF_TextEditor_Search_Backwards previous=%ld, contents=%s\n",line, contents); 126 | if(!StrCmp(contents, msg->SearchString, len)) 127 | { 128 | LONG startx = contents - line->line.Contents; 129 | 130 | //D(DBF_STARTUP, "MUIF_TextEditor_Search_Backwards found\n"); 131 | 132 | SimpleMarkText(data, startx, line, startx+len, line); 133 | 134 | RETURN(TRUE); 135 | return TRUE; 136 | } 137 | contents -= 1; 138 | lenTmp += 1; 139 | } 140 | 141 | line = GetPrevLine(line); 142 | 143 | if(line != NULL) 144 | cursor = line->line.Length; 145 | } 146 | } 147 | else 148 | { 149 | while(line) 150 | { 151 | LONG skip; 152 | STRPTR contents = line->line.Contents + cursor + len-1; 153 | STRPTR upper = line->line.Contents + line->line.Length; 154 | 155 | while(contents < upper) 156 | { 157 | skip = map[(int)(*contents)]; 158 | contents += skip; 159 | 160 | if(skip <= 0) 161 | { 162 | if(!StrCmp(contents, msg->SearchString, len)) 163 | { 164 | LONG startx = contents - line->line.Contents; 165 | 166 | SimpleMarkText(data, startx, line, startx+len, line); 167 | 168 | RETURN(TRUE); 169 | return TRUE; 170 | } 171 | contents += len; 172 | } 173 | } 174 | 175 | cursor = 0; 176 | 177 | line = GetNextLine(line); 178 | } 179 | } 180 | 181 | } 182 | 183 | RETURN(FALSE); 184 | return FALSE; 185 | } 186 | 187 | /// 188 | /// mReplace() 189 | IPTR mReplace(UNUSED struct IClass *cl, Object *obj, struct MUIP_TextEditor_Replace *msg) 190 | { 191 | struct InstData *data = INST_DATA(cl, obj); 192 | IPTR res = FALSE; 193 | 194 | ENTER(); 195 | 196 | if(Enabled(data)) 197 | { 198 | Key_Clear(data); 199 | DoMethod(obj, MUIM_TextEditor_InsertText, msg->NewString, MUIV_TextEditor_InsertText_Cursor); 200 | res = TRUE; 201 | } 202 | 203 | RETURN(res); 204 | return res; 205 | } 206 | 207 | /// 208 | -------------------------------------------------------------------------------- /include/ppcinline/muimaster.h: -------------------------------------------------------------------------------- 1 | /* Automatically generated header! Do not edit! */ 2 | 3 | #ifndef _PPCINLINE_MUIMASTER_H 4 | #define _PPCINLINE_MUIMASTER_H 5 | 6 | #ifndef __PPCINLINE_MACROS_H 7 | #include 8 | #endif /* !__PPCINLINE_MACROS_H */ 9 | 10 | #ifndef MUIMASTER_BASE_NAME 11 | #define MUIMASTER_BASE_NAME MUIMasterBase 12 | #endif /* !MUIMASTER_BASE_NAME */ 13 | 14 | #define MUI_ObtainPen(__p0, __p1, __p2) \ 15 | LP3(156, LONG , MUI_ObtainPen, \ 16 | struct MUI_RenderInfo *, __p0, a0, \ 17 | struct MUI_PenSpec *, __p1, a1, \ 18 | ULONG , __p2, d0, \ 19 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 20 | 21 | #define MUI_RemoveClipping(__p0, __p1) \ 22 | LP2NR(174, MUI_RemoveClipping, \ 23 | struct MUI_RenderInfo *, __p0, a0, \ 24 | APTR , __p1, a1, \ 25 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 26 | 27 | #define MUI_ReleasePen(__p0, __p1) \ 28 | LP2NR(162, MUI_ReleasePen, \ 29 | struct MUI_RenderInfo *, __p0, a0, \ 30 | LONG , __p1, d0, \ 31 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 32 | 33 | #define MUI_EndRefresh(__p0, __p1) \ 34 | LP2NR(198, MUI_EndRefresh, \ 35 | struct MUI_RenderInfo *, __p0, a0, \ 36 | ULONG , __p1, d0, \ 37 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 38 | 39 | #define MUI_AllocAslRequest(__p0, __p1) \ 40 | LP2(48, APTR , MUI_AllocAslRequest, \ 41 | unsigned long , __p0, d0, \ 42 | struct TagItem *, __p1, a0, \ 43 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 44 | 45 | #define MUI_DisposeObject(__p0) \ 46 | LP1NR(36, MUI_DisposeObject, \ 47 | Object *, __p0, a0, \ 48 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 49 | 50 | #define MUI_SetError(__p0) \ 51 | LP1(72, LONG , MUI_SetError, \ 52 | LONG , __p0, d0, \ 53 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 54 | 55 | #define MUI_RemoveClipRegion(__p0, __p1) \ 56 | LP2NR(186, MUI_RemoveClipRegion, \ 57 | struct MUI_RenderInfo *, __p0, a0, \ 58 | APTR , __p1, a1, \ 59 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 60 | 61 | #define MUI_Layout(__p0, __p1, __p2, __p3, __p4, __p5) \ 62 | LP6(126, BOOL , MUI_Layout, \ 63 | Object *, __p0, a0, \ 64 | LONG , __p1, d0, \ 65 | LONG , __p2, d1, \ 66 | LONG , __p3, d2, \ 67 | LONG , __p4, d3, \ 68 | ULONG , __p5, d4, \ 69 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 70 | 71 | #define MUI_NewObjectA(__p0, __p1) \ 72 | LP2(30, Object *, MUI_NewObjectA, \ 73 | const char *, __p0, a0, \ 74 | struct TagItem *, __p1, a1, \ 75 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 76 | 77 | #define MUI_Redraw(__p0, __p1) \ 78 | LP2NR(102, MUI_Redraw, \ 79 | Object *, __p0, a0, \ 80 | ULONG , __p1, d0, \ 81 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 82 | 83 | #define MUI_AslRequest(__p0, __p1) \ 84 | LP2(54, BOOL , MUI_AslRequest, \ 85 | APTR , __p0, a0, \ 86 | struct TagItem *, __p1, a1, \ 87 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 88 | 89 | #define MUI_BeginRefresh(__p0, __p1) \ 90 | LP2(192, BOOL , MUI_BeginRefresh, \ 91 | struct MUI_RenderInfo *, __p0, a0, \ 92 | ULONG , __p1, d0, \ 93 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 94 | 95 | #define MUI_CreateCustomClass(__p0, __p1, __p2, __p3, __p4) \ 96 | LP5(108, struct MUI_CustomClass *, MUI_CreateCustomClass, \ 97 | struct Library *, __p0, a0, \ 98 | const char *, __p1, a1, \ 99 | struct MUI_CustomClass *, __p2, a2, \ 100 | int , __p3, d0, \ 101 | APTR , __p4, a3, \ 102 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 103 | 104 | #define MUI_RequestA(__p0, __p1, __p2, __p3, __p4, __p5, __p6) \ 105 | LP7(42, LONG , MUI_RequestA, \ 106 | APTR , __p0, d0, \ 107 | APTR , __p1, d1, \ 108 | LONGBITS , __p2, d2, \ 109 | const char *, __p3, a0, \ 110 | const char *, __p4, a1, \ 111 | const char *, __p5, a2, \ 112 | APTR , __p6, a3, \ 113 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 114 | 115 | #define MUI_Error() \ 116 | LP0(66, LONG , MUI_Error, \ 117 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 118 | 119 | #define MUI_AddClipRegion(__p0, __p1) \ 120 | LP2(180, APTR , MUI_AddClipRegion, \ 121 | struct MUI_RenderInfo *, __p0, a0, \ 122 | struct Region *, __p1, a1, \ 123 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 124 | 125 | #define MUI_RequestIDCMP(__p0, __p1) \ 126 | LP2NR(90, MUI_RequestIDCMP, \ 127 | Object *, __p0, a0, \ 128 | ULONG , __p1, d0, \ 129 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 130 | 131 | #define MUI_FreeClass(__p0) \ 132 | LP1NR(84, MUI_FreeClass, \ 133 | struct IClass *, __p0, a0, \ 134 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 135 | 136 | #define MUI_AddClipping(__p0, __p1, __p2, __p3, __p4) \ 137 | LP5(168, APTR , MUI_AddClipping, \ 138 | struct MUI_RenderInfo *, __p0, a0, \ 139 | WORD , __p1, d0, \ 140 | WORD , __p2, d1, \ 141 | WORD , __p3, d2, \ 142 | WORD , __p4, d3, \ 143 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 144 | 145 | #define MUI_GetClass(__p0) \ 146 | LP1(78, struct IClass *, MUI_GetClass, \ 147 | const char *, __p0, a0, \ 148 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 149 | 150 | #define MUI_RejectIDCMP(__p0, __p1) \ 151 | LP2NR(96, MUI_RejectIDCMP, \ 152 | Object *, __p0, a0, \ 153 | ULONG , __p1, d0, \ 154 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 155 | 156 | #define MUI_FreeAslRequest(__p0) \ 157 | LP1NR(60, MUI_FreeAslRequest, \ 158 | APTR , __p0, a0, \ 159 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 160 | 161 | #define MUI_MakeObjectA(__p0, __p1) \ 162 | LP2(120, Object *, MUI_MakeObjectA, \ 163 | LONG , __p0, d0, \ 164 | ULONG *, __p1, a0, \ 165 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 166 | 167 | #define MUI_DeleteCustomClass(__p0) \ 168 | LP1(114, BOOL , MUI_DeleteCustomClass, \ 169 | struct MUI_CustomClass *, __p0, a0, \ 170 | , MUIMASTER_BASE_NAME, 0, 0, 0, 0, 0, 0) 171 | 172 | #ifdef USE_INLINE_STDARG 173 | 174 | #include 175 | 176 | #define MUI_AslRequestTags(__p0, ...) \ 177 | ({ULONG _tags[] = { __VA_ARGS__ }; \ 178 | MUI_AslRequest(__p0, (struct TagItem *)_tags);}) 179 | 180 | #define MUI_AllocAslRequestTags(__p0, ...) \ 181 | ({ULONG _tags[] = { __VA_ARGS__ }; \ 182 | MUI_AllocAslRequest(__p0, (struct TagItem *)_tags);}) 183 | 184 | #define MUI_MakeObject(__p0, ...) \ 185 | ({ULONG _tags[] = { __VA_ARGS__ }; \ 186 | MUI_MakeObjectA(__p0, (ULONG *)_tags);}) 187 | 188 | #define MUI_NewObject(__p0, ...) \ 189 | ({ULONG _tags[] = { __VA_ARGS__ }; \ 190 | MUI_NewObjectA(__p0, (struct TagItem *)_tags);}) 191 | 192 | #define MUI_Request(__p0, __p1, __p2, __p3, __p4, __p5, ...) \ 193 | ({ULONG _tags[] = { __VA_ARGS__ }; \ 194 | MUI_RequestA(__p0, __p1, __p2, __p3, __p4, __p5, (APTR )_tags);}) 195 | 196 | #endif 197 | 198 | #endif /* !_PPCINLINE_MUIMASTER_H */ 199 | -------------------------------------------------------------------------------- /include/xml/muimaster.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | exec/types.h 6 | intuition/classes.h 7 | utility/tagitem.h 8 | libraries/mui.h 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /mcp/library.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | /******************************************************************************/ 29 | /* */ 30 | /* MCC/MCP name and version */ 31 | /* */ 32 | /* ATTENTION: The FIRST LETTER of NAME MUST be UPPERCASE */ 33 | /* */ 34 | /******************************************************************************/ 35 | 36 | #include "private.h" 37 | #include "version.h" 38 | 39 | /******************************************************************************/ 40 | /* include the minimal startup code to be able to start the class from a */ 41 | /* shell without crashing the system */ 42 | /******************************************************************************/ 43 | #include "shellstart.c" 44 | 45 | #define VERSION LIB_VERSION 46 | #define REVISION LIB_REVISION 47 | 48 | #define CLASS MUIC_TextEditor_mcp 49 | #define SUPERCLASSP MUIC_Mccprefs 50 | 51 | #define INSTDATAP InstData_MCP 52 | 53 | #define USERLIBID CLASS " " LIB_REV_STRING " (" LIB_DATE ") " LIB_COPYRIGHT " [" SYSTEMSHORT "/" CPU "]" 54 | #define MASTERVERSION 19 55 | 56 | #define CLASSINIT 57 | #define CLASSEXPUNGE 58 | 59 | #define USEDCLASSES used_mccs 60 | static const char *used_mccs[] = { "TextEditor.mcc", "BetterString.mcc", NULL }; 61 | 62 | #define MIN_STACKSIZE 8192 63 | 64 | #include "locale.h" 65 | 66 | #if defined(__amigaos4__) || defined(__MORPHOS__) 67 | struct Library *LocaleBase = NULL; 68 | #else 69 | struct LocaleBase *LocaleBase = NULL; 70 | #endif 71 | 72 | #if defined(__amigaos4__) 73 | struct LocaleIFace *ILocale = NULL; 74 | #endif 75 | 76 | #if !defined(__MORPHOS__) 77 | static BOOL nbitmapCanHandleRawData; 78 | #endif 79 | 80 | /******************************************************************************/ 81 | /* define the functions used by the startup code ahead of including mccinit.c */ 82 | /******************************************************************************/ 83 | static BOOL ClassInit(UNUSED struct Library *base); 84 | static VOID ClassExpunge(UNUSED struct Library *base); 85 | 86 | /******************************************************************************/ 87 | /* include the lib startup code for the mcc/mcp (and muimaster inlines) */ 88 | /******************************************************************************/ 89 | #define USE_ICON8_COLORS 90 | #define USE_ICON8_BODY 91 | 92 | #include "icon.h" 93 | 94 | #if defined(__MORPHOS__) 95 | #include 96 | #else 97 | #include 98 | #endif 99 | 100 | static Object *get_prefs_image(void) 101 | { 102 | Object *obj; 103 | 104 | #if !defined(__MORPHOS__) 105 | if(nbitmapCanHandleRawData == TRUE) 106 | { 107 | obj = NBitmapObject, 108 | MUIA_FixWidth, ICON32_WIDTH, 109 | MUIA_FixHeight, ICON32_HEIGHT, 110 | MUIA_NBitmap_Type, MUIV_NBitmap_Type_ARGB32, 111 | MUIA_NBitmap_Normal, icon32, 112 | MUIA_NBitmap_Width, ICON32_WIDTH, 113 | MUIA_NBitmap_Height, ICON32_HEIGHT, 114 | End; 115 | } 116 | else 117 | { 118 | obj = NULL; 119 | } 120 | #else 121 | obj = RawimageObject, 122 | MUIA_Rawimage_Data, icon32, 123 | End; 124 | #endif 125 | 126 | // if the 32bit image data couldn't be loaded 127 | // we fall back to the 8bit icon 128 | if(obj == NULL) 129 | { 130 | obj = BodychunkObject,\ 131 | MUIA_FixWidth, ICON8_WIDTH,\ 132 | MUIA_FixHeight, ICON8_HEIGHT,\ 133 | MUIA_Bitmap_Width, ICON8_WIDTH ,\ 134 | MUIA_Bitmap_Height, ICON8_HEIGHT,\ 135 | MUIA_Bodychunk_Depth, ICON8_DEPTH,\ 136 | MUIA_Bodychunk_Body, (UBYTE *)icon8_body,\ 137 | MUIA_Bodychunk_Compression, ICON8_COMPRESSION,\ 138 | MUIA_Bodychunk_Masking, ICON8_MASKING,\ 139 | MUIA_Bitmap_SourceColors, (ULONG *)icon8_colors,\ 140 | MUIA_Bitmap_Transparent, 0,\ 141 | End; 142 | } 143 | 144 | return obj; 145 | } 146 | 147 | #define PREFSIMAGEOBJECT get_prefs_image() 148 | 149 | #include "mccinit.c" 150 | 151 | /******************************************************************************/ 152 | /* define all implementations of our user functions */ 153 | /******************************************************************************/ 154 | static BOOL ClassInit(UNUSED struct Library *base) 155 | { 156 | if((LocaleBase = (APTR)OpenLibrary("locale.library", 38)) && 157 | GETINTERFACE(ILocale, struct LocaleIFace *, LocaleBase)) 158 | { 159 | // open the TextEditor.mcp catalog 160 | OpenCat(); 161 | 162 | #if !defined(__MORPHOS__) 163 | { 164 | struct Library *nbitmapMcc; 165 | 166 | nbitmapCanHandleRawData = FALSE; 167 | 168 | // we need at least NBitmap.mcc V15.8 to be able to let it handle raw image data 169 | if((nbitmapMcc = OpenLibrary("mui/NBitmap.mcc", 0)) != NULL) 170 | { 171 | SHOWVALUE(DBF_ALWAYS, nbitmapMcc->lib_Version); 172 | SHOWVALUE(DBF_ALWAYS, nbitmapMcc->lib_Revision); 173 | 174 | if(nbitmapMcc->lib_Version > 15 || (nbitmapMcc->lib_Version == 15 && nbitmapMcc->lib_Revision >= 8)) 175 | nbitmapCanHandleRawData = TRUE; 176 | 177 | CloseLibrary(nbitmapMcc); 178 | } 179 | 180 | SHOWVALUE(DBF_ALWAYS, nbitmapCanHandleRawData); 181 | } 182 | #endif 183 | 184 | // Initialize the subclasses 185 | if(CreateSubClasses()) 186 | return TRUE; 187 | 188 | DROPINTERFACE(ILocale); 189 | CloseLibrary((APTR)LocaleBase); 190 | LocaleBase = NULL; 191 | } 192 | 193 | return FALSE; 194 | } 195 | 196 | 197 | static VOID ClassExpunge(UNUSED struct Library *base) 198 | { 199 | DeleteSubClasses(); 200 | 201 | CloseCat(); 202 | 203 | if(LocaleBase) 204 | { 205 | DROPINTERFACE(ILocale); 206 | CloseLibrary((APTR)LocaleBase); 207 | LocaleBase = NULL; 208 | } 209 | } 210 | 211 | -------------------------------------------------------------------------------- /mcc/library.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | TextEditor.mcc - Textediting MUI Custom Class 4 | Copyright (C) 1997-2000 Allan Odgaard 5 | Copyright (C) 2005-2021 TextEditor.mcc Open Source Team 6 | 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. 11 | 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. 16 | 17 | TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc 18 | 19 | $Id$ 20 | 21 | ***************************************************************************/ 22 | 23 | #include 24 | #include 25 | 26 | /******************************************************************************/ 27 | /* */ 28 | /* MCC/MCP name and version */ 29 | /* */ 30 | /* ATTENTION: The FIRST LETTER of NAME MUST be UPPERCASE */ 31 | /* */ 32 | /******************************************************************************/ 33 | 34 | #include "private.h" 35 | 36 | #define DEBUG_USE_MALLOC_REDEFINE 1 37 | #include "Debug.h" 38 | #include "version.h" 39 | 40 | /******************************************************************************/ 41 | /* include the minimal startup code to be able to start the class from a */ 42 | /* shell without crashing the system */ 43 | /******************************************************************************/ 44 | #include "shellstart.c" 45 | 46 | #define VERSION LIB_VERSION 47 | #define REVISION LIB_REVISION 48 | 49 | #define CLASS MUIC_TextEditor 50 | #define SUPERCLASS MUIC_Area 51 | 52 | #define INSTDATA InstData 53 | 54 | #define USERLIBID CLASS " " LIB_REV_STRING " (" LIB_DATE ") " LIB_COPYRIGHT " [" SYSTEMSHORT "/" CPU "]" 55 | #define MASTERVERSION 19 56 | 57 | #define CLASSINIT 58 | #define CLASSEXPUNGE 59 | 60 | #define USEDCLASSESP used_mcps 61 | static const char *used_mcps[] = { "TextEditor.mcp", NULL }; 62 | 63 | #define MIN_STACKSIZE 8192 64 | 65 | struct Library *DiskfontBase = NULL; 66 | struct Library *KeymapBase = NULL; 67 | struct Library *LayersBase = NULL; 68 | struct Library *LocaleBase = NULL; 69 | struct Library *RexxSysBase = NULL; 70 | struct Library *WorkbenchBase = NULL; 71 | struct Library *CyberGfxBase = NULL; 72 | 73 | #if defined(__amigaos4__) 74 | struct DiskfontIFace *IDiskfont = NULL; 75 | struct KeymapIFace *IKeymap = NULL; 76 | struct LayersIFace *ILayers = NULL; 77 | struct LocaleIFace *ILocale = NULL; 78 | struct RexxSysIFace *IRexxSys = NULL; 79 | struct Interface *IWorkbench = NULL; 80 | struct CyberGfxIFace *ICyberGfx = NULL; 81 | #endif 82 | 83 | /******************************************************************************/ 84 | /* define the functions used by the startup code ahead of including mccinit.c */ 85 | /******************************************************************************/ 86 | static BOOL ClassInit(UNUSED struct Library *base); 87 | static VOID ClassExpunge(UNUSED struct Library *base); 88 | 89 | /******************************************************************************/ 90 | /* include the lib startup code for the mcc/mcp (and muimaster inlines) */ 91 | /******************************************************************************/ 92 | #include "mccinit.c" 93 | 94 | /******************************************************************************/ 95 | /* define all implementations of our user functions */ 96 | /******************************************************************************/ 97 | static BOOL ClassInit(UNUSED struct Library *base) 98 | { 99 | ENTER(); 100 | 101 | if((LocaleBase = OpenLibrary("locale.library", 38)) && 102 | GETINTERFACE(ILocale, struct LocaleIFace *, LocaleBase)) 103 | { 104 | if((LayersBase = OpenLibrary("layers.library", 36)) && 105 | GETINTERFACE(ILayers, struct LayersIFace *, LayersBase)) 106 | { 107 | if((KeymapBase = OpenLibrary("keymap.library", 36)) && 108 | GETINTERFACE(IKeymap, struct KeymapIFace *, KeymapBase)) 109 | { 110 | if((RexxSysBase = OpenLibrary("rexxsyslib.library", 36)) && 111 | GETINTERFACE(IRexxSys, struct RexxSysIFace *, RexxSysBase)) 112 | { 113 | if((DiskfontBase = OpenLibrary("diskfont.library", 36)) && 114 | GETINTERFACE(IDiskfont, struct DiskfontIFace *, DiskfontBase)) 115 | { 116 | if(StartClipboardServer() == TRUE) 117 | { 118 | /* workbench.library is optional */ 119 | if ((WorkbenchBase = OpenLibrary("workbench.library", 44))) 120 | { 121 | if (!(GETINTERFACE(IWorkbench, struct Interface *, WorkbenchBase))) 122 | { 123 | CloseLibrary(WorkbenchBase); 124 | WorkbenchBase = NULL; 125 | } 126 | } 127 | 128 | // cybergraphics.library is allowed to fail 129 | if((CyberGfxBase = OpenLibrary("cybergraphics.library", 41)) && 130 | GETINTERFACE(ICyberGfx, struct CyberGfxIFace *, CyberGfxBase)) 131 | { } 132 | 133 | RETURN(TRUE); 134 | return(TRUE); 135 | } 136 | 137 | DROPINTERFACE(IDiskfont); 138 | CloseLibrary(DiskfontBase); 139 | DiskfontBase = NULL; 140 | } 141 | 142 | DROPINTERFACE(IRexxSys); 143 | CloseLibrary(RexxSysBase); 144 | RexxSysBase = NULL; 145 | } 146 | 147 | DROPINTERFACE(IKeymap); 148 | CloseLibrary(KeymapBase); 149 | KeymapBase = NULL; 150 | } 151 | 152 | DROPINTERFACE(ILayers); 153 | CloseLibrary(LayersBase); 154 | LayersBase = NULL; 155 | } 156 | 157 | DROPINTERFACE(ILocale); 158 | CloseLibrary(LocaleBase); 159 | LocaleBase = NULL; 160 | } 161 | 162 | RETURN(FALSE); 163 | return(FALSE); 164 | } 165 | 166 | 167 | static VOID ClassExpunge(UNUSED struct Library *base) 168 | { 169 | ENTER(); 170 | 171 | ShutdownClipboardServer(); 172 | 173 | if(CyberGfxBase) 174 | { 175 | DROPINTERFACE(ICyberGfx); 176 | CloseLibrary(CyberGfxBase); 177 | CyberGfxBase = NULL; 178 | } 179 | 180 | if(WorkbenchBase) 181 | { 182 | DROPINTERFACE(IWorkbench); 183 | CloseLibrary(WorkbenchBase); 184 | WorkbenchBase = NULL; 185 | } 186 | 187 | if(DiskfontBase) 188 | { 189 | DROPINTERFACE(IDiskfont); 190 | CloseLibrary(DiskfontBase); 191 | DiskfontBase = NULL; 192 | } 193 | 194 | if(RexxSysBase) 195 | { 196 | DROPINTERFACE(IRexxSys); 197 | CloseLibrary(RexxSysBase); 198 | RexxSysBase = NULL; 199 | } 200 | 201 | if(KeymapBase) 202 | { 203 | DROPINTERFACE(IKeymap); 204 | CloseLibrary(KeymapBase); 205 | KeymapBase = NULL; 206 | } 207 | 208 | if(LayersBase) 209 | { 210 | DROPINTERFACE(ILayers); 211 | CloseLibrary(LayersBase); 212 | LayersBase = NULL; 213 | } 214 | 215 | if(LocaleBase) 216 | { 217 | DROPINTERFACE(ILocale); 218 | CloseLibrary(LocaleBase); 219 | LocaleBase = NULL; 220 | } 221 | 222 | LEAVE(); 223 | } 224 | 225 | --------------------------------------------------------------------------------