Thursday, July 06, 2006

Custom Toolbars in Pocket GTViewer

Since version 1.0 of Pocket GTViewer released in 2000, the toolbar has been relatively consistent and fixed. There was an addition of the Raster toggle button in Version 3, but no other changes. The Yellow and Blue Star buttons always provided a small degree of customizability since they can be assigned to any external application, the GPS, Query, and Application dialogs. However, the 8 slots you get on standard Pocket PC or Window Mobile devices is very restricting and this limited number of slots is very difficult to make all users happy.

With version 5.0.x.15 of Pocket GTViewer, there are two major changes to the toolbar. First, new images have been provided specifically for Hi-Res devices. The standard toolbar images worked, but they became very small on a Hi-Res Device. The second major change is the support for up to 5 custom toolbars. These custom toolbar are defined in your .GTM file in the [Additional Properties] section or in an AddProp.ini file. The toolbar entries simply specify the Command to perform and an Image to use for each button on the toolbar. A few new commands have been added to facilitate this new feature even more. The Next Toolbar command can be used to jump to the next custom toolbar (you can have up to 5). So, if you put a button on your toolbar and associate it with the Next Toolbar command, you can scroll through up to 5 different toolbars; then it wraps around to the beginning. Currently, there are 55 different images to choose from for 40 different Commands (which mostly correspond to the menu items).

Let’s look at an example. The following screenshot shows a toolbar similar to the standard:



There are a few differences here from the traditional toolbar in Pocket GTViewer. The first icon looks like the Zoom command, but it is has been assigned to the Attribute Info command. The Zoom and Attribute Info commands on the toolbar were a little redundant anyway, so this is a way to customize the toolbar to get the most usability. The last button on the toolbar (three right facing arrow heads) has been assigned to the Next Toolbar command and pressing it will take you to the next toolbar as seen below:



The second toolbar still contains the Attribute Info/Zoom command at the beginning (since it is useful for all toolbars), but it contains all of the Drawing commands instead of the general list of commands. The second toolbar also contains the Next Toolbar command. The third custom toolbar is show below:



This toolbar contains all of the GPS commands, plus the Attribute Info/Zoom and a Fit. A special command has also been added to immediately start or stop GPS tracking without going through the normal GPS Tracking dialog. Pressing the Next Toolbar from the third custom toolbar will take you back to the first custom toolbar (since there were no other toolbars defined).

The customizable toolbars can also be used to make you external applications more recognizable. For example, the GT/Field icons (from the Desktop version of GT/Field) can be used instead of the Yellow and Blue Stars:



Another benefit of the customizable toolbars is the ability to add more than 8 buttons. You may wonder why this is important since only 8 buttons will fit on a screen. That is a good point, but with Landscape mode and differently shaped screens provided by newer devices, it is possible to fit more buttons on certain devices.

No comments: