IconDesk.dll 0.55                                  IconDesk.txt


General

IconDesk is a Litestep module that displays icons on the
desktop, much like in Explorer.


Bangs

!IconDeskShow <group>
Shows the specified icon group

!IconDeskHide <group>
Hides the specified icon group

!IconDeskToggle <group>
Toggles the visibility of the specified icon group

!IconDeskUpdate <group>
Updates the specified group


RC-commands

IconDeskUpdateInterval <int>
The time, in ms, to wait between checking if there has been any
updates in the displayed folders. Defaults to 1000 (1 second).


IconDesk is configured much in the same way as Maduin's Label.
Begin with specifying a list of groups to add (a group [of
icons] is basicly a folder to display).

IconDeskGroups name1[,name2[,name3]]

You can then specify individual settings for each group. If you
want to set the icon size for a group you add a line like this.

IconDesk<name>Size 32

Where <name> is the name of the group. The following settings
are available:

Visible <bool>
Determines whether or not the group is visible. Defaults to
true.

X <int>
Y <int>
Position on the desktop to start drawing the icons. Negative
coordinates are supported. Both defaults to 0.

Size <int>
Size of the icons, in pixels. Defaults to 32.

SpacingX <int>
SpacingY <int>
Distance between the icons. Not that the distance is calculated
between the rectangles formed by both the icons and the text.
Defaults to 0, both ways.

Direction [right|left|down|up]
The direction to draw the icons in. Defaults to right.

WrapDirection [right|left|down|up]
Direction to wrap the icons in. Defaults to down. Note: If
Direction is set to right or left, WrapDirection must be up or
down and vice versa.

WrapCount <int>
Number of icons to display before wrapping to the next line
or column. Defaults to 10.

Font <string>
FontSize <int>
FontItalic <bool>
FontBold <bool>
FontColor <colour>
Font used to display the filenames. Defaults to Arial, size 14,
white, neither bold nor italic.

TextSpacing <int>
Distance between the icon and the text. Defaults to 5.

TextWidth <int>
TextHeight <int>
Size of the box where the text is drawn. Defaults to 64x28.

TextBackground <colour>
If set, this colour will be used to paint a box behind the
text. Default: blank (no box is painted).

TextShadowDepth <int>
If set, a text shadow will be drawn the specified number of
pixels below and to the right of the normal text. Negative
numbers will place the shadow above and to the left of the
normal text. Defaults to 0.

TextShadowColor <color>
The color of the text shadow. Defaults to 80 80 80.

HideExtension <bool>
If set to true the extensions of the files will not be
displayed. Defaults to true.

ShowHidden <bool>
If true, files with the hidden and system attributes will
displayed. Defaults to false.

FoldersFirst <bool>
If true, all folders will be placed before all files. Defaults
to true.

HideText <bool>
If true, no text labels will be drawn. Note that this affects
the spacing of the icons. Defaults to false.

Tooltips <bool>
If true, tooltips with the title of the icon will be displayed.
Defaults to true.

Mouse[Left|Right|Middle][Up|Down|Dbl] <command>
Specifies commands to execute on different mouse events. Can be
either an internal command, a bang or a file. Internal commands
are .context to open the context menu and .open to execute the
file. MouseLeftDbl defaults to .open, MouseRightUp to .context
and the rest to .none (which surprisingly means that they do
nothing).

Saturation <int>
Icon saturation. 255 will result in the normal icon and 0 in a
monochrome image. Defaults to 255 (= effect deactivated).

HueColor <color>
HueIntensity <int>
Color and intensity of the hue effect. The intensity should be
a number between 0 and 255. 0 will give no effect and 255 will
result in the icon being completely covered in the specified
color. Defaults to 128 128 128 (medium gray) and 0 (= effect
deactivated).

*IconDesk<group>Folder <string>
Specifies a folder to display. You can have as many of these
lines as you want. If no lines are present C:\ will be
displayed. This can be either a normal directory, a CLSID
($drives$, $controlpanel$, etc) or ".desktop" (sans quotes).


Changes

