Last updated at 2:01 pm UTC on 16 January 2006
Update April 9, 2003
In early February 2003, someone wrote to me (Stephan B. Wessels) again asking if I would please port the old skins code over to Squeak version 3. Fact of the matter is, I did not want to port the old skins code because of a number of outstanding issues. However, I did start working on a re-write a few weekends ago and this is a PRELIMINARY result. It's actually quite functional.
This code is operational using Squeak 3.4, 3.5 beta and 3.6 alpha.
This new model attempts to accomplish a couple of goals that I saw as defects in the original skins model:
- Use "standard" theme files from the open source Linux world.
- Replace existing morphic components in the skinned window by finding them dynamically and not requiring special subclassed window code.
- Provide a way to delete a theme and restore the window to it's original state.
I've accomplished those goals. Also, the framework can be extended to support other imported theme files. At this time the skins framework will import the "Ice Window Manager" themes directly as can be found at a site like http://themes.freshmeat.net. I have successfuly imported and tested more than 40 themes from that site in Squeak with this new skins code. No special handling of the theme files is required. Just uncompress them and tell Squeak where to find them. More about the actual skins theme process later...
The nice part about this approach is that I don't have to concern myself with distibution of themes and art work. Lots of existing themes already exist and are being added regularly. The Ice Window Manager themes were selected as my first importer because they seemed to be the easiest to understand and seem to be standard forms-based theme designs. Forms-based themes are the easiest to write. At this time window title bar, title bar buttons and window borders are imported and managed by the skins framework. I'm also using theme definition information for window border thickness and colors if the theme does not supply window border forms.
The old skins code required special subclasses of standard windows to override and install it's pieces. This new model make some intrusive changes to the SystemWindow architecture, but not really much, and performs a "swap out" of the morphic components that comprise the window with new ones created by the skin. Also, this technique allows me to easily remove a skin from a window with it's window menu. The original widow shape and style is restored completely. You can even skin selected windows and leave others alone. This approach does allow for the condition where you could have multiple skins installed on windows at once. Every open window could wear it's own skin. User interface folks would have a fit over that one, but you can try it out. There's a Preference to contol automatic skin application. The preference controls application of skins to systems menus too.
3 preliminary change sets must be installed before the skins change set can be installed and used. The "dialogs", "xpm-support" and "importer-support" change sets must be installed first. The skins change set is named "skin-importer".
After you install the 4 change sets, you will need to download some theme files from the site mentioned above. Some of the ICE WM themes work better than others. Ones that I have used with Squeak and like include "18k", "aesthete", "aeteria", "Athens", "beamer", "bluecrux", "bluesteel", "Eazel", "helix", "Mars", "ubicande", and "xp new".
When you uncompress the themes they create individual folders. Put the whole batch of folders anywhere. The first time you try to use one after an image startup the skins framework will ask you for the location of these folders. The .
A Preference is added to the #skins category to support automatic creation of windows using the "current" theme. The easiest way to establish a skin for a window is to use it's own window menu. There will be a choice to select a theme (or remove one if one is already assigned to the window). The skins framework will scan through the folder and present you with a you can use.
The skins work is incomplete. Internal borders, alignment pane backgrounds, and popup dialogs need to be addressed. The latest update (4/9/2003) supports list boxes, tool tips, buttons, text panes, menus and desktop backgrounds if specified by the original theme. All of these can be individually controlled by the #skins preference panel..
This is a great starting point. I'm perfectly happy to see the open source Squeak community adopt this framework and enhance and complete as best we can. I want to take a crack at importing some other open unix theme formats soon to further refine the framework and refactor as necessary. I'm interested in dynamic theme designs too (not just strictly form based) and want to adopt some ideas I have along those lines into this framework as time permits.
Change sets you will need
Install the change sets in the following order.
After you install the 4 change sets, grab some themes from the Internet as described above, and try it out.
You can check out other Squeak goodies I've written and sharing at my Squeak Enhancements Page. Whenever I publish new goodies or updates I put them there first.