Commit Graph

56 Commits

Author SHA1 Message Date
spx
489f2c5a30 Code cleanup & cosmetics: Moved Measure/Meter shared part to Section.h 2012-08-09 06:50:58 -07:00
Brian Ferguson
90c81e01d1 Fixed Bar/Histogram meters containing wrong width/height values when used with images 2012-08-04 17:15:56 -06:00
Brian Ferguson
78542ec2be Fixed resizing of certain meters with !SetOption 2012-08-03 17:18:12 -06:00
Birunthan Mohanathas
ffbdcbf65a Tweaks 2012-07-18 13:27:30 +03:00
Birunthan Mohanathas
f2b52b4204 Fixed that meters were initialized before measures 2012-07-18 08:19:01 +03:00
Birunthan Mohanathas
1ecf6086bd Additional changes to 4bbc372 2012-07-17 22:07:57 +03:00
Birunthan Mohanathas
2f543e5dcb Changed !SetOption to work with X, Y, and Hidden 2012-07-17 21:19:03 +03:00
Birunthan Mohanathas
40212ddd5e Tweaks 2012-07-17 12:00:28 +03:00
Birunthan Mohanathas
8309eb2bda Tweaks 2012-07-17 10:57:28 +03:00
Birunthan Mohanathas
4bbc372116 Tweaked measure binding 2012-07-17 10:37:53 +03:00
Birunthan Mohanathas
e884201a90 Added support for custom cursors (based on @brianferguson's work)
Also refactored mouse action code to remove duplicate code.
2012-07-13 12:33:09 +03:00
Birunthan Mohanathas
e3d92d354c Cosmetics 2012-05-30 21:53:44 +03:00
Birunthan Mohanathas
6a520542bc Removed useless comments 2012-05-20 20:58:37 +03:00
Brian
1ec7f71ce7 Changed StringAlign on Meter=String to support both horizontal and vertical positioning 2012-05-16 14:02:31 -04:00
Birunthan Mohanathas
7168634bb6 Disabled RTTI and removed dynamic_cast 2012-04-09 19:45:54 +03:00
spx
ebec08914a Adjusted copyright notice.
http://www.gnu.org/licenses/gpl-2.0.html
2012-01-23 06:36:15 +00:00
spx
3c1338b4c5 - Renamed bool ReadFormula() to ParseFormula.
- Changed ReadConfig() in Measure/Meter to protected.
- Other code tweaks and cleanups.
2011-11-26 02:49:52 +00:00
spx
efc8275ed1 Minor tweaks. 2011-11-18 22:40:58 +00:00
spx
deef3b0ab4 Minor tweaks. 2011-11-12 15:36:05 +00:00
spx
f945bacfb7 Minor tweaks. 2011-11-04 12:48:03 +00:00
spx
22c36f8b49 Code cleanup. 2011-11-03 00:13:42 +00:00
spx
1aaa03308c Code cleanup. 2011-11-01 04:56:46 +00:00
Birunthan Mohanathas
822c10060a - Added !SetOption/!SetOptionGroup bangs.
- Script: Added GetOption() function
2011-07-27 10:42:35 +00:00
spx
fe9fd9f476 Code cleanup. 2011-02-15 16:26:54 +00:00
spx
1ba57f2adf Fixed some Lua related issues.
Removed some internal functions from exposed functions for Lua.
Code cleanup and optimizing for VC2010.
2011-02-15 13:22:19 +00:00
spx
b0af82a25d Cleaned up header dependencies to avoid unnecessary compiling. 2011-02-07 08:02:12 +00:00
spx
2fafb5dcdc - Added !RainmeterUpdate/!RainmeterUpdateMeter(Group)/!RainmeterUpdateMeasure(Group).
- Changed Update= and UpdateDivider= behaviors. If you specify < 0 to them, measures/meters are not updated automatically.
2010-12-28 13:31:17 +00:00
mapeki
c516bf8310 Added Lua Stuff
There are a few changes to the core Rainmeter code.
2010-12-12 17:08:36 +00:00
spx
9c24727749 - Reduced memory usage on BackgroundMode=2.
- Code cleanup.
2010-12-08 09:04:36 +00:00
Birunthan Mohanathas
6efbd23314 Adding ImageCrop and MeasureName/ImageName changes by spx. 2010-12-05 15:34:37 +00:00
spx
2186b2eb2a Fixed an issue that ReadConfig() is called unnecessarily when DynamicVariables=1 and UpdateDivider=* are set. 2010-11-25 23:57:10 +00:00
spx
45e33ce704 - Code cleanup.
- MeterLine: Small performance improvement on Draw().
2010-11-19 07:33:58 +00:00
spx
25abbc2444 - Added multiple MeterStyle.
- Code cleanup & cosmetics.
2010-11-04 00:17:42 +00:00
spx
db4fac0877 Code cleanup & cosmetics. 2010-10-19 22:03:32 +00:00
Birunthan Mohanathas
b53f0d9f6b - Moving to NSIS Unicode
- Partial rewrite of Rainstaller
- Fixed a small problem with !RainmeterShowMeter and ToolTipHidden=1.
- ToolTipHidden can now be used under [Rainmeter].
2010-10-12 14:14:32 +00:00
Birunthan Mohanathas
140ed85ed7 Added ToolTipHidden=1 / 0. When set to 1, tooltips will be suppressed. Default is 0.
Some minor changes to Rainstaller.
2010-10-10 16:58:55 +00:00
spx
df146e4eb4 Code cleanup & cosmetic. 2010-09-17 08:47:22 +00:00
jsmorley
eee8d9bb1c Changed ToolTip function to allow using %1, %2 etc. as appropriate for various meter types:
Line, String: %1, %2, %3, ...
Histogram: %1, %2
Others: %1
2010-09-10 17:29:30 +00:00
jsmorley
b3507f6f8e Tooltips: Added ToolTipWidth= key | Fix for using [MeasureName] as ToolTipText alone. 2010-07-20 21:20:14 +00:00
jsmorley
ff153f3f86 Adding JamesAC's new ToolTips functionality.
Minor fix to the Rainmeter installer
Minor changes to RainBrowser and RainThemes
2010-07-17 00:06:24 +00:00
spx
f61a35a64d - Added "Group" option to Measure/Meter to operate Measures/Meters in bulk.
Usage:
    Group=group1 | group2 | group3
    * Concatenate group with the "|" if you'd like to assign multiple groups.

- Added !Bangs for Group. (!RainmeterShowMeterGroup, !RainmeterHideMeterGroup, !RainmeterToggleMeterGroup, !RainmeterEnableMeasureGroup, !RainmeterDisableMeasureGroup, !RainmeterToggleMeasureGroup)
Usage:
    !RainmeterShowMeterGroup [group] (Config)
    !RainmeterHideMeterGroup [group] (Config)
    !RainmeterToggleMeterGroup [group] (Config)
    !RainmeterEnableMeasureGroup [group] (Config)
    !RainmeterDisableMeasureGroup [group] (Config)
    !RainmeterToggleMeasureGroup [group] (Config)

- Modified logging feature. Added new "Logging" menu to the context menu.

- Added the manifest to Rainmeter.exe to apply visual style to button etc.
2010-07-07 23:46:44 +00:00
spx
b675265606 Fixed incomplete fix in r420 and r422.
Fixed the issue that the result of some bangs is overwritten with the default value if DynamicVariables=1 is added to Measure/Meter. (Issue 125) Note that this fix is effective only when the setting is not defined in skin configuration file. The result of !RainmeterHideMeter(or Show/Toggle) is overwritten if Hidden=0/1 is added.
Some minor changes.
2010-05-31 21:02:04 +00:00
spx
cc3ad487a7 * 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
jsmorley
fd9cac7add Change by MattKing to the MouseActionCursor feature. The user can now set MouseActionCursor=0 in the [Rainmeter] section of the skin, and the change of the cursor to the hand when over mouse action meters will be disabled for the entire skin. This can be overridden on a meter-by-meter basis with MouseActionCursor=1.
Added this change to the Meters.htm help file.
2009-10-30 18:15:13 +00:00
jsmorley
5560d6e72a Added MattKing's code to enable the standard "hand pointer" mouse cursor when you hover over a meter with any "MouseAction" on it or a button.
This behavior is ON by default.  If you do not want the cursor change on a meter or button, set MouseActionCursor=0 on the Meter or button.

Example of disabling mouse cursor change:

[Meter]
Meter=Image
W=100
H=100
SolidColor=0,0,0,255
LeftMouseUpAction=!Execute ["http://rainmeter.net"]
MouseActionCursor=0

Note: If you have a button with a meter (either image or text) on TOP of it, you will need to set MouseActionCursor=0 on the image/text meter even if it doesn't have a mouse action, or the button will not change cursors.
2009-09-25 22:20:07 +00:00
spx
9d96ec61c1 - Fixed: Multibang [] not assumed when [Measure] is replaced in CConfigParser::ReadString().
- Minor changes of ConvertToXXX(): Get an appropriate buffer size to convert the string. And using [] when deleting arrays.
- Fixed a few memory leaks.
- It's now possible to send the !BANG command when all windows are "On Desktop". (Rainmeter.exe and WebParser)
2009-09-12 11:11:40 +00:00
jsmorley
48bee2c6fe 1) Added MattKing's code for supporting the middle mouse button in [Rainmeter] and [MeasureName].
MiddleMouseUpAction | MiddleMouseDownAction

