Tk::HyperText

Tk::HyperText can create and manipulate ROText widgets which render HTML code.
Download

Tk::HyperText Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Casey Kirsle
  • Publisher web site:
  • http://search.cpan.org/~kirsle/Tk-HyperText-0.06/lib/Tk/HyperText.pm

Tk::HyperText Tags


Tk::HyperText Description

Tk::HyperText can create and manipulate ROText widgets which render HTML code. Tk::HyperText can create and manipulate ROText widgets which render HTML code.SYNOPSIS my $hypertext = $mw->Scrolled ("HyperText", -scrollbars => 'e', -wrap => 'word', -linkcommand => &onLink, # what to do when links are clicked -titlecommand => &onTitle, # what to do when s are found )->pack (-fill => 'both', -expand => 1); # insert some HTML code $hypertext->insert ("end","" . "Hello, world!");WIDGET-SPECIFIC OPTIONS-rerenderBoolean. When true (the default), the ENTIRE contents of your HyperText widget will be (re)rendered every time you modify it. In this way, if you insert, e.g. a "bold" tag and don't close it, then insert new text, the new text should logically still be in bold, and it would be when this flag is true.When false, only the newly inserted text will be rendered independently of what else is already there. If re-rendering the page is too slow for you, try disabling this flag.-titlecommandThis should be a CODEREF pointing to a subroutine that will handle changes in a page's title. While HTML code is being parsed, when a title tag is found, it will call this method.The callback will received the following variables: $widget = a reference to the HyperText widget that wants to set a title. $title = the text in the tag.-linkcommandThis should be a CODEREF pointing to a subroutine that will handle the clicking of hyperlinks.The callback will received the following variables: $widget = a reference to the HyperText widget that invoked the link. $href = the value of the link's "href" attribute. $target = the value of the link's "target" attribute.-attributesThis option will allow you to define all of the default settings for the display of HTML pages. Here's an example: my $html = $mw->Scrolled ("HyperText", -attributes => { body => { bgcolor => 'white', text => 'black', link => 'blue', vlink => 'purple', alink => 'red', }, font => { family => 'Arial', size => 3, color => '', # inherit from back => '', # inherit from }, }, )->pack;-basehrefThe "base href" of the webpages being rendered. This should be the local file path (ex. "./demolib"). The base href can be reset using the < base > tag in a webpage. The base href is used for locating external files, such as images. Requirements: · Perl


Tk::HyperText Related Software