GithubHelp home page GithubHelp logo

amiga-mui / texteditor Goto Github PK

View Code? Open in Web Editor NEW
18.0 7.0 4.0 2.19 MB

A well-known and used MUI custom class (TextEditor.mcc) which provides application programmers a textedit gadget. It supports features like word wrapping, soft styles (bold, italic, underline), a spell checking interface as well as an AREXX interface for scripting.

License: GNU Lesser General Public License v2.1

Makefile 1.90% C 97.51% Shell 0.56% SWIG 0.03%
texteditor mcc gadget mui amiga amigaos amigaos3 amigaos4 morphos

texteditor's People

Contributors

alpyre avatar jens-maus avatar mattrust avatar mparnaudeau avatar pbobbenb avatar sba1 avatar sorbits avatar tboeckel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

texteditor's Issues

Cannot get() MUIA_TextEditor_RedoAvailable from call hook

Trying to get() MUIA_TextEditor_RedoAvailable doesn't work from a call hook. Here's how to reproduce it:

  1. Enter a char
  2. Click the button to undo the operation
  3. Note the debug output: AppMsgFunc2 correctly receives 1 in the x argument because redo is now available. However, when querying MUIA_TextEditor_RedoAvailable using get() at the same time, y still receives 0 but it should be 1 now.

Here is the demo code:

#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>

#include <exec/exec.h>
#include <exec/types.h>

#include <intuition/intuition.h>

#include <libraries/mui.h>
#include <mui/TextEditor_mcc.h>

#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/muimaster.h>
#include <proto/utility.h>

struct Library *MUIMasterBase = NULL;
struct IntuitionBase *IntuitionBase = NULL;

#define REG(x) register __ ## x
#define ASM    __asm
#define SAVEDS __saveds

SAVEDS ASM LONG AppMsgFunc(REG(a2) APTR obj, REG(a1) int *x)
{
	int y = -1;
	
	get(obj, MUIA_TextEditor_UndoAvailable, &y);
	
	printf("Undo available: %d %d\n", *x, y);

	return(0);
}

SAVEDS ASM LONG AppMsgFunc2(REG(a2) APTR obj, REG(a1) int *x)
{
	int y = -1;
	
	get(obj, MUIA_TextEditor_RedoAvailable, &y);
	
	printf("Redo available: %d %d\n", *x, y);

	return(0);
}

int main(int argc, char *argv[])
{
	Object *win, *app, *bt, *editor;
	ULONG sigs = 0;
	ULONG id;
	int flag = 0;
	Object *subwin, *parent, *reg;
	static const struct Hook AppMsgHook = { { NULL,NULL },(VOID *)AppMsgFunc,NULL,NULL };	
	static const struct Hook AppMsgHook2 = { { NULL,NULL },(VOID *)AppMsgFunc2,NULL,NULL };	
	
	IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library", 0);
	MUIMasterBase = OpenLibrary("muimaster.library", 0);

	app = ApplicationObject,
		MUIA_Application_Title, "Foo",
		MUIA_Application_Base, "xxxxx",

		SubWindow, win = WindowObject,
			MUIA_Window_Title, "Bar",

			WindowContents, VGroup,

				Child, VGroup,
				
					Child, editor = TextEditorObject,
						MUIA_CycleChain, 1,
					End,				
					Child, bt = SimpleButton("Click"),
				End,
			End,
		End,
	End;

	DoMethod(bt,MUIM_Notify,MUIA_Pressed,FALSE,app,2,MUIM_Application_ReturnID,1000);
	DoMethod(editor, MUIM_Notify, MUIA_TextEditor_UndoAvailable, MUIV_EveryTime, editor, 3, MUIM_CallHook,&AppMsgHook,MUIV_TriggerValue);
	DoMethod(editor, MUIM_Notify, MUIA_TextEditor_RedoAvailable, MUIV_EveryTime, editor, 3, MUIM_CallHook,&AppMsgHook2,MUIV_TriggerValue);	
	DoMethod(win, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);

	set(win, MUIA_Window_Open, TRUE);

	while((id = DoMethod(app,MUIM_Application_NewInput,&sigs)) != MUIV_Application_ReturnID_Quit) {

		switch(id) {
		case 1000:
			DoMethod(editor, MUIM_TextEditor_ARexxCmd, "UNDO");				
			break;
		}
		
		if(sigs) {
			sigs = Wait(sigs | SIGBREAKF_CTRL_C);
			if (sigs & SIGBREAKF_CTRL_C) break;
		}
	}

	MUI_DisposeObject(app);

	if(MUIMasterBase) CloseLibrary(MUIMasterBase);
	if(IntuitionBase) CloseLibrary((struct Library *) IntuitionBase);

	return 0;
}
 

Double notification when selecting item from a context menu on TextEditor.mcc

Not sure if this is a MUI or a TextEditor.mcc issue but when selecting an item from a context menu applied to TextEditor.mcc, there will be a double notification.

Test program attached. For comparison, if you access the context menu of the simple button, there'll be only one notification. If you access the context menu of the text editor gadget, there'll be two notifications.
ctxtmenu.zip

Implement horizontal scrolling

When setting MUIA_TextEditor_WrapMode to MUIV_TextEditor_WrapMode_NoWrap there is no horizontal scrolling. Instead, characters are added to the beginning of the same line which looks ugly and makes this attribute rather useless. There should be a possibility to have horizontal scrolling with TextEditor.mcc as well. This is a fundamental feature which every TextEditor class needs IMHO. It's about time that TextEditor.mcc supports this as well :)

Broken uses topaz font

15.38 works fine, then i forced to install 15.45 and it show ugly topaz font only. There seems no font setting in MUI and no font setting in YAM. If i copy 15.38 over again the old yam works fine with the right font, the new yam refused the start.

Setting MUIA_Font doesn't work at all

Passing MUIA_Font to TextEditor.mcc on object creation doesn't seem to work at all. The special values MUIV_Font_Big, and MUIV_Font_Tiny have no effect. Setting MUIA_Font to a struct TextFont directly doesn't do anything either.

AROS i-386 version 15.51 & 15.52 Text is invisible

I'm using MUI Royale for Hollywood on AROS i-386 and the text is invisible in my project and in the Hollywood example TextEditor.hws. I've set the color to black in code but that makes no difference. Version 15.45 works just fine. Hollywood author believes it is a bug in 15.51 and not in MUI Royale. Thanks for looking into it.

NathanH
[email protected]

Crash when doing a text copy in Yam

mcc version: 15.47
100 % reproducible

When I select text in Yam, it always crashes with:
Stack trace:
LIBS:mui/TextEditor.mcc:SetDefaultColor()+0x8 (section 1 @ 0x49E4)
LIBS:mui/TextEditor.mcc:ClipboardServer()+0x248 (section 1 @ 0x2D40)
native kernel module kernel.debug+0x00067db0
native kernel module kernel.debug+0x00067df8

PPC disassembly:
7f5ed9e0: 2c030000 cmpwi r3,0
7f5ed9e4: 41820010 beq- 0x7F5ED9F4
*7f5ed9e8: a923043c lha r9,1084(r3)
7f5ed9ec: 2f890001 cmpwi cr7,r9,1
7f5ed9f0: 419e0018 beq- cr7,0x7F5EDA08

Full log attached.
Crashlog_TextEditor.mcc clipboard server_2016-11-12_18-55-08.txt

Version 15.51 crashes YAM after change of message selection

YAM version used: 2.10-dev [OS3/m68k], 23-02-2019
TextEditor version: 15.51 (issue not present with 15.50)

Steps to reproduce the issue:

  1. Open YAM (all still OK, YAM opens in a folder with multiple emails)
  2. Select a different message in the folder (with the mouse or arrow down for instance)
  3. YAM crashes

Two hits are produced:

