man Gtk2::Ex::HyperTextView () - A TextView widget with hyper links

NAME

Gtk2::Ex::HypertextView - A TextView widget with hyper links

DESCRIPTION

This module derives from Gtk2::TextView but adds code to have hyperlinks in your text. It adds 3 signals to make it easier to work with links.

This module can be used together with Gtk2::Ex::HyperTextBuffer but also with other TextBuffer classes.

HIERARCHY

  Glib::Object
  +----Gtk2::Object
        +----Gtk2::Widget
              +----Gtk2::Container
                    +----Gtk2::TextView
                          +---- Gtk2::Ex::HyperTextView

METHODS

insert_link_at_iter(START, TEXT, DATA)
Inserts a piece of text into the buffer, giving it the usual appearance of a hyperlink in a web browser: blue and underlined. Additionally, attaches some data on the tag, to make it recognizable as a link. DATA is the argument that will be passed back on events for this link, it can be any perl scalar.
apply_link(DATA, START, END)
Makes a link of all text between START and END and attaches the perl scalar DATA to this link.
get_link_at_cursor( )
Returns link data or undef.
get_link_at_pointer( )
Like get_link_at_cursor( ) except that it looks at the mouse cursor, not at the text cursor.
get_link_at_iter(ITER)
Returns link data or undef.
click_if_link_at_cursor( )
Emits the link_clicked signal if the text cursor is at a link. Returns undef or link data.
click_if_link_at_iter(ITER)
Emits the link_clicked signal if ITER is part of a link. Returns undef or link data.
set_cursor_if_appropriate(X, Y)
Looks at all tags covering the position (X, Y) in the text view, and if one of them is a link, change the cursor to the hands cursor typically used by web browsers. If no (X, Y) is given the pointer coordinates are used. This method is called on a number of events. Returns the link data if the cursor is above a link.

SIGNALS

link_clicked(DATA)
Emitted when the user clicks on a link or presses Enter while on a link.
link_enter(DATA)
Emitted when the mouse cursor enters the region of a link.
link_leave( )
Emitted when the mouse cursor leaves the region of a link.

AUTHOR

Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>

Copyright (c) 2005 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.