WndMan (0.14):
by Vendicator

WndMan, short for Window Manager.
The module is intended to provide useful utility functins for handling windows
Currently a lot of the commands are untested.

Bang %argument%
	WndMan can try to find the target window to work on depending on the given argument:
	%point% - Bang will work on the window beneath the mouse pointer
	%active% - Bang will work on the active window (foreground)
	Other - WndMan assumes that the argument is a window class and looks for it
	Default: foreground window

Bangs:

Basic Window Handling:
	!WndForeground %argument%
	Sets the window to foreground

	!WndPushBottom %argument% [untested]
	Pushes the window down to the bottom closes to desktop

	!WndPushBack %argument% [untested]
	Pushes the window back one step

	!WndOnTop %argument% ("on"/"true")
	Sets the window status to be on top if argument is "on" or "true" otherwise it'll be set to normal

	!WndHide %argument%
	Hides the window

	!WndRestore %argument%
	Restores a window from being hidden

	!WndMaxToggle %argument%
	Toggles a window between maximized/normal view

	!WndMaximize %argument%
	Maximizes a window

	!WndMinimize %argument%
	Minimizes a window

	!WndClose %argument%
	Closes a window

	!WndDestroy %argument% [untested]
	Destroys a window, use at own risk

	!WndSetOpacity %argument% (Int: 0-255)
	Sets the opacity of the window, range 0-255. Win2k/Xp only

	!WndInfo %argument%
	Displays a messagebox with various info on a window, also ouputted to log file

	!WndAllInfo %argument%
	Same as !WndInfo but applied to active, foreground and focused window (to check difference)

Changing Size of Windows:
	!WndShade %argument%
	Shades a window, only showing it's titlebar

	!WndToggleShade %argument%
	Toggles a window between shaded state and normal size

	!WndUnShade %argument%
	Unshades the window

	!WndUnShadeAll
	Unshades all windows that have the shaded

	!WndToggleShade %argument%
	Toggles shading the window.

	!WndSize %argument% x y
	Sets the new size of the window to x y (old width or height is kept if that size is set to 0)

	!WndSizeGrow %argument% x y
	Grows the size of the window by x, y (old width or height is kept if that grow amount is set to 0)

	!WndSizeMax %argument% x y [untested]
	Sets the size of the dimension to biggest that the resolution can show
	(ie. 1 0 would mean that the window would be as wide as possible)

Moving Windows:
	!WndMove %argument% x y
	Moves the window to position x, y (old x or y position is kept if that is set to 0)

	!WndMoveDelta %argument% x y
	Moves the window by x y  (old x or y position is kept if that is set to 0)

	!WndMoveHome %argument% [untested]
	Asks Windows where the window should be and moves it there

	!WndMoveCenter %argument% [untested]
	Centers the window on the screen

Traying:
	!WndSendToTray %argument%
	Minimizes the window to tray, clicking it's icon will restore it again

	!WndRestoreFromTray %argument%
	Restores the window from being in the tray

	!WndRestoreAllFromTray
	Restores all icons that have been minimized to tray

LS Module Hiding:
	!WndLSModulesHide
	Hides all modules in LiteStep.

	!WndLSModulesRestore
	Shows all modules in LiteStep again.


Changelog:

- Changed [WndMan / Vendicator / 2003-06-15, release 0.14]
  - Using BangManager.h from VTK.
  - Fixed a small error in the find window helper.

- Added [WndMan / Vendicator / 2003-05-28]
  - Added LS modules hiding, code from 0.24.7.
    Needed the functionality in .6 until I've tested all my modules with the new core.

- Added [WndMan / repugnant, Vendicator / 2003-05-10]
  - Added window size output to info