WORD READ from FFFFFF88 (INST) PC: FFFFFF88
USP : 785810C4 SR: 0000 (U0)(-)(-) TCB: 78569E98
Data: 78B90000 00000000 00000230 78580000 78A30000 0000008C 0000000B 00000002
Addr: 78B922A4 78581104 00000230 00000604 00000030 78581240 00000000 7820DFE8
Stck: 7868D2E2 00000017 78A348E4 00000120 00000017 00000000 78730AB0 00000017
Stck: 000000B3 00000030 78581240 78000B4C 000000B3 00000000 78B922A4 78731C7C
Stck: 00000000 78731C7C 00000000 00000000 00000000 00000000 FF0100FF 00000F00
Stck: 0001FFFF 008B0007 EA2A2A2A 2A2A2A2A 00000000 782A7B4A 01000009 00060006
Stck: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Stck: 00000000 008A0009 0000FFFA 00890002 00000000 7868DF5C 78730AB0 78A348E4
Stck: 00000017 00000000 80000000 00000001 7858133C 0000001A 00000001 78730001
Stck: 00000000 00000000 78A34884 00000003 786910A4 78A30000 000078A3 48B40000
Stck: 0009B2E6 78580001 786AB4E0 00000000 00000000 00000000 000001D3 00000000
Stck: 78A3491E 78A34972 00000000 00000000 00000000 0000001A 0000004A 78A348B4
Stck: 00017560 78A10000 008A0000 00090000 01200000 00000000 01AA0000 00090000
Stck: 00020000 00000001 0000BDAE 78A3480C 00000001 7858133C 78A1B240 7858129C
Stck: 7868B612 78A1B240 00000000 78A34884 00000003 00000001 78A1B374 7858133C
Stck: 7855A560 78580000 78730000 78B91C00 78A1B656 78A1B240 78A1B1B8 780001F0
Stck: 7868FD00 78A3480C 00000001 00000000 7858133C 78A1B656 78581354 7867FFBC
Stck: 78A1B240 00000001 00000000 00000019 00000000 78A1B240 78A1B240 7858162C
Name: "YAM"

Exception !! 00000002 TCB: 78569E98 CTX: 78104FC0 SSP: 7820DFE8
USP : 785810C4 SR: 0000 (U0)(-)(-) TCB: 78569E98
Data: 78B90000 00000000 00000230 78580000 78A30000 0000008C 0000000B 00000002
Addr: 78B922A4 78581104 00000230 00000604 00000030 78581240 00000000 7820DFE8
Stck: 7868D2E2 00000017 78A348E4 00000120 00000017 00000000 78730AB0 00000017
Stck: 000000B3 00000030 78581240 78000B4C 000000B3 00000000 78B922A4 78731C7C
Stck: 00000000 78731C7C 00000000 00000000 00000000 00000000 FF0100FF 00000F00
Stck: 0001FFFF 008B0007 EA2A2A2A 2A2A2A2A 00000000 782A7B4A 01000009 00060006
Stck: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Stck: 00000000 008A0009 0000FFFA 00890002 00000000 7868DF5C 78730AB0 78A348E4
Stck: 00000017 00000000 80000000 00000001 7858133C 0000001A 00000001 78730001
Stck: 00000000 00000000 78A34884 00000003 786910A4 78A30000 000078A3 48B40000
Stck: 0009B2E6 78580001 786AB4E0 00000000 00000000 00000000 000001D3 00000000
Stck: 78A3491E 78A34972 00000000 00000000 00000000 0000001A 0000004A 78A348B4
Stck: 00017560 78A10000 008A0000 00090000 01200000 00000000 01AA0000 00090000
Stck: 00020000 00000001 0000BDAE 78A3480C 00000001 7858133C 78A1B240 7858129C
Stck: 7868B612 78A1B240 00000000 78A34884 00000003 00000001 78A1B374 7858133C
Stck: 7855A560 78580000 78730000 78B91C00 78A1B656 78A1B240 78A1B1B8 780001F0
Stck: 7868FD00 78A3480C 00000001 00000000 7858133C 78A1B656 78581354 7867FFBC
Stck: 78A1B240 00000001 00000000 00000019 00000000 78A1B240 78A1B240 7858162C
Name: "YAM"

