Page Modules

By convention, page modules are defined in the Pages subdirectory within your application directory, or within the Pages subdirectory of an OEM layer upon which another application is based (any pages defined in the AppMod.src root files of a parent application can be shared by all applications based upon it – see AppMod.src Root File for a Standard Application). The pop-up dialog boxes in a VTS application are also configured as pages.

The page modules have two local variables that are used to define the background color and the title for the system page. These variables are:

      Color

      DrawLabel

Page Module Color Variable

The Color variable identifies the name of a configuration file variable (in the application's Config.ini configuration file) whose numeric value specifies the color index of the background color to be used for the page. If the numeric color index is not initialized in the application's AppMod.src root file (see AppMod.src Root File for a Standard Application), or in its Config.ini configuration file, the background will default to black. For background color, the Display Manager uses the DefaultBGColor variable defined in the Code module to set the background color if the Color variable is Invalid.

Page Module DrawLabel Variable

The DrawLabel variable identifies the name of a configuration file variable (in the application's Config.ini configuration file) whose value specifies the text to be used as the page's title. If the DrawLabel variable is missing or the Config.ini configuration file variable specifying the text for the page is missing, the default value of the Title variable is used.

The operation of the Color and DrawLabel variables defined above allows end users to modify the background color and title of the page in your VTS application without having to access the application's code. This is particularly useful in situations where standard page names must be translated into another language, or otherwise customized for a particular application. Many of VTS's labels are configured in the same way; a variable in the code points to a Config.ini variable that in turn provides the text for the label.

The Pages library automatically manages these values for the pages of your application when you generate a page and configure its properties from within the application while it is running.

The default Display Manager has a print button in its title bar which calls a module called "Page\PrintPage()". This PrintPage module executes within the currently displayed page and prints it in a graphic format.

The Code module (see VTS Application Module Organization) also has a PrintPage() module which performs a window print. If the page does not have a PrintPage() module, the Code module's PrintPage() module is executed. The Code module's PrintPage() module allows specific pages to print in a text format, rather than in the graphic format. An example is the default Alarm page; rather than graphically printing the alarm page, whose alarm list is text-based, the Alarm page's alarm list is printed in a text format.