###############################################################################
##########                      LSYzController                       ##########
###############################################################################

Author: Whitman
Homepage: http://www.nullified.com
Contact: You can usually find me in #lsdev and #litestep on irc.freenode.net

Acknowledgements:
-----------------
Anyone in #lsdev that helped me with making this module.  Thanks.

Changelog:
----------
v1.0.1
------
	:: Added !YzDockToggle bang.

v1.0
----
	:: Initial Release.
	
ToDo: (maybe)
-------------
	:: Add ability to install extra resources (Backgrounds, Indicators, Poofs)
	:: Edit Items.ini
	:: Any sensible requests from users.

Overview:
---------
LSYzController is a LiteStep module to control Yz Dock.
This module is not aimed for themers to include with their themes, it is more
intended for the end user.
LSYzController allows users to change Yz Dock settings and apply them.
Has only been tested with Yz Dock 0.83 (the latest and last).

Usage:
------
Order Of Execution:
	When the module is first loaded it will look for the YzDockDirectory
	evar.  If this is not found the module will unload itself as there
	isn't any point it being loaded without YzDockDirectory being set.
	Assuming YzDockDirectory is set, the module will then look for
	*YzDockUseThemeConfig.  If this is found an attempt to copy the theme
	YzDock.ini will be made.
	Next the module will look for *YzDockLoadConfig.  Then the module will
	read the YzDock settings from the .rc files
	Yz Dock saves its YzDock.ini when it closes so *YzDockKill is looked for
	next followed by looking for *YzDockSaveConfig.
	Then there is the option to use *YzDockStart.
	Yz Dock needs to be restarted for new settings to be loaded.
	Finally *YzDockUnloadModuleOnLoad will be looked for and the module will
	be unloaded if it is found.
			
NOTES:  When the module is loaded it will have in memory the default values for the
	YzDock.ini file.  If you wish to only change some of the settings make sure	you
	use *YzDockLoadConfig or !YzDockLoadConfig before you save the config with 
	*YzDockSaveConfig or !YzDockSaveConfig respectively.

Settings:
---------

NOTE:  Any settings that require a <string> parameter should be enclosed in quotes
if the <string> contains spaces.

YzDockDirectory <string>
This setting tells the module the location of Yz Dock on your computer.  If the
path contains spaces it should be quoted.  The trailing slash (\) must be included.
This setting is crucial for the correct operation of the module.
Example:
		YzDockDirectory "C:\Program Files\YzDock\"

*YzDockUseThemeConfig
If this is used, LSYzController will look for a file called YzDock.ini in your
$ThemesDir$\misc\YzDock\ directory.  If this file exists it will be copied to
your Yz Dock directory, overwriting the current YzDock.ini file.  A backup of
your YzDock.ini file will be made and will be called YzDock.ini.bak.

*YzDockUnloadModuleOnLoad
If you only use this module to copy YzDock.ini from the theme to the YzDock
directory and don't require the use of the bang functions, using this setting
will cause the module to be unloaded after it has copied the YzDock.ini file.

*YzDockStart
Runs Yz Dock. YzDockDirectory has to have been set.

*YzDockKill
Terminates a running copy of YzDock.

*YzDockSaveConfig
Saves the current config defined by the settings in .rc files.

*YzDockLoadConfig
Loads the current YzDock.ini file into memory.  Should be used before *YzDockSaveConfig
if you don't want unspecified settings to revert to default.

NOTE:  The following settings are pulled straight from the YzDock.ini file and
simply prefixed with "YzDock".

YzDockLanguageFile <string>
This setting specifies the language file that Yz Dock will use.
Exmaple:
		YzDockLanguageFile English.lang
		
YzDockSmallSize <int>
<int> possible values [16 - 192]
Specifies the size of the dock when no magnification is taking place.
Example:
		YzDockSmallSize 50

YzDockLargeSize <int>
<int> possible values [16 - 192]
Specifies the size of the dock when magnification is taking place.
Example:
		YzDockLargeSize 50

YzDockMagnification <bool>
<bool> possible values [true | false]
Turns on or off the magnification of the dock.
Example:
		YzDockMagnification true
		
YzDockIndicator <string>
<string> is the name of the Indicator that will be used.  Indicators can be found
in $YzDockDirectory$indicators\
The name of the Indicator to be used should be provided without the .png extension.
Example:
		YzDockIndicator Flame

YzDockPoof <string>
<string> is the name of the Poof that will be used.  Poofs can be found in
$YzDockDirectory$poofs\
The name of the Poof to be used should be provided without the .png extension.
Example:
		YzDockPoof Jaguar
		
YzDockBackgroundAlpha <int>
<int> possible values [0 - 255]
Specifies the transparency of the dock background.
0 = Full Transparent
255 = Opaque
Example:
		YzDockBackgroundAlpha 150
		
YzDockBackgroundName <string>
<string> is the name of the Background that will be used.  Backgrounds can be
found in $YzDockDirectory$backgrounds\
The name of the Background to be used is the name of the folder that the background
files are kept in.
Example:
		YzDockBackgroundName "Brushed Metal"
		
