===================================================
===================================================
=tasks.dll - it makes your coffee. Sorry no decaf!=
===================================================
===================================================
====== Written by: ================================
================== Chris Rempel (jugg) ============
===================================================
================== http://aster.omega2.com/jugg/ ==
================== jugg@dylern.com ================
===================================================
====== Adapted from: ==============================
==================== [rdj]'s tasks.dll ============
==================== Remco de Jong ================
==================== http://litestep.rdj.cg.nu/ ===
==================== rdj@telekabel.nl =============
===================================================
= Version: 0.80 = Release Date: 99.12.25 ==========
===================================================
===================================================

-=ToC=-
I. Introduction
II. Installation
III. Information
 A} Commands
 B} Changes
IV. Tips & Tricks
V. Disclaimer


=====================
== I. Introduction ==
=====================
===================================================
Welcome, and thank you for trying out this small
efficient task manager for Win32 shells. Tasks runs
under both LiteStep (natively) and DarkStep. Tasks
displays by default, 32x32 tiles with 16x16 icons
representing the currently running applications.
Each tile has a popup system menu for the specific
Application it represents, from which you can
control the Application window.

Furthermore, Tasks is completely customizable,
supporting a wide range of functionality from a
static block of tiles, to a popup menu interface,
with hide-on-click and zOrder positioning options.
But that is only a small portion of the numerous
options to customize your Tasks tiles.


======================
== II. Installation ==
======================
===================================================

Extract "tasks.dll" to your shell directory
(c:\litestep\). Open up your step.rc (your shell
configuration file) and find the section where all
of your "LoadModule" lines are located. Now, add a
new line that looks like this:

LoadModule "c:\litestep\tasks.dll"

Of course, adjust the path as necessary. Save your
step.rc and issue the shell's Recycle command
(!Recycle).


======================
== III. Information ==
======================
===================================================

The following Commands section is broken up into
four parts. You have the "MAIN", "NORMAL",
"MINIMIZED", and "SELECTED" sections. Basically,
Tasks has three different "states" it can be in.

First you have your default "normal" state where
the application is neither minimized nor active.

Secondly, there is the "minimized" state where the
application is minimized.

Finally, there is the "selected" or "active" state
where the application is the one with the focus.

By default the second and third states are
disabled (minimized, selected), defaulting all
tiles to have the "normal" look. You can activate
the "minimized" and "selected" states by setting
the first command under those two sections shown
below.

The three "state" sections each have an identical
set of commands to the other. The "minimized" and
"selected" variants of each similar command, to the
three states, values default to the "normal" state
value, unless explicitly overridden, with the
exception of boolean values.

Besides the three different "state" sections, you
have a "main" section of commands, who's values are
not effected by the current state of the
application. Plus several action (!bang) commands
and filters.

===============
= A} Commands =
===============

The default value for each command is shown
following the command, just as you would set a new
value in the shell configuration file.

===================================================
=========== (Begin) MAIN Command Section ==========
===================================================

TasksX 0
  - Sets the horizontal (x coordinate) value to
    start placing Tasks tiles, relevant to the
    direction in which they are arranged.
  - accepts any negative or positive integer.
  - defaults to: 0

TasksY 0
  - Sets the vertical (y coordinate) value to
    start placing Tasks tiles, relevant to the
    direction in which they are arranged.
  - accepts any negative or positive integer.
  - defaults to: 0

TasksHeight 32
  - Sets the vertical size (height) value.
  - accepts any positive integer greater then 1.
  - defaults to: 32

TasksWidth 32
  - Sets the horizontal size (width) value.
  - accepts any positive integer greater then 1.
  - defaults to: 32

TasksSpacingX 0
  - Sets the horizontal seperation (spacing)
    between tiles.
  - accepts any positive or negative integer.
  - defaults to: 0

TasksSpacingY 0
  - Sets the vertical seperation (spacing)
    between tiles.
  - accepts any positive or negative integer.
  - defaults to: 0

TasksDirection "right"
  - Sets the directional postion new tiles are
    added relevant to the values given in
    [TasksX] and [TasksY].
  - accepts one of the following: "up", "down",
    "left", "right".
  - when set to "up" or "left". If you set [TasksY]
    or [TasksX] respectively to zero 0, the zero
    acts like a negative zero.
  - defaults to: "right"

TasksWrapDirection "down"
  - Sets the directional postion tiles are wrapped
    to relevant to the values given in [TasksX] and
    [TasksY] when the [TasksWrapCount] limit has
    been reached.
  - accepts one of the following:
    + Either "up" or "down" if [TasksDirection] is
      set to "left" or "right".
    + Either "left" or "right" if [TasksDirection]
      is set to "up", or "down".
  - when set to "up" or "left". If you set [TasksY]
    or [TasksX] respectively to zero 0, the zero
    acts like a negative zero.
  - defaults to: "down"

TasksWrapCount 0
  - Sets the maximum number of tiles that can be
    displayed in one direction, before wrapping.
  - accepts any positive integer. Use 0 to disable.
  - defaults to: 0

TasksMaxTiles 0
  - Sets the maximum number of tiles that can be
    displayed.
  - accepts any positive integer. Use 0 to disable.
    When disabled, the maximum is limited by your
    system memory.
  - defaults to: 0

TasksDragDistance 4
  - Sets the distance a tile must move before it is
    registered as movement, rather then a mouse
    click.
  - accepts any positive integer.
  - defaults to: 4

TasksIconSize 16
  - Sets the size of the displayed Icon on the tile
  - accepts any positive integer greater then 1.
  - defaults to: 16

TasksAlwaysOnTop
  - If set, Tasks tiles will be on top of other
    windows.
  - boolean value: true if set, otherwise false.

TasksAutoArrange
  - If set, Tasks tiles will be rearrange to close.
    any gaps made if a single tile is dragged away
    from the group.
  - boolean value: true if set, otherwise false.

TasksHideMinAppBar
  - If set, Tasks will hide all minimized
    application bars from the viewable desktop area
  - boolean value: true if set, otherwise false.

TasksHideOnClick
  - If set, all Tasks tiles will be hidden when any
    tile is clicked on.
  - boolean value: true if set, otherwise false.

TasksMoveAll
  - If set, when any tile is dragged and dropped on
    the desktop, all Tasks tiles will be moved and
    rearranged at that location.
  - boolean value: true if set, otherwise false.

TasksNoMinimizeOnClick
  - If set, when clicking on the tile of the active
    application, the application will -not- be
    minimized. Otherwise it would be.
  - boolean value: true if set, otherwise false.

TasksNoMove
  - If set, all dragging movement of the tiles are
    disabled.
  - boolean value: true if set, otherwise false.

TasksOnlyMinimized
  - If set, only tiles for minimized applications
    will be displayed.
  - boolean value: true if set, otherwise false.

TasksHideMinimized
  - If set, only -non- minimzed applications will
    be displayed.
  - boolean value: true if set, otherwise false.

TasksStartHidden
  - If set, all Tasks tiles will be hidden on load/
    recyle of the shell.
  - boolean value: true if set, otherwise false.

TasksNoHints
  - If set, no popup hints containing the
    applications title will be displayed.
  - boolean value: true if set, otherwise false.

TasksNoIcons
  - If set, no icons will be displayed on the tiles
    although, custom "pix" (bitmaps) will be.
  - boolean value: true if set, otherwise false.

TasksUseWindowsSettings
  - If set, all display of the Tasks tiles gets
    handled by windows. This setting uses the
    system color schemes, fonts, and icons. No
    custom settings can be used from of the three
    states commands, and only some of the Main set.
  - boolean value: true if set, otherwise false.

TasksTitles
  - If set, turns on the display of application
    titles on the Tasks tiles for -non- minimized
    and -non- active applications.
  - boolean value: true if set, otherwise false.

TasksTitleMinimized
  - If set, turns on the display of application
    titles on the Tasks tiles for minimized
    applications only.
  - boolean value: true if set, otherwise false.

TasksTitleSelected
  - If set, turns on the display of application
    titles on the Tasks tiles for active (selected)
    applications only.
  - boolean value: true if set, otherwise false.
  

  =====!Bang Commands==============================
  =================================================
   !TasksGather
     - parameters: none
     - Issuing this command will re-position all
       tiles back to their original position.

   !TasksHide
     - parameters: none
     - Issuing this command will hide all tiles.

   !TasksMove
     - parameters: x,y
       'x' is any positive or negative integer
       representing the horizontal (x coordinate)
       value to position the tiles at.
       'y' is any positive or negative integer
       representing the vertical (y coordinate)
       value to position the tiles at.
     - Issuing this command will position the tiles
       at x,y values passed, or if no values were
       specified, it will position the tiles at
       the current mouse coordinates.

   !TasksOnBottom
     - parameters: none
     - Issuing this command will place and keep the
       tiles at the bottom of the zOrder, under all
       other windows.

   !TasksOnTop
     - parameters: none
     - Issuing this command will place and keep the
       tiles at the top of the zOrder, on top of
       all other windows.

   !TasksShow
     - parameters: none
     - Issuing this command will show all tiles.

   !TasksSwitch
     - parameters: "next" or "prev"
     - Issuing this command will switch the active
       application to either the "next" or
       "previous" application in the Tasks list. If
       no parameters are specified, the command is
       ignored.

   !TasksToggle
     - parameters: none
     - Issuing this command toggles the visibility
       state of the tiles, by either hiding or
       showing them, opposite of their current
       visible state.

  =====Task Filters================================
  == All "text" fields are case sensitive! ========
  =================================================
   *TasksIcon
     - parameters: "text", "filename", n
     - Multiple settings of this command are
       allowed and the maximum number is limited by
       system memory.
     - It is used to specify a custom icon for any
       tile who's application's title or class
       matches the text specified in the "text"
       field. The "filename" is any icon resource
       contianing a valid icon in the position
       specified by the positive integer "n".

   *TasksIgnore
     - paramters: "text"
     - Multiple settings of this command are
       allowed and the maximum number is limited by
       system memory.
     - Removes all tiles for applications who's
       class or title matches the string passed in
       the "text" field.

   *TasksAdd
     - parameters: "text"
     - Multiple settings of this command are
       allowed and the maximum number is limited by
       system memory.
     - Adds a tile for any application who's class
       or title matches the string passed in the
       "text" field.

   *TasksPix
     - parameters: "text", "filename"
     - Multiple settings of this command are
       allowed and the maximum number is limited by
       system memory.
     - It is used to specify a custom bitmap for
       any tile who's application's title or class
       matches the text specified in the "text"
       field. The "filename" is either the full
       path and filename to a valid bitmap, or the
       filename to a valid bitmap located in the
       shell's image/theme directory.
===================================================
============ (End) MAIN Command Section ===========
===================================================


===================================================
========== (Begin) NORMAL Command Section =========
===================================================
TasksIconX -2
  - Sets the horizontal (x coordinate) value to
    place the Icon at inside of the tile.
  - accepts any positive integer, -1,-2, or -3. See
    the table at the end of the command section for
    explanation of negative values.
  - defaults to: -2

TasksIconY -2
  - Sets the vertical (y coordinate) value to
    place the Icon at inside of the tile.
  - accepts any positive integer, -1,-2, or -3. See
    the table at the end of the command section for
    explanation of negative values.
  - defaults to: -2

TasksPixX 1
  - Sets the horizontal (x coordinate) value to
    place the Custom bitmap at inside of the tile.
  - accepts any positive or negative integer.
  - defaults to: 1

TasksPixY 1
  - Sets the vertical (y coordinate) value to
    place the Custom bitmap at inside of the tile.
  - accepts any positive or negative integer.
  - defaults to: 1

TasksBgColor FF00FF
  - Sets the BackGround color of the tile.
  - accepts any color format the shell supports.
    Usually in the form of RBG Hex. Use FF00FF or
    RGB 255,0,255 (pink) for transparency.
  - defaults to: FF00FF
    
TasksDarkColor FF00FF
  - Sets the bottom/right border color of the tile.
  - accepts any color format the shell supports.
    Usually in the form of RBG Hex. Use FF00FF or
    RGB 255,0,255 (pink) for transparency.
  - defaults to: FF00FF

TasksLightColor FF00FF
  - Sets the top/left border color of the tile.
  - accepts any color format the shell supports.
    Usually in the form of RBG Hex. Use FF00FF or
    RGB 255,0,255 (pink) for transparency.
  - defaults to: FF00FF

