Text Datatype LNF_LINK handling

6 posts / 0 new
Last post
trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Text Datatype LNF_LINK handling

For the past few days I've been burning my fingers developing a Text Datatype subclass. I wonder if anybody can shed some light on this:

The Text Datatype uses a linked list of struct Line (see datatypes/textclass.h) to gather lines of text for display. Each struct Line represents a segment of text. Now, the ln_Flags field in the structure can carry a LNF_LINK flag to indicate that the line segment is a link.

What I don't understand is what the flag really is for. What can the Text Datatype do for me if I actually pass a LNF_LINK-flagged segment as part of the linked list? Can the datatype tell (and more importantly, report) that the link has been clicked on?

Or is it just a once-planned feature that never materialized?

salass00
salass00's picture
Offline
Last seen: 7 months 1 week ago
Joined: 2011-02-03 11:27
Re: Text Datatype LNF_LINK handling

LNF_LINK is only used by the amigaguide.datatype AFAICT so I don't think you need to worry about it (the text.datatype doesn't do anything with the flag).

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Text Datatype LNF_LINK handling

@salass00

OK, so the Text Datatype doesn't support links at all? I'm asking because the format for which I'm developing the subclass does use links (and it would be quite nice to have them).

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

salass00
salass00's picture
Offline
Last seen: 7 months 1 week ago
Joined: 2011-02-03 11:27
Re: Text Datatype LNF_LINK handling

OK, so the Text Datatype doesn't support links at all?

Yes, that is the case.

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Text Datatype LNF_LINK handling

@salass00

Yes, that is the case.

I feared as much :-(

Looking at the Text Datatype includes and autodocs, I can see that I can query TDTA_WordSelect to see which word has been double-clicked on. Is that really all input I can get from the gadget? If I could also retrieve which actual Line segment the double-clicked word belongs in, I could check the LNF_LINK flag for that segment and let my subclass behave accordingly. Surely this would be trivial to implement?

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Text Datatype LNF_LINK handling

@myself

Looking at the Text Datatype includes and autodocs, I can see that I can query TDTA_WordSelect to see which word has been double-clicked on.

Oh cr@p, looking at the text datatype source code (53.9) it's clear that TDTA_WordSelect is just another unimplemented feature :-(

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

Log in or register to post comments