SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Fedora 13 Zim-0.29-1.fc13.noarch.rpm

Gtk2::Ex::HyperTextView

Section: User Contributed Perl Documentation (3)
Updated: 2010-02-10
Index 

NAME

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

DESCRIPTION

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

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

HIERARCHY

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

METHODS

new()
new_with_buffer(BUFFER)
Constructors.
insert_link_at_iter(START, TEXT, DATA)
Inserts a piece of text into the buffer, giving it the usual appearance of ahyperlink in a web browser: blue and underlined. Additionally, attaches somedata 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 attachesthe 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 themouse 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.

get_iter_at_pointer()
Returns the text iter for the current pointer (mouse cursor) position.
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.

toggle_if_checkbox_at_iter(ITER, TYPE)
Toggles a checkbox. If type if ``x'' it uses the ``x checked'' state, else just normale ``v'' check.
search(STRING, DIRECTION, CASE, WORD)
Searches for STRING in the buffer and selects the next occurence it finds.The search is case-insensitive and TEXT can not include line breaks.The search wraps around when nothing is found before the end/beginof the buffer.

DIRECTION can be 1, -1 for forward and backward search.If DIRECTION is 0 it will match forward including the current cursor. Try:

        $entry->signal_connect( changed =>                sub { $htext->search( $entry->get_text, 0 ) }    );

to get an entry that searches while typing.

CASE is a boolean for case sensitive search.

WORD is a boolean for matching whole words only.

Returns boolean for success.

replace(STRING)
Replace the current selection with STRING.To be used in combination with "search()" to create a``Find and Replace'' function.
replace_all(OLD, NEW)
Loop through the document once and replace all matches for OLD with NEW.
 

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] <pardusAATTcpan.org>

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


 

Index

NAME
DESCRIPTION
HIERARCHY
METHODS
SIGNALS
AUTHOR

This document was created byman2html,using the manual pages.