Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencardbutton.hGo to the documentation of this file.00001 #ifndef CARDBUTTON_INCLUDED 00002 #define CARDBUTTON_INCLUDED 00003 00004 #define MAXBUTTONTEXT 64 00005 00006 #include "cardlib.h" 00007 00008 class CardButton 00009 { 00010 friend class CardWindow; 00011 00012 // 00013 // Constructor is PRIVATE - only a 00014 // CardWindow can create buttons! 00015 // 00016 CardButton(CardWindow &parent, int id, TCHAR *szText, UINT style, bool visible, 00017 int x, int y, int width, int height); 00018 00019 ~CardButton(); 00020 00021 public: 00022 00023 void SetStyle(UINT uStyle); 00024 UINT GetStyle(); 00025 00026 void SetText(TCHAR *fmt, ...); 00027 void SetFont(HFONT font); 00028 00029 void SetPlacement(UINT xJustify, UINT yJustify, int xAdjust, int yAdjust); 00030 00031 void SetForeColor(COLORREF cr); 00032 void SetBackColor(COLORREF cr); 00033 00034 void Move(int x, int y, int width, int height); 00035 void Show(bool fShow); 00036 void Redraw(); 00037 int Id(); 00038 00039 void SetIcon(HICON hicon, bool fRedraw); 00040 00041 void SetButtonProc(pButtonProc proc); 00042 00043 CardWindow &GetCardWindow() { return parentWnd; } 00044 00045 bool Lock(); 00046 bool UnLock(); 00047 00048 static COLORREF GetHighlight(COLORREF crBase); 00049 static COLORREF GetShadow(COLORREF crBase); 00050 static COLORREF GetFace(COLORREF crBase); 00051 00052 private: 00053 00054 // 00055 // Private member functions 00056 // 00057 void AdjustPosition(int winwidth, int winheight); 00058 00059 void DrawRect(HDC hdc, RECT *rect, bool fNormal); 00060 void Draw(HDC hdc, bool fNormal); 00061 void Clip(HDC hdc); 00062 00063 int OnLButtonDown(HWND hwnd, int x, int y); 00064 int OnMouseMove(HWND hwnd, int x, int y); 00065 int OnLButtonUp(HWND hwnd, int x, int y); 00066 00067 // 00068 // Private members 00069 // 00070 CardWindow &parentWnd; 00071 00072 RECT rect; 00073 int id; 00074 UINT uStyle; 00075 bool fVisible; 00076 00077 int xadjust; 00078 int xjustify; 00079 int yadjust; 00080 int yjustify; 00081 00082 HICON hIcon; 00083 HFONT hFont; 00084 00085 TCHAR szText[MAXBUTTONTEXT]; 00086 00087 COLORREF crBack; 00088 COLORREF crText; 00089 COLORREF crHighlight; 00090 COLORREF crShadow; 00091 COLORREF crShadow2; 00092 00093 bool fMouseDown; 00094 bool fButtonDown; 00095 00096 HANDLE mxlock; 00097 00098 pButtonProc ButtonCallback; 00099 }; 00100 00101 #endif Generated on Thu Feb 9 04:59:25 2012 for ReactOS by
1.6.3
|