2009-02-10 18:37:48 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2001 Kimmo Pekkola
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __METERWINDOW_H__
|
|
|
|
#define __METERWINDOW_H__
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include <gdiplus.h>
|
2011-04-08 18:14:32 +00:00
|
|
|
#include <dwmapi.h>
|
2009-02-10 18:37:48 +00:00
|
|
|
#include <string>
|
|
|
|
#include <list>
|
|
|
|
#include "ConfigParser.h"
|
2010-07-17 13:02:34 +00:00
|
|
|
#include "Group.h"
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2011-11-14 07:53:19 +00:00
|
|
|
#define BEGIN_MESSAGEPROC switch (uMsg) {
|
|
|
|
#define MESSAGE(handler, msg) case msg: return window->handler(uMsg, wParam, lParam);
|
2009-02-10 18:37:48 +00:00
|
|
|
#define REJECT_MESSAGE(msg) case msg: return 0;
|
2011-11-14 07:53:19 +00:00
|
|
|
#define END_MESSAGEPROC } return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2009-08-19 17:57:09 +00:00
|
|
|
#define WM_DELAYED_EXECUTE WM_APP + 0
|
|
|
|
#define WM_DELAYED_REFRESH WM_APP + 1
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
#define WM_DELAYED_MOVE WM_APP + 3
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2010-09-04 08:04:13 +00:00
|
|
|
#define METERWINDOW_CLASS_NAME L"RainmeterMeterWindow"
|
|
|
|
|
2011-04-08 18:14:32 +00:00
|
|
|
typedef HRESULT (WINAPI * FPDWMENABLEBLURBEHINDWINDOW)(HWND hWnd, const DWM_BLURBEHIND* pBlurBehind);
|
|
|
|
typedef HRESULT (WINAPI * FPDWMGETCOLORIZATIONCOLOR)(DWORD* pcrColorization, BOOL* pfOpaqueBlend);
|
|
|
|
typedef HRESULT (WINAPI * FPDWMSETWINDOWATTRIBUTE)(HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute);
|
|
|
|
typedef HRESULT (WINAPI * FPDWMISCOMPOSITIONENABLED)(BOOL* pfEnabled);
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
enum MOUSE
|
|
|
|
{
|
|
|
|
MOUSE_LMB_DOWN,
|
|
|
|
MOUSE_LMB_UP,
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
MOUSE_LMB_DBLCLK,
|
2009-02-10 18:37:48 +00:00
|
|
|
MOUSE_RMB_DOWN,
|
|
|
|
MOUSE_RMB_UP,
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
MOUSE_RMB_DBLCLK,
|
2009-09-07 16:37:58 +00:00
|
|
|
MOUSE_MMB_DOWN,
|
|
|
|
MOUSE_MMB_UP,
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
MOUSE_MMB_DBLCLK,
|
2009-02-10 18:37:48 +00:00
|
|
|
MOUSE_OVER,
|
|
|
|
MOUSE_LEAVE
|
|
|
|
};
|
|
|
|
|
2010-08-03 15:10:42 +00:00
|
|
|
enum BUTTONPROC
|
|
|
|
{
|
|
|
|
BUTTONPROC_DOWN,
|
|
|
|
BUTTONPROC_UP,
|
|
|
|
BUTTONPROC_MOVE
|
|
|
|
};
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
enum ZPOSITION
|
|
|
|
{
|
|
|
|
ZPOSITION_ONDESKTOP = -2,
|
|
|
|
ZPOSITION_ONBOTTOM = -1,
|
|
|
|
ZPOSITION_NORMAL = 0,
|
|
|
|
ZPOSITION_ONTOP = 1,
|
|
|
|
ZPOSITION_ONTOPMOST = 2
|
|
|
|
};
|
|
|
|
|
2011-04-08 18:14:32 +00:00
|
|
|
enum BLURMODE
|
|
|
|
{
|
|
|
|
BLURMODE_NONE = 0,
|
|
|
|
BLURMODE_FULL,
|
|
|
|
BLURMODE_REGION
|
|
|
|
};
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
enum BGMODE
|
|
|
|
{
|
|
|
|
BGMODE_IMAGE = 0,
|
|
|
|
BGMODE_COPY,
|
|
|
|
BGMODE_SOLID,
|
2010-12-04 15:07:28 +00:00
|
|
|
BGMODE_SCALED_IMAGE,
|
|
|
|
BGMODE_TILED_IMAGE
|
2009-02-10 18:37:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum HIDEMODE
|
|
|
|
{
|
|
|
|
HIDEMODE_NONE = 0,
|
|
|
|
HIDEMODE_HIDE,
|
|
|
|
HIDEMODE_FADEIN,
|
|
|
|
HIDEMODE_FADEOUT
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BEVELTYPE
|
|
|
|
{
|
|
|
|
BEVELTYPE_NONE,
|
|
|
|
BEVELTYPE_UP,
|
|
|
|
BEVELTYPE_DOWN
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BANGCOMMAND
|
|
|
|
{
|
|
|
|
BANG_REFRESH,
|
|
|
|
BANG_REDRAW,
|
2010-12-28 13:31:17 +00:00
|
|
|
BANG_UPDATE,
|
2009-02-10 18:37:48 +00:00
|
|
|
BANG_TOGGLEMETER,
|
|
|
|
BANG_SHOWMETER,
|
|
|
|
BANG_HIDEMETER,
|
2010-07-17 13:02:34 +00:00
|
|
|
BANG_MOVEMETER,
|
2010-12-28 13:31:17 +00:00
|
|
|
BANG_UPDATEMETER,
|
2009-02-10 18:37:48 +00:00
|
|
|
BANG_TOGGLEMEASURE,
|
|
|
|
BANG_ENABLEMEASURE,
|
|
|
|
BANG_DISABLEMEASURE,
|
2010-12-28 13:31:17 +00:00
|
|
|
BANG_UPDATEMEASURE,
|
2011-07-09 09:23:28 +00:00
|
|
|
BANG_COMMANDMEASURE,
|
2011-04-08 18:14:32 +00:00
|
|
|
BANG_SHOWBLUR,
|
|
|
|
BANG_HIDEBLUR,
|
|
|
|
BANG_TOGGLEBLUR,
|
|
|
|
BANG_ADDBLUR,
|
|
|
|
BANG_REMOVEBLUR,
|
2009-02-10 18:37:48 +00:00
|
|
|
BANG_SHOW,
|
|
|
|
BANG_HIDE,
|
|
|
|
BANG_TOGGLE,
|
2010-03-20 19:40:30 +00:00
|
|
|
BANG_SHOWFADE,
|
|
|
|
BANG_HIDEFADE,
|
|
|
|
BANG_TOGGLEFADE,
|
2009-02-10 18:37:48 +00:00
|
|
|
BANG_MOVE,
|
|
|
|
BANG_ZPOS,
|
2010-03-20 19:40:30 +00:00
|
|
|
BANG_SETTRANSPARENCY,
|
2010-08-22 12:08:38 +00:00
|
|
|
BANG_CLICKTHROUGH,
|
|
|
|
BANG_DRAGGABLE,
|
|
|
|
BANG_SNAPEDGES,
|
|
|
|
BANG_KEEPONSCREEN,
|
2010-07-17 13:02:34 +00:00
|
|
|
|
|
|
|
BANG_TOGGLEMETERGROUP,
|
|
|
|
BANG_SHOWMETERGROUP,
|
|
|
|
BANG_HIDEMETERGROUP,
|
2010-12-28 13:31:17 +00:00
|
|
|
BANG_UPDATEMETERGROUP,
|
2010-07-17 13:02:34 +00:00
|
|
|
BANG_TOGGLEMEASUREGROUP,
|
|
|
|
BANG_ENABLEMEASUREGROUP,
|
|
|
|
BANG_DISABLEMEASUREGROUP,
|
2010-12-28 13:31:17 +00:00
|
|
|
BANG_UPDATEMEASUREGROUP,
|
2010-07-17 13:02:34 +00:00
|
|
|
|
2009-08-04 09:48:03 +00:00
|
|
|
BANG_PLUGIN,
|
2011-07-27 10:42:35 +00:00
|
|
|
BANG_SETVARIABLE,
|
|
|
|
BANG_SETOPTION,
|
|
|
|
BANG_SETOPTIONGROUP
|
2009-02-10 18:37:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CRainmeter;
|
|
|
|
class CMeasure;
|
|
|
|
class CMeter;
|
2010-12-12 17:08:36 +00:00
|
|
|
class CMeasureScript;
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2010-07-17 13:02:34 +00:00
|
|
|
class CMeterWindow : public CGroup
|
2009-02-10 18:37:48 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-11-11 20:24:59 +00:00
|
|
|
CMeterWindow(const std::wstring& path, const std::wstring& config, const std::wstring& iniFile);
|
2009-02-10 18:37:48 +00:00
|
|
|
~CMeterWindow();
|
|
|
|
|
|
|
|
int Initialize(CRainmeter& Rainmeter);
|
|
|
|
|
2010-10-19 22:03:32 +00:00
|
|
|
CRainmeter* GetMainObject() { return m_Rainmeter; }
|
2010-07-17 00:06:24 +00:00
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
void RunBang(BANGCOMMAND bang, const WCHAR* arg);
|
|
|
|
|
|
|
|
void MoveMeter(int x, int y, const WCHAR* name);
|
2010-07-07 23:46:44 +00:00
|
|
|
void HideMeter(const WCHAR* name, bool group = false);
|
|
|
|
void ShowMeter(const WCHAR* name, bool group = false);
|
|
|
|
void ToggleMeter(const WCHAR* name, bool group = false);
|
2010-12-28 13:31:17 +00:00
|
|
|
void UpdateMeter(const WCHAR* name, bool group = false);
|
2010-07-07 23:46:44 +00:00
|
|
|
void DisableMeasure(const WCHAR* name, bool group = false);
|
|
|
|
void EnableMeasure(const WCHAR* name, bool group = false);
|
|
|
|
void ToggleMeasure(const WCHAR* name, bool group = false);
|
2010-12-28 13:31:17 +00:00
|
|
|
void UpdateMeasure(const WCHAR* name, bool group = false);
|
2010-03-29 21:50:05 +00:00
|
|
|
void Refresh(bool init, bool all = false);
|
2009-02-10 18:37:48 +00:00
|
|
|
void Redraw();
|
2011-07-27 10:42:35 +00:00
|
|
|
void SetOption(const WCHAR* name, bool group);
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2010-08-03 15:10:42 +00:00
|
|
|
void SetMouseLeaveEvent(bool cancel);
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
void MoveWindow(int x, int y);
|
2010-03-29 21:50:05 +00:00
|
|
|
void ChangeZPos(ZPOSITION zPos, bool all = false);
|
2011-11-10 11:50:47 +00:00
|
|
|
void ChangeSingleZPos(ZPOSITION zPos, bool all = false);
|
2009-10-18 13:31:55 +00:00
|
|
|
void FadeWindow(int from, int to);
|
2010-08-03 15:10:42 +00:00
|
|
|
|
2011-04-08 18:14:32 +00:00
|
|
|
void ResizeBlur(const WCHAR* arg, int mode);
|
|
|
|
bool IsBlur() { return m_Blur; }
|
|
|
|
void SetBlur(bool b) { m_Blur = b; }
|
|
|
|
|
2010-10-19 22:03:32 +00:00
|
|
|
Gdiplus::Bitmap* GetDoubleBuffer() { return m_DoubleBuffer; }
|
|
|
|
HWND GetWindow() { return m_Window; }
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2010-10-19 22:03:32 +00:00
|
|
|
CConfigParser& GetParser() { return m_Parser; }
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2011-12-30 17:18:34 +00:00
|
|
|
const std::wstring& GetSkinAuthor() { return m_Author; }
|
2010-10-19 22:03:32 +00:00
|
|
|
const std::wstring& GetSkinName() { return m_SkinName; }
|
|
|
|
const std::wstring& GetSkinIniFile() { return m_SkinIniFile; }
|
2011-07-18 00:32:09 +00:00
|
|
|
std::wstring GetSkinRootPath();
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2010-10-19 22:03:32 +00:00
|
|
|
std::list<CMeasure*>& GetMeasures() { return m_Measures; }
|
|
|
|
std::list<CMeter*>& GetMeters() { return m_Meters; }
|
2009-02-10 18:37:48 +00:00
|
|
|
|
|
|
|
ZPOSITION GetWindowZPosition() { return m_WindowZPosition; }
|
2009-03-24 04:29:48 +00:00
|
|
|
bool GetXPercentage() { return m_WindowXPercentage; }
|
|
|
|
bool GetYPercentage() { return m_WindowYPercentage; }
|
|
|
|
bool GetXFromRight() { return m_WindowXFromRight; }
|
|
|
|
bool GetYFromBottom() { return m_WindowYFromBottom; }
|
|
|
|
|
2011-01-16 15:51:23 +00:00
|
|
|
int GetW() { return m_WindowW; }
|
|
|
|
int GetH() { return m_WindowH; }
|
|
|
|
int GetX() { return m_ScreenX; }
|
|
|
|
int GetY() { return m_ScreenY; }
|
|
|
|
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
bool GetXScreenDefined() { return m_WindowXScreenDefined; }
|
|
|
|
bool GetYScreenDefined() { return m_WindowYScreenDefined; }
|
|
|
|
int GetXScreen() { return m_WindowXScreen; }
|
|
|
|
int GetYScreen() { return m_WindowYScreen; }
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
bool GetNativeTransparency() { return m_NativeTransparency; }
|
|
|
|
bool GetClickThrough() { return m_ClickThrough; }
|
|
|
|
bool GetKeepOnScreen() { return m_KeepOnScreen; }
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
bool GetAutoSelectScreen() { return m_AutoSelectScreen; }
|
2009-02-10 18:37:48 +00:00
|
|
|
bool GetWindowDraggable() { return m_WindowDraggable; }
|
|
|
|
bool GetSavePosition() { return m_SavePosition; }
|
|
|
|
bool GetSnapEdges() { return m_SnapEdges; }
|
|
|
|
HIDEMODE GetWindowHide() { return m_WindowHide; }
|
|
|
|
int GetAlphaValue() { return m_AlphaValue; }
|
|
|
|
int GetUpdateCounter() { return m_UpdateCounter; }
|
2009-07-21 12:26:50 +00:00
|
|
|
int GetTransitionUpdate() { return m_TransitionUpdate; }
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2011-11-03 00:13:42 +00:00
|
|
|
bool GetMeterToolTipHidden() { return m_ToolTipHidden; }
|
|
|
|
bool GetMeterMouseActionCursor() { return m_MouseActionCursor; }
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
void AddMeasureBang(const WCHAR* bang, int index, CMeasure* measure);
|
|
|
|
|
2010-09-03 11:05:28 +00:00
|
|
|
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2011-11-28 14:13:20 +00:00
|
|
|
void MakePathAbsolute(std::wstring& path);
|
2009-07-24 07:56:37 +00:00
|
|
|
|
2010-10-19 22:03:32 +00:00
|
|
|
Gdiplus::PrivateFontCollection* GetPrivateFontCollection() { return m_FontCollection; }
|
2009-09-03 00:33:46 +00:00
|
|
|
|
2011-02-15 13:22:19 +00:00
|
|
|
CMeter* GetMeter(const std::wstring& meterName);
|
|
|
|
CMeasure* GetMeasure(const std::wstring& measureName);
|
|
|
|
|
2011-08-28 10:58:26 +00:00
|
|
|
friend class CDialogManage;
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
protected:
|
|
|
|
static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2011-11-14 07:53:19 +00:00
|
|
|
static LRESULT CALLBACK InitialWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2009-02-10 18:37:48 +00:00
|
|
|
|
2010-09-03 11:05:28 +00:00
|
|
|
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnMove(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnEnterSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2011-01-08 07:28:48 +00:00
|
|
|
LRESULT OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnEnterMenuLoop(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2010-09-03 11:05:28 +00:00
|
|
|
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnMouseLeave(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnLeftButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnRightButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnMiddleButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnLeftButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnRightButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnMiddleButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnLeftButtonDoubleClick(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnRightButtonDoubleClick(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnMiddleButtonDoubleClick(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnDelayedExecute(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnDelayedRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnDelayedMove(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2011-04-08 18:14:32 +00:00
|
|
|
LRESULT OnDwmColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnDwmCompositionChange(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT OnDisplayChange(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2009-02-10 18:37:48 +00:00
|
|
|
|
|
|
|
private:
|
2011-08-06 10:43:14 +00:00
|
|
|
enum SETTING
|
|
|
|
{
|
|
|
|
SETTING_WINDOWPOSITION = 0x00000001,
|
|
|
|
SETTING_ALPHAVALUE = 0x00000002,
|
|
|
|
SETTING_FADEDURATION = 0x00000004,
|
|
|
|
SETTING_CLICKTHROUGH = 0x00000008,
|
|
|
|
SETTING_WINDOWDRAGGABLE = 0x00000010,
|
|
|
|
SETTING_HIDEONMOUSEOVER = 0x00000020,
|
|
|
|
SETTING_SAVEPOSITION = 0x00000040,
|
|
|
|
SETTING_SNAPEDGES = 0x00000080,
|
|
|
|
SETTING_KEEPONSCREEN = 0x00000100,
|
|
|
|
SETTING_AUTOSELECTSCREEN = 0x00000200,
|
|
|
|
SETTING_ALWAYSONTOP = 0x00000400,
|
|
|
|
|
|
|
|
SETTING_ALL = 0xFFFFFFFF
|
|
|
|
};
|
|
|
|
|
2010-08-03 15:10:42 +00:00
|
|
|
bool HitTest(int x, int y);
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
void CreateRegion(bool clear);
|
|
|
|
void GetSkinFolders(const std::wstring& folder);
|
|
|
|
Gdiplus::Bitmap* GrabDesktop(int x, int y, int w, int h);
|
|
|
|
void SnapToWindow(CMeterWindow* window, LPWINDOWPOS wp);
|
|
|
|
void MapCoordsToScreen(int& x, int& y, int w, int h);
|
2009-03-24 04:29:48 +00:00
|
|
|
void WindowToScreen();
|
|
|
|
void ScreenToWindow();
|
2010-12-28 13:31:17 +00:00
|
|
|
void PostUpdate(bool bActiveTransition);
|
|
|
|
bool UpdateMeasure(CMeasure* measure, bool force);
|
|
|
|
bool UpdateMeter(CMeter* meter, bool& bActiveTransition, bool force);
|
2009-02-10 18:37:48 +00:00
|
|
|
void Update(bool nodraw);
|
|
|
|
void UpdateTransparency(int alpha, bool reset);
|
|
|
|
void ReadConfig();
|
2011-08-06 10:43:14 +00:00
|
|
|
void WriteConfig(INT setting = SETTING_ALL);
|
2010-07-22 02:37:51 +00:00
|
|
|
bool ReadSkin();
|
2010-06-01 14:55:52 +00:00
|
|
|
void InitializeMeasures();
|
2009-02-10 18:37:48 +00:00
|
|
|
void InitializeMeters();
|
|
|
|
void ShowWindowIfAppropriate();
|
2010-09-03 11:05:28 +00:00
|
|
|
HWND GetWindowFromPoint(POINT pos);
|
2011-11-08 10:32:57 +00:00
|
|
|
void HandleButtons(POINT pos, BUTTONPROC proc, bool execute = true);
|
2010-09-03 11:05:28 +00:00
|
|
|
void SetClickThrough(bool b);
|
|
|
|
void SetKeepOnScreen(bool b);
|
|
|
|
void SetWindowDraggable(bool b);
|
|
|
|
void SetSavePosition(bool b);
|
|
|
|
void SetSnapEdges(bool b);
|
2011-08-28 10:58:26 +00:00
|
|
|
void SetWindowHide(HIDEMODE hide);
|
2011-09-30 16:49:49 +00:00
|
|
|
void SetWindowZPosition(ZPOSITION zpos);
|
2009-02-10 18:37:48 +00:00
|
|
|
bool DoAction(int x, int y, MOUSE mouse, bool test);
|
2010-08-13 23:20:20 +00:00
|
|
|
bool DoMoveAction(int x, int y, MOUSE mouse);
|
2009-02-10 18:37:48 +00:00
|
|
|
bool ResizeWindow(bool reset);
|
2010-03-20 19:40:30 +00:00
|
|
|
void IgnoreAeroPeek();
|
2011-04-08 18:14:32 +00:00
|
|
|
void BlurBehindWindow(BOOL fEnable);
|
2011-01-16 15:51:23 +00:00
|
|
|
void SetWindowPositionVariables(int x, int y);
|
|
|
|
void SetWindowSizeVariables(int w, int h);
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
|
2011-04-08 18:14:32 +00:00
|
|
|
void ShowBlur();
|
|
|
|
void HideBlur();
|
|
|
|
|
2011-03-23 21:19:55 +00:00
|
|
|
void CreateDoubleBuffer(int cx, int cy);
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
CConfigParser m_Parser;
|
|
|
|
|
|
|
|
Gdiplus::Bitmap* m_DoubleBuffer;
|
2011-03-23 21:19:55 +00:00
|
|
|
HBITMAP m_DIBSectionBuffer;
|
|
|
|
LPDWORD m_DIBSectionBufferPixels;
|
|
|
|
int m_DIBSectionBufferW;
|
|
|
|
int m_DIBSectionBufferH;
|
|
|
|
|
2009-02-10 18:37:48 +00:00
|
|
|
Gdiplus::Bitmap* m_Background; // The background bitmap
|
|
|
|
SIZE m_BackgroundSize;
|
|
|
|
|
|
|
|
HWND m_Window; // Handle to the Rainmeter window
|
|
|
|
|
|
|
|
std::wstring m_LeftMouseDownAction; // Action to run when left mouse is pressed
|
2011-11-18 22:40:58 +00:00
|
|
|
std::wstring m_RightMouseDownAction; // Action to run when right mouse is pressed
|
2009-09-07 16:37:58 +00:00
|
|
|
std::wstring m_MiddleMouseDownAction; // Action to run when middle mouse is pressed
|
2009-02-10 18:37:48 +00:00
|
|
|
std::wstring m_LeftMouseUpAction; // Action to run when left mouse is released
|
2011-11-18 22:40:58 +00:00
|
|
|
std::wstring m_RightMouseUpAction; // Action to run when right mouse is released
|
2009-09-07 16:37:58 +00:00
|
|
|
std::wstring m_MiddleMouseUpAction; // Action to run when middle mouse is released
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
std::wstring m_LeftMouseDoubleClickAction; // Action to run when left mouse is double-clicked
|
2011-11-18 22:40:58 +00:00
|
|
|
std::wstring m_RightMouseDoubleClickAction; // Action to run when right mouse is double-clicked
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
std::wstring m_MiddleMouseDoubleClickAction; // Action to run when middle mouse is double-clicked
|
2009-02-10 18:37:48 +00:00
|
|
|
std::wstring m_MouseOverAction; // Action to run when mouse goes over the window
|
|
|
|
std::wstring m_MouseLeaveAction; // Action to run when mouse leaves the window
|
|
|
|
std::wstring m_OnRefreshAction; // Action to run when window is initialized
|
|
|
|
|
|
|
|
bool m_MouseOver;
|
|
|
|
|
2011-12-30 17:18:34 +00:00
|
|
|
std::wstring m_Author; // Skin's author
|
2010-11-24 16:41:50 +00:00
|
|
|
std::wstring m_ConfigGroup;
|
2009-02-10 18:37:48 +00:00
|
|
|
std::wstring m_BackgroundName; // Name of the background image
|
2010-12-06 08:59:55 +00:00
|
|
|
RECT m_BackgroundMargins;
|
|
|
|
RECT m_DragMargins;
|
2009-03-24 04:29:48 +00:00
|
|
|
std::wstring m_WindowX; // Window's X-position in config file
|
|
|
|
std::wstring m_WindowY; // Window's Y-position in config file
|
2009-03-26 04:16:57 +00:00
|
|
|
std::wstring m_AnchorX; // Anchor's X-position in config file
|
|
|
|
std::wstring m_AnchorY; // Anchor's Y-position in config file
|
2009-03-24 04:29:48 +00:00
|
|
|
int m_WindowXScreen;
|
|
|
|
int m_WindowYScreen;
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
bool m_WindowXScreenDefined;
|
|
|
|
bool m_WindowYScreenDefined;
|
2009-03-24 04:29:48 +00:00
|
|
|
bool m_WindowXFromRight;
|
|
|
|
bool m_WindowYFromBottom;
|
|
|
|
bool m_WindowXPercentage;
|
|
|
|
bool m_WindowYPercentage;
|
|
|
|
int m_WindowW; // Window's Width
|
2009-02-10 18:37:48 +00:00
|
|
|
int m_WindowH; // Window's Height
|
2009-03-24 04:29:48 +00:00
|
|
|
int m_ScreenX; // Window's X-postion on the virtual screen
|
|
|
|
int m_ScreenY; // Window's Y-postion on the virtual screen
|
2009-03-26 04:16:57 +00:00
|
|
|
bool m_AnchorXFromRight;
|
|
|
|
bool m_AnchorYFromBottom;
|
|
|
|
bool m_AnchorXPercentage;
|
|
|
|
bool m_AnchorYPercentage;
|
|
|
|
int m_AnchorScreenX; // Window's anchor X-postion
|
|
|
|
int m_AnchorScreenY; // Window's anchor Y-postion
|
2009-02-10 18:37:48 +00:00
|
|
|
bool m_WindowDraggable; // True, if window can be moved
|
|
|
|
int m_WindowUpdate; // Measure update frequency
|
2009-07-21 12:26:50 +00:00
|
|
|
int m_TransitionUpdate; // Transition redraw frequency
|
|
|
|
bool m_ActiveTransition;
|
2010-03-29 21:50:05 +00:00
|
|
|
bool m_HasNetMeasures;
|
2010-08-17 07:19:48 +00:00
|
|
|
bool m_HasButtons;
|
2009-03-24 04:29:48 +00:00
|
|
|
HIDEMODE m_WindowHide; // If true, the window is hidden when mouse is over it
|
2009-02-10 18:37:48 +00:00
|
|
|
bool m_WindowStartHidden; // If true, the window is hidden at startup
|
|
|
|
bool m_SavePosition; // If true, the window's position is saved
|
|
|
|
bool m_SnapEdges; // If true, the window snaps to the edges of the screen when moved
|
|
|
|
bool m_NativeTransparency; // If true, use the W2k/XP native transparency
|
|
|
|
int m_AlphaValue; // The 'from' transparency value 0 - 255
|
|
|
|
int m_FadeDuration; // Time it takes to fade the window
|
|
|
|
ZPOSITION m_WindowZPosition; // Window's Z-position
|
|
|
|
bool m_DynamicWindowSize; //
|
|
|
|
bool m_ClickThrough; //
|
|
|
|
bool m_KeepOnScreen; //
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
bool m_AutoSelectScreen; //
|
2009-03-24 04:29:48 +00:00
|
|
|
bool m_Dragging; //
|
* Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)
-----
* Added the "Display Monitor" submenu in [Skins Menu]-[Position].
These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)
- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.
AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.
-----
* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.
The following variables are for the virtual screen.
#VSCREENAREAX# is the X-position of the left-side of the virtual screen.
#VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
#VSCREENAREAWIDTH# is the width of the virtual screen.
#VSCREENAREAHEIGHT# is the height of the virtual screen.
The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.
#WORKAREAX# is the X-position of the left-side of the work area.
#WORKAREAY# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH# is the width of the work area.
#WORKAREAHEIGHT# is the height of the work area.
#SCREENAREAX# is the X-position of the left-side of the monitor screen.
#SCREENAREAY# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH# is the width of the display resolution.
#SCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the PRIMARY monitor.
#PWORKAREAX# is the X-position of the left-side of the work area.
#PWORKAREAY# is the Y-position of the top-side of the work area.
#PWORKAREAWIDTH# is the width of the work area.
#PWORKAREAHEIGHT# is the height of the work area.
#PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
#PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
#PSCREENAREAWIDTH# is the width of the display resolution.
#PSCREENAREAHEIGHT# is the height of the display resolution.
The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)
#WORKAREAX@n# is the X-position of the left-side of the work area.
#WORKAREAY@n# is the Y-position of the top-side of the work area.
#WORKAREAWIDTH@n# is the width of the work area.
#WORKAREAHEIGHT@n# is the height of the work area.
#SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
#SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
#SCREENAREAWIDTH@n# is the width of the display resolution.
#SCREENAREAHEIGHT@n# is the height of the display resolution.
-----
* Other related changes:
- Fixed the problem that the primary monitor isn't recognized correctly.
- Fixed the problem that the information of the multiple display monitors is refreshed excessively.
- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.
- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.
- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)
-----
* Other changes:
- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.
- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.
- Fixed the problem that the Meter's hit-test code checks outside the area.
- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
|
|
|
bool m_Dragged; //
|
2009-02-10 18:37:48 +00:00
|
|
|
BGMODE m_BackgroundMode; // The background mode
|
|
|
|
Gdiplus::Color m_SolidColor; // Color of the solid background
|
|
|
|
Gdiplus::Color m_SolidColor2; // Color of the solid background
|
2011-04-08 18:14:32 +00:00
|
|
|
Gdiplus::REAL m_SolidAngle; //
|
2009-02-10 18:37:48 +00:00
|
|
|
BEVELTYPE m_SolidBevel; // The type of the bevel
|
|
|
|
|
2011-04-08 18:14:32 +00:00
|
|
|
bool m_Blur; // If true, Aero blur is active
|
|
|
|
BLURMODE m_BlurMode; // The blur mode
|
|
|
|
HRGN m_BlurRegion; // Handle to the blur region
|
|
|
|
|
2011-06-05 12:32:18 +00:00
|
|
|
ULONGLONG m_FadeStartTime;
|
2009-02-10 18:37:48 +00:00
|
|
|
int m_FadeStartValue;
|
|
|
|
int m_FadeEndValue;
|
|
|
|
int m_TransparencyValue;
|
|
|
|
|
|
|
|
bool m_Refreshing; // This is true, when the meter is refreshing
|
|
|
|
|
|
|
|
bool m_Hidden; // True, if Rainmeter is hidden
|
|
|
|
bool m_ResetRegion; // If true, the window region is recalculated during the next update
|
|
|
|
|
|
|
|
std::list<CMeasure*> m_Measures; // All the measures
|
|
|
|
std::list<CMeter*> m_Meters; // All the meters
|
|
|
|
|
2010-11-22 19:52:10 +00:00
|
|
|
const std::wstring m_SkinPath; // Path of the skin folder
|
|
|
|
const std::wstring m_SkinName; // Name of the current skin folder
|
|
|
|
const std::wstring m_SkinIniFile; // Name of the current skin iniFile
|
2009-02-10 18:37:48 +00:00
|
|
|
|
|
|
|
int m_UpdateCounter;
|
2010-12-24 10:47:31 +00:00
|
|
|
UINT m_MouseMoveCounter;
|
2009-02-10 18:37:48 +00:00
|
|
|
|
|
|
|
CRainmeter* m_Rainmeter; // Pointer to the main object
|
|
|
|
|
2009-09-03 00:33:46 +00:00
|
|
|
Gdiplus::PrivateFontCollection* m_FontCollection;
|
2009-10-30 18:15:13 +00:00
|
|
|
|
|
|
|
bool m_MouseActionCursor;
|
2010-10-12 14:14:32 +00:00
|
|
|
bool m_ToolTipHidden;
|
2011-01-29 00:11:01 +00:00
|
|
|
|
|
|
|
static int c_InstanceCount;
|
2011-04-08 18:14:32 +00:00
|
|
|
|
|
|
|
static HINSTANCE c_DwmInstance;
|
|
|
|
|
|
|
|
static FPDWMENABLEBLURBEHINDWINDOW c_DwmEnableBlurBehindWindow;
|
|
|
|
static FPDWMGETCOLORIZATIONCOLOR c_DwmGetColorizationColor;
|
|
|
|
static FPDWMSETWINDOWATTRIBUTE c_DwmSetWindowAttribute;
|
|
|
|
static FPDWMISCOMPOSITIONENABLED c_DwmIsCompositionEnabled;
|
2009-02-10 18:37:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|