GPS Skinner: Documentation

This section contains in depth documentation on how to create your own skins for GPS Skinner.

Synopsis

The magic behind GPS Skinner is the ability to create an on-the-fly user interface from a skin file. Skin files tell the application what pages you want and what objects you want on each page. Skin files are plain text files with a generic *.txt extension. The reason for this is to allow editing via many text editors on the desktop or directly on your Windows Mobile device.

Table of Contents

File Layout
Page Object
Font Object
Colour Object
Text Object
Hot Spot Object
Graphics Object
Widget Object
Map Object
Advanced Options
Limitations

File Layout

Since GPS Skinner skins files are nothing more than text files, other text files must be eliminated if the user attempts to load a text file which is not a skin file.

In order to achieve this the first line of any skin file must be "GPS SKINNER" (without the quotes). If this isnt the first line of the text file the application will not load the text file.

Skin files should generally follow this layout;

Header (ie GPS SKINNER)
Fonts
Colours
Page 1
Object 1
Object 2
Page 2
Object 1
Object 2
...
Page X
Object 1
Object 2
etc

The file is read sequentially and hence objects are considered to be part of the last page declaration. Fonts and colours are considerd to be global declarations which span an entire skin file.

Example;
GPS SKINNER
FN|0|Tahoma|18|0|0
CL|0|255|255|255
PG|0|First Page|Tutorial.bmp
TX|This is the first page|12|12|232|22|0|0|C
PG|1|Second Page|Tutorial.bmp
TX|This is the seond page|12|12|232|22|0|0|C

The example skin file above contains 1 font declaration and 1 colour declaration. The skin also declares two pages which contain one text object each. Numbers must start at zero for all declarations.

Variables for objects are divided by a pipe symbol (ie "|") and generally follow the trend of;

Object Type|Text or Style|Left Co-ordinate|Top Co-ordinate|Right Co-ordinate|Bottom Co-ordinate|Option 1|Option 2 etc

The co-ordinates refer to a bounding rectangle for the object. For graphical objects this is used to calculate the extents of the object. Text objects are more forgiving in that they can go over their bounding rectangle if the text is longer than the area assigned.

Page Object (PG)

The page object is declared with the text "PG".

Example;
PG|0|First Page|Tutorial.bmp
PG|1|Page 1|1

The object  has the following options;

Declaration|Page Number|Page Name|Page Background (image name or colour number)

The page name can be any text up to 60 characters in length. The page  background can be any bitmap image or a predefined colour. When using an image specify the file name of the image, the image should be in the same directory as the skin file. When using a colour the background will be a solid fill using the colour specified.

Font Object (FN)

The font object is declared with the text "FN".

Example;
FN|0|Tahoma|18|0|0

The object  has the following options;

Declaration|Font Number|Font Name|Font Size|Bold Flag|Italic Flag

The font name can be any installed font on your device. If you are unsure what font you have on your device take a look at the fonts listed in Word Mobile. Additional fonts can be installed to your device by copying true types fonts from your PC to the \Windows\Fonts directory on your device (via ActiveSync).

The font size can be any valid font size (in points).

The bold flag specifies if the font is bold or not.

The italic flag specifies if the font is itaic or not.

Colour Object (CL)

The colour object is declared with the text "CL".

Example;
CL|0|255|255|255

The object  has the following options;

Declaration|Colour Number|Red Value|Green Value|Blue Value

Colours are specified using RGB values. Each colour is built up using the red, green and blue components of the colour.

Text Object (TX)

The text object is declared with the text "TX".

Example;
TX|This is the first page|12|12|232|22|0|0|C

The object has the following options;

Declaration|Text|Left|Top|Right|Bottom|Font Number|Colour Number|Text Alignment

The font number is any font number that has been declared earlier.

The colour number is an colour number that has been decalred earlier.

The text alignment can be either "L", "C" or "R"  which stand for left, centre or right justification.

The text can be user text (eg "This is the first page") or it can be a system generated text (eg #SPEED_CURRENT)
User text can be any free text except for the pipe (ie "|") character. There is no word wrapping at the moment.

System text is declared with a "#" symbol prefix and can be any of the following;

Hot Spot Object (HS)

The hot spot object is declared with the text "HS".  Hot spots are areas that generate an action when tapped by the user such as switching to a different page or resetting the trip meter.

Example;
HS|PAGE_NEXT|0|0|33|31|0

The object  has the following options;

Declaration|Hot Spot Type|Left|Top|Right|Bottom|Hot Spot Option

Each hot spot allows the perform an action by tapping anywhere in the rectangle defined by the object. The declaration is followed by a type which can be any of the following;
Note: Only the PAGE and TRIP_X hot spots use the option flag at the present time. All other hot spots should however include the option declaration (just add a "|0" to the end of the hot spot definition).

Graphics Object (GR/RD/GA)

The graphics objects are declared with either of the following texts "GR", "RD" or "GA". These stand for graph, radial graph and gauge respectively. Each graphic shares similar attributes but are obviously different when displayed.

Example;
GR|ACCELERATION|90|35|230|100|3|3|7|8
RD|ACCELERATION|10|75|85|130|0|0|7|8
GA|ACCELERATION|10|35|85|70|5|0|0|3

The object  has the following options;

Declaration (Style)|Type|Left|Top|Right|Bottom|Font Number|Colour 1|Colour 2|Colour 3

The declaration is also the style of the graphic, which determines what the graphic looks like. The type is what the actual graphic will show in terms of data. It can be any of the following;
These values are the same as their textual counterparts but they are displayed graphically. Each graphic type can display any of these types of data.

The left, bottom, right and top values determine a bounding rectangle for the graphic object. The display of the graphic will be contained withing this rectangle. The graph and gauge graphics will be fitted to the extent of the graphic while the smallest dimeniosn (ie width or height) will form the diamtere of the radial graph.

The three colour are as follows (ie Colour 1|Colour 2|Colour 3);

Graph - Text|Grid Lines|Value Line
Radial Graph -Text|Value Outline|Value Fill
Gauge - Text|Gauge Outline|Gauge Value

Widget Object (WG)

The widget objects are declared with the text "WG". Widgets are unique graphical elements that show information in a specific manner 

Example;
WG|CLOCK|10|70|230|175|3|0|2|3|4
WG|SPEEDO|15|25|225|175|1|0|2|6|5
WG|SATELLITE_SKY_PLOT|15|25|225|175|3|0|0|4|6

The object  has the following options;

Declaration|Type|Left|Top|Right|Bottom|Font Number|Colour 1|Colour 2|Colour 3|Colour 4

The type of the widget is what determines how the widget looks, the following widget types are currently available;
The font number is any font number that has been declared earlier.

The colour number is an colour number that has been decalred earlier.

The text alignment is handled automatically by the widget.

The left, bottom, right and top values determine a bounding rectangle for the widget object. The display of the widget will be contained within this rectangle.
The fours colours are for different aspects of each widget. In all cases colour 1 will be the colour of the text (and ocassionaly something else). Refer to the table below;
Widget Type
Colour 1
Colour 2
Colour 3
Colour 4
COMPASS
Text
Outline/Tics
North Fill
South Fill
WAYPOINT_COMPASS Text Outline/Tics Right Fill Left Fill
CLOCK/CLOCK_UTC
Text/Outline/Tics
Hour Hand
Minute Hand
Second Hand
SPEEDO
Text
Outline/Tics
Needle Outline
Needle Fill
ACCELEROMETER
Text
Acceleration Fill
Decceleration Fill
Not Used
SATELLITE_BARS
Text
Outline
Active Satellite Fill
Non-active Satellite Fill
SATELLITE_SKY_PLOT
Text
Outline
Active Satellite Fil
Non-active Satellite Fill
ALTIMETER
Text/Outline/Tics
10 000's Fill
1000's Fill
100's Fill

Map Object (MP)

GPS Skinner can utilise internet mapping services (Google only at the moment) to display a map of your location. Maps are declated with the text "MP".
Example;
MP|GOOGLE_MOBILE|0|0|200|200|12|3|6
MP|GOOGLE_ROAD|0|0|100|100|12|3|6
The object  has the following options;

Declaration|Type|Left|Top|Right|Bottom|Zoom Level|Marker Colour|Marker Radius

The type is map style. It can be any of the following; GOOGLE_MOBILE (left) or GOOGLE_ROAD (right). The GOOGLE_MOBILE offers a map more suited to mobile devices. Google Maps does not currently offer a satellite map style in their static map API.


The marker is your current location in relation to the map (see red dot in picture below). Initially it will be in the centre of the map but will move as your location changes. When the marker reaches the edge of the map the map will be refreshed and the marker will be placed in the centre of the new map.
 
Note: You must have an open internet connection on your device in order to use the map object. The maps do not work in a disconnected fashion as this violates the Google Maps terms of use.
Note: The map is refreshed automatically when the marker is within 5 pixels of any edge of the map. Thus a 200x200 pixel map may initially be a bigger download it may result in less download traffic if the marker stays within the bounds of the map. Also using a smaller zoom value will keep the marker on the map for longer since the map covers a larger region. 

Advanced Options

GPS Skinner has several advanced options that can be used to customise the application even further through the skin file. Options are declared at the top of the skin file where fonts and colours are declared. Options are declated with the text "OP".
Example;
OP|FULLSCREEN
OP|MIRRORSCREEN
OP|NOMENU
The following advanced options are currently available;
The NOMENU option should be used with caution as settings cannot be accessed or the application cannot be exited if no alternative hot spots are set up to provide this functionality. As of version 1.4 you can bring up the popup menu by using the tap-n-hold technique or pressing zero on the device key pad.

Limitations

GPS Skinner is currently limited to 15 Pages per skin file.
Each page can however contain;