ReactOS 0.4.15-dev-8434-g155a7c7
cardbutton.h
Go to the documentation of this file.
1#ifndef CARDBUTTON_INCLUDED
2#define CARDBUTTON_INCLUDED
3
4#define MAXBUTTONTEXT 64
5
7{
8 friend class CardWindow;
9
10 //
11 // Constructor is PRIVATE - only a
12 // CardWindow can create buttons!
13 //
14 CardButton(CardWindow &parent, int id, TCHAR *szText, UINT style, bool visible,
15 int x, int y, int width, int height);
16
18
19public:
20
21 void SetStyle(UINT uStyle);
22 UINT GetStyle();
23
24 void SetText(TCHAR *fmt, ...);
25 void SetFont(HFONT font);
26
27 void SetPlacement(UINT xJustify, UINT yJustify, int xAdjust, int yAdjust);
28
29 void SetForeColor(COLORREF cr);
30 void SetBackColor(COLORREF cr);
31
32 void Move(int x, int y, int width, int height);
33 void Show(bool fShow);
34 void Redraw();
35 int Id();
36
37 void SetIcon(HICON hicon, bool fRedraw);
38
40
42
43 bool Lock();
44 bool UnLock();
45
46 static COLORREF GetHighlight(COLORREF crBase);
47 static COLORREF GetShadow(COLORREF crBase);
48 static COLORREF GetFace(COLORREF crBase);
49
50private:
51
52 //
53 // Private member functions
54 //
55 void AdjustPosition(int winwidth, int winheight);
56
57 void DrawRect(HDC hdc, RECT *rect, bool fNormal);
58 void Draw(HDC hdc, bool fNormal);
59 void Clip(HDC hdc);
60
61 int OnLButtonDown(HWND hwnd, int x, int y);
62 int OnMouseMove(HWND hwnd, int x, int y);
63 int OnLButtonUp(HWND hwnd, int x, int y);
64
65 //
66 // Private members
67 //
69
71 int id;
74
79
82
84
90
93
95
97};
98
99#endif /* CARDBUTTON_INCLUDED */
Arabic default style
Definition: afstyles.h:94
#define MAXBUTTONTEXT
Definition: cardbutton.h:4
void(CARDLIBPROC * pButtonProc)(CardButton &pButton)
Definition: cardlib.h:94
void SetPlacement(UINT xJustify, UINT yJustify, int xAdjust, int yAdjust)
Definition: cardbutton.cpp:431
void Show(bool fShow)
Definition: cardbutton.cpp:375
void SetForeColor(COLORREF cr)
Definition: cardbutton.cpp:398
COLORREF crText
Definition: cardbutton.h:86
void SetFont(HFONT font)
Definition: cardbutton.cpp:447
TCHAR szText[MAXBUTTONTEXT]
Definition: cardbutton.h:83
int OnMouseMove(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:278
CardWindow & GetCardWindow()
Definition: cardbutton.h:41
pButtonProc ButtonCallback
Definition: cardbutton.h:96
RECT rect
Definition: cardbutton.h:70
HICON hIcon
Definition: cardbutton.h:80
static COLORREF GetHighlight(COLORREF crBase)
Definition: cardbutton.cpp:415
CardWindow & parentWnd
Definition: cardbutton.h:68
void SetIcon(HICON hicon, bool fRedraw)
Definition: cardbutton.cpp:439
void SetText(TCHAR *fmt,...)
Definition: cardbutton.cpp:359
HANDLE mxlock
Definition: cardbutton.h:94
COLORREF crShadow2
Definition: cardbutton.h:89
COLORREF crBack
Definition: cardbutton.h:85
int yadjust
Definition: cardbutton.h:77
int xjustify
Definition: cardbutton.h:76
UINT GetStyle()
Definition: cardbutton.cpp:481
int yjustify
Definition: cardbutton.h:78
static COLORREF GetShadow(COLORREF crBase)
Definition: cardbutton.cpp:421
void DrawRect(HDC hdc, RECT *rect, bool fNormal)
Definition: cardbutton.cpp:46
bool Lock()
Definition: cardbutton.cpp:458
UINT uStyle
Definition: cardbutton.h:72
int OnLButtonUp(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:301
void SetBackColor(COLORREF cr)
Definition: cardbutton.cpp:403
void Redraw()
Definition: cardbutton.cpp:385
void Draw(HDC hdc, bool fNormal)
Definition: cardbutton.cpp:109
void AdjustPosition(int winwidth, int winheight)
Definition: cardbutton.cpp:208
bool fMouseDown
Definition: cardbutton.h:91
static COLORREF GetFace(COLORREF crBase)
Definition: cardbutton.cpp:426
bool fButtonDown
Definition: cardbutton.h:92
void Clip(HDC hdc)
Definition: cardbutton.cpp:102
int OnLButtonDown(HWND hwnd, int x, int y)
Definition: cardbutton.cpp:253
void SetButtonProc(pButtonProc proc)
Definition: cardbutton.cpp:453
bool fVisible
Definition: cardbutton.h:73
COLORREF crShadow
Definition: cardbutton.h:88
void SetStyle(UINT uStyle)
Definition: cardbutton.cpp:476
COLORREF crHighlight
Definition: cardbutton.h:87
bool UnLock()
Definition: cardbutton.cpp:468
HFONT hFont
Definition: cardbutton.h:81
int xadjust
Definition: cardbutton.h:75
void Move(int x, int y, int width, int height)
Definition: cardbutton.cpp:380
r parent
Definition: btrfs.c:3010
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static HICON
Definition: imagelist.c:84
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
static HANDLE proc()
Definition: pdb.c:34
Definition: dsound.c:943
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
DWORD COLORREF
Definition: windef.h:300
char TCHAR
Definition: xmlstorage.h:189