how to...

Portable Presenter is a package designed to give presentations. A presentation is based on slides, which are shown on viewports.

There are two kinds of viewports:

  • viewports without any controls: these are described on this page, and
  • exactly one viewport with controls, showing the show's progress, with a background-menu, etc.
When you use more than one viewport, usually the viewport with controls will show slide-notes. But none, or even more than one viewport showing the notes is possible, too.

How to create a viewport

Implicit creation

Do not add any viewports explicitly: PPresenter will create one for you. You may specify the size of this viewport with the -geometry option of the show's constructor function new().

If you specify the -controlDisplay variable at the show's new(), then PPresenter will create a control viewport which displays slide-notes.

Explicit creation

After the show's instantiation until you add your first slide, you can add viewports explicitly. You can add as many viewport as you like, but only one can have controls. See the examples below how it can be used.

Options for all viewport

About the windowing system

-display => display
On which visual should the viewport appear? By default the screen which you are using (for X11 this value is taken from $ENV{DISPLAY}).

-device => string
Type of device. This is important for the decoration. Currently defined are lcd, beamer, and printer. Add a new device via the decoration method addDevice().

-geometry => geometry
The requested size and location of the window. This defaults to the show's new() option with the same name, which on its turn defaults to the size of the screen.

-resizable => boolean
Is the user permitted to resize the main window? Usually not, so by default this is turned off (0).

There is no options to switch the title-bar off: this is an option for the window-manager. Each window-manager has its own way to achieve that.

About PPresenter

-name => string
-aliases => [ string, ... ]
Name and optionally nicknames of the viewport. Required when you address the viewports yourself.

-hasControl => boolean
Is this the control window? There must be exactly one control window.

-showSlideNotes => boolean
Does this viewports show slidenotes, or slides. If you create a window with controls, the default is notes (true, 1). For other windows, the default is slides (false, 0).

-style => string
Which style is used to describe the style. Viewports which show slidenotes have style "slidenotes" as default. Other viewports get by default the selected style (usually the default style).


Example 1: Implicit Creation

The easiest way to create one viewport for your show is just by not using addViewport:
   use PPresenter;
   my $show = PPresenter->new();
Now you have only one viewport, with controls on that viewport. The viewport covers the whole screen, unless you specify a -geometry with new()

Example 2: Implicit Creation with Control Viewport

If you want to have more than 1 viewport, you need a windowing system which enables Tk to do this. Currently, this is only tested for UNIX.
   use PPresenter;
   my $show = PPresenter->new
      ( -controlDisplay  => ''
      , -controlGeometry => '300x300+40+40'
When you specify the -controlDisplay you will get two viewports: one without controls and showing slides, the other with controls, showing slide-notes. The default geometry is '640x480'. As test, you may try:
   -controlDisplay => $ENV{DISPLAY}
but this is not useful in a practical situation.

Example 3: Explicit Creation of one viewport

Explicit creation of one single window is also not hard, as long as you do not forget that one viewport --so this viewport-- requires control:
   $show = PPresenter->new;
      ( -display    => 'anywhere'
      , -hasControl => 1
      , -geometry   => '400x600+30-20'
Because one viewport is explicitly added, PPresenter will not create one for you. To be more precize: if there is at least one viewport which shows slides, then none is created automatically.

The number of options of a viewport with controls is much larger than for a viewport without controls. See the special section of control options.

Portable Presenter is written and maintained by Mark Overmeer. Copyright (C) 2000-2002, Free Software Foundation FSF.