summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/iconlib.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-04 23:23:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-04 23:23:45 +0000
commit15855fa84a09fd1fd486d357c38db0f2bd181e74 (patch)
treec98d1ae74abca41c776522059343eda13a7e0a31 /plugins/HistoryStats/src/iconlib.h
parent819f8efabea6b0d7d971f9e6e4b21bbc18838874 (diff)
HistoryStats compiles ok now
git-svn-id: http://svn.miranda-ng.org/main/trunk@8399 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src/iconlib.h')
-rw-r--r--plugins/HistoryStats/src/iconlib.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/HistoryStats/src/iconlib.h b/plugins/HistoryStats/src/iconlib.h
new file mode 100644
index 0000000000..bc4ab3b1c7
--- /dev/null
+++ b/plugins/HistoryStats/src/iconlib.h
@@ -0,0 +1,74 @@
+#if !defined(HISTORYSTATS_GUARD_ICONLIB_H)
+#define HISTORYSTATS_GUARD_ICONLIB_H
+
+#include "_globals.h"
+
+
+#include <set>
+
+class IconLib
+ : private pattern::NotInstantiable<IconLib>
+{
+public:
+ enum IconIndex {
+ iiMenuCreateStatistics = 0,
+ iiMenuShowStatistics = 1,
+ iiMenuConfigure = 2,
+ iiContactMenu = 3,
+ iiExcludeNo = 4,
+ iiExcludeYes = 5,
+ iiTreeCheck1 = 6,
+ iiTreeCheck2 = 7,
+ iiTreeCheck3 = 8,
+ iiTreeCheck4 = 9,
+ iiTreeRadio1 = 10,
+ iiTreeRadio2 = 11,
+ iiTreeRadio3 = 12,
+ iiTreeRadio4 = 13,
+ iiTreeEdit1 = 14,
+ iiTreeEdit2 = 15,
+ iiTreeCombo1 = 16,
+ iiTreeCombo2 = 17,
+ iiTreeFolder1 = 18,
+ iiTreeFolder2 = 19,
+ iiTreeButton1 = 20,
+ iiTreeButton2 = 21,
+ iiTreeDateTime1 = 22,
+ iiTreeDateTime2 = 23,
+ };
+
+ typedef void (*CallbackProc)(LPARAM lParam);
+
+private:
+ struct IconInfo
+ {
+ WORD wID;
+ mu_ansi* szIconName;
+ mu_text* szSection;
+ mu_text* szDescription;
+ HICON hIcon;
+ };
+
+ typedef std::pair<CallbackProc, LPARAM> CallbackPair;
+ typedef std::set<CallbackPair> CallbackSet;
+
+private:
+ static bool m_bIcoLibAvailable;
+ static HANDLE m_hHookSkin2IconsChanged;
+ static IconInfo m_IconInfo[];
+ static ext::string m_Section;
+ static ext::a::string m_IconName;
+ static CallbackSet m_Callbacks;
+
+private:
+ static int handleCallbacks(WPARAM wParam, LPARAM lParam);
+
+public:
+ static void init();
+ static void uninit();
+ static void registerCallback(CallbackProc callback, LPARAM lParam);
+ static void unregisterCallback(CallbackProc callback, LPARAM lParam);
+ static HICON getIcon(IconIndex index);
+};
+
+#endif // HISTORYSTATS_GUARD_ICONLIB_H \ No newline at end of file