1.0 General
2.0 Installation
3.0 Uninstalling
3.1 Uninstalling Previous Versions
4.0 Implementing Themes
4.1 PDA Toolbox Users
4.2 C/C++ Programs (BIN Resource)
4.3 PilRC Usage (RCP File)
5.0 Product Limitations and Requirements
6.0 Revision History
7.0 Questions/Comments/Bug Reports
8.0 Purchasing UIColorTheme
LICENSE AGREEMENT
UIColorTheme creates color theme resources for use in PDA ToolBox(tm) generated applications and in C/C++ projects that support importing .BIN resources or PilRC scripts. The resource is comprised of a Palette Table type (‘tclt’) table that provides User Interface objects with color information. There are 22 user configurable color items for Non-Japanese Palm (tm) OS systems, and 27 user configurable items for the Japanese Palm(tm) OS systems. All are displayed in a Drop-down menu for selecting and configuring a color theme.
Colors of UI items are displayed as represented in a WYSIWYG format of the UIColorTheme application as shown above.
NOTE: PDA Toolbox Users |
1) Open the UIColor.Zip file and extract all the files into the folder of your choice.
2) Make a shortcut to the UIColorTheme.exe application on your desktop or into the Start/Programs/PDAToolbox startmenu.
When you run UIColorTheme, if you get an error message indicating that a DLL file is missing, you will need to download and install the VB6 Runtime Package.
This is available for free from the following locations:
http://download.microsoft.com/download/vb60pro/Redist/sp4/win98/EN-US/VBRun60sp4.exe
http://www.tweakfiles.com/misc/vb6.html
http://www.zdnet.com/downloads/stories/info/0,,000Y8M,.html
NOTE: PDA Toolbox Users |
Uninstalling may be performed through your Control Panel’s “Add/Remove Programs” or may be done manually by removing the UIColorTheme folder and deleting any shortcuts on them Windows menu or desktop.
The previous versions of UIColorTheme were intended for PDA Toolbox owners only. One of the requirements was the UIColorTheme.exe and associated files had to be installed into the PDA Toolbox application folder. This is no longer required and you may install a single copy and use it for all versions of PDA Toolbox and other development tools.
To uninstall the prior UIColorTheme:
Install the new UIColorTheme application and ensure it is working.
In each of your PDA Toolbox folders, delete UIColorTheme.exe.
In each of your PDA Toolbox folders, delete DEBUG.ORG.
In each of your PDA Toolbox folders, delete tclt277c.bin.
For convenience, your can create a shortcut to the new UIColorTheme.exe.
You can implement a color theme in any Palm OS application with literally zero lines of code. A special system resource ‘tclt 10108’ exists in OS 3.5 through 5.0 which has the color settings for the user interface. If you provide a theme resource in your own application with the same ID (tclt 10108), then it will be automatically loaded. No coding required.
For OS’s later than 5.0, the OS itself supports themes through the Prefs application. It does not support the tclt 10108 resource. So, in this case, and probably in the most general case, you will want to add a bit of code to save the current color theme and set your application’s theme manually.
In all cases, if the minimum OS for user interface color themes is Palm OS 3.5. If the device does not support themes, then they are simply ignored.
To generate the correct resources for PDA Toolbox, first select the “PDA Toolbox™” option in the “Generate” frame of UIColorTheme and then click the (Install to PDAT) button.
PDA Toolbox supports themes only for devices that support the ‘tclt 10108’ resource so there is no coding required.
PDA Toolbox developers do not need to do anything other than to compile their applications with a theme previously installed into their development system. Until the theme is changed, or removed, every application that’s generated will contain a default system theme.
If a PDA Toolbox developer wishes to allow their users to choose from different, predefined themes, then the application may use the $Theme ID action and be post-compiled with PDAT/Advanced from Sands USA (www.SandsUSA.com/PDAT).
To generate the correct resources for C/C++ compilers, first select the “BIN Resource” option in the “Generate” frame of UIColorTheme and then click the (Create BIN Resource) button.
The BIN resource that you save should go into the compiled resource folder of your C project. In MetroWork’s CodeWarrior, for example, it would often go into the “\rsc” folder under your project. To complete the hookup, create a text file, say, “CustTheme.r” in your resource folder with the line:
read 'tclt' (1000) "tcltDefault.bin";
Or whatever you named your BIN file. Include one line for each of your binary resources. The 1000 is the ID and should be unique for each ‘tclt’ resource.
I recommend not using the default system resource ‘tclt10108’ as the method for adding a theme to your application. Your best strategy, is when your application starts, save the current color settings to a variable that can be used to restore the OS or user’s color scheme and set your application’s color theme manually. If you don’t need to ever restore the color theme (it is not required at program termination), then you just need to set the initial theme up.
Here is a routine that will load a theme resource from your application’s resources and make it the active theme:
static void ThemeSet(DmResID ThemeID) { UInt16 I; MemHandle tTHM; MemPtr tTHMptr; RGBColorType *cteP; if (!CheckThemeOK()) return; // Get the theme resource tTHM = DmGetResource('tclt', ThemeID); if (tTHM) { // And move it into the UIColorTable tTHMptr = MemHandleLock(tTHM); cteP = ColorTableEntries(tTHMptr); for (I=0; I < UILastColorTableEntry; I++, cteP++) UIColorSetTableEntry(I, cteP); MemHandleUnlock(tTHM); DmReleaseResource(tTHM); } } |
See the complete CSAMPLE project for more details on using and selecting themes from your application.
For any development environment that supports Aaron Ardiri’s PilRC resource compiler, you can have UIColorTheme create a compatible resource script.
To generate the correct resource for the PilRC compiler, first select the “PilRC Definition” option in the “Generate” frame of UIColorTheme and then click the (Create PilRC Script) button.
The will create a script for a theme that has an ID of 1000. Edit or merge this script into your project and you will be good to go.
See the PilRC documentation for details on compiling resource scripts.
UIColorTheme.exe will run on all versions of Microsoft Windows™ through Windows XP and Windows 2003.
Applications generated will run in color on all Palm OS® color models. The applications will ignore the color theme information for devices not capable of color.
The PDA Toolbox generation mode is for PDA Toolbox Version 3.2 and higher.
August 24, 2003 - Version 2.0 Build 9
August 16, 2003 – Version 2.0 by Richard R. Sands dba Sands USA
August 10, 2001 - Initial Release by PR Anderson
Please email your questions, comments, and bug reports to:
Or join the PDA Support forum at www.PDATNutsAndBolts.com.
The UIColorTheme package is shareware and can be purchased from www.SandsUSA.com for US $10.00. Once the unlock key is entered, all features become available.
This Agreement sets forth your licensed rights to use "UIColorTheme" and is granted to you upon condition that you accept the terms of this license. Your electronic indication of agreement, or your use of the program constitute acceptance of all of the terms of this license.
The program copy and documentation are furnished to make "UIColorTheme" available for your use and remain the property of the author.
IF YOU DO NOT AGREE WITH ANY PART OF THIS LICENSE, DO NOT USE THIS SOFTWARE. Delete "UIColorTheme" and all associated files from all media on which it has been copied.
THE LICENSED PRODUCT
"UIColorTheme" comprises copyrighted computer programs for the development of color resources and theme files. The Licensed Product is in its entirety protected by copyright. YOU MAY NOT DISTRIBUTE THE LICENSE KEYS.
YOUR USE OF THE LICENSED PRODUCT
General Use. You have the right to use for the specified purpose of the licensed product.
LIMITATIONS ON USE
General Use Limitations. You have no right to reproduce, transfer, publish or otherwise distribute the "UIColorTheme" software. You may freely distribute themes and/or resources generated by "UIColorTheme".
THE AUTHOR RESERVES ALL RIGHTS NOT SPECIFICALLY GRANTED BY THIS LICENSE.
WARRANTIES, WARNING, DISCLAIMER
Warning and Disclaimer of All Warranties. THE PROGRAM IS FURNISHED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, IN ALL JURISDICTIONS WHERE ALL WARRANTIES MAY BE DISCLAIMED IN THE LICENSING OF INTELLECTUAL PROPERTY.
IN NO EVENT SHALL THE AUTHOR BE LIABLE TO LICENSEE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES OR PROFITS, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
PDAT/Advanced is copyrighted by Richard R. Sands dba Sands USA
PDA Toolbox is copyrighted by Paul Prejean.
Quartus RsrcEdit is apparently not copyrighted, but is maintained by Quartus at www.Quartus.net.
Windows is trademarked by Microsoft
And ever the ever present...
Palm OS, Palm Computing, HandFAX, HandSTAMP, HandWEB, Graffiti, HotSync, iMessager, MultiMail, Palm.Net, PalmPak, PalmConnect, PalmGlove, PalmModem, PalmPoint, PalmPrint, and PalmSource are registered trademarks of Palm, Inc. Palm, the Palm logo, MyPalm, PalmGear, PalmPix, PalmPower, AnyDay, EventClub, HandMAIL, the HotSync logo, PalmGlove, Palm Powered, the Palm trade dress, Smartcode, Simply Palm, WeSync, and Wireless Refresh are trademarks of Palm, Inc.
eod