[ALLY] Exploring desktop skins
From: larry:ecotope at: 23-Apr-2001 12:57
The next version of View will have user created skins. Most of the skin
machinery is already present in the desktop code. In fact, the desktop
window appearance is created from a default skin. Here is a quick hack which
will allow you to explore the current skin attributes. It will run OK
regardless of whether the desktop is set to come up immediately or not. You
could also provide some feedback to RT on desired features, etc.
In your user.r add the following lines of code:
; load desktop object
if block? ctx-viewtop [ctx-viewtop: context ctx-viewtop]
; make info text more visible
; maybe you don't like the grid?
The currently available skin attributes can be found with (after desktop
object is loaded)
>> print mold ctx-viewtop/dtw-skin
make object! [
side-effect: [gradient 0x1 200.220.200 100.120.100]
Main refers to the default folder window, side refers to the default
bookmark sidebar, top is the default services bar.
How it works
User.r is executed before the desktop is created. The desktop comes
originally as an object spec code block called ctx-viewtop. We need to load
this block into an object so that we can use it. The object is given the
same name, which allows the GC to free up the memory used by the block.
Afterwards, whatever changes are made to the dtw-skin object will be
reflected whenever the desktop comes up.
One negative feature of this method is an increase of about 300kB in the
memory image and a small amount of time to load the object, even when the
desktop is not invoked (e.g. when running a local script). Remember it's
just a quick hack.
Enjoy (and be sure to send your comments)