Page 1 of 2

HyperTextView gadget feature?

Posted: Sun Jul 18, 2021 9:35 pm
by SamuraiCrow
So soon after the release of RapaGUI 2.0, I'm afraid I have to add another feature request. The HyperLink class is not embeddable in a text view and doesn't behave like a word-wrappable button.

The HyperTextView class can be a child class of the TextView class. The idea is that the links should be treated like buttons within text that trigger events.

This may add a dependency on Amiga because the MUI Custom Class may have different requirements than what I was hoping to have. I do know C so if you need an MUI Custom Class to be able to implement that style of button, I may be able to help. Otherwise it shouldn't be too complicated. I know wxWidgets has support for this.

Applied Usage:

One project I would like to accomplish on the Amiga is to be able to create a forum browser app that can view and post to forums without the need of a web browser. Jaimie Kruger was going to implement a ReST interface to Amiga.org so that this could be accomplished.

Another use for the proposed gadget would be to replace the AmigaGuide and Windows Help gadgets with something cross-platform implementable.

Re: HyperTextView gadget feature?

Posted: Wed Jul 21, 2021 12:09 pm
by airsoftsoftwair
Sorry, but something like this isn't supported by neither MUI nor wxWidgets so not really possible without going to great pains.

Re: HyperTextView gadget feature?

Posted: Wed Jul 21, 2021 3:07 pm
by plouf
but why you create textview and not a HTMLview?

inside html view can be text, links , buttons, images etc..

Re: HyperTextView gadget feature?

Posted: Wed Jul 21, 2021 3:56 pm
by SamuraiCrow
plouf wrote: Wed Jul 21, 2021 3:07 pm but why you create textview and not a HTMLview?

inside html view can be text, links , buttons, images etc..
I was hoping to be able to view BB code and AmigaGuide files without translating to HTML 3 but maybe just updating the HTMLview.mcc file is the way to go after all.

Re: HyperTextView gadget feature?

Posted: Wed Jul 21, 2021 6:03 pm
by SamuraiCrow
The latest HTMLview.mcc doesn't work on MophtOS in binary form from the Aminet. I tried forking and building it from source but that doesn't work on MorphOS either. It is stale, unmaintained code on MorphOS at least.

Re: HyperTextView gadget feature?

Posted: Thu Jul 22, 2021 8:28 pm
by SamuraiCrow
Update:
ESC O[x] ESC O[x,width]:: draw a MUI object pointed to by , i.e. "\033O[deadbeef]". The address may be prefixed with a '$'. The additional width value is optional. If it is omitted the object will be queried for its minimum width.

Note: These rules apply to all MUI strings, not only to a text object's contents. You can e.g. format the columns of a listview or include images in a cycle gadget's entries.
Taken from the MUI Dev Wiki. Almost no changes needed to embed objects in an MUI 5.0 text object. The catch is: I don't know what an MUI Object is. Is it a member of RootClass? Does area.mui count? Also, the handle will need an ID lookup to get the address of the object, but there are text substitution tools already in string.library in Hollywood.

Edit: I think an object is just a picture/brush.

Re: HyperTextView gadget feature?

Posted: Thu Jul 22, 2021 9:20 pm
by SamuraiCrow
Update2:
HTML Cells can be generated by an alternate parser using wxWidgets. Even more hopeful. Maybe I'll start here with a BBCode parser.

Re: HyperTextView gadget feature?

Posted: Sat Jul 24, 2021 8:39 pm
by airsoftsoftwair
SamuraiCrow wrote: Thu Jul 22, 2021 8:28 pm Update:
ESC O[x] ESC O[x,width]:: draw a MUI object pointed to by , i.e. "\033O[deadbeef]". The address may be prefixed with a '$'. The additional width value is optional. If it is omitted the object will be queried for its minimum width.
Well, yeah, with MUI it might be possible but there's no way this can be ported to native widgets on Windows, Linux, macOS, Android etc.

Re: HyperTextView gadget feature?

Posted: Sat Jul 24, 2021 10:21 pm
by SamuraiCrow
I can possibly redo the HTMLview.mcc file to take advantage of that and then expand on its capabilities.

Re: HyperTextView gadget feature?

Posted: Wed Jul 28, 2021 7:27 pm
by SamuraiCrow
UPDATE
The HTMLview.mcc code is way too fancy for my liking. I may just have to settle for trying to get it to work on MorphOS as is.

Edit:
The demo that comes with the class actually does work on MorphOS. It's just the HTML tag on RapaGUI that does the MorphOS equivalent of a segfault.