select()

PPresenter
Manual
function
select via

Portable Presenter is a package designed to give presentations. Presentations are written in options to style-elements grouped into styles. To avoid that you have to specify all the style-elements for all the styles each time over again, you can select your defaults.

The following selects are available:

A select is always of the form:
   $object->select('objtype', name);
   $object->select(objtype => name);
Where the name is something what is accepted by find: a name of an object of the required type, or one of its aliases, 'FIRST', or 'LAST', or a sequence number in the list.

Selections on a Show

Handled by show itself:
   my $style    = $show->select(style    => 'default');
   my $viewport = $show->select(viewport => 'control');
The selected style is the style which will be the default style for all viewports which are added to the show after this select statement. This function is valid only till the first slide is defined.

The select for a viewport is only useful to give a default for find on a show, nothing more. All other selects on a show are passed to the selected style. The following two lines are equivalent:

   $show->select(formatter => 'plain');
   $show->find('style')->select(formatter => 'plain');

Selections on a Style

A style is a combination of lists of style-elements. Of each list, one is selected to be used by default by any viewport which has that style selected.

A few ways you can use this select function:

   $show->addStyle(...options...)
         ->select(formatter => 'plain');
   my $style = $show->find(style => 'slidenotes')
         ->select(formatter => 'simple');
   $style->select(formatter => 'markup');

Selections on a Viewport

A viewport has a selected style, which determines how a slide for that viewport should be displayed. You can select a new style or change something in the selected style.

BE WARNED: if you change the selection of a style-element in one viewport, this will affect the other viewports which use the same style. (may change in the future).

  $show->find(viewport => 'control')
       ->select(style  => 'slidenotes');
  $show->find(viewport)
       ->select(template => 'tm');
The latter is dangerous, and would be more clearly written (assuming the viewport uses the selected style of the show):
   $show->select(template => 'tm');
   $show->find(viewport)->find(style)
        ->select(template => 'tm');
 
Portable Presenter is written and maintained by Mark Overmeer. Copyright (C) 2000-2002, Free Software Foundation FSF.