Class Demo::Hypertext
In: gtk/sample/gtk-demo/hypertext.rb
Parent: BasicWindow

Methods

Public Class methods

Public Instance methods

Links can also be activated by clicking.

Looks at all tags covering the position of iter in the text view, and if one of them is a link, follow it by showing the page identified by the data attached to it.

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.

Links can be activated by pressing Enter.

Update the cursor image if the pointer moved.

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.

Fills the buffer with text and interspersed links. In any real hypertext app, this method would parse a file to identify the links.

Also update the cursor image if the window becomes visible (e.g. when a window covering it got iconified).

[Validate]