diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-22 12:29:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-22 12:29:14 +0000 |
commit | 5095e9d08fedfb4ea175403266b343f4561a1a9d (patch) | |
tree | aee2b45b3fdb0273bc1031d62f6a158808a9afdf /plugins/TopToolBar/common.h | |
parent | cebec2980d00661cddf6d287800de656c6909f29 (diff) |
pointers, pointers everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar/common.h')
-rw-r--r-- | plugins/TopToolBar/common.h | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/plugins/TopToolBar/common.h b/plugins/TopToolBar/common.h index 909c981ea9..7d8c1f0161 100644 --- a/plugins/TopToolBar/common.h +++ b/plugins/TopToolBar/common.h @@ -23,6 +23,7 @@ #include "m_cluiframes.h"
#include "m_clui.h"
#include "m_clc.h"
+#include "m_findadd.h"
#include "m_langpack.h"
#include "m_options.h"
#include "resource.h"
@@ -35,28 +36,32 @@ #define TTB_OPTDIR "TopToolBar"
#define TTBDEFAULT_BKBMPUSE CLB_STRETCH
-
-
#define TTBDEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE)
#define TTBDEFAULT_USEBITMAP 0
#define TTBDEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT)
-int TTBOptInit(WPARAM wParam, LPARAM lParam);
-//append string
-char __inline *AS(char *str, const char *setting, char *addstr);
+///////////////////////////////////////////////////////////////////////////////
+// TopButtonInt class
-int ttbOptionsChanged();
+struct TopButtonInt
+{
+ ~TopButtonInt();
-int ArrangeButtons();
-int RecreateWindows();
+ DWORD CheckFlags(DWORD Flags);
+ void CreateWnd(void);
+ void LoadSettings(void);
+ void SaveSettings(int &SepCnt, int &LaunchCnt);
+ void SetBitmap(void);
+
+ __inline bool isSep() const
+ { return (dwFlags & TTBBF_ISSEPARATOR) != 0;
+ }
-struct TopButtonInt
-{
HWND hwnd;
int id;
BOOL bPushed;
int dwFlags;
- int x, y;
+ int x, y, arrangedpos;
HICON hIconUp, hIconDn;
HANDLE hIconHandleUp, hIconHandleDn;
@@ -69,26 +74,33 @@ struct TopButtonInt WPARAM wParamUp;
LPARAM lParamDown;
WPARAM wParamDown;
- WORD arrangedpos;
};
-struct SortData
-{
- int oldpos;
- int arrangeval;
-};
+///////////////////////////////////////////////////////////////////////////////
+
+int TTBOptInit(WPARAM wParam, LPARAM lParam);
+//append string
+char __inline *AS(char *str, const char *setting, char *addstr);
-#define MAX_BUTTONS 64
-//#define BUTTWIDTH 20
+int ttbOptionsChanged();
+
+int ArrangeButtons();
+int RecreateWindows();
+
+#define DEFBUTTWIDTH 20
+#define DEFBUTTHEIGHT 16
+#define DEFBUTTGAP 1
-//#define BUTTHEIGHT 16
#define SEPWIDTH 3
+extern LIST<TopButtonInt> Buttons;
extern bool StopArrange;
-extern HWND OptionshWnd;
+extern HWND OptionshWnd, hwndTopToolBar;
extern HANDLE hHookTTBModuleLoaded;
extern HINSTANCE hInst;
extern LIST<void> arHooks, arServices;
+extern HBITMAP hBmpBackground, hBmpSeparator;
+extern int BUTTWIDTH, BUTTHEIGHT, BUTTGAP;
int OptionsPageRebuild();
void lockbut();
@@ -129,7 +141,4 @@ void InsertLBut(int i); int OnModulesLoad(WPARAM, LPARAM);
-#define BM_SETPRIVATEICON (WM_USER + 6)
-#define BM_SETIMLICON (WM_USER + 7)
-
#endif
\ No newline at end of file |