Catching mouse over ListBrowser columns

7 posts / 0 new
Last post
trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Catching mouse over ListBrowser columns

Is there an easy way to determine that the mouse pointer is currently over a particular node in a particular column of a ListBrowser Gadget?

broadblues
broadblues's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2012-05-02 21:48
Re: Catching mouse over ListBrowser columns

MOuse over of gadgets is always tricky as gadgets don't accept input unless they are active.

With simple gadgets you can use a commodity / input handler and test the gadget bounds, but for something like listbrowser nodes that get near impossible as the node location can't be obained.

However have you looked at the LISTBROWSER_HintInfoHook (struct Hook *) ?

You might be able to repurpose this to your needs, depending on what those needs are. Requiers a relatively recent (but public) version of listbrowser. The hook has existed for a while but was broke IIRC. Don't have the exact version to hand.

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Catching mouse over ListBrowser columns

@broadblues

have you looked at the LISTBROWSER_HintInfoHook (struct Hook *) ?

Yes I have (one of the first solutions I tried), and it indeed allows you to determine the actual node and column. But the problem is that it's really been designed for gadget help hints, i.e. the hook function only gets invoked after the mouse pointer has been over the gadget for some time.

To explain what I'm after: I have some listbrowser nodes the text of which are in fact URL addresses, so I wanted them to act as web links. Making the text underlined is no problem but to make them appear as real links I would need to intercept the mouse-over (in order to change the text colour).

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

broadblues
broadblues's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2012-05-02 21:48
Re: Catching mouse over ListBrowser columns

Interesting. Did you try invoking GM_QUERY yourself, in respnse to mouse move and or timer event?

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Catching mouse over ListBrowser columns

No but I will - thanks for the tip!

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

mritter0
mritter0's picture
Offline
Last seen: 2 years 6 months ago
Joined: 2014-04-21 21:15
Re: Catching mouse over ListBrowser columns

trixie,

If you get this to work, please post the code. I have wanted this for a similar use for a few years.

trixie
trixie's picture
Offline
Last seen: 7 months 3 weeks ago
Joined: 2011-02-03 13:58
Re: Catching mouse over ListBrowser columns

@mritter

If you get this to work, please post the code

Briefly looking at the GM_QUERY documentation doesn't fill me with much hope but I'll see what can be done here.

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

Log in or register to post comments