Class | Demo::Hypertext |
In: |
gtk/sample/gtk-demo/hypertext.rb
|
Parent: | BasicWindow |
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.
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.