SwiftView Plug-In Reference Manual
Release 6.2
Glenn Widener
4/10/02
This specification describes the SwiftView plug-in modes of operation,
appearance, configuration, and integration into Web pages. Much of this
description also applies to the SwiftView C/IE ActiveX Control ("SAX");
the SAX reference manual documents the differences.
Contents
Plug-in User Interface Modes
General Features
Including SwiftView Files in Your HTML Documents
Configuring the Plug-In
MIME Types and Suffixes
How the SwiftView Executable is Started
Document Transfer to SwiftView
LiveConnect
Native Language Support
Security
See also the plug-in release notes
(http://www.swiftview.com/tech/npsvreadme.txt, or installed with the plug-in)
for:
- installation and deinstallation notes
- configuring web server MIME types
- known bugs
- licensing
See the SwiftView Technical Reference Manual for more information on basic
SwiftView features, configuration, and application programming.
Plug-in User Interface Modes
A web page can have multiple instances of SwiftView plug-in documents.
The plug-in instance can appear in a rectangular window in the HTML
document, as a separate web page taking over the full browser window, or
in a separate SwiftView window (looks much like a helper application; we
will call it "partner mode").
Full-Page Plug-ins
Full-page SwiftView plug-ins are incorporated by a simple URL to a file
that is one of the SwiftView-supported MIME types. The document is
displayed in-line, taking over the full browser document window.
The default user interface for full-page plug-ins includes a control bar
on the right side of the window containing "All", "Wide", "Rotate",
"Print", "Tips", and "Swift" iconic buttons, plus a page number
display/selector.
The "All" button redraws the full page to fit the window. The "Wide"
button redraws the full page to fill the window horizontally. The
"Rotate" button redraws the full page to fit the window rotated 90 degrees
clockwise from the current rotation. The "Help" button pops up a dialog
identifying the plug-in and displaying a brief description of the mouse
and keyboard commands. The "Swift" button displays product information
about the plug-in. (F9 to displays information about the SwiftView
executable.)
The page selector consists of previous and next page icons, and a
current/total page indicator, that when clicked displays a page selection
dialog.
ToolTips are provided for all control bar fields and buttons.
The vertical scrollbar selects pages in a multi-page document, or pans a
single page document. A horizontal scrollbar is displayed when the
current page is not fully visible in the horizontal dimension.
Note that normal SwiftView document printing can be accessed from the
browser print button in full-page mode. Unfortunately, this does not work
with Internet Explorer or on Unix, so a separate plug-in print button is
also provided in the plug-in control bar.
Although full-page plug-ins are very simple to incorporate into your web
pages, they do not allow:
- displaying a SwiftView document simultaneously with related web pages
- directing the first-time user to the SwiftView plug-in installation
page.
Embedded and "partner" plug-ins offer these features.
Embedded Plug-ins
All other SwiftView plug-in modes are implemented using the EMBED tag in
the HTML page; we will refer to them as "embedded plug-ins". EMBED tags
can have attributes that configure the plug-in user interface. Most
attributes correspond to gui ics commands that can be used to configure
the SwiftView plug-in any mode. See "Including SwiftView Files in Your
HTML Documents" for details on creating EMBED tags, and "Configuring the
Plug-In" for details on the various ways of changing the plug-in's user
interface.
An embedded plug-in operates in either a "partner plug-in" mode or an
"in-line embedded" mode. The mode is selected by the EMBED tag attributes
"INLINE", "HIDDEN", "WIDTH", and "HEIGHT".
Partner Plug-ins
If an embedded plug-in has attributes INLINE=false, HIDDEN=true, WIDTH=0,
or HEIGHT=0, the SwiftView plug=in operates in "partner" mode. The
document is displayed in the SwiftView window, which is popped up over the
browser window. If HIDDEN=false, WIDTH>0, and HEIGHT>0. a "Show document"
button is displayed in the plug-in window, so the user can command the
document to be displayed or redisplayed. This button is 27 pixels square,
so the EMBED tag attributes width=27 height=27 should be given.
Hitting the browser "back" button hides the SwiftView window. Note -
HIDDEN fails with Internet Explorer; use WIDTH=0 and HEIGHT=0 instead
for portability.
Hitting the browser "back" button hides the SwiftView window.
If HIDDEN=true, WIDTH=0, or HEIGHT=0, or INLINE=false and AUTOSTART=false
is not given, the document is displayed immediately when the HTML page
containing the EMBED tag is viewed.
In-Line Embedded Plug-ins
If an embedded plug-in does not have INLINE=false HIDDEN=true, WIDTH=0, or
HEIGHT=0, the document is displayed in the plug-in window embedded in the
current HTML document, sized according to the EMBED tag attributes HEIGHT,
WIDTH, and UNITS. This can be a fixed size in pixels, or a percentage of
the browser window. A one-pixel border is drawn by default.
The CONTROLS embed attribute controls display of a control bar. The
control bar can be placed at the right side of the plug-in, just like
full-page mode, at the top of the plug-in window, or not shown, depending
on CONTROLS="topbuttons", "rightbuttons", or "none". By default, the
control bar is not displayed for embedded plug-ins.
The SCROLLBAR embed attribute controls display of the scrollbars. Values
are "vertical", "horizontal", "both", or "none". The default is "both",
but note that the scrollbars don't actually appear until the page is
zoomed in.
For in-line plug-ins, AUTOSTART is ignored.
Multiple In-Line Embedded Plug-ins
With in-line embedded plug-ins, multiple drawings can be visible
simultaneously.
On Windows, each document instance gets it's own SwiftView program, so the
entire user interface state is maintained as the user switches between
instances.
On UNIX, SwiftView's output is multiplexed among the plug-in instances.
Each document is transferred to sview as needed to respond to user
requests. Multiplexing instead of running an sview instance for each
instance significantly reduces memory consumption and speeds initial page
drawing time, but makes switching among multiple instances on the same
HTML page slower. Simply clicking on a different in-line plug-in instance
causes this context switch. The document must be completely reloaded from
the cached file when the user switches among multiple instances. User
interface state (e.g. rotate, zoom, page number) is not maintained in the
plug-in instance, and is reset to the initial value (as specified in the
ICS file, else page 1, zoomed to show all).
Because of this, a larger SwiftView file cache size may be needed to
display multiple large documents efficiently (see the "set cachesize" ICS
command).
General Features
The Plug-in supports all standard SwiftView key commands and selection
with the mouse. (Exceptions: Netscape prevents use of certain control and
function keys, so five commands are accessed via other keys. F9 or F10
presents the sview copyright/version info, not that of the plug-in itself,
which is provided by the Swift icon.
Including SwiftView Files in Your HTML Documents
SwiftView documents are incorporated into HTML pages in one of two ways:
- A simple URL to a file that is one of the SwiftView-supported MIME
types.
- An EMBED tag which contains various attributes defined by the Netscape
or SwiftView plug-in. Embedded plug-ins can occupy a rectangular area
of the HTML page or display the document in a separate SwiftView
window. Attributes take the forms
NAME=value
NAME
where NAME is case-insensitive. A NAME with no value is the same as
NAME=true. Attributes used by SwiftView are:
Defined by Netscape:
SRC="URL[#ics cmds]" - where to get the SwiftView document/ics file
file. Follows standard URL syntax,
including file: or http:. If the URL
contains the '#' character, everything
after it is processed as ICS commands,
prior to other EMBED tags.
TYPE=MIME - The document MIME type
PLUGINSPAGE="URL" - where to get the plug-in itself
WIDTH=val
HEIGHT=val - the area of the HTML document taken by
the plug-in instance if not full-page.
val is in pixels, or nnn%, a
percentage of the browser document window.
"100%" sets the size to match the
window, less a small margin (fixed in
Netscape, config with xxxMARGIN
in IE). Note that SAX defaults to
CONTROLS=rightbuttons if WIDTH=100%.
In partner mode, must be set to 27x27,
the size of the "Show" button, except if
width or height is zero, INLINE=false
and AUTOSTART=true are set, creating a
"HIDDEN" plugin (except SAX, where you
must set both explicitly).
LEFTMARGIN=pixels
RIGHTTMARGIN=pixels
TOPMARGIN=pixels
BOTTOMMARGIN=pixels - IE only - set the margin between the
browser document window and the page.
SCROLL=false|true - IE only - if true, the browser document
window scrollbar is now shown
HIDDEN=false|true - if true, the plug-in window is not
created by the browser, and INLINE=false
and AUTOSTART=true are implied.
Default "false". Note - fails with
Internet Explorer; use WIDTH=0 and
HEIGHT=0 instead for portability.
Defined by SwiftView:
INLINE=false|true - if true, show the SwiftView document
in-line in the HTML document, else in a
separate "partner" SwiftView window,
with a "Show" button in the HTML page.
Default "true".
Equivalent ICS command: gui inline
CONTROLS=rightbuttons|topbuttons|none
- if INLINE=true, show a set of buttons
at the top or right of the document,
within the plug-in instance area.
Default "rightbuttons" if WIDTH=100% in
SAX, else "none". Ignored if INLINE=false;
use COMMANDS PARAMeter.
Equivalent ICS command: gui controls display
SCROLLBARS=vertical|horizontal|both|none
- show the desired scrollbars.
Default "both". Ignored if INLINE=false;
use COMMANDS PARAMeter.
Equivalent ICS command: gui scrollbars
display
BORDERWIDTH=n - width of border around entire plug-in.
Default 1 for embedded, 0 for full-page
Border is inside WIDTH/HEIGHT.
New in 4.0
Equivalent ICS command: gui borderwidth
AUTOSTART=false|true - if true, show the SwiftView document
as soon as the HTML page is viewed.
Default "false". Ignored if INLINE=true.
Equivalent ICS command: gui autostart
COMMANDS="ics commands" - a string of ICS commands to process
The string may contain multiple commands
separated by newline or pipe ("\\n" or "|").
Use """ to embed a double quote.
FIRSTICS="ics commands" - Same as COMMANDS, but processed before
SRC.
The EMBED tag is a very flexible and powerful mechanism, and is highly
recommended. For example, "partner" mode allows the referencing HTML page
to remain visible in the browser while the SwiftView document is being
viewed. EMBED tag entry is supported to some degree by HotMeTal, and
quite well by Microsoft FrontPage.
As noted, the SwiftView-specific EMBED tags have equivalent ICS commands;
see the SwiftView Technical Reference Manual for details. Also note that
EMBED tags CONTROLS, SCROLLBARS, and BORDERWIDTH do not affect the partner
mode user interface (if INLINE=false); use COMMANDS= to configure controls
and scrollbars in this case.
The SRC attribute references the SwiftView document file.
The TYPE attribute is an alternative way to specify the MIME type of the
document, but even when the server handles suffix-to-MIME mapping, use of
TYPE allows faster plug-in loading.
The NOEMBED tag should be used after the EMBED tag to invoke SwiftView
directly as a helper in browsers that do not support plug-ins:
Use the SwiftView helper from http://www.swiftview.com/dload/dlmain.htm
We recommend use of the "PLUGINSPAGE=URL" EMBED tag attribute. This
attribute tells Navigator 3.0 where to get the plug-in for the MIME type
specified by the EMBED tag. If the plug-in is not installed, Navigator
makes a CGI GET request to that URL with the MIME type as the
QUERY_STRING. We supply a web page at
http://www.swiftview.com/dload/euinstall.htm
that can be referenced by the PLUGINSPAGE attribute of any webpage to
install the plug-in if not already installed. Read
http://www.swiftview.com/howto/webhowto1.htm for more details.
Note that this implies that you should use the EMBED tag even for
large documents that would normally be incorporated in full-page mode.
Example EMBED tag HTML code:
This is an EMBED tag with INLINE=true and CONTROLS=topbuttons: