NAME

PageDisplayer - Content Display


SYNOPSIS

Generates the visual elements which compose Luci's output to the browser. Includes style settings, frame and no frame page creation, preferences interface, etc... For the most part, content acquired using Luci is merged with special templates in order to provide the required output.


USAGE

First, a PageDisplayer object must be created to store the member data required by the functions. Create the object with the Luci config hash reference as the only constructor parameter:

 # set up our page displayer
 my $displayer = PageDisplayer->new($config);

Then, give the object some addtional data to work with:

 $displayer->cookie_manager($cookie_man);
 $displayer->{_target} = $fetcher->target;
 $displayer->{_show_settings} = false;
 $displayer->page_parser($p);

Next call the member function get_page_output:

 print $displayer->get_page_output();


DESCRIPTION

get_page_output

Renders the page to be displayed. This function relies on data from page parser and cookie manager to determine what kind of page to output, whether it is a frames page, a straight rendering of the target document, or to display the preferences page. All user defined styles are taken into account and applied to the rendering. This is the only function that tends to be used externally in this module.

 get_page_output()

returns the rendered HTML to be displayed to the user.

example:

 print $displayer->get_page_output();

output_style_settings

This is called when Luci user preferences should be displayed Gets most of its content from templates and combines it with style data from the config file. Also uses display settings to highlight current choices.

returns the preference page HTML.

example: used internally

output_parsed_page

Called whenever the user preferences are not to be displayed and the parsed target document should be displayed to the user. Gets most of its content from templates, plugging in content acquired from page parser.

returns the elucidated target document's HTML.

example: used internally

join_html

Simply delimits the HTML content based on some configuration parameter.

returns returns delimited HTML

example: used internally


LUCI DOCUMENTATION

See Luci Documentation for more information.


AUTHORS