summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/bandctrl.h
blob: b5bda2834020c1f34a639b71959f2eeea0844b63 (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
#if !defined(HISTORYSTATS_GUARD_BANDCTRL_H)
#define HISTORYSTATS_GUARD_BANDCTRL_H

#include "_globals.h"
#include "bandctrldefs.h"

/*
 * BandCtrl
 */ 

class BandCtrl
	: public BandCtrlDefs
	, private pattern::NotCopyable<BandCtrl>
{
private:
	HWND m_hBandWnd;

public:
	explicit BandCtrl(HWND hBandWnd = NULL) : m_hBandWnd(hBandWnd) { }
	~BandCtrl() { }

public:
	const BandCtrl& operator <<(HWND hBandWnd) { m_hBandWnd = hBandWnd; return *this; }
	operator HWND() { return m_hBandWnd; }

public:
	void setLayout(int nLayout);
	HANDLE addButton(DWORD dwFlags, HICON hIcon, DWORD dwData, const TCHAR* szTooltip = NULL, const TCHAR* szText = NULL);
	bool isButtonChecked(HANDLE hButton);
    void checkButton(HANDLE hButton, bool bCheck);
	DWORD getButtonData(HANDLE hButton);
	void setButtonData(HANDLE hButton, DWORD dwData);
	bool isButtonVisisble(HANDLE hButton);
	void showButton(HANDLE hButton, bool bShow);
	RECT getButtonRect(HANDLE hButton);
	bool isButtonEnabled(HANDLE hButton);
	void enableButton(HANDLE hButton, bool bEnable);
};

#endif // HISTORYSTATS_GUARD_BANDCTRL_H