Re: events on TextTag's
- From: Havoc Pennington <hp redhat com>
- To: Mariano Suarez-Alvarez <msuarezalvarez arnet com ar>
- Cc: gtk-list -- General discussion on GTK+ <gtk-list gnome org>
- Subject: Re: events on TextTag's
- Date: Sun, 16 Mar 2003 01:00:43 -0500
On Sat, Mar 15, 2003 at 08:39:59PM -0300, Mariano Suarez-Alvarez wrote:
> Hi,
>
> I'd like to have hyper-links in a GtkTextView. Right now I'm using a TextTag
> on the text that carries the link, which, apart from underlining and such
> niceties, has its "event" signal connected to a callback which, on
> ButtonEvents, does The Right Thing. I'd like to have the mouse cursor become
> a GTK_HAND2 when it hovers the link, but the TextTag does not (seem to)
> reveice GDK_{ENTER,LEAVE}_NOTIFY events (it doesn't have its own window, so
> that's rather natural, isnt't it?)
>
> I tried looking at the libgtkhtml source for ideas, but that did not help at
> all...
>
> Any suggestions?
>
Just use MotionNotify on the GtkTextView, and the function
get_iter_at_location() or whatever it is that finds the text at a
given mouse point. There aren't enter/leave notify on the tags,
because it would be pretty inefficient and most apps wouldn't use
them.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]