summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/bandctrldefs.h
blob: 2109696a778f87e2c4bf4381153296be3e02a44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#if !defined(HISTORYSTATS_GUARD_BANDCTRLDEFS_H)
#define HISTORYSTATS_GUARD_BANDCTRLDEFS_H

#include "_globals.h"

/*
 * BandCtrlDefs
 */

class BandCtrlDefs
{
public:
	enum Message {
		BCM_SETLAYOUT        = WM_USER +  0, // (int nLayout, #)               -> #
		BCM_ADDBUTTON        = WM_USER +  1, // (#, BCBUTTON* pButton)         -> HANDLE hButton
		BCM_ISBUTTONCHECKED  = WM_USER +  2, // (HANDLE hButton, #)            -> BOOL bChecked
		BCM_CHECKBUTTON      = WM_USER +  3, // (HANDLE hButton, BOOL bCheck)  -> #
		BCM_GETBUTTONDATA    = WM_USER +  4, // (HANDLE hButton, #)            -> DWORD dwData
		BCM_SETBUTTONDATA    = WM_USER +  5, // (HANDLE hButton, DWORD dwData) -> #
		BCM_ISBUTTONVISIBLE  = WM_USER +  6, // (HANDLE hButton, #)            -> BOOL bVisible
		BCM_SHOWBUTTON       = WM_USER +  7, // (HANDLE hButton, BOOL bShow)   -> #
		BCM_GETBUTTONRECT    = WM_USER +  8, // (HANDLE hButton, RECT* pRect)  -> #
		BCM_ISBUTTONENABLED  = WM_USER +  9, // (HANDLE hButton, #)            -> BOOL bEnabled
		BCM_ENABLEBUTTON     = WM_USER + 10, // (HANDLE hButton, BOOL bEnable) -> #
	};

	enum Notification {
		BCN_CLICKED  = NM_LAST - 1, // -> NMBANDCTRL
		BCN_DROPDOWN = NM_LAST - 2, // -> NMBANDCTRL
	};

	enum ButtonFlags {
		BCF_RIGHT    = 0x001,
		BCF_CHECKED  = 0x002,
		BCF_HIDDEN   = 0x004,
		BCF_TOOLTIP  = 0x008,
		BCF_TEXT     = 0x010,
		BCF_ICON     = 0x020,
		BCF_DATA     = 0x040,
		BCF_DROPDOWN = 0x080,
		BCF_DISABLED = 0x100,
	};

	struct BCBUTTON {
		DWORD dwFlags;
		HICON hIcon;
		mu_text* szText;
		mu_text* szTooltip;
		DWORD dwData;
	};

	struct NMBANDCTRL {
		NMHDR hdr;
		HANDLE hButton;
		DWORD dwData;
	};
};

#endif // HISTORYSTATS_GUARD_BANDCTRLDEFS_H