Additional information:

  • "YAM" Hunk 0000 Offset 0012CE58
    ----> 7855A600 - "YAM" Hunk 0000 Offset 0012CE58
    ----> 782DB1F0 - "LIBS:muimaster.library" Hunk 0000 Offset 0000AA70
    ----> 7868F404 - "LIBS:mui/TextEditor.mcc" Hunk 0000 Offset 00003EC4
    ----> 7855A600 - "YAM" Hunk 0000 Offset 0012CE58
    ----> 786A1E9C - "LIBS:mui/TextEditor.mcc" Hunk 0000 Offset 0001695C
    ----> 78680000 - "LIBS:mui/NListtree.mcc" Hunk 0000 Offset 0000C770
    ----> 7868ED88 - "LIBS:mui/TextEditor.mcc" Hunk 0000 Offset 00003848
    ----> 7868F4DA - "LIBS:mui/TextEditor.mcc" Hunk 0000 Offset 00003F9A
    ----> 7855A600 - "YAM" Hunk 0000 Offset 0012CE58
    ----> 782B13A0 - "LIBS:muilowlevel.library" Hunk 0001 Offset 00000000
    ----> 7868F0CE - "LIBS:mui/TextEditor.mcc" Hunk 0000 Offset 00003B8E
    ----> 782D610C - "LIBS:muimaster.library" Hunk 0000 Offset 0000598C
    ----> 784DEC9C - "YAM" Hunk 0000 Offset 000B14F4
    ----> 7855ABE2 - "YAM" Hunk 0000 Offset 0012D43A
    ----> 7855AB28 - "YAM" Hunk 0000 Offset 0012D380
    ----> 784DED8E - "YAM" Hunk 0000 Offset 000B15E6
    ----> 782D610C - "LIBS:muimaster.library" Hunk 0000 Offset 0000598C
    ----> 7830126E - "LIBS:muilowlevel.library" Hunk 0000 Offset 00000E2E
    ----> 78300F6C - "LIBS:muilowlevel.library" Hunk 0000 Offset 00000B2C
    Name: "YAM"

Please let me know if I need to provide additional details.

Horizontal Slider should always display the same scroll size

After having implemented the horizontal slider functionality I quickly tested it and recognized that it is currently implemented in a non-standard way horizontal slider are usually working in text editors.

As an example, start TextEditor-Test. It contains a very long line at the very top which causes the horizontal slider to automatically reduce to a very small size showing a user that there is lot of text to be scrolled to the right. If you now move the vertical slider down so that the very long line disappears from the field of view (FOV) the horizontal slider adapts itself to a different size because all the current lines in the FOV are not scrollable so much to the right like the top line.

This is quite a non-standard way of displaying/handling sliders in a text editor. I would like to therefore request that the horizontal slider functionality should be changed so that the slider size is only dependent on the maximum length of a line within the WHOLE text and not just within the current FOV.

Feature request: MUIA_TextEditor_InactiveContents

I think TextEditor class also needs support for hints that are displayed when the contents are empty. MUI 5 has such a feature in MUIA_String_InactiveContents so I think the text editor equivalent should be named MUIA_TextEditor_InactiveContents.

A fatal bug in separator drawing!

The latest changes to remove glitches at the bottom of the gadget revealed a very fatal implicit bug about separators.

DrawSeparator() function uses RectFill() calls. There are no problems when the separator is within gadget boundaries. But when smooth scrolling (vertically) there are times they had to be drawn partially at the edges. This is done either by drawing the separator with MUIClipping or drawing into the doublebuffer and blitting the required portion of it to the rastport.

The current implementation (interestingly) uses the clipping method in smooth scrolling (by passing FALSE for doublebuffer parameter of DumpText()).