TasksBgImage ".none"
  - Sets the BackGround image of the tile.
  - accepts any image format supported by the shell
    which is normally only BMP (bitmap).
    Use ".none" for no image/ transparency. Any
    portion of the image that contains the color
    FF00FF Hex will be displayed as transparent.
  - defaults to: ".none"


  =====Title Commands==============================
  == These are only available if one of the =======
  == following booleans have been set from the ====
  == MAIN command section: ========================
  =================================================
  == TasksTitles =========== TasksTitleMinimized ==
  ============ TasksTitleSelected =================
  =================================================
   TasksTitleHeight 12
     - Sets the vertical size (height) value of the
       Title box.
     - accepts any positive integer greater then 1.
     - defaults to: 12

   TasksTitleWidth 28
     - Sets the horizontal size (width) value of
       the Title box.
     - accepts any positive integer greater then 1.
     - defaults to: 28

   TasksTitleX -2
     - Sets the horizontal (x coordinate) value to
       place the Title box at inside of the tile.
     - accepts any positive integer, -1,-2, or -3.
       See the table at the end of the command
       section for explanation of negative values.
     - defaults to: -2

   TasksTitleY -3
     - Sets the vertical (y coordinate) value to
       place the Title box at inside of the tile.
     - accepts any positive integer, -1,-2, or -3.
       See the table at the end of the command
       section for explanation of negative values.
     - defaults to: -3

   TasksTitleIconX -2
     - Sets the horizontal (x coordinate) value to
       place the Icon at inside of the tile when
       titles are enabled, overriding [TasksIconX].
     - accepts any positive integer, -1,-2, or -3.
       See the table at the end of the command
       section for explanation of negative values.
     - defaults to: -2

   TasksTitleIconY -1
     - Sets the vertical (y coordinate) value to
       place the Icon at inside of the tile when
       titles are enabled, overriding [TasksIconY]
     - accepts any positive integer, -1,-2, or -3.
       See the table at the end of the command
       section for explanation of negative values.
     - defaults to: -1


   TasksTitlePixX 1
     - Sets the horizontal (x coordinate) value to
       place the Custom bitmap at inside of the
       tile when titles are enabled, overriding
       [TasksPixX].
     - accepts any positive or negative integer.
     - defaults to: 1

   TasksTitlePixY 1
     - Sets the vertical (y coordinate) value to
       place the Custom bitmap at inside of the
       tile when titles are enabled, overriding
       [TasksPixY].
     - accepts any positive or negative integer.
     - defaults to: 1

   TasksTitleFontSize 10
     - Sets the font size for the title text.
     - accepts any positive integer greater then 1.
     - defaults to: 10

   TasksTitleFont "Arial"
     - Sets the font name(face) for the title text.
     - accepts any valid windows font name.
     - defaults to: "Arial"

   TasksTitleFontColor C0C0C0
     - Sets the font color of the title text.
     - accepts any color format the shell supports.
       Usually in the form of RBG Hex. Use FF00FF
       or RGB 255,0,255 (pink) for transparency.
     - defaults to: C0C0C0  (a light grey)

   TasksTitleNoEllipsis
     - If set, turns off the display of Ellipsis
       "..." shown at the end of truncated titles.
     - boolean value: true if set, otherwise false.

   TasksTitleUnderline
     - If set, underlines the title text.
     - boolean value: true if set, otherwise false.

   TasksTitleBgColor FF00FF
     - Sets the BackGround color of the title box.
     - accepts any color format the shell supports.
       Usually in the form of RBG Hex. Use FF00FF
       or RGB 255,0,255 (pink) for transparency.
     - defaults to: FF00FF

   TasksTitleDarkColor FF00FF
     - Sets the bottom/right border color of the
       title box.
     - accepts any color format the shell supports.
       Usually in the form of RBG Hex. Use FF00FF
       or RGB 255,0,255 (pink) for transparency.
     - defaults to: FF00FF

   TasksTitleLightColor FF00FF
     - Sets the top/left border color of the title
       box.
     - accepts any color format the shell supports.
       Usually in the form of RBG Hex. Use FF00FF
       or RGB 255,0,255 (pink) for transparency.
     - defaults to: FF00FF

===================================================
=========== (End) NORMAL Command Section ==========
===================================================


