Removed useless comments

This commit is contained in:
Birunthan Mohanathas 2012-05-20 20:57:12 +03:00
parent 59713dd9b3
commit 6a520542bc
16 changed files with 175 additions and 186 deletions

View File

@ -132,16 +132,16 @@ private:
std::wstring* m_CurrentSection; std::wstring* m_CurrentSection;
std::list<std::wstring> m_Sections; // The sections must be an ordered array std::list<std::wstring> m_Sections; // Ordered section
std::unordered_map<std::wstring, std::wstring> m_Values; std::unordered_map<std::wstring, std::wstring> m_Values;
std::unordered_set<std::wstring> m_FoundSections; std::unordered_set<std::wstring> m_FoundSections;
std::list<std::wstring> m_ListVariables; std::list<std::wstring> m_ListVariables;
std::unordered_map<std::wstring, std::wstring> m_BuiltInVariables; // Built-in variables std::unordered_map<std::wstring, std::wstring> m_BuiltInVariables;
std::unordered_map<std::wstring, std::wstring> m_Variables; // User-defined variables std::unordered_map<std::wstring, std::wstring> m_Variables;
static std::unordered_map<std::wstring, std::wstring> c_MonitorVariables; // Monitor variables static std::unordered_map<std::wstring, std::wstring> c_MonitorVariables;
}; };
#endif #endif

View File

@ -136,21 +136,21 @@ protected:
static void ReadMeasureNames(CConfigParser& parser, const WCHAR* section, std::vector<std::wstring>& measureNames); static void ReadMeasureNames(CConfigParser& parser, const WCHAR* section, std::vector<std::wstring>& measureNames);
static bool ReplaceMeasures(const std::vector<std::wstring>& stringValues, std::wstring& str); static bool ReplaceMeasures(const std::vector<std::wstring>& stringValues, std::wstring& str);
const std::wstring m_Name; // Name of the meter const std::wstring m_Name;
std::wstring m_MeasureName; // Name of the measure this is bound to std::wstring m_MeasureName; // Name of bound measure
CMeasure* m_Measure; // Pointer to the measure this meter is bound to CMeasure* m_Measure; // Pointer to bound measure
std::vector<CMeasure*> m_AllMeasures; std::vector<CMeasure*> m_AllMeasures;
int m_X; // X-position of the meter int m_X;
int m_Y; // Y-position of the meter int m_Y;
int m_W; // Width of the meter int m_W;
int m_H; // Height of the meter int m_H;
bool m_Hidden; // Status of the meter bool m_Hidden;
bool m_WDefined; bool m_WDefined;
bool m_HDefined; bool m_HDefined;
CMeter* m_RelativeMeter; CMeter* m_RelativeMeter;
bool m_DynamicVariables; // If true, the measure contains dynamic variables bool m_DynamicVariables;
Gdiplus::Matrix* m_Transformation; // The transformation matrix Gdiplus::Matrix* m_Transformation;
std::wstring m_StyleX; std::wstring m_StyleX;
std::wstring m_StyleY; std::wstring m_StyleY;
@ -166,7 +166,7 @@ protected:
HWND m_ToolTipHandle; HWND m_ToolTipHandle;
std::wstring m_LeftMouseDownAction; // Actions for left/right/middle mouse buttons std::wstring m_LeftMouseDownAction;
std::wstring m_RightMouseDownAction; std::wstring m_RightMouseDownAction;
std::wstring m_MiddleMouseDownAction; std::wstring m_MiddleMouseDownAction;
std::wstring m_LeftMouseUpAction; std::wstring m_LeftMouseUpAction;
@ -185,14 +185,14 @@ protected:
METER_POSITION m_RelativeX; METER_POSITION m_RelativeX;
METER_POSITION m_RelativeY; METER_POSITION m_RelativeY;
int m_UpdateDivider; // Divider for the update int m_UpdateDivider;
int m_UpdateCounter; // Current update counter int m_UpdateCounter;
BEVELTYPE m_SolidBevel; BEVELTYPE m_SolidBevel;
Gdiplus::Color m_SolidColor; Gdiplus::Color m_SolidColor;
Gdiplus::Color m_SolidColor2; Gdiplus::Color m_SolidColor2;
Gdiplus::REAL m_SolidAngle; Gdiplus::REAL m_SolidAngle;
bool m_AntiAlias; // If true, the line is antialiased bool m_AntiAlias;
bool m_Initialized; bool m_Initialized;
CMeterWindow* m_MeterWindow; CMeterWindow* m_MeterWindow;

View File

@ -45,11 +45,11 @@ private:
}; };
CTintedImage m_Image; CTintedImage m_Image;
std::wstring m_ImageName; // Name of the bar-image std::wstring m_ImageName;
bool m_NeedsReload; bool m_NeedsReload;
Gdiplus::Color m_Color; // Color of the bar Gdiplus::Color m_Color;
ORIENTATION m_Orientation; // Orientation (i.e. the growth direction) ORIENTATION m_Orientation; // Growth direction
double m_Value; double m_Value;
int m_Border; int m_Border;
bool m_Flip; bool m_Flip;

View File

@ -42,13 +42,13 @@ protected:
private: private:
CTintedImage m_Image; CTintedImage m_Image;
std::wstring m_ImageName; // Name of the image std::wstring m_ImageName;
bool m_NeedsReload; bool m_NeedsReload;
bool m_ZeroFrame; // If true, the first frame is only shown when the measured value is zero bool m_ZeroFrame; // If true, the first frame is only shown when the measured value is zero
int m_FrameCount; // Number of frames in the bitmap int m_FrameCount;
int m_TransitionFrameCount; // Number of transition frames (per one frame) in the bitmap int m_TransitionFrameCount; // Number of transition frames (per one frame) in the bitmap
METER_ALIGNMENT m_Align; // Alignment of the bitmaps METER_ALIGNMENT m_Align;
bool m_Extend; // If true, bitmaps extend horizontally and are used like numbers bool m_Extend; // If true, bitmaps extend horizontally and are used like numbers
int m_Separation; int m_Separation;
int m_Digits; int m_Digits;

View File

@ -50,11 +50,11 @@ private:
bool HitTest2(int px, int py, bool checkAlpha); bool HitTest2(int px, int py, bool checkAlpha);
CTintedImage m_Image; CTintedImage m_Image;
std::wstring m_ImageName; // Name of the image std::wstring m_ImageName;
bool m_NeedsReload; bool m_NeedsReload;
Gdiplus::CachedBitmap* m_Bitmaps[BUTTON_FRAMES]; // The cached bitmaps Gdiplus::CachedBitmap* m_Bitmaps[BUTTON_FRAMES]; // Cached bitmaps
std::wstring m_Command; // Command to be executed std::wstring m_Command;
int m_State; int m_State;
bool m_Clicked; bool m_Clicked;
bool m_Focus; bool m_Focus;

View File

@ -38,16 +38,16 @@ CMeterHistogram::CMeterHistogram(CMeterWindow* meterWindow, const WCHAR* name) :
m_SecondaryMeasure(), m_SecondaryMeasure(),
m_PrimaryColor(Color::Green), m_PrimaryColor(Color::Green),
m_SecondaryColor(Color::Red), m_SecondaryColor(Color::Red),
m_BothColor(Color::Yellow), m_OverlapColor(Color::Yellow),
m_MeterPos(), m_MeterPos(),
m_Autoscale(false), m_Autoscale(false),
m_Flip(false), m_Flip(false),
m_PrimaryImage(L"PrimaryImage", c_PrimaryConfigArray), m_PrimaryImage(L"PrimaryImage", c_PrimaryConfigArray),
m_SecondaryImage(L"SecondaryImage", c_SecondaryConfigArray), m_SecondaryImage(L"SecondaryImage", c_SecondaryConfigArray),
m_BothImage(L"BothImage", c_BothConfigArray), m_OverlapImage(L"BothImage", c_BothConfigArray),
m_PrimaryNeedsReload(false), m_PrimaryNeedsReload(false),
m_SecondaryNeedsReload(false), m_SecondaryNeedsReload(false),
m_BothNeedsReload(false), m_OverlapNeedsReload(false),
m_PrimaryValues(), m_PrimaryValues(),
m_SecondaryValues(), m_SecondaryValues(),
m_MaxPrimaryValue(1.0), m_MaxPrimaryValue(1.0),
@ -96,13 +96,13 @@ void CMeterHistogram::Initialize()
CMeter::Initialize(); CMeter::Initialize();
// A sanity check // A sanity check
if (m_SecondaryMeasure && !m_PrimaryImageName.empty() && (m_BothImageName.empty() || m_SecondaryImageName.empty())) if (m_SecondaryMeasure && !m_PrimaryImageName.empty() && (m_OverlapImageName.empty() || m_SecondaryImageName.empty()))
{ {
Log(LOG_WARNING, L"Histogram: SecondaryImage and BothImage not defined"); Log(LOG_WARNING, L"Histogram: SecondaryImage and BothImage not defined");
m_PrimaryImage.DisposeImage(); m_PrimaryImage.DisposeImage();
m_SecondaryImage.DisposeImage(); m_SecondaryImage.DisposeImage();
m_BothImage.DisposeImage(); m_OverlapImage.DisposeImage();
} }
else else
{ {
@ -141,19 +141,19 @@ void CMeterHistogram::Initialize()
m_SecondaryImage.DisposeImage(); m_SecondaryImage.DisposeImage();
} }
if (!m_BothImageName.empty()) if (!m_OverlapImageName.empty())
{ {
m_BothImage.LoadImage(m_BothImageName, m_BothNeedsReload); m_OverlapImage.LoadImage(m_OverlapImageName, m_OverlapNeedsReload);
} }
else if (m_BothImage.IsLoaded()) else if (m_OverlapImage.IsLoaded())
{ {
m_BothImage.DisposeImage(); m_OverlapImage.DisposeImage();
} }
} }
if ((!m_PrimaryImageName.empty() && !m_PrimaryImage.IsLoaded()) || if ((!m_PrimaryImageName.empty() && !m_PrimaryImage.IsLoaded()) ||
(!m_SecondaryImageName.empty() && !m_SecondaryImage.IsLoaded()) || (!m_SecondaryImageName.empty() && !m_SecondaryImage.IsLoaded()) ||
(!m_BothImageName.empty() && !m_BothImage.IsLoaded())) (!m_OverlapImageName.empty() && !m_OverlapImage.IsLoaded()))
{ {
DisposeBuffer(); DisposeBuffer();
@ -187,7 +187,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
// Store the current values so we know if the image needs to be updated // Store the current values so we know if the image needs to be updated
std::wstring oldPrimaryImageName = m_PrimaryImageName; std::wstring oldPrimaryImageName = m_PrimaryImageName;
std::wstring oldSecondaryImageName = m_SecondaryImageName; std::wstring oldSecondaryImageName = m_SecondaryImageName;
std::wstring oldBothImageName = m_BothImageName; std::wstring oldBothImageName = m_OverlapImageName;
int oldW = m_W; int oldW = m_W;
int oldH = m_H; int oldH = m_H;
@ -196,7 +196,7 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_PrimaryColor = parser.ReadColor(section, L"PrimaryColor", Color::Green); m_PrimaryColor = parser.ReadColor(section, L"PrimaryColor", Color::Green);
m_SecondaryColor = parser.ReadColor(section, L"SecondaryColor", Color::Red); m_SecondaryColor = parser.ReadColor(section, L"SecondaryColor", Color::Red);
m_BothColor = parser.ReadColor(section, L"BothColor", Color::Yellow); m_OverlapColor = parser.ReadColor(section, L"BothColor", Color::Yellow);
if (!m_Initialized && !m_MeasureName.empty()) if (!m_Initialized && !m_MeasureName.empty())
{ {
@ -233,17 +233,17 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_SecondaryImage.ClearConfigFlags(); m_SecondaryImage.ClearConfigFlags();
} }
m_BothImageName = parser.ReadString(section, L"BothImage", L""); m_OverlapImageName = parser.ReadString(section, L"BothImage", L"");
if (!m_BothImageName.empty()) if (!m_OverlapImageName.empty())
{ {
m_MeterWindow->MakePathAbsolute(m_BothImageName); m_MeterWindow->MakePathAbsolute(m_OverlapImageName);
// Read tinting configs // Read tinting configs
m_BothImage.ReadConfig(parser, section); m_OverlapImage.ReadConfig(parser, section);
} }
else else
{ {
m_BothImage.ClearConfigFlags(); m_OverlapImage.ClearConfigFlags();
} }
m_Autoscale = 0!=parser.ReadInt(section, L"AutoScale", 0); m_Autoscale = 0!=parser.ReadInt(section, L"AutoScale", 0);
@ -267,14 +267,14 @@ void CMeterHistogram::ReadConfig(CConfigParser& parser, const WCHAR* section)
m_PrimaryNeedsReload = (wcscmp(oldPrimaryImageName.c_str(), m_PrimaryImageName.c_str()) != 0); m_PrimaryNeedsReload = (wcscmp(oldPrimaryImageName.c_str(), m_PrimaryImageName.c_str()) != 0);
m_SecondaryNeedsReload = (wcscmp(oldSecondaryImageName.c_str(), m_SecondaryImageName.c_str()) != 0); m_SecondaryNeedsReload = (wcscmp(oldSecondaryImageName.c_str(), m_SecondaryImageName.c_str()) != 0);
m_BothNeedsReload = (wcscmp(oldBothImageName.c_str(), m_BothImageName.c_str()) != 0); m_OverlapNeedsReload = (wcscmp(oldBothImageName.c_str(), m_OverlapImageName.c_str()) != 0);
if (m_PrimaryNeedsReload || if (m_PrimaryNeedsReload ||
m_SecondaryNeedsReload || m_SecondaryNeedsReload ||
m_BothNeedsReload || m_OverlapNeedsReload ||
m_PrimaryImage.IsConfigsChanged() || m_PrimaryImage.IsConfigsChanged() ||
m_SecondaryImage.IsConfigsChanged() || m_SecondaryImage.IsConfigsChanged() ||
m_BothImage.IsConfigsChanged()) m_OverlapImage.IsConfigsChanged())
{ {
Initialize(); // Reload the image Initialize(); // Reload the image
} }
@ -445,7 +445,7 @@ bool CMeterHistogram::Draw(Graphics& graphics)
Bitmap* primaryBitmap = m_PrimaryImage.GetImage(); Bitmap* primaryBitmap = m_PrimaryImage.GetImage();
Bitmap* secondaryBitmap = m_SecondaryImage.GetImage(); Bitmap* secondaryBitmap = m_SecondaryImage.GetImage();
Bitmap* bothBitmap = m_BothImage.GetImage(); Bitmap* bothBitmap = m_OverlapImage.GetImage();
int x = GetX(); int x = GetX();
int y = GetY(); int y = GetY();
@ -643,7 +643,7 @@ bool CMeterHistogram::Draw(Graphics& graphics)
} }
else else
{ {
SolidBrush brush(m_BothColor); SolidBrush brush(m_OverlapColor);
graphics.FillPath(&brush, &bothPath); graphics.FillPath(&brush, &bothPath);
} }
} }