This has a danger! If the gadget does not have any spacing (maybe some other GUI objects) between the window edges from top or bottom, the coordinates passed to the RectFill() calls can fall out of the window borders and crashing the system.

It seems that the previous coder(s) avoided these cases by coding this condition into DumpText():

MixedFunctions.c (640)
    if(lines-line_nr < 3 || doublebuffer == TRUE)
    {
      doublebuffer = TRUE;
    }   

What this does is; "if we are printing the first line at the top of the gadget, always use doublebuffering".
(and for the bottom, never print anything - which was the couse of the pattern glitches now removed).

This is very bad coding. Because in the current implementation, if the allocation of the doublebuffering rastport fails for a reason, it does NOT prevent the gadet from being created! Instead it fallbacks to non-doublebuffered (MUIClipping) mode (which would eventually crash when a separator was smooth scrolled out of gadget).

This currently causes crashes in YAM's mail preview gadget in the main window, if the e-mail has a separator and the user scrolls it using the scroller because the gadget is adjacent to the window bottom.

Add MUIA_TextEditor_GlobalAlign attribute

As the author of RapaGUI, a cross-platform GUI toolkit, I'm trying to achieve a behaviour that is as consistent as possible between MUI, GTK, Windows and Mac OS X.

On GTK, Windows, and Mac OS X the native text editor control uses a global alignment setting for all of the text in the control. TextEditor.mcc, however, allows individual line alignment. For example, line 1 can be left-aligned, line 2 can be right-aligned, and line 3 can be centered.

Since this is not possible on GTK, Windows, and Mac OS X I'd like to see an option that can be used to set a global alignment for all lines in the text editor control so that TextEditor.mcc's alignment behaviour is identical to the behaviour on GTK, Windows, and Mac OS X.

If such a global alignment is set, TextEditor.mcc should then always enforce this global alignment, i.e. if text that contains a different alignment is pasted into the control, the global alignment should be enforced and potential other alignments set in the text that is to be pasted should be ignored.

crash/GR when usnig AMIGA+C (copy to clipboard)

Ig et a crash/GR when trying to copy text to clipboard (Amiga+C). Using MUI5 nightly build. and TextEditor.mcc from MUI5_contrib archive.

version TextEditor.mcc full file

TextEditor.mcc 15.47 OS4/PPC
Copyright (C) 2005-2015 TextEditor.mcc Open Source Team

list TextEditor.mcc

TextEditor.mcc 171068 ----rwed Martes 23:34:09
1 fichero - 167K bytes - 336 bloques usados

md5sum TextEditor.mcc

909767f6b7d4bb4bcac50f24a291aaa5 TextEditor.mcc

Crash log for task "TextEditor.mcc clipboard server"
Generated by GrimReaper 53.19
Crash occured in module TextEditor.mcc at address 0x7F8A69E8
Type of crash: DSI (Data Storage Interrupt) exception
Alert number: 0x80000003

Register dump:
GPR (General Purpose Registers):
0: 7F8A4CD0 5D6B5EF0 00000000 FEFECAFE 5D6B5F1C 0002D030 0229AE0C 0229AE7C
8: 00000021 00000001 00000001 0218974C 48842428 00000000 5D36A450 DEADF00D
16: FEFECAFE 434F4C53 53424152 43534554 00000000 00000032 5DE90000 5B87F1A0
24: 464C4F57 5D6D85C0 5D1E1630 5DE9290C 00000001 0218974C 7FFFFFFF 5DE92900

FPR (Floating Point Registers, NaN = Not a Number):
0: 0 0 0 0
4: 0 0 0 0
8: 0 0 0 0
12: 0 0 0 0
16: 0 0 0 0
20: 0 0 0 0
24: 0 0 0 0
28: 0 0 0 0

FPSCR (Floating Point Status and Control Register): 0x00000000

SPRs (Special Purpose Registers):
Machine State (msr) : 0x0002D030
Condition (cr) : 0x5F302F2C
Instruction Pointer (ip) : 0x7F8A69E8
Xtended Exception (xer) : 0x5AAA7018
Count (ctr) : 0x6FF5E4D0
Link (lr) : 0x7FC4F5E0
DSI Status (dsisr) : 0x5AAA6DD0
Data Address (dar) : 0x01ACEC88

680x0 emulated registers:
DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
FPU0: 0 0 0 0
FPU4: 0 0 0 0

Symbol info:
Instruction pointer 0x7F8A69E8 belongs to module "TextEditor.mcc" (PowerPC)
Symbol: SetDefaultColor + 0x8 in section 1 offset 0x000049E4

Stack trace:
LIBS:mui/TextEditor.mcc:SetDefaultColor()+0x8 (section 1 @ 0x49E4)
LIBS:mui/TextEditor.mcc:ClipboardServer()+0x248 (section 1 @ 0x2D40)
native kernel module kernel.debug+0x00067e40
native kernel module kernel.debug+0x00067e88

PPC disassembly:
7f8a69e0: 2c030000 cmpwi r3,0
7f8a69e4: 41820010 beq- 0x7F8A69F4
*7f8a69e8: a923043c lha r9,1084(r3)
7f8a69ec: 2f890001 cmpwi cr7,r9,1
7f8a69f0: 419e0018 beq- cr7,0x7F8A6A08

System information:

CPU
Model: AMCC PPC460EX V1.2

Crashlog.txt

Crash when copying in YAM

Since the last update a few days ago, I have a crash when I select some text and type Amiga-C to copy it in the clipboard.
It is 100% reproducible.

Registers pointing to code:
r0 : LIBS:mui/TextEditor.mcc:ClipboardServer()+0x1d4 (section 1 @ 0x2CCC)
r6 : native kernel module Kickstart/kernel+0x00a8ade8
r10: module LIBS:mui/Frimagedisplay.mui at 0x00000001 (section 0 @ 0xFFFFFFDC)
r11: native kernel module Kickstart/kernel+0x0097972c
r27: LIBS:mui/TextEditor.mcc:msg()+0x0 (section 11 @ 0xC)
r29: native kernel module Kickstart/kernel+0x0097972c
r31: LIBS:mui/TextEditor.mcc:IIFFParse()+0x0 (section 11 @ 0x0)
ip : LIBS:mui/TextEditor.mcc:SetDefaultColor()+0x8 (section 1 @ 0x49E4)
lr : LIBS:mui/TextEditor.mcc:ClipboardServer()+0x248 (section 1 @ 0x2D40)
ctr: native kernel module Kickstart/kernel+0x00010498

Stack trace:
(0x60C50EF0) LIBS:mui/TextEditor.mcc:SetDefaultColor()+0x8 (section 1 @ 0x49E4)
(0x60C50F90) LIBS:mui/TextEditor.mcc:ClipboardServer()+0x248 (section 1 @ 0x2D40)
(0x60C50FC0) native kernel module Kickstart/kernel+0x0003b9dc
(0x60C50FD0) native kernel module Kickstart/kernel+0x0003ba24

Disassembly of crash site:
7F6FA9D8: 409EFF30 bne+ cr7,0x7F6FA908
7F6FA9DC: 4BFFFEA8 b 0x7F6FA884
7F6FA9E0: 2C030000 cmpwi r3,0
7F6FA9E4: 41820010 beq- 0x7F6FA9F4

7F6FA9E8: A923043C lha r9,1084(r3)
7F6FA9EC: 2F890001 cmpwi cr7,r9,1
7F6FA9F0: 419E0018 beq- cr7,0x7F6FAA08
7F6FA9F4: 39200000 li r9,0
7F6FA9F8: 39400000 li r10,0
7F6FA9FC: B1240004 sth r9,4(r4)
Stack pointer (0x60C50EF0) is inside bounds
Redzone is OK (4)

Tell me if you need more.

