PDoc-TXT Format

Created by: Lester Caine, Last modification: 12 Oct 2010 (12:09 BST)

Text File Data Format

The system will display files with raw text provided that they follow the attached layout format.
Once the layout has been defined for a particular information page, that format can be called up as an outline onto which automatically generated pages of information can be displayed. The format allows for different header and footer layouts to be added to a standard set of display data, providing for different display devices without having to modify the information generator.

A fixed background can be selected, and the text inserted into a window area of that background. With careful planning, the header line can be overlayed with a 'blank' line for any fixed text on the blank. ( Background picture load still has to be checked. )

The system works on a simple fixed height line basis, with one font and colour set per line, and allows a number of options per line. An expansion to the system allows for up to two columns of tabbed  information to be displayed on the one page, for use with wide format display devices.
For single column displays, a variable number of lines can be displayed depending on the font used, while the two column mode provides for a header line across the whole display, followed by a tabbed list of information for the first column, a tabbed list of information for the second column, and optional bottom lines across the whole display.

The justification options for each line provide a basic left, centered, and right justified single line of text, along with a left and right justify for a pair of text entries. The tabbed option includes up to 4 tabbed columns with adjustable left and right edges, and facilities to highlight or right justify an entry inside the column area.

Profiles

An facility has been provided to use a 'Profile' to define the layout for the page. This profile can be stored locally on the display controller, which will reduce network traffic, but requires the Profiles to be downloaded as they are updated. The contents of the display pages is always accessed direct from the main file server.

A number of profile sub-directories are added to the \DATA\PROFILE section with the same set of names as the Picture section. This allows different formats to be used for each different screen orientation or resolution. A single Arrival list and Departure list can then be created, but will be output with the correct layout.

A section added to the text file calls up the required profile
[Blank]
Title=ProfileFileName

The profile file is then used to provide the [Layout] and [Font] sections, along with the formats for the [Body] section. In order to override lines in the TEXT file, any lines included in the profile will be used before accessing the contents of the text page. This allows the correct arrangement of header and footer information to the added to a simple summary list or similar page.

Title Section
This section is kept for notes and defines the type of page being managed when working with automatic pages

[Title]
Name=Colour and Font Test Chart
Type=1
This entry controls the method of converting text files to images for display, or to reformat text pages to other serial output formats such as DVC's or LED displays.

0 - Do not display page ( i.e. Blank pages of NTI Sequence )
1 - Normal Display
2 - NTI Platform Display
3 - Departure Summary Display
4 - Arrival Summary Display
5 - Ticket Validity
6 - NTI Special Notice ( Connection Information )

Layout Section
This section defines the page layout and background along this the fine detail of tabbed columns

[Layout]
HorPos=0
Horizontal position of text area on screen
VertPos=0
Vertical position of text area on screen
Width=1024
Width of text area on screen
Height=1024
Height position of text area on screen
BackgroundPic=NONE
Picture to be used as background on screen
BackgroundColour=0
Colour used for rest of area outside text area, and highlight text colour
(An entry of 16 indicates transparent, which allows the background picture to be visible)
ForegroundColour=15
Default text colour, and background colour for highlighted text.
LeftTabs=     100,200,300,400
RightTabs=100,200,300,400,500
This defines the left and right edges of the tab positions. The first Left tab is HorPos, hence the gap above the first right tab.
    (This sets up the tab positions for Justify 4)
Offset=428
This defines the horizontal position of the second colum of information, the actual text position is given, with a vertical line being added 10 pixels before this.

Shift=1

This defines the first line of display that is to be drawn in two columns.

Step=0

This defines the the number of lines of header that are added to the second column before the original data is displayed.

As an example, Departure summaries are Shift=1 and Step=1, where they have a single line header, and add a second column header line at the start of the second column.

While Horizontal NTI's are Shift=2 and Step=0, where the first two lines are used as full width headers, while the two columns are displayed x on the left followed directly by x on the right.

Font Section
This section is used to define the font sizes used for the page. Up to 8 different sizes can be used, either with the same font, or a number of different fonts as required. Only the number of fonts actually used need to be loaded, unused fonts will just add unnecessary load on the display computer.

[TXTFONT]
N=A
The number of fonts required

FontNo0=50,20,300,LucidaSans
FontNo1=40,15,300
FontNo2=32,12,300
FontNo3=50,20,300,CooperBlack
FontNo4=
FontNo5=
FontNo6=
FontNo7=
 The font number is used in the BODY section to select a font size for a line
 Number 1 = Height of character in pixels - this includes white space above and below as defined by font
 Number 2 = Width of character in pixels - for proportional fonts this is the width of the average character
 Number 3 = Boldness (see Microsoft for explination!)
 Fourth entry is the font name, which is only required when it changes

Body Section
Each line of the display is defined by a pair of entries, an LFx and an LTx. The LF entry defines the format for the line while the LT entry contains the text to be displayed. Since the LF entry can be picked up from the PROFILE file, a simple text page would consist of an entry to select the profile, and a set of text to be displayed.

[Body]
N=24
Number of lines making up page
When there are two columns, each entry in the list counts, so that the number will be the total number of column entries + the header and any footer lines.
The number of lines actually displayed may be less than that called for, if the fonts sizes do not permit all of the information to be displayed.

LFx=2|0|15|0|

 Number 1 = Font (from list above)
 Number 2 = Colour of text
 Number 3 = Colour of background (16 = Transparent allowing picture to show)
 Number 4 = Justification
 The justification is to be sorted. Tabs= entry above allows columns of text to be built at fixed positions, while also using centered, and right justified.