For the next two sections, the descriptions of each
command is exactly the same as the previous section
commands, accept that these are for overiding the
settings for Minimized apps and the Active app. Be
sure to set the first command in each of the
following sections to enable the rest of the
commands in each section!  Each command in the next
two sections are followed by a command in
[brackets]. This means it defaults to that command
if not set, or if set, it overides that command
for any application that is either minimized or 
selected(active).


===================================================
========= (Begin) MINIMIZED Command Section =======
===================================================
TasksHighLightMinimized
  - If set, enabled the rest of the commands in the
    MINIMIZED Command Section.
  - boolean value: true if set, otherwise false.

TasksMinIconX [TasksIconX]
TasksMinIconY [TasksIconY]

TasksMinPixX [TasksPixX]
TasksMinPixY [TasksPixY]

TasksMinBgColor [TasksBgColor]
TasksMinDarkColor [TasksDarkColor]
TasksMinLightColor [TasksLightColor]

TasksMinBgImage "" [TasksBgImage]
  - If using empty quotes "" it will default to
    [TasksBgImage]. Use ".none" to disable/make
    transparent.

  =====Title Commands==============================
  == These are only available if one of the =======
  == following booleans have been set from the ====
  == MAIN command section: ========================
  =================================================
  == TasksTitles =========== TasksTitleMinimized ==
  ============ TasksTitleSelected =================
  =================================================
   TasksTitleMinHeight [TasksTitleHeight]
   TasksTitleMinWidth [TasksTitleWidth]

   TasksTitleMinX [TasksTitleX]
   TasksTitleMinY [TasksTitleY]

   TasksTitleMinIconX [TasksTitleIconX]
   TasksTitleMinIconY [TasksTitleIconY]

   TasksTitleMinPixX [TasksTitlePixX]
   TasksTitleMinPixY [TasksTitlePixY]

   TasksTitleMinFontSize [TasksTitleFontSize]
   TasksTitleMinFont [TasksTitleFont]
   TasksTitleMinFontColor [TasksTitleFontColor]

   TasksTitleMinNoEllipsis
   TasksTitleMinUnderline

   TasksTitleMinBgColor [TasksTitleBgColor]
   TasksTitleMinDarkColor [TasksTitleDarkColor]
   TasksTitleMinLightColor [TasksTitleLightColor]
===================================================
========= (End) MINIMIZED Command Section =========
===================================================


===================================================
========= (Begin) SELECTED Command Section ========
===================================================
TasksHighLightSelected
  - If set, enabled the rest of the commands in the
    SELECTED Command Section.
  - boolean value: true if set, otherwise false.

TasksSelIconX [TasksIconX]
TasksSelIconY [TasksIconY]

TasksSelPixX [TasksPixX]
TasksSelPixY [TasksPixY]

TasksSelBgColor [TasksBgColor]
TasksSelDarkColor [TasksDarkColor]
TasksSelLightColor [TasksLightColor]

TasksSelBgImage "" [TasksBgImage]
  - If using empty quotes "" it will default to
    [TasksBgImage]. Use ".none" to disable/make
    transparent.

  =====Title Commands==============================
  == These are only available if one of the =======
  == following booleans have been set from the ====
  == MAIN command section: ========================
  =================================================
  == TasksTitles =========== TasksTitleMinimized ==
  ============ TasksTitleSelected =================
  =================================================
   TasksTitleSelHeight [TasksTitleHeight]
   TasksTitleSelWidth [TasksTitleWidth]

   TasksTitleSelX [TasksTitleX]
   TasksTitleSelY [TasksTitleY]

   TasksTitleSelIconX [TasksTitleIconX]
   TasksTitleSelIconY [TasksTitleIconY]

   TasksTitleSelPixX [TasksTitlePixX]
   TasksTitleSelPixY [TasksTitlePixY]

   TasksTitleSelFontSize [TasksTitleFontSize]
   TasksTitleSelFont [TasksTitleFont]
   TasksTitleSelFontColor [TasksTitleFontColor]

   TasksTitleSelNoEllipsis
   TasksTitleSelUnderline

   TasksTitleSelBgColor [TasksTitleBgColor]
   TasksTitleSelDarkColor [TasksTitleDarkColor]
   TasksTitleSelLightColor [TasksTitleLightColor]
