Information within help windows is displayed in viewports. In the default case, a single viewport is defined that occupies the entire help window and contains the text. This is known as a simple viewport. However, multiple viewports may be defined within the same help window, and handled separately. For example, two viewports may be defined in a help window; the first may be used to display a graphical diagram, while the second may contain a text narrative relating to the diagram. The user may scroll the text in the window, but the diagram remains displayed since it lies in a separate viewport. This type of definition is known as a complex viewport.
Multiple viewports are normally defined within a help window using :link tags which are known as automatic links. These operate in a similar manner to hypertext links, but are invoked automatically when the help window is displayed. An example of a help window containing such links is shown in Figure "Multiple Viewports Using Automatic Links".
The auto attribute specifies that the viewport is to be opened automatically when its parent help window is opened. The dependent attribute specifies that the viewport is to be closed when its parent is closed. The vpx=, vpy=, vpcx= and vpcy= attributes specify the position and size of the viewport within the parent window. In Figure "Multiple Viewports Using Automatic Links", two viewports are opened, positioned side-by-side within the parent window.
The scroll=, titlebar= and rules= attributes determine whether each viewport possesses its own scroll bars, title bar and sizing borders. In Figure "Multiple Viewports Using Automatic Links", neither viewport contains a title bar or sizing border (both make use of the parent's title bar and border), but the right-hand viewport contains its own scroll bar. This allows the right-hand viewport to be scrolled while the left-hand viewport remains unchanged.
IPF-Controlled Viewports
By default, the presentation of information in viewports is under the control of IPF, using instructions defined in the source files. Such viewports are known as IPF-controlled viewports. When an IPF-controlled viewport is used, text is automatically formatted within the viewport by IPF, and presented in the help window.
Application-Controlled Viewports
A viewport may also be defined as an application-controlled viewport, using the :acviewport tag. This tag allows an application to take direct control of a viewport, and to present information in this viewport in a manner determined by that application. For example, a full-motion video application could be used to display information in video format.
The :acviewport tag is shown in Figure "Application-Controlled Viewport".
The :acviewport tag causes IPF to load a dynamic link library as specified in the dll= attribute, and to pass control to the entry point identified by the objectname= attribute.