Justify Types
 0 Left and Right (Two segments of text Justified Left and Right)
 1 Left Justify
 2 Center
 3 Right Justify
 4 Tabbed Columns (4 Columns are allowed)
+8 Where a justify entry has had eight added to it, it indicates that the line is displayed in the second column.

Lines do not need to be included when they are the same as the line above, the previous line information is used as the default for a following line, so blocks of information can be managed simply by editing the first line of the sequence.

LTx=|Colour Test Chart|Colour 1|

Up to 4 segments of text can be added to a line, but how many are used will depend on the justify mode selected.
 The vertical bar character is used rather than <tab> as it is easier to view when manually coding pages, also Windows 98 can not read <tab> characters from the text file.
In order to control fine detail in the columns of a tabbed list, the first character in each segment of text is used as a flag character and will define how a column is displayed. Currently there are only two special modes, highlight(!) and right justify(>), but other modes can be added as required.
( It was originally intended to use control characters for this purpose, but while it works beautifully on NT, Windows 98 treats all control characters as <end of line> when reading text files, so screws up the text )

Graphics Section

There are two levels of switch to enable the graphics facilities. Firstly the DCSlave registry entry must be set for Graphics=1, and then the switch enable must be present in the profile file. The second element allows individual control of graphics elements dependent on the output display device, providing a means of removing some elements from certain devices.

[Graphics]
Enable=31
// Bitwise switches to enable each element of the graphics pallet

// 1 = Header
// 2 = Second Logo
// 4 = Icons
// 8 = GIF animation
// 16 = AVI Clip Viewer

The system allows for up to two logo's to be displayed from a variable length pallet of logo's. Two versions of the pallet are required, one with the elements horizontal, and the other vertical, for the different orientations of displays. These pallets must be present in the /Profiles/Logos section along with a halve size horizontal version for the operator mimics.

Head=x

This will be in the Text.TXT file and selects the number of the logo from the pallet.

The following entries will be in the Profile.TXT.

HeadTop=10

The pixel position down the screen for the first logo location ( vertical displays are handled without reference to any rotate )

HeadLeft=10

The pixel position from the left of the screen for the first logo location ( vertical displays are handled without reference to any rotate )

HeadHeight=50

The pixel height of the first logo ( vertical displays are handled as if viewing normally )

HeadWidth=200

The pixel width of the first logo ( vertical displays are handled as if viewing normally )

Second=x

This will be in the Text.TXT file and selects the number of the logo from the pallet.

The following entries will be in the Profile.TXT.

SecondTop=10

The pixel position down the screen for the second logo location ( vertical displays are handled without reference to any rotate )

SecondLeft=10

The pixel position from the left of the screen for the second logo location ( vertical displays are handled without reference to any rotate )

SecondHeight=50

The pixel height of the second logo ( vertical displays are handled as if viewing normally )

SecondWidth=200

The pixel width of the second logo ( vertical displays are handled as if viewing normally )

Icons=x

This will be in the Text.TXT file and is a bit map of the icons to be selected from the icon pallet.

The following entries will be in the Profile.TXT.

IconsTop=100

The pixel position down the screen for the icon strip location ( vertical displays are handled without reference to any rotate )

IconsLeft=30

The pixel position from the left of the screen for the icon strip location ( vertical displays are handled without reference to any rotate )

IconsSize=50

The pixel hight of the icons ( icons are currently assumed to be square to simplify arrangement horivontally or vertically )

// Gif inimations are currently disabled due to a memory leak problem, the section is left in for information with the intention that it will be restored later

Animate=x
This will be in the Text.TXT file and is set to 1 to enable the .

The following entries will be in the Profile.TXT.

AnimFile=postfield.gif

The file name of the animation to be used. If this has not changed from the last update, then the display is not updated, so any changes to animation files will only be picked up when the program is restarted, or alternatively change the file name.

( This is to reduce memory growth associated with a new file load )

AnimTop=10

The pixel position down the screen for the animation window ( vertical displays are handled WITH DIRECT reference to the actual window not rotated )

AnimLeft=10

The pixel position from the left of the screen for the animation window ( vertical displays are handled WITH DIRECT reference to the actual window not rotated )

AnimHeight=200

The pixel hight of the animation window on the RAW display

AnimWidth=200

The pixel width of the animation window on the RAW display

Video=x

This will be in the Text.TXT file and selects the number of the logo from the pallet.

The following entries will be in the Profile.TXT.

VideoFile=postfield.avi

The file name of the animation to be used. If this has not changed from the last update, then the display is not updated, so any changes to animation files will only be picked up when the program is restarted, or alternatively change the file name.

( This is to reduce memory growth associated with a new file load )

VideoTop=10

The pixel position down the screen for the animation window ( vertical displays are handled WITH DIRECT reference to the actual window not rotated )

VideoLeft=10

The pixel position from the left of the screen for the animation window ( vertical displays are handled WITH DIRECT reference to the actual window not rotated )

VideoHeight=200

The pixel hight of the animation window on the RAW display

VideoWidth=200

The pixel width of the animation window on the RAW display

 

 

Sample Simple Text File
This is a simple 12 line page using one font and centering each line on the page.

Sample Page using Profile
This is a sample departure summary, with various demonstration entries such as Highlighted times and right justified platform column.
The file can be displayed with either of the following profiles.

Sample Profile File
This is a simple profile for a VGA resolution horizontal display, giving 11 lines of departure information, with two header lines, and a footer line used inplace of line 14 from the departure summary file.

Sample Two Column Profile
This provides for the same display but on a horizontal plasma monitor. 24 lines of information in two columns, along with the header and footer displays.