MUIM_TextEditor_CursorXYToIndex should indicate success/failure

So MUIM_TextEditor_IndexToCursorXY returns a BOOL indicating whether the operation succeeded or not. I'd like MUIM_TextEditor_CursorXYToIndex to do that as well because currently it always returns something, even if the specified cursor indices are well out of range...

Keybinding bug

Version 15.47, MorphOS 3.9
Apparently I can't associate the combination rshift+up to Top and rshift+bottom to Bottom, also
I can't associate rshift+left to line start and rshift+right to line end. If I do, I always get text selection as
a result or other unpredictable text selection + movement.
Also (perhaps this is highly related to the wrong behaviour said above) the Block Qualifier doesn't accept
the "(mouse only)" option, I can change it but everytime I switch between pages I read "Shift" again.
Please fix it, thanks.

Using copy keysstroke (Amiga+C) to copy to clipboard some text crashes/GR

With TE.mcc V15.47 using copy keysstroke (Amiga+C) to copy to clipboard some text crashes/GR, tested with TextEditor.mcc 15.46 no problems using AMIGA+C keystroke to copy to clipboard text:

Crash log for task "TextEditor.mcc clipboard server"
Generated by GrimReaper 53.19
Crash occured in module TextEditor.mcc at address 0x7F8A69E8
Type of crash: DSI (Data Storage Interrupt) exception
Alert number: 0x80000003

Register dump:
GPR (General Purpose Registers):
0: 7F8A4CD0 5E2AEEF0 00000000 FEFECAFE 5E2AEF1C 0002D030 0229AE0C 0229AE7C
8: 00000033 00000001 00000001 0218974C 48842428 00000000 5288DFA0 DEADF00D
16: FEFECAFE 434F4C53 53424152 43534554 00000000 00000013 5EA60000 5E548DB0
24: 464C4F57 5EA589C0 5E696D90 5EA5990C 00000013 0218974C 7FFFFFFF 5EA59900

FPR (Floating Point Registers, NaN = Not a Number):
0: 0 0 0 0
4: 0 0 0 0
8: 0 0 0 0
12: 0 0 0 0
16: 0 0 0 0
20: 0 0 0 0
24: 0 0 0 0
28: 0 0 0 0

FPSCR (Floating Point Status and Control Register): 0x00000000

SPRs (Special Purpose Registers):
Machine State (msr) : 0x0002D030
Condition (cr) : 0x00000000
Instruction Pointer (ip) : 0x7F8A69E8
Xtended Exception (xer) : 0x50E10490
Count (ctr) : 0x00000000
Link (lr) : 0x509F1E80
DSI Status (dsisr) : 0x57616974
Data Address (dar) : 0x509F1DA8

680x0 emulated registers:
DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
FPU0: 0 0 0 0
FPU4: 0 0 0 0

Symbol info:
Instruction pointer 0x7F8A69E8 belongs to module "TextEditor.mcc" (PowerPC)
Symbol: SetDefaultColor + 0x8 in section 1 offset 0x000049E4

Stack trace:
LIBS:mui/TextEditor.mcc:SetDefaultColor()+0x8 (section 1 @ 0x49E4)
LIBS:mui/TextEditor.mcc:ClipboardServer()+0x248 (section 1 @ 0x2D40)
native kernel module kernel.debug+0x00067e40
native kernel module kernel.debug+0x00067e88

PPC disassembly:
7f8a69e0: 2c030000 cmpwi r3,0
7f8a69e4: 41820010 beq- 0x7F8A69F4
*7f8a69e8: a923043c lha r9,1084(r3)
7f8a69ec: 2f890001 cmpwi cr7,r9,1
7f8a69f0: 419e0018 beq- cr7,0x7F8A6A08

System information:

CPU
Model: AMCC PPC460EX V1.2
CPU speed: 1155 MHz
FSB speed: 231 MHz
Extensions:

Machine
Machine name: Sam460ex
Memory: 2097152 KB
Extensions: bus.pci bus.pcie
crashlog_TE.mcc-clipboard server.txt

Get cursor index from mouse position

Is it possible to get the cursor index at a specified mouse position? e.g. something similar to MUIM_List_TestPos , just for the text editor class. Could be useful for showing customized context menus on MUIM_ContextMenuBuild.

MorphOS: MUIC_TextEditor class prevents mouse-wheel/touchbar to scroll content of accompanying MUIC_List, MUIC_Floattext etc

Tested on MorphOS 3.18
When on a window there is an object of MUIC_TextEditor and also MUIC_List. Scrolling with mouse wheel or touch pad is not working on MUIC_List object. It works on MUIC_TextEditor.
Tested on example provided with TextEditor:
https://github.com/amiga-mui/texteditor/blob/master/demo/TextEditor-Demo.c
Only adjustments are

  • bigger initial list, change from:
    const char *StdEntries[] = { "Kind regards ", "Yours ", "Mvh ", NULL };

    into
    const char *StdEntries[] = { "Kind regards ", "Yours ", "Mvh ", "a", "B", "c", "d", "e", "f", NULL };
  • disable MUIA_List_AdjustHeight for list, change from:
    MUIA_List_AdjustHeight, TRUE,

    into
    MUIA_List_AdjustHeight, FALSE,

Italian translation for the installer

This is the italian part of the installer, i believe we share the same text in mcc classes

;----------------------------------------------------------------------------
; /// ***** Italiano
(if (= #language "italiano")
(
(set #acknowledgeOS (cat "Per favore conferma il rilevamento\n"
"automatico del sistema operativo in uso:"))
(set #lang_catalog (cat "Quale catalogo di lingua si desidera installare?\n"
"(La lingua inglese è incorporata)"))
(set #done (cat "\n"
@App-Name " è stata installata correttamente.\n"
"\n"
"Potrebbe essere necessario un riavvio\n"
"per completare questa installazione!"))
)
)

; ///

TextEditor 15.54 opens a "Inser MUI: drive" requester on i386 AROS

As the title says. If I place texteditor .mcp and .mcc in my current installation, a requester asking for MUI: drive appears several times at system startup and almost randomly when opening volumes and applications.

The issue does not occurr with texteditor 15.53 beta.

Calculation for the longest line in NoWrapMode can be optimized.

In the current implementation the longest line is found out by traversing through all the lines.

It would be more optimized to calculate the longestline by traversing through all the lines ONLY in the case of an import. In the cases of other changes, calculate ONLY for the edited section, and compare it with previous longestline value.

Add support for custom RGB colors

MUI's text enginge supports direct RGB colors for text via the \033P[RRGGBB] sequence. If possible TextEditor.mcc should be able to do the same as well, provided the system is able to handle direct RGB colors.

Wrong mouse pointer when context menu is open

When opening a context menu attached to a TextEditor gadget, the TextEditor gadget will still show its custom mouse pointer. This looks a little awkward. It should better show the system mouse pointer when opening a context menu because otherwise you have to select a context menu item using the custom TextEditor pointer which feels a little weird.

MUIA_TextEditor_Rows shouldn't affect MaxHeight

I'm trying to change TextEditor.mcc's default height of 15 rows to something smaller by setting MUIA_TextEditor_Rows. However, this has the effect that TextEditor.mcc will also set the maximum height to what has been passed to MUIA_TextEditor_Rows, resulting in a gadget that's not vertically resizable. Could this be changed in a way that MUIA_TextEditor_Rows will just affect the minimum and default height of the TextEditor gadget but not the maximum height? IMHO this would make much more sense.

If you don't want to change the existing behaviour, maybe a new tag could be introduced.

A coloring bug when editing Highlighted Text

The text color used when drawing the cursor on highlighted text does not match the highlight color. This was a long existing bug which is now resolved with a quick fix in SetCursor() function in MixedFunctions.c

A fix inside SetColor() function may be much better (if possible). This quick fix requires revising.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.