Date         Ver    Changes
13 jul 2003  0.55   !IconDeskUpdate didn't cause redrawing
                    Fixed a GDI leak (thanks to jesus_mjjg for
                    pointing it out)
                    Quoted paths are now working
                    Added support for negative coordinates
                    Added tooltips (disable w/ Tooltips false)
					If the desktop window isn't found, the
                    module waits for 500ms and then looks again

22 jun 2003  0.52   Reverted to old icon extraction mechanism
                    Now using IShellFolder to enum the files,
                    in other words special folders such as My
                    Computer and the desktop are now supported
                    Fixed the bug where you could still click
                    the areas where the icons where when they
                    were hidden

11 may 2003  0.5    Add ability to hide icon texts
                    Added customisation of mouse events
                    Improved icon extraction a bit, still not
                    working very well with icon sizes above 32
                    Converted to STL lists and implemented
                    sorting, still no customisation
                    Added ability to merge folders
                    Attribute changes in monitored folders are
                    now detected
                    Added icon effects (hue & saturation) from
                    systray2
                    Changed default text color to white
                    Changed default shadow color to a darker
                    gray (80 80 80)

26 apr 2003  0.41   If no groups are specified, a group called
                    "Default" will be created.
                    All positions and distances are now
                    calculated on the rectangles formed by both
                    the icon and the text.
                    Added support for text shadows

25 apr 2003  0.4    IconDesk is no longer a part of desktop2,
                    it's a regular module. It now works with
                    jDesk as well
                    I decided that IconDesktop was too long,
                    the module is now called IconDesk
                    Added support for multiple folders
                    Readded IconDeskUpdateInterval
                    Added !IconDeskUpdate
                    Reworked the settings system, all settings
                    have new names
                    Increased the default of UpdateInterval to
                    1000 milliseconds

24 apr 2003  0.35   Code cleanup
                    Added DesktopIconVisible
                    Added !DesktopIconShow
                    Added !DesktopIconHide
                    Added !DesktopIconToggle
                    Added DesktopIconFoldersFirst
                    Added DesktopIconShowHidden
                    Removed DesktopIconUpdateInterval

24 apr 2003  0.3    First public release


To-do-list

 * Better customisation, ideas?
 * Sorting customisation
 * In-module browsing
 * Keyboard navigation
 * Manual adding of icons (*IconDesk<group>Add?)
 * Filtering (*IconDesk<group>Hide <filter>?)
 * Specify icons to display before the sorted ones
 * Drag'n'Drop support (creating shortcuts etc)
 * A windowed mode with support for always on top, background
   images, scrolling, etc
 * Implement SHChangeNotifyRegister to get updates from shell
   folders


Known bugs/faults

1. If icon size is set to anything larger then 32 the 32x32
icon will be stretched, even if the file contains a larger
icon. The only time larger icons are loaded is if the file is a
.ico file. The problem lies in the way I extract the icons,
unfortunately I haven't found another way that works better.
I'll keep on searching, but if you have any ideas on how to
solve it, please contact me.

2. Folders sometimes won't open when you double click them, the
context menu always works though.

3. Special folders like My Computer and the desktop are not
updated when the content is changed.

4. My Documents is displayed by it's CLSID


Feedback

If you have a bug report, feature request, or any kind of
feedback, feel free to email it to me at erik@alphafish.com.
For more info and other LiteStep modules and programs, check
out www.alphafish.com


Sourcecode

The sourcecode for this module is distributed under the GNU
Public License. If you didn't get the sourcecode with this
module, you can download it from www.alphafish.com


Credits

All the authors of popup2, I've borrowed some code from it
(namely the context menu handling). grd, who originally wrote
the icon effects code that I borrowed from systray2. Thanks for
ides for improvment goes to: allelimo, Phil Varcoe, Gregory
Weaver, rabidcow, Christian Buffin (jesus_mjjg), Paradox,
fractal.design, Phil Stopford, sryo, David Consuegra,
Deedstyger, uggi, Anders Jakobsson (Milk), Scathe, Daniel Kerr
and many others.


_______________________________________________________________
Erik Christiansson, aka Sci                  erik@alphafish.com