YzDockAlwaysOnTop <bool>
<bool> possible values [true | false]
Sets whether the dock is always on top or not.
Example:
		YzDockAlwaysOnTop true
		
YzDockAutoHide <bool>
<bool> possible values [true | false]
Sets whether the dock auto hides or not.
Example:
		YzDockAutoHide true
		
YzDockShowSensitivity <int>
<int> possible values [0 - 1000]
Sets the sensitivity of the dock when auto hidden.  This setting has no effect if
the dock is not set to auto hide.
The <int> value is actually the number of milliseconds the dock will wait before
it shows itself if the mouse cursor is in the docks area.
Example:
		YzDockShowSensitivity 500
		
YzDockDisappearDelayTime <int>
<int> possible values [0 - 10]
The number of seconds the dock will stay visible after the mouse cursor has left
the dock area.  This setting has no effect if the dock is not set to auto hide.
Example:
		YzDockDisappearDelayTime 5

YzDockOpenAppEffect <bool>
<bool> possible values [true | false]
Sets whether the open application animation (icon bouncing) will occur or not.
Example:
		YzDockOpenAppEffect true
		
YzDockOpenAppEffectExceptApp <bool>
<bool> possible values [true | false]
Sets whether only system icons are animated.  For this to properly work,
YzDockOpenAppEffect has to be set to false and this set to true.
Example:
		YzDockOpenAppEffectExceptApp true
		
YzDockColorOfClickedItem <int> <int> <int>
<int> possible values [0 - 255]
Sets the color that a clicked icon will be shaded.
The color format is RGB
Example:
		YzDockColorOfClickedItem 0 255 0

YzDockNumberOfOpenAppEffect <int>
<int> possible values [1 - 5]
Sets the number of times an icon will bounce during an Open Application
Animation.  This setting will only have an effect if YzDockOpenAppEffect
or YzDockOpenAppEffectExceptApp is set to true.
Example:
		YzDockOpenAppEffectExceptApp 3
		
YzDockLockedMoveDeleteItem <bool>
<bool> possible values [true | false]
If this is set to true it will be impossible to add, move or delete items from
the dock.
Example:
		YzDockLockedMoveDeleteItem true
		
YzDockWindowFocusBack <bool>
<bool> possible values [true | false]
When set to true, YzDock will return focus to the last focused window when
the mouse cursor leaves the dock area.  Only has an effect if YzDockAlwaysOnTop
is set to false.
Example:
		YzDockWindowFocusBack true
		
YzDockPositionOnScreen <string>
<string> possible values [bottom | left | right | top]
This sets the position of the dock on the screen and should be used in
conjunction with YzDockPositionOnScreen2.
Example
		YzDockPositionOnScreen top
		
YzDockPositionOnScreen2 <string>
<string> possible values [center | bottom | left | right | top]
This sets the position of the dock on the screen and should be used in
conjunction with YzDockPositionOnScreen.
Example
		YzDockPositionOnScreen2 left

YzDockPositionMargin <int>
<int> possible values [0 - 400]
Sets a margin of <int> pixels between the edge of the screen and the
dock relative to the YzDockPositionOnScreen2 value.
Example:
		YzDockPositionMargin 200
		
YzDockMultiMonitorSupport <bool>
<bool> possible values [true | false]
Sets whether Yz Dock has support for a multi monitor setup.
Example:
		YzDockMultiMonitorSupport false
		
YzDockFont <string>
<string> is the name of the font Yz Dock will use for the icon labels.
Example:
		YzDockFont "Tahoma"
		
YzDockFontSize <int>
<int> possible values [7 - 72]
The font size of the icon labels.
Example:
		YzDockFontSize 16
		
YzDockBold <bool>
<bool> possible values [true | false]
If set to true, icon labels will be bold.
Example:
		YzDockBold true
		
YzDockItalic <bool>
<bool> possible values [true | false]
If set to true, icon labels will be italic.
Example:
		YzDockItalic false

YzDockDirectionOfGradation <string>
<string> possible values [none | vertical | horizontal]
Specifies whether a gradient should be used within the icon labels and if so
the direction of the gradient.
Example:
		YzDockDirectionOfGradation vertical
		
YzDockColor <int> <int> <int>
<int> possible values [0 - 255]
Sets the color of the icon label.  If a gradient has been set, YzDockColor will
be the first color which will fade into YzDockColor2.
Example:
		YzDockColor 255 150 70
		
YzDockColor2 <int> <int> <int>
<int> possible values [0 - 255]
Sets the second color of the icon label within a gradient.  Not used if a gradient
is not used.
Example:
		YzDockColor2 100 40 170
		
YzDockEdgeColor <int> <int> <int>
<int> possible values [0 - 255]
Sets the color of the edge of the icon label.  If a gradient has been set,
YzDockEdgeColor will be the first color which will fade into YzDockEdgeColor2.
Example:
		YzDockColor 255 150 70
		
