guides:oi10:presentation_server_model:010_introduction

Welcome to the OpenInsight Presentation Server Reference Manual, which provides a comprehensive reference to the capabilities offered by the Presentation Server. It is not intended to be a guide to developing OpenInsight applications, although the appendices do cover several programming topics that developers may find useful when dealing with specific tasks.

What is the Presentation Server?

The OpenInsight Presentation Server is a core part of the OpenInsight Development suite. It hosts the Revelation Engine (RevEngine) virtual machine and provides Basic+ programs with an object-based interface to create and manipulate Windows Desktop (aka. Win32) Applications. As well as providing the capability to create your own applications, the Presentation Server also provides the actual OpenInsight development environment itself, which comprises the IDE and most of its associated tools.

In addition to the stored procedures described later in this manual the Presentation Server also includes the Windows executable files listed below:

File Purpose
OpenInsight.exeThis is the core Presentation Server executable. It hosts the RevEngine virtual machine at runtime to provide access to Basic+ programs.
RevVSM.dll Provides visual style rendering services to windows and controls hosted by the Presentation Server.
RevGrid.dll Provides grid-based controls to the Presentation Server, such as the PROPERTYGRID control.

Of course, these are in addition to those required by RevEngine itself, which are documented elsewhere.

Conventions

This section describes the conventions adopted throughout this manual.

Several abbreviations are used throughout this manual. Here is a list of those commonly used:

AbbreviationMeaning
DWM Desktop Window Manager
GUI Graphical User Interface
IDE Integrated Development Environment
PS Presentation Server
OI OpenInsight
OS Operating System
UDP User-Defined Property
UI User Interface

Many entries in this document describe the contents of properties and variables using the terms "TRUE$" and "FALSE$" when referring to Boolean values. These terms are actually equated constants from a Stored Procedure Insert record called LOGICAL and have the value "1" and "0" respectively.

 Equ TRUE$        To 1\\
 Equ FALSE$       To 0\\
 

This term is simply used to represent an empty (null) string.

In this document, the terms "form", "frame" and "window" are used interchangeably to mean an OpenInsight WINDOW object type. A form or frame is basically a visual surface that is populated with other "child" controls to build a user-interface for your application. These can be "top-level" standalone forms, Dialog Boxes, or MDI child forms.

In this document the term "form" will be used in preference to "window" or "frame" wherever possible.

Please see the documentation for the WINDOW object type for more information.

Starting the Presentation Server

While most of an application’s configuration information is stored in various database records, there are some startup options that need to be determined before the actual database can be accessed (i.e. before the RevEngine virtual machine is loaded).

The Presentation Server can be configured with a wide range of options at startup, via means of an RXI configuration file, and/or a set of command line switches. Both methods support nearly all of the same options, but any option specified by a command line switch always overrides the same option specified in the configuration file.

There are nearly twenty options that can be applied when starting the Presentation Server and adding these as switches to a command line shortcut can be a tedious and error-prone exercise. In order to remedy this, it is possible to create an RXI (Revelation Xml Ini) file to store these options instead, where they are read and parsed by the PS during its boot-up sequence.

The contents of an RXI file are simple XML which looks like this:


 <revPS appID="SYSPROG">
   <taskBarID>RevX.SYSPROG</taskBarID>
   <serverName>\\.\REVXPS_DEBUG</serverName>
   <queueName></queueName>
   <autoExec>REV_IDE</autoExec>
   <bannerFile>revx.png</bannerFile>
   <caption>Revelation X Dev System</caption>
   <showBanner>1</showBanner>
   <showMonitor>1</showMonitor>
   <noSpy>1</noSpy>
   <hideEngine>0</hideEngine>
   <elevate>0</elevate>
   <minDisplaySecs>0</minDisplaySecs>
   <enginePath>C:\RevSoft\RevX.Dev</enginePath>
 </revPS>


There is root element “revPS” with an attribute called “appID” (required) that contains the OI application to load. After this are a series of elements that specify the available options. None of the option elements are required, and may be omitted if desired.

There are no specific formatting requirements for an RXI file name other than that it has a file extension of “rxi”. e.g.

  • DevSystem.rxi
  • Sysprog.rxi
  • ExampleApp.rxi

When looking for an RXI file to load the Presentation Server uses the following algorithm:

  1. Look for an RXI file specified via the “RX” command line switch.
  2. Look for an RXI file with the same name as the “AP” command line switch in the same folder as the PS.
  3. Look for an RXI file with the same name as the last loaded OpenInsight application (this is extracted from the Registry) in the same folder as the PS.
  4. Look for an RXI file called “SYSPROG.rxi” in the same folder as the PS.

(When looking for files in step (1) and (2) above the RX and AP switches do not have to include the “.rxi” file extension)

To see which RXI file has been used at runtime you can use the SYSTEM CONFIGFILE and CONFIGINFO properties, or used the "cfg" System Monitor command.