View File

@ -41,27 +41,27 @@ protected:
private: private:
void DisposeBuffer(); void DisposeBuffer();
std::wstring m_SecondaryMeasureName; // Name of the secondary measure std::wstring m_SecondaryMeasureName;
CMeasure* m_SecondaryMeasure; // Pointer ot the secondary measure CMeasure* m_SecondaryMeasure;
Gdiplus::Color m_PrimaryColor; // Color of the primary histogram Gdiplus::Color m_PrimaryColor;
Gdiplus::Color m_SecondaryColor; // Color of the secondary histogram Gdiplus::Color m_SecondaryColor;
Gdiplus::Color m_BothColor; // Color when the both histograms overlap Gdiplus::Color m_OverlapColor;
int m_MeterPos; // Position of the meter (i.e. where the new value should be placed) int m_MeterPos; // New value placement position
bool m_Autoscale; bool m_Autoscale;
bool m_Flip; bool m_Flip;
std::wstring m_PrimaryImageName; // Name of the primary image for bitmap histograms std::wstring m_PrimaryImageName;
std::wstring m_SecondaryImageName; // Name of the secondary image for bitmap histograms std::wstring m_SecondaryImageName;
std::wstring m_BothImageName; // Name of the image for overlapping histograms std::wstring m_OverlapImageName;
CTintedImage m_PrimaryImage; // The primary bitmap CTintedImage m_PrimaryImage;
CTintedImage m_SecondaryImage; // The secondary bitmap CTintedImage m_SecondaryImage;
CTintedImage m_BothImage; // The overlap bitmap CTintedImage m_OverlapImage;
bool m_PrimaryNeedsReload; bool m_PrimaryNeedsReload;
bool m_SecondaryNeedsReload; bool m_SecondaryNeedsReload;
bool m_BothNeedsReload; bool m_OverlapNeedsReload;
double* m_PrimaryValues; double* m_PrimaryValues;
double* m_SecondaryValues; double* m_SecondaryValues;
@ -73,8 +73,8 @@ private:
bool m_SizeChanged; bool m_SizeChanged;
bool m_GraphStartLeft; // Start graph to the Left or Right(default) bool m_GraphStartLeft;
bool m_GraphHorizontalOrientation; // Horizontal or Vertical(default) bool m_GraphHorizontalOrientation;
static const WCHAR* c_PrimaryConfigArray[CTintedImage::ConfigCount]; static const WCHAR* c_PrimaryConfigArray[CTintedImage::ConfigCount];
static const WCHAR* c_SecondaryConfigArray[CTintedImage::ConfigCount]; static const WCHAR* c_SecondaryConfigArray[CTintedImage::ConfigCount];

View File

@ -42,12 +42,12 @@ private:
void LoadImage(const std::wstring& imageName, bool bLoadAlways); void LoadImage(const std::wstring& imageName, bool bLoadAlways);
CTintedImage m_Image; CTintedImage m_Image;
std::wstring m_ImageName; // Name of the image std::wstring m_ImageName;
std::wstring m_ImageNameResult; // Name of the image (as absolute path) std::wstring m_ImageNameResult; // Image name as absolute path
std::wstring m_Path; std::wstring m_Path;
bool m_NeedsRedraw; bool m_NeedsRedraw;
bool m_PreserveAspectRatio; // If true, aspect ratio of the image is preserved when the image is scaled bool m_PreserveAspectRatio;
bool m_Tile; bool m_Tile;
RECT m_ScaleMargins; RECT m_ScaleMargins;

View File

@ -38,23 +38,23 @@ protected:
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section); virtual void ReadConfig(CConfigParser& parser, const WCHAR* section);
private: private:
std::vector<std::wstring> m_MeasureNames; // Name of the other measures std::vector<std::wstring> m_MeasureNames;
std::vector<CMeasure*> m_Measures; // Pointer ot the other measures std::vector<CMeasure*> m_Measures;
std::vector<Gdiplus::Color> m_Colors; // Color of the histograms std::vector<Gdiplus::Color> m_Colors;
std::vector<double> m_ScaleValues; // The scale values for the measures std::vector<double> m_ScaleValues;
bool m_Autoscale; // If true, the meter is automatically adjusted to show all values bool m_Autoscale;
bool m_HorizontalLines; // If true, horizontal lines will ba drawn on the meter bool m_HorizontalLines;
bool m_Flip; bool m_Flip;
double m_LineWidth; double m_LineWidth;
Gdiplus::Color m_HorizontalColor; // Color of the horizontal lines Gdiplus::Color m_HorizontalColor;
std::vector< std::vector<double> > m_AllValues; // All the values to be drawn std::vector< std::vector<double> > m_AllValues;
int m_CurrentPos; // Place of the current value int m_CurrentPos;
bool m_GraphStartLeft; // Start graph to the Left or Right(default) bool m_GraphStartLeft;
bool m_GraphHorizontalOrientation; // Horizontal or Vertical(default) bool m_GraphHorizontalOrientation;
}; };
#endif #endif

View File

@ -39,7 +39,7 @@ protected:
private: private:
CTintedImage m_Image; CTintedImage m_Image;
std::wstring m_ImageName; // Name of the image std::wstring m_ImageName;
bool m_NeedsReload; bool m_NeedsReload;
double m_OffsetX; double m_OffsetX;

View File

@ -70,7 +70,7 @@ CMeterString::CMeterString(CMeterWindow* meterWindow, const WCHAR* name) : CMete
m_Align(ALIGN_LEFT), m_Align(ALIGN_LEFT),
m_Style(NORMAL), m_Style(NORMAL),
m_Effect(EFFECT_NONE), m_Effect(EFFECT_NONE),
m_textCase(TEXTCASE_NONE), m_Case(TEXTCASE_NONE),
m_FontSize(10), m_FontSize(10),
m_Scale(1.0), m_Scale(1.0),
m_NoDecimals(true), m_NoDecimals(true),
@ -419,19 +419,19 @@ void CMeterString::ReadConfig(CConfigParser& parser, const WCHAR* section)
const WCHAR* stringCase = parser.ReadString(section, L"StringCase", L"NONE").c_str(); const WCHAR* stringCase = parser.ReadString(section, L"StringCase", L"NONE").c_str();
if (_wcsicmp(stringCase, L"NONE") == 0) if (_wcsicmp(stringCase, L"NONE") == 0)
{ {
m_textCase = TEXTCASE_NONE; m_Case = TEXTCASE_NONE;
} }
else if (_wcsicmp(stringCase, L"UPPER") == 0) else if (_wcsicmp(stringCase, L"UPPER") == 0)
{ {
m_textCase = TEXTCASE_UPPER; m_Case = TEXTCASE_UPPER;
} }
else if (_wcsicmp(stringCase, L"LOWER") == 0) else if (_wcsicmp(stringCase, L"LOWER") == 0)
{ {
m_textCase = TEXTCASE_LOWER; m_Case = TEXTCASE_LOWER;
} }
else if (_wcsicmp(stringCase, L"PROPER") == 0) else if (_wcsicmp(stringCase, L"PROPER") == 0)
{ {
m_textCase = TEXTCASE_PROPER; m_Case = TEXTCASE_PROPER;
} }
else else
{ {
@ -529,7 +529,7 @@ bool CMeterString::Update()
} }
if (!m_Postfix.empty()) m_String += m_Postfix; if (!m_Postfix.empty()) m_String += m_Postfix;
switch (m_textCase) switch (m_Case)
{ {
case TEXTCASE_UPPER: case TEXTCASE_UPPER:
StringToUpper(m_String); StringToUpper(m_String);

View File

@ -73,25 +73,25 @@ private:
bool DrawString(Gdiplus::Graphics& graphics, Gdiplus::RectF* rect); bool DrawString(Gdiplus::Graphics& graphics, Gdiplus::RectF* rect);
Gdiplus::Color m_Color; // The color of the text Gdiplus::Color m_Color;
Gdiplus::Color m_EffectColor; // The color of the text effect Gdiplus::Color m_EffectColor;
std::wstring m_Postfix; // The postfix of the text std::wstring m_Postfix;
std::wstring m_Prefix; // The prefix of the text std::wstring m_Prefix;
std::wstring m_Text; // The text std::wstring m_Text;
std::wstring m_FontFace; // name of the font face std::wstring m_FontFace;
AUTOSCALE m_AutoScale; // true, if the value should be autoscaled AUTOSCALE m_AutoScale;
METER_ALIGNMENT m_Align; // Alignment of the text METER_ALIGNMENT m_Align;
TEXTSTYLE m_Style; // Style of the text TEXTSTYLE m_Style;
TEXTEFFECT m_Effect; // Text effect TEXTEFFECT m_Effect;
TEXTCASE m_textCase; // Case of the text TEXTCASE m_Case;
int m_FontSize; // Size of the fonts int m_FontSize;
double m_Scale; // Scaling if autoscale is not used double m_Scale;
bool m_NoDecimals; // Number of decimals to use bool m_NoDecimals;
bool m_Percentual; // True, if the value should be given as % bool m_Percentual;
bool m_ClipString; // True, the text is clipped in borders (adds ellipsis to the end of the string) bool m_ClipString;
Gdiplus::Font* m_Font; // The font Gdiplus::Font* m_Font;
Gdiplus::FontFamily* m_FontFamily; // The font family Gdiplus::FontFamily* m_FontFamily;
int m_NumOfDecimals; // Number of decimals to be displayed int m_NumOfDecimals;
Gdiplus::REAL m_Angle; Gdiplus::REAL m_Angle;
Gdiplus::RectF m_Rect; Gdiplus::RectF m_Rect;
@ -108,12 +108,3 @@ private:
}; };
#endif #endif
/*
E eksa 10^18
P peta 10^15
T tera 10^12
G giga 10^9
M mega 10^6
k kilo 10^3
*/