===================================================
========== (End) SELECTED Command Section =========
===================================================


===Negative number Positioning code===
Imagine the following grid as the Task tile. So,
when you specify -2 for x and -2 for y, the item
will be centered in the tile. If you specify -3 for
x and -1 for y, then the item will be placed in the
top right corner.


 x, y | x, y | x, y
====================

-1,-1 |-2,-1 |-3,-1
--------------------
-1,-2 |-2,-2 |-3,-2
--------------------
-1,-3 |-2,-3 |-3,-3

If that still seems confusing, perhaps a little
description will help: (for x -1=left etc...)

x|left, center,  right
x| -1     -2      -3

y| top, middle, bottom
y| -1     -2      -3



===================================================
= B} Changes =
==============
  - 0.80 -
  --------
  
    + Added filter "*TasksAdd"
    + Added !TasksMove
    + Added TasksHideOnClick
    + Added TasksMaxTiles
    + Added TasksUseWindowsSettings
    + Added TasksHideMinimized
    + Added a whole lot of new commands for the
            Normal/Min/Sel state settings.
            Read the command section to see them.
    + Added !TasksSwitch
    + Added negative zero support for TasksX/Y when
            using "up" or "left" for a direction.
    + Added code to keep tiles in the visible
            window when dragging them around.

    - Removed double internal task list, decreasing
              memory usage significantly.

    * Changed all !bang commands so they start with
              !Tasksxxxx.
    * Changed !TasksBottom to !TasksOnBottom and
              !TasksTop to !TasksOnTop
    * Changed all memory management to all dynamic
              allocation, instead of static.
              Making a much smaller memory usage.
    * Changed !TasksGather so now it resets tile
              positions back to their default setup

    ! Fixed ScreenSaver from showing in task list.
    ! Fixed MDI bugs
    ! Fixed Focus bug
    ! Fixed misc task list issues
    ! Fixed case sensitivity in commands
    ! Fixed minappbars from not being hidden.
    ! Fixed TasksOnlyMinimized from showing a tile
            even after the application wasn't min.
    ! Fixed system popup menus from refreshing.
    ! Fixed tiles from being destroyed from alt+f4
    ! Fixed movement bugs.
    ! Fixed serveral GDI resource leaks. thanks dde
    
    And a lot more... but I forget :/


  - old -
  -------
   Will move the old version changes over when I
   have the time.


=====================
= IV. Tips & Tricks =
=====================
===================================================
Use only the following commands for a quick and
easy setup to get a Task List popup menu.

TasksWidth 150
TasksHeight 20
TasksUseWindowsSettings
TasksDirection "down"
TasksNoMove
TasksHideOnClick
TasksStartHidden
TasksAlwaysOnTop

Then using a desktop module like jDesk bind the
following command to the mouse down action:

!TasksHide

And to the mouse up action bind the following:

!TasksMove !TasksShow

Now, whenever you click on the Desktop up will pop
a fast clean and conenient menu containing all of
the running applications.
---------------------------------------------------

Will add in more tips & tricks when I have time.

---------------------------------------------------
Credits/Thanks:
===============
-[rdj] for providing the original tasks.dll source
  and for a great concept to work off of!
-The old school coders who've worked with me on this.
  limpid, killarny, maduin, nimue, fahim, others.
-Re5ources popup source code.
-Those who email with suggestions/bug reports/etc.

-In this version particularly:
 "dde" who's real nick I forget, but gave me some
 painting code which fixed the GDI resource leaks.
 
 Fahim always helping a lot. thanks.


=================
= V. Disclaimer =
=================
===================================================

Copyright (C) 1999, Chris Rempel

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT  WARRANTY
OF ANY KIND, EXPRESS OR  IMPLIED, INCLUDING BUT NOT
LIMITED  TO  THE   WARRANTIES  OF  MERCHANTABILITY,
FITNESS  FOR   A   PARTICULAR   PURPOSE   AND  NON-
INFRINGEMENT.  IN  NO  EVENT  SHALL THE  AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,  DAMAGES
OR  OTHER  LIABILITY,   WHETHER  IN  AN  ACTION  OF
CONTRACT,  TORT OR OTHERWISE,  ARISING FROM, OUT OF
OR IN CONNECTION  WITH  THE  SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
