def show_page(buffer, page)
puts
buffer.text = ''
iter = buffer.get_iter_at_offset(0)
case page
when 1
buffer.insert(iter, 'Some text ot show that simple ')
insert_link(buffer, iter, 'hypertext', 3)
buffer.insert(iter, ' can easily be realized with ')
insert_link(buffer, iter, 'tags', 2)
buffer.insert(iter, '.')
when 2
buffer.insert(iter,
%Q[A tag is an attribute that can be applied to some range of text. For example, a tag might be called "bold" and make the text insid the tag bold. However, the tag concept is more general than that; tags don't have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user can't edit it, or countless other things.])
buffer.insert(iter, "\n")
insert_link(buffer, iter, 'Go back', 1)
when 3
tag = buffer.create_tag(nil,
{
'weight' =>
Pango::FontDescription::WEIGHT_BOLD
})
buffer.insert(iter, "hypertext:\n", tag);
buffer.insert(iter, %Q[machine-readable text that is not sequential but is organized so that related items of information are connected.\n])
insert_link(buffer, iter, 'Go back', 1)
end
end