View File

@ -360,35 +360,35 @@ private:
int m_DIBSectionBufferW; int m_DIBSectionBufferW;
int m_DIBSectionBufferH; int m_DIBSectionBufferH;
Gdiplus::Bitmap* m_Background; // The background bitmap Gdiplus::Bitmap* m_Background;
SIZE m_BackgroundSize; SIZE m_BackgroundSize;
HWND m_Window; // Handle to the Rainmeter window HWND m_Window;
std::wstring m_LeftMouseDownAction; // Action to run when left mouse is pressed std::wstring m_LeftMouseDownAction;
std::wstring m_RightMouseDownAction; // Action to run when right mouse is pressed std::wstring m_RightMouseDownAction;
std::wstring m_MiddleMouseDownAction; // Action to run when middle mouse is pressed std::wstring m_MiddleMouseDownAction;
std::wstring m_LeftMouseUpAction; // Action to run when left mouse is released std::wstring m_LeftMouseUpAction;
std::wstring m_RightMouseUpAction; // Action to run when right mouse is released std::wstring m_RightMouseUpAction;
std::wstring m_MiddleMouseUpAction; // Action to run when middle mouse is released std::wstring m_MiddleMouseUpAction;
std::wstring m_LeftMouseDoubleClickAction; // Action to run when left mouse is double-clicked std::wstring m_LeftMouseDoubleClickAction;
std::wstring m_RightMouseDoubleClickAction; // Action to run when right mouse is double-clicked std::wstring m_RightMouseDoubleClickAction;
std::wstring m_MiddleMouseDoubleClickAction; // Action to run when middle mouse is double-clicked std::wstring m_MiddleMouseDoubleClickAction;
std::wstring m_MouseOverAction; // Action to run when mouse goes over the window std::wstring m_MouseOverAction;
std::wstring m_MouseLeaveAction; // Action to run when mouse leaves the window std::wstring m_MouseLeaveAction;
std::wstring m_OnRefreshAction; // Action to run when window is initialized std::wstring m_OnRefreshAction;
std::wstring m_OnCloseAction; // Action to run when window is closed std::wstring m_OnCloseAction;
bool m_MouseOver; bool m_MouseOver;
std::wstring m_ConfigGroup; std::wstring m_ConfigGroup;
std::wstring m_BackgroundName; // Name of the background image std::wstring m_BackgroundName;
RECT m_BackgroundMargins; RECT m_BackgroundMargins;
RECT m_DragMargins; RECT m_DragMargins;
std::wstring m_WindowX; // Window's X-position in config file std::wstring m_WindowX;
std::wstring m_WindowY; // Window's Y-position in config file std::wstring m_WindowY;
std::wstring m_AnchorX; // Anchor's X-position in config file std::wstring m_AnchorX;
std::wstring m_AnchorY; // Anchor's Y-position in config file std::wstring m_AnchorY;
int m_WindowXScreen; int m_WindowXScreen;
int m_WindowYScreen; int m_WindowYScreen;
bool m_WindowXScreenDefined; bool m_WindowXScreenDefined;
@ -397,60 +397,60 @@ private:
bool m_WindowYFromBottom; bool m_WindowYFromBottom;
bool m_WindowXPercentage; bool m_WindowXPercentage;
bool m_WindowYPercentage; bool m_WindowYPercentage;
int m_WindowW; // Window's Width int m_WindowW;
int m_WindowH; // Window's Height int m_WindowH;
int m_ScreenX; // Window's X-postion on the virtual screen int m_ScreenX; // X-postion on the virtual screen
int m_ScreenY; // Window's Y-postion on the virtual screen int m_ScreenY; // Y-postion on the virtual screen
bool m_AnchorXFromRight; bool m_AnchorXFromRight;
bool m_AnchorYFromBottom; bool m_AnchorYFromBottom;
bool m_AnchorXPercentage; bool m_AnchorXPercentage;
bool m_AnchorYPercentage; bool m_AnchorYPercentage;
int m_AnchorScreenX; // Window's anchor X-postion int m_AnchorScreenX;
int m_AnchorScreenY; // Window's anchor Y-postion int m_AnchorScreenY;
bool m_WindowDraggable; // True, if window can be moved bool m_WindowDraggable;
int m_WindowUpdate; // Measure update frequency int m_WindowUpdate;
int m_TransitionUpdate; // Transition redraw frequency int m_TransitionUpdate;
bool m_ActiveTransition; bool m_ActiveTransition;
bool m_HasNetMeasures; bool m_HasNetMeasures;
bool m_HasButtons; bool m_HasButtons;
HIDEMODE m_WindowHide; // If true, the window is hidden when mouse is over it HIDEMODE m_WindowHide;
bool m_WindowStartHidden; // If true, the window is hidden at startup bool m_WindowStartHidden;
bool m_SavePosition; // If true, the window's position is saved bool m_SavePosition;
bool m_SnapEdges; // If true, the window snaps to the edges of the screen when moved bool m_SnapEdges;
int m_AlphaValue; // The 'from' transparency value 0 - 255 int m_AlphaValue;
int m_FadeDuration; // Time it takes to fade the window int m_FadeDuration;
ZPOSITION m_WindowZPosition; // Window's Z-position ZPOSITION m_WindowZPosition;
bool m_DynamicWindowSize; // bool m_DynamicWindowSize;
bool m_ClickThrough; // bool m_ClickThrough;
bool m_KeepOnScreen; // bool m_KeepOnScreen;
bool m_AutoSelectScreen; // bool m_AutoSelectScreen;
bool m_Dragging; // bool m_Dragging;
bool m_Dragged; // bool m_Dragged;
BGMODE m_BackgroundMode; // The background mode BGMODE m_BackgroundMode;
Gdiplus::Color m_SolidColor; // Color of the solid background Gdiplus::Color m_SolidColor;
Gdiplus::Color m_SolidColor2; // Color of the solid background Gdiplus::Color m_SolidColor2;
Gdiplus::REAL m_SolidAngle; // Gdiplus::REAL m_SolidAngle;
BEVELTYPE m_SolidBevel; // The type of the bevel BEVELTYPE m_SolidBevel;
bool m_Blur; // If true, Aero blur is active bool m_Blur;
BLURMODE m_BlurMode; // The blur mode BLURMODE m_BlurMode;
HRGN m_BlurRegion; // Handle to the blur region HRGN m_BlurRegion;
ULONGLONG m_FadeStartTime; ULONGLONG m_FadeStartTime;
int m_FadeStartValue; int m_FadeStartValue;
int m_FadeEndValue; int m_FadeEndValue;
int m_TransparencyValue; int m_TransparencyValue;
bool m_Refreshing; // This is true, when the meter is refreshing bool m_Refreshing;
bool m_Hidden; // True, if Rainmeter is hidden bool m_Hidden;
RESIZEMODE m_ResizeWindow; // If needed, the window size is recalculated during the next update RESIZEMODE m_ResizeWindow;
std::list<CMeasure*> m_Measures; // All the measures std::list<CMeasure*> m_Measures;
std::list<CMeter*> m_Meters; // All the meters std::list<CMeter*> m_Meters;
const std::wstring m_SkinName; // Name of the current skin folder const std::wstring m_SkinName;
const std::wstring m_SkinIniFile; // Name of the current skin iniFile const std::wstring m_SkinIniFile;
bool m_ResourcesFolder; bool m_ResourcesFolder;