- Added [WndMan / repugnant, Vendicator / 2003-02-07, release: 0.13]
  - Added !WndToggleShade made by repugnant
  - Fixed bug with saved window size not being removed when window is unshaded
    (needed otherwise the restored size can't be changed and needed for shade toggle)

- Changed [WndMan / Vendicator / 2003-02-05, release: 0.12]
  - WndMan now restores all tasks from tray before closing, otherwise the tasks
    wouldn't restorable, since the icons still refer to the old WndMan window
  - Added !WndRestoreFromTray and !WndRestoreAllFromTray

- Fixed [WndMan / Vendicator / 2003-02-05, release: 0.11]
  - Tested and fixed shading/unshading windows
  - Removed some logging left from early development
  - Renamed previous !WndClose to !WndDestroy, and made a new implementation of !WndClose
  - Added !WndUnshadeAll to restore previously shaded windows

- Fixed [WndMan / Vendicator / 2003-02-03, release: 0.1]
  - Fixed tray minimization & restore

- Added [WndMan / Vendicator / 2002-07-22]
  - Added options %active% and %point% to commands to get active window or window from mouse point location.

- Added [WndMan / Vendicator / 2002-06-10]
  - Added !WndClose to close a window.
  - Worked more on systray minimization, needs unique uID's & track HWND's that have been minimized

- Added [WndMan / Vendicator / 2002-06-09]
  - Added Minimizing to tray, tho not possible to restore yet.
  - Added !bangs for sizing and moving

- Added [WndMan / Vendicator / 2002-06-08]
  - Added WndSize() & WndMove()

- Modified [WndMan / Vendicator / 2002-06-02]
  - Restructured WindowInfo()

- Modified [WndMan / Vendicator / 2002-06-02]
  - Moved code section for finding window on args or active window to a function.

- Added [WndMan / Vendicator / 2002-06-02]
  - Can now specify window classname in all !bang commands (set first)
  - Fixes to Opacity setting handlers.

- Added [WndMan / Vendicator / 2002-06-01]
  - Added Opacity setting (thanks MickeM).
  - Added some more stuff... don't remember

- Start [WndMan / Vendicator 2002-05-31]
  - Started working on WndMan - Window Manager, basic window commands added


To Do:

  - Test moving & sizing (multimon too)
  - SetThreadPriority, GetThreadFromWindow?
  - Change window titles?
  - Linking windows to move together, specify parent / child.
  - Docking windows together.
  - Remaximize windows on recycle (if desktop area changes, so windows look right after recycle)
  - Intercept new HWNDs? hook into windows.
  - Window startup animations? (alpha 0->255)
  - Info: find process name from HWND, exe
  - Colors (GetSysColor, set...)
  - Get sizes GetSystemMetrics, GetTitleBarInfo, GetWindowInfo, GetClientRect
  - Set animation AnimateWindow, toggles of animation
  - Keep internal window list? hooks?
  - placement on different desks?
  - groups?
  - step.rc settings, detect of windows for everything
  - x tracking, set forground window automatically to window under point?
  - dialog pos, per windows?WndMan (0.14):
by Vendicator

WndMan, short for Window Manager.
The module is intended to provide useful utility functins for handling windows
Currently a lot of the commands are untested.

Bang %argument%
	WndMan can try to find the target window to work on depending on the given argument:
	%point% - Bang will work on the window beneath the mouse pointer
	%active% - Bang will work on the active window (foreground)
	Other - WndMan assumes that the argument is a window class and looks for it
	Default: foreground window

Bangs:

Basic Window Handling:
	!WndForeground %argument%
	Sets the window to foreground

	!WndPushBottom %argument% [untested]
	Pushes the window down to the bottom closes to desktop

	!WndPushBack %argument% [untested]
	Pushes the window back one step

	!WndOnTop %argument% ("on"/"true")
	Sets the window status to be on top if argument is "on" or "true" otherwise it'll be set to normal

	!WndHide %argument%
	Hides the window

	!WndRestore %argument%
	Restores a window from being hidden

	!WndMaxToggle %argument%
	Toggles a window between maximized/normal view

	!WndMaximize %argument%
	Maximizes a window

	!WndMinimize %argument%
	Minimizes a window

	!WndClose %argument%
	Closes a window

	!WndDestroy %argument% [untested]
	Destroys a window, use at own risk

	!WndSetOpacity %argument% (Int: 0-255)
	Sets the opacity of the window, range 0-255. Win2k/Xp only

	!WndInfo %argument%
	Displays a messagebox with various info on a window, also ouputted to log file

	!WndAllInfo %argument%
	Same as !WndInfo but applied to active, foreground and focused window (to check difference)

Changing Size of Windows:
	!WndShade %argument%
	Shades a window, only showing it's titlebar

	!WndToggleShade %argument%
	Toggles a window between shaded state and normal size

	!WndUnShade %argument%
	Unshades the window

	!WndUnShadeAll
	Unshades all windows that have the shaded

	!WndToggleShade %argument%
	Toggles shading the window.

	!WndSize %argument% x y
	Sets the new size of the window to x y (old width or height is kept if that size is set to 0)

	!WndSizeGrow %argument% x y
	Grows the size of the window by x, y (old width or height is kept if that grow amount is set to 0)

	!WndSizeMax %argument% x y [untested]
	Sets the size of the dimension to biggest that the resolution can show
	(ie. 1 0 would mean that the window would be as wide as possible)

Moving Windows:
	!WndMove %argument% x y
	Moves the window to position x, y (old x or y position is kept if that is set to 0)

	!WndMoveDelta %argument% x y
	Moves the window by x y  (old x or y position is kept if that is set to 0)

	!WndMoveHome %argument% [untested]
	Asks Windows where the window should be and moves it there

	!WndMoveCenter %argument% [untested]
	Centers the window on the screen

Traying:
	!WndSendToTray %argument%
	Minimizes the window to tray, clicking it's icon will restore it again

	!WndRestoreFromTray %argument%
	Restores the window from being in the tray

	!WndRestoreAllFromTray
	Restores all icons that have been minimized to tray


Changelog:

- Changed [WndMan / Vendicator / 2003-06-15, release: 0.14]
  - Using BangManager.h from VTK.
  - Fixed a small error in the find window helper.

- Added [WndMan / Vendicator / 2003-05-28]
  - Added LS modules hiding, code from 0.24.7.
    Needed the functionality in .6 until I've tested all my modules with the new core.

- Added [WndMan / repugnant, Vendicator / 2003-05-10]
  - Added window size output to info

- Added [WndMan / repugnant, Vendicator / 2003-02-07, release: 0.13]
  - Added !WndToggleShade made by repugnant
  - Fixed bug with saved window size not being removed when window is unshaded
    (needed otherwise the restored size can't be changed and needed for shade toggle)

- Changed [WndMan / Vendicator / 2003-02-05, release: 0.12]
  - WndMan now restores all tasks from tray before closing, otherwise the tasks
    wouldn't restorable, since the icons still refer to the old WndMan window
  - Added !WndRestoreFromTray and !WndRestoreAllFromTray

- Fixed [WndMan / Vendicator / 2003-02-05, release: 0.11]
  - Tested and fixed shading/unshading windows
  - Removed some logging left from early development
  - Renamed previous !WndClose to !WndDestroy, and made a new implementation of !WndClose
  - Added !WndUnshadeAll to restore previously shaded windows

- Fixed [WndMan / Vendicator / 2003-02-03, release: 0.1]
  - Fixed tray minimization & restore

- Added [WndMan / Vendicator / 2002-07-22]
  - Added options %active% and %point% to commands to get active window or window from mouse point location.

- Added [WndMan / Vendicator / 2002-06-10]
  - Added !WndClose to close a window.
  - Worked more on systray minimization, needs unique uID's & track HWND's that have been minimized

- Added [WndMan / Vendicator / 2002-06-09]
  - Added Minimizing to tray, tho not possible to restore yet.
  - Added !bangs for sizing and moving

- Added [WndMan / Vendicator / 2002-06-08]
  - Added WndSize() & WndMove()

- Modified [WndMan / Vendicator / 2002-06-02]
  - Restructured WindowInfo()

- Modified [WndMan / Vendicator / 2002-06-02]
  - Moved code section for finding window on args or active window to a function.

- Added [WndMan / Vendicator / 2002-06-02]
  - Can now specify window classname in all !bang commands (set first)
  - Fixes to Opacity setting handlers.

- Added [WndMan / Vendicator / 2002-06-01]
  - Added Opacity setting (thanks MickeM).
  - Added some more stuff... don't remember

- Start [WndMan / Vendicator 2002-05-31]
  - Started working on WndMan - Window Manager, basic window commands added


To Do:

  - Test moving & sizing (multimon too)
  - SetThreadPriority, GetThreadFromWindow?
  - Change window titles?
  - Linking windows to move together, specify parent / child.
  - Docking windows together.
  - Remaximize windows on recycle (if desktop area changes, so windows look right after recycle)
  - Intercept new HWNDs? hook into windows.
  - Window startup animations? (alpha 0->255)
  - Info: find process name from HWND, exe
  - Colors (GetSysColor, set...)
  - Get sizes GetSystemMetrics, GetTitleBarInfo, GetWindowInfo, GetClientRect
  - Set animation AnimateWindow, toggles of animation
  - Keep internal window list? hooks?
  - placement on different desks?
  - groups?
  - step.rc settings, detect of windows for everything
  - x tracking, set forground window automatically to window under point?
  - dialog pos, per windows?