It is important to note that an RXI file is only used when the Presentation Server is first loaded. Swapping to another application from within the PS without closing it first (e.g. by using the "Open Application" functionality in the IDE) will not use any RXI files that might apply to the new application.

For example, if the PS is started in SYSPROG, and is then switched to the EXAMPLES application it will not use a file called EXAMPLES.rxi even if the EXAMPLES.rxi file actually exists.

The following options are supported in the RXI file:

autoExec

This option specifies the name of a stored procedure to execute at startup, after which the Presentation Server will be closed.

autoForm

This option specifies the name of a form to execute at startup, overriding both the IDE (if in DevMode) or the Application Entry Point (if in RunMode).

appID

Unlike other options this must be specified as an attribute of the root element in the RXI file. It contains the name of the OpenInsight application to load and should not be null.

bannerFile

This option specifies the name of an image file to use as the application's splash screen. If not specified, the Presentation Server will attempt to use a PNG file with the same name as the executable file (i.e. "OpenInsight.png") instead.

The "bannerFile" element can appear multiple times in an RXI file along with an attribute called "dpi", which specifies the DPI that the image is designed for. When the Presentation Server displays the bannerFile image it chooses the closest match to the monitor DPI from all the "bannerFile" elements specified (if the "dpi" attribute is omitted it defaults to "96").

The "dpi" attribute can be a value specifying the actual DPI such as "96" or "144", or it can be expressed as a percentage such as "100%" or "150%" and so on.

E.g.

The RXI file below contains multiple bannerFile elements:

 
 <revPS appID="SYSPROG">
   <taskBarID>RevX.SYSPROG</taskBarID>
   <serverName>\\.\REVXPS_DEBUG</serverName>
   <queueName></queueName>
   <autoExec>REV_IDE</autoExec>
   <bannerFile dpi="96">revx.png</bannerFile>
   <bannerFile dpi="150%">revx_med.png</bannerFile>
   <bannerFile dpi="200%">revx_big.png</bannerFile>
   <caption>Revelation X Dev System</caption>
   <showBanner>1</showBanner>
   <showMonitor>1</showMonitor>
   <noSpy>1</noSpy>
   <hideEngine>0</hideEngine>
   <elevate>0</elevate>
   <minDisplaySecs>0</minDisplaySecs>
   <enginePath>C:\RevSoft\RevX.Dev</enginePath>
 </revPS>
  • When loaded onto a monitor running at 96DPI (or 100%) it will display the "revx.png" file.
  • When loaded onto a monitor running at greater than 96DPI but less than or equal to 144DPI (150%) it will display the "revx_med.png" file.
  • When loaded onto a monitor running at greater than 144DPI it will use the "revx_big.png" file.

caption

This option specifies additional text that appears in the OpenInsight IDE caption bar. This can be helpful in identifying different copies of an application on the same desktop.

cleanBoot

This option specifies if the IDE should be loaded with a "clean" workspace. It should be one of the following values:

  • 0 or null. Load the IDE as normal.
  • 1 – Clean workspace - do not load saved toolpanels or designers.
  • 2 – Clean workspace - do not load saved toolpanels or designers and reset all IDE settings to their default values.

devMode

This option should be a value of 1 or 0. It specifies if the application should be “opened” and load the OpenInsight IDE, rather than its nominated startup window. This option is ignored If the runMode or /RN command line switch is set to a value of 1 or 2.

enginePath

Specifies the path containing the Revelation virtual machine. By default the engine path is set to the same folder as the Presentation Server.

elevate

This option should be a value of 1 or 0. When set to 1 the application will attempt to load with admin privileges and asks the user for permission if necessary.

hideEngine

This option should be a value of 1 or 0. Specifies if the RevEngine window should be hidden when the application is started.

loginTemplate

This option specifies the name of a form to use as the custom login dialog template.

noSpy

This option should be a value of 1 or 0. Specifies if the “Event Spy” setting for the System Monitor is disabled.

minDisplaySecs

Specifies the minimum number of seconds to display the startup banner image for.

maxInstances

Specifies the maximum number of concurrent instances of the specified application allowed to run on the same workstation (not exceeding the overall licensed amount).

runMode

Specifies if the application should be executed in “runtime” mode. This means that the application will load its nominated startup window after login rather than the OpenInsight IDE. This option is not compatible with the “devMode” option: setting both “devMode“ and “runMode” to TRUE$ will result in the runMode option taking priority.

This option should be a value of 0, 1 or 2:

  • 0 or null. Runtime mode is not specified – allow DevMode to be set.
  • 1 – Runtime mode – allow any app
  • 2 – Runtime mode – allow specific app

suppressDPIAware

This option should be a value of 1 or 0. Specifies if the PS should be treated as a High-DPI application by Windows.

showBanner

This option should be a value of 1 or 0. Specifies if the splash screen is displayed when the application is started.

showMonitor

This option should be a value of 1 or 0. Specifies if the System Monitor should be visible after the application has been loaded.