View File

@ -269,7 +269,7 @@ private:
CTrayWindow* m_TrayWindow; CTrayWindow* m_TrayWindow;
std::vector<CONFIG> m_ConfigStrings; // All configs found in the given folder std::vector<CONFIG> m_ConfigStrings;
std::vector<CONFIGMENU> m_ConfigMenu; std::vector<CONFIGMENU> m_ConfigMenu;
std::multimap<int, int> m_ConfigOrders; std::multimap<int, int> m_ConfigOrders;
std::map<std::wstring, CMeterWindow*> m_MeterWindows; std::map<std::wstring, CMeterWindow*> m_MeterWindows;
@ -286,7 +286,7 @@ private:
std::wstring m_Drive; std::wstring m_Drive;
std::wstring m_StatsDate; // The date when stats gathering started std::wstring m_StatsDate;
std::wstring m_TrayExecuteR; std::wstring m_TrayExecuteR;
std::wstring m_TrayExecuteM; std::wstring m_TrayExecuteM;
@ -299,7 +299,7 @@ private:
bool m_NewVersion; bool m_NewVersion;
bool m_DesktopWorkAreaChanged; bool m_DesktopWorkAreaChanged;
bool m_DesktopWorkAreaType; // If true, DesktopWorkArea is treated as "margin" bool m_DesktopWorkAreaType;
std::map<UINT, RECT> m_DesktopWorkAreas; std::map<UINT, RECT> m_DesktopWorkAreas;
std::vector<RECT> m_OldDesktopWorkAreas; std::vector<RECT> m_OldDesktopWorkAreas;