YzDockEdgeColor2 <int> <int> <int>
<int> possible values [0 - 255]
Sets the second color of the edge of then icon label within a gradient.
Not used if a gradient is not used.
Example:
		YzDockColor2 100 40 170
		
YzDockShadowColor <int> <int> <int>
<int> possible values [0 - 255]
Sets the color of the shadow of the icon label.  If a gradient has been set,
YzDockShadowColor will be the first color which will fade into YzDockShadowColor2.
Example:
		YzDockColor 255 150 70
		
YzDockShadowColor2 <int> <int> <int>
<int> possible values [0 - 255]
Sets the second color of the shadow of then icon label within a gradient.
Not used if a gradient is not used.
Example:
		YzDockColor2 100 40 170
		
YzDockEdgeAlpha <int>
<int> possible values [0 - 255]
Sets the transparency of the edge of an icon label.
Example:
		YzDockEdgeAlpha 150
		
YzDockShadowAlpha <int>
<int> possible values [0 - 255]
Sets the transparency of the shadow of an icon label.
Example:
		YzDockShadowAlpha 150
		
YzDockFadeEffectWhenMouseMove <bool>
<bool> possible values [true | false]
If set to true, the icon label will fade in to view when the mouse cursor moves
over an icon.
Example:
		YzDockFadeEffectWhenMouseMove true
		
YzDockIconSize <string>
<string> possible values [small | large | dynamic]
I'll be honest, I haven't seen any differences no matter which value I use so
I'm not sure completely how this works.  If anyone wants to fill me in on this
feel free to contact me.
Example:
		YzDockIconSize dynamic
		
YzDockShowModeFileExtension <string>
<string> possible values [hide | show | hideregistered]
Specifies whether file extensions should be shown as part of the icon label.
Example:
		YzDockShowModeFileExtension hide
		
YzDockShowOpenFolderItem <bool>
<bool> possible values [true | false]
Once again I've not seen this in action and can't seem to get it to do anything
but, if set to true, the YzDockOpenFolderItemLabel should be shown in a menu
somewhere.
Example:
		YzDockShowOpenFolderItem true
		
YzDockOpenFolderItemLabel <string>
<string> is the menu item label to be shown in a menu somewhere if 
YzDockShowOpenFolderItem is set to true.
Example:
		YzDockOpenFolderItemLabel "Show in Explorer"
		
YzDockRemovableDriveHasSubMenu <bool>
<bool> possible values [true | false]
Yet another setting that doesn't appear to do anything obvious...
Example:
		YzDockRemovableDriveHasSubMenu true

YzDockShortcutFolderHasSubMenu <bool>
<bool> possible values [true | false]
And another setting that doesn't appear to do anything obvious...
Example:
		YzDockShortcutFolderHasSubMenu true
		
YzDockLowQualityInHovering <bool>
<bool> possible values [true | false]
If set to true, Yz Dock will render the dock in low quality mode while the mouse
is hovering over the dock which will reduce CPU usage and might make things smoother.
Example:
		YzDockLowQualityInHovering true
		
YzDockLowQualityInMagnification <bool>
<bool> possible values [true | false]
If set to true, Yz Dock will render the dock in low quality mode while the dock
is being magnified which will reduce CPU usage and might make things smoother.
Example:
		YzDockLowQualityInMagnification true
		
YzDockMagnificationMode <string>
<string> possible values [wide | narrow]
This sets how much of the dock is magnified when the mouse moves over the dock.
Has no effect if YzDockMagnification is set to false.
Exmaple:
		YzDockMagnificationMode wide
		
YzDockTransitionSmoothnessExpand <int>
<int> possible values [10 - 160]
Sets how smooth the the transition is between being normal and magnified.
10 = very smooth
160 = no transition
Example:
		YzDockTransitionSmoothnessExpand 35
		
YzDockTransitionSmoothnessReduce <int>
<int> possible values [10 - 160]
Sets how smooth the the transition is between being magnified and normal.
10 = very smooth
160 = no transition
Example:
		YzDockTransitionSmoothnessReduce 35

Bangs:
------

!YzDockStart
Runs Yz Dock.  For this to work, YzDockDirectory has to have been defined previously.

!YzDockKill
Terminates Yz Dock if it is currently running.

!YzDockSaveConfig
Saves the current config defined by the settings in .rc files.

!YzDockLoadConfig
Loads the current YzDock.ini file into memory.  Should be used before !YzDockSaveConfig
if you don't want unspecified settings to revert to default.

!YzDockUnloadModule
Unloads the LSYzController module.

!YzDockUseThemeConfig
If this is used, LSYzController will look for a file called YzDock.ini in your
$ThemesDir$\misc\YzDock\ directory.  If this file exists it will be copied to
your Yz Dock directory, overwriting the current YzDock.ini file.  A backup of
your YzDock.ini file will be made and will be called YzDock.ini.bak.  YzDock
will then be restarted for the changes to take effect.

!YzDockToggle
This toggles Y'z Dock.  If Y'z Dock is currently running, this bang will kill
it.  If Y'z Dock is not currently running, this bang will start it.