serverName

Specifies the RevEngine “ServerName” string.

taskBarID

Specifies the string used to identify the PS instance on the Windows taskbar.

For each of the options specified in an RXI file there is a corresponding command line switch that can be used to override it, along with several switches that have no RXI equivalent.

Command line switches should be prefixed with the “/” character and separated from their value by “=”.

E.g.

C:\RevSoft\OpenInsight\Oinsight.exe /AP=SYSPROG /UN=REVCZAR

C:\RevSoft\OpenInsight\Oinsight.exe /RX=LI_DEV

Etc.

SwitchEquivalent RXI nameDescription
AE autoExec Specifies the name of a stored procedure to run at startup, after which the system is closed down.
AF autoForm Specifies the name of a startup form to execute after login.
AP appID Application ID. Specifies the OpenInsight application to load. If not present on the command line this defaults to SYSPROG (unless the RX switch has been specified).
BF bannerFile BannerFile (aka. Splash screen). Specifies the name of an image file to display during startup for 96DPI only. If this is not specified, the system looks for a file with the same name as the executable with a “.png” extension (i.e. "OpenInsight.png").
BN showBanner ShowBanner (1 or 0). Specifies if the splash screen is displayed when the application is started.
CA caption Caption. Specifies additional text that appears in the OpenInsight IDE caption bar. This can be helpful in identifying different copies of an application on the same desktop.
CL cleanBoot Clean Boot (0, 1, 2). Specifies if the IDE should be loaded with a "clean" workspace. It should be one of the following values:

* 0 or null. Load the IDE as normal.
* 1 – Clean workspace - do not load saved toolpanels or designers.
* 2 – Clean workspace - do not load saved toolpanels or designers and reset all IDE settings to their default values.
DV devMode Development Mode (1 or 0). Specifies if the application should be “opened” and load the IDE rather than its nominated startup window. This option is ignored of the runMode or /RN switch is set to a value of 1 or 2.
EP enginePath Engine Path. Specifies the path containing the Revelation virtual machine. By default the engine path is set to the same folder as the Presentation Server.
EL elevate Elevate (1 or 0). When set to 1 the application will attempt to load with admin privileges, and asks the user for permission if necessary.
HE hideEngine Hide Engine (1 or 0). Specifies if the RevEngine window should be hidden when the application is started.
NS noSpy No Spy (1 or 0). Specifies if the “Event Spy” setting for the System Monitor is disabled.
MD minDisplaySecs Minimum Display Time. Specifies the minimum number of seconds to display the startup banner image for.
MI maxInstances Max Instances. Specifies the maximum number of concurrent instances of the specified application allowed to run.
PW n/a Password. Specifies the password to use to log into the application.
RN runMode Runtime Mode (0,1, or 2). Specifies if the application should be “executed” and load its nominated startup window rather than the IDE.

* 0 or null. Runtime mode is not specified. Allow devMode/DV to be set.
* 1 – Runtime – choose any app to run. Overrides devMode/DV.
* 2 – Runtime mode – only run a specific app. Overrides devMode/DV.
RX n/a RXI file name. Specifies the RXI configuration file to use when starting the PS.
SD suppressDPIAware SuppressDPIAware (1 or 0). Specifies if the PS should be treated as a High-DPI application by Windows.
SM showMonitor ShowMonitor (1 or 0). Specifies if the System Monitor should be visible after the application has been loaded.
SN serverName ServerName. Specifies the RevEngine “ServerName” string.
TB taskBarID TaskBarID. Specifies the string used to identify the PS instance on the Windows taskbar.
TM loginTemplate This option specifies the name of a form to use as the custom login dialog template.
UN n/a UserName. Specifies the username used to log into the application.

The Presentation Server can be started in one of two modes: Development Mode or Runtime Mode.

  • Development Mode (devMode) means that the system will load the OpenInsight IDE after login.
  • Runtime Mode (runMode) means that the system will load the application’s specified startup form after login

The mode is controlled by a pair of options in the RXI file (runMode and devMode), and a corresponding pair of command line switches (/RN and /DV).

  • The devMode (or /DV switch) can be set to 0 or 1 – setting it to the latter will load the OpenInsight IDE after login. This is ignored if the runMode is “1” or “2”.
  • The runMode (or /RN switch) can be set to 0, 1 or 2:
    • 0 or null. Runtime mode is not specified – allows DevMode/DV to be set.
    • 1 – Runtime mode – allows any app to be selected in the login form.
    • 2 – Runtime mode – only allows specific app to be selected in the login form. The application ID must be specified by the appID attribute in the RXI file, or the /AP switch on the command line.

If neither options or switches are set then the system defaults to using a runMode value of 1. However, the login form displays a “Run Application” checkbox that can be unchecked to allow the system to be loaded in Development mode if desired.

  • guides/oi10/presentation_server_model/010_introduction.txt
  • Last modified: 2024/03/29 13:26
  • by 127.0.0.1