View File

@ -36,18 +36,18 @@ struct MONITOR_INFO
HMONITOR handle; HMONITOR handle;
RECT screen; RECT screen;
RECT work; RECT work;
std::wstring deviceName; //Device name (E.g. "\\.\DISPLAY1") std::wstring deviceName; // Device name (E.g. "\\.\DISPLAY1")
std::wstring monitorName; //Monitor name (E.g. "Generic Non-PnP Monitor") std::wstring monitorName; // Monitor name (E.g. "Generic Non-PnP Monitor")
}; };
struct MULTIMONITOR_INFO struct MULTIMONITOR_INFO
{ {
bool useEnumDisplayDevices; //If true, use EnumDisplayDevices function to obtain the multi-monitor information bool useEnumDisplayDevices; // If true, use EnumDisplayDevices function to obtain the multi-monitor information
bool useEnumDisplayMonitors; //If true, use EnumDisplayMonitors function to obtain the multi-monitor information bool useEnumDisplayMonitors; // If true, use EnumDisplayMonitors function to obtain the multi-monitor information
int vsT, vsL, vsH, vsW; //Coordinates of the top-left corner (vsT,vsL) and size (vsH,vsW) of the virtual screen int vsT, vsL, vsH, vsW; // Coordinates of the top-left corner (vsT,vsL) and size (vsH,vsW) of the virtual screen
int primary; //Index of the primary monitor int primary; // Index of the primary monitor
std::vector<MONITOR_INFO> monitors; //Monitor information std::vector<MONITOR_INFO> monitors;
}; };
class CSystem class CSystem
@ -111,7 +111,7 @@ private:
static HWINEVENTHOOK c_WinEventHook; static HWINEVENTHOOK c_WinEventHook;
static MULTIMONITOR_INFO c_Monitors; // Multi-Monitor info static MULTIMONITOR_INFO c_Monitors;
static bool c_ShowDesktop; static bool c_ShowDesktop;

View File

@ -24,9 +24,7 @@
#include <string> #include <string>
/* /*
** CTintedImageHelper_DefineConfigArray macro ** Helper macro to define the array of the config item.
**
** This is a helper macro to define the array of the config item.
** It's necessary to give a string literal to the prefix parameter. ** It's necessary to give a string literal to the prefix parameter.
** **
*/ */
@ -103,8 +101,8 @@ protected:
static Gdiplus::Bitmap* TurnGreyscale(Gdiplus::Bitmap* source); static Gdiplus::Bitmap* TurnGreyscale(Gdiplus::Bitmap* source);
static bool CompareColorMatrix(const Gdiplus::ColorMatrix* a, const Gdiplus::ColorMatrix* b); static bool CompareColorMatrix(const Gdiplus::ColorMatrix* a, const Gdiplus::ColorMatrix* b);
Gdiplus::Bitmap* m_Bitmap; // The bitmap Gdiplus::Bitmap* m_Bitmap;
Gdiplus::Bitmap* m_BitmapTint; // The tinted bitmap Gdiplus::Bitmap* m_BitmapTint; // Tinted bitmap
const std::wstring m_ConfigName; const std::wstring m_ConfigName;
const WCHAR** m_ConfigArray; const WCHAR** m_ConfigArray;