2) Updated the manual entries for the middle mouse functionality

3) Added  spx268's code to fix a problem with BUTTON and dynamic variables addressed in:

http://code.google.com/p/rainmeter/issues/detail?id=108
2009-09-07 16:37:58 +00:00
Kimmo Pekkola
4bf4e51126 Reverted the changes from r209. 2009-09-04 16:37:51 +00:00
jsmorley
8239919333 Added MeterStyle functionality:
Rainy, given the "issues" listed at the bottom of this comment, I leave it to you whether to create a build using this revision or use r208 for the build.  I would like to start testing MeterStyle, but there are a few more things it needs work on.

What is MeterStyle?

MeterStyle
This will allow users to create CSS-like "Styles" for meters. This means that all the parameters of a meter can be defined in the style, and then many meters can use the style to eliminate copy / pasting the same parameters over and over on multiple meters. (Examples: FontColor=, FontSize= etc.)

How do I use it?

You will create a new [Section] (as many as you want) in the .ini. The section(s) can have any name.

[MyStringStyle]

Then you will tell Rainmeter that this is a "MeterStyle" and not a measure or meter

Style=Meter

Note: The "value" of the key "Style" can be anything. It can be used to add a description of the style if you like. Style=This style is for the AccuWeather part of this skin
It is however required, both to tell Rainmeter it is not a meter or measure and to have the MeterStyle routines parse it.

Then you define parameters you want to use in the style

FontColor=#FontColor#
FontFace=TheSansBold-Caps
FontSize=11
StringEffect=SHADOW
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1

Then in any or all meters, you just use

[MeterName]
Meter=STRING (or any other meter type)
MeterStyle=MyStringStyle

None of the parameters in the style are then required to be actually in the meter(s). They are "inherited" from the MeterStyle.

Note: This works and has had preliminary testing with dynamic variables like FontColor=[MeasureName] and regular variables like FontColor=#FontColor#. It doesn't matter if the [Variables] section or the [MeasureName] measure is before or after the [StyleName] in the .ini file.

What if I want to override a MeterStyle parameter on a meter?

Sure. Just put in any parameter with a value different from the one defined in the MeterStyle and the one in the meter will take presidence. All non-defined parameters will still use the MeterStyle value.

[MeterName]
Meter=STRING
MeterStyle=MyStringStyle
FontColor=100,100,100,50

What are these "known issues" you are on about?

This is still a bit of a work in progress. Right now you cannot define X or Y in a style. You can define W and H, but NOT for a STRING meter. You cannot define a "Transformation Matrix" in a style. MattKing will be looking into these tomorrow. W and H in a string meter is our top priority. We will also look at X and Y and hope for an easy solution. Transformation Matrix may have to come later.
2009-09-04 14:48:28 +00:00
Kimmo Pekkola
c6fdbf7b60 Dynamic variables can be used to change the font in the string Meter.cpp.
Removed the error message if the meter's dimensions are 0.
2009-08-27 17:05:10 +00:00