HyperTextView gadget feature?

Discuss GUI programming with the RapaGUI plugin here
SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

User avatar
airsoftsoftwair
Posts: 4787
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: HyperTextView gadget feature?

Post by airsoftsoftwair »

Sorry, but something like this isn't supported by neither MUI nor wxWidgets so not really possible without going to great pains.

plouf
Posts: 218
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: HyperTextView gadget feature?

Post by plouf »

but why you create textview and not a HTMLview?

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

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

User avatar
airsoftsoftwair
Posts: 4787
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: HyperTextView gadget feature?

Post 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.

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post by SamuraiCrow »

I can possibly redo the HTMLview.mcc file to take advantage of that and then expand on its capabilities.
I'm on registered MorphOS using FlowStudio.

SamuraiCrow
Posts: 424
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: HyperTextView gadget feature?

Post 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.
I'm on registered MorphOS using FlowStudio.

Post Reply