[TextEditor_mcc] Re: Tabs and colours

  • From: Ilkka Lehtoranta <ilkleht@xxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Thu, 7 Jul 2005 23:30:39 +0300 (EEST)

On Thu, 7 Jul 2005, Mathias PARNAUDEAU wrote:

> Le 04/07/2005, Ilkka Lehtoranta a écrit:
> 
> > I'd like to have this feature too. I'm out of time but source is there :P
> 
> Aaargh :( We are all in the same situation ...
> 
> But as I use TextEditor in various programs, I put pressure on it :) And I
> found a bug : I use a page object and if I insert text (with
> MUIA_TextEditor_InsertText) in the TextEditor object that is on the
> undisplayed page, the application freezes. This case is raised with several
> versions : 15.12, 15.13, 15.14. That's ok with the 15.9.
> I'm going to use the official way to report this bug.

Can you provide small test program?

> >> And I need to give colours to my text. For one of my project (document
> >> viewer), that's enough but for another one (editor for programers), I
> >> would like to have an easier way to apply colours on text.
> 
> > Hmm... In addition to pen table (MUIA_TextEditor_ColorMap) TextEditor 
> > could support ARGB lookup table and TextEditor could render using ARGB 
> > values directly (rather than using obsoleted pen system). Only problem is 
> > OS3: there RGB rendering must be emulated by internal ObtainBestPen() 
> > workaround or such.
> 
> It's maybe time to add needed features in classes like TextEditor, even if
> it's not supported by the class for AmigaOS 3.x. That's really time
> consuming to try keeping the compatibility. We miss software on our systems
> and I'm not sure the active developers can still spend time on that. Do you
> all think new software appears for 68k targets ? That's sad but I think we
> have to set priorities.

> I don't know if the problem related to colours is easy to solve with pens
> ...

It is possible but not efficiently.. however.. under 3.x colors could be 
just omitted. Easy and clean solution.

Fallback mode for 8bit screens is needed as well, but it could just 'no 
colors', just like under 3.x.

Anyway, take a look into TextEditor_mcc.h:

There is struct LineNode and UWORD *Colors;

You could add ULONG *RGB_Colors; or sth where RGB colors are stored in 
similar manner and edit PrintLineWithStyles.c/PrintLine() to support it.
Instead of SetAPen() just use SetRPAttrs(), some support macros are needed 
to handle this transparently for MOS and OS4.


_____________________________________________________________________________
TextEditor ML   - http://www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025

Other related posts: