Re: creating hypertext documents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for a detailed reply. 

In fact, I was working on GTK 1.2 and all other
programs are on GTK 1.2 I was thinking how to approach
this problem in GTK 1.2. I was thinking of writing my
own widget. But I am not sure, how to get the
functionality of detecting that the mouse is hoveing
over a link. If I use a Text widget how do I detect
mouse movement on a particular word (or link). Do I
have to check the mouse pointer every milisecond or
something. Or is their technique when the system can
inform me. I know if there is widget present and the
mouse hovers over it, the system informs me through
motion_notify_event. But can I place a widget along
with text contents in a text widget. or do I have to
look for some other technique.

Thanks.
shiraz

--- Noah Levitt <nlevitt@columbia.edu> wrote:
> You can do basic hypertext pretty easily with a
> GtkTextView.
> Use a tag to make the link blue and underlined, then
> g_object_set_data the link target on that tag.
> Connect to
> button release events (actually you'll probably find
> that
> you need to connect to "event-after" and check that
> it's a
> button release, otherwise an annoying problem comes
> up) and
> look at the tags on the text where the click comes
> from. If
> one of the tags has the link target in its
> g_object_get_data, follow the link. Also, use motion
> notify
> to see if the mouse is hovering over a link, and
> turn the
> cursor into a hand. See
> gucharmap/gucharmap/gucharmap-charmap.c
> for an example of how to do this.
> 
> Noah
> 
> On Thu, Jul 31, 2003 at 22:41:23 -0700, Shiraz Baig
> wrote:
> > I have been searching for some hints, how can I
> create
> > a hypertext document. If I use a text widget, I
> need
> > to create a link and then the mouse should be able
> to
> > reacognise that link.But the mouse movement is
> > detectable only over widgets. Then shall I place
> the
> > text on the widget?
> > 
> > Could somebody just give me a hint how to approach
> the
> > problem?
> > 1) Which widget should be used?
> > 2) How would the mouse movement over the "
> hypertext
> > link" be detected. 
> > 3) How can the hypertext link be placed in a
> widget. 
> > 
> > Thanks
> > shiraz


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux