00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLHOMEPANEL_H__02E64581_B110_4491_9F14_A0363005626E__INCLUDED_)
00023 #define AFX_CTRLHOMEPANEL_H__02E64581_B110_4491_9F14_A0363005626E__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "CtrlRichTaskBox.h"
00028 #include "CtrlDownloadTip.h"
00029
00030 class CDownload;
00031 class CLibraryRecent;
00032
00033
00034 class CHomeDownloadsBox : public CRichTaskBox
00035 {
00036
00037 public:
00038 CHomeDownloadsBox();
00039 virtual ~CHomeDownloadsBox();
00040 DECLARE_DYNAMIC(CHomeDownloadsBox)
00041
00042
00043 protected:
00044 CRichElement* m_pdDownloadsNone;
00045 CRichElement* m_pdDownloadsOne;
00046 CRichElement* m_pdDownloadsMany;
00047 CString m_sDownloadsMany;
00048 protected:
00049 CPtrArray m_pList;
00050 CFont m_pFont;
00051 HCURSOR m_hHand;
00052 CDownloadTipCtrl m_wndTip;
00053
00054 struct Item
00055 {
00056 CDownload* m_pDownload;
00057 CString m_sText;
00058 int m_nIcon16;
00059 QWORD m_nSize;
00060 QWORD m_nComplete;
00061 BOOL m_bPaused;
00062 };
00063
00064 Item* m_pHover;
00065
00066
00067 public:
00068 void Setup();
00069 void Update();
00070 Item* HitTest(const CPoint& point) const;
00071 BOOL ExecuteDownload(CDownload* pDownload);
00072
00073
00074 public:
00075
00076
00077
00078
00079 protected:
00080
00081 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00082 afx_msg void OnSize(UINT nType, int cx, int cy);
00083 afx_msg void OnPaint();
00084 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00085 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00086 afx_msg void OnTimer(UINT nIDEvent);
00087
00088
00089 DECLARE_MESSAGE_MAP()
00090 };
00091
00092
00093 class CHomeLibraryBox : public CRichTaskBox
00094 {
00095
00096 public:
00097 CHomeLibraryBox();
00098 virtual ~CHomeLibraryBox();
00099 DECLARE_DYNAMIC(CHomeLibraryBox)
00100
00101
00102 protected:
00103 CRichElement* m_pdLibraryFiles;
00104 CRichElement* m_pdLibraryVolume;
00105 CRichElement* m_pdLibraryHashRemaining;
00106 protected:
00107 CPtrArray m_pList;
00108 CFont m_pFont;
00109 HCURSOR m_hHand;
00110
00111 struct Item
00112 {
00113 CLibraryRecent* m_pRecent;
00114 DWORD m_nIndex;
00115 CString m_sText;
00116 int m_nIcon16;
00117 };
00118
00119 Item* m_pHover;
00120
00121
00122 public:
00123 void Setup();
00124 void Update();
00125 Item* HitTest(const CPoint& point) const;
00126
00127
00128 public:
00129
00130
00131
00132
00133 protected:
00134
00135 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00136 afx_msg void OnSize(UINT nType, int cx, int cy);
00137 afx_msg void OnPaint();
00138 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00139 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00140 afx_msg void OnTimer(UINT nIDEvent);
00141
00142
00143 DECLARE_MESSAGE_MAP()
00144 };
00145
00146
00147 class CHomeUploadsBox : public CRichTaskBox
00148 {
00149
00150 public:
00151 CHomeUploadsBox();
00152 virtual ~CHomeUploadsBox();
00153 DECLARE_DYNAMIC(CHomeUploadsBox)
00154
00155
00156 protected:
00157 CRichElement* m_pdUploadsNone;
00158 CRichElement* m_pdUploadsOne;
00159 CRichElement* m_pdUploadsMany;
00160 CRichElement* m_pdUploadedNone;
00161 CRichElement* m_pdUploadedOne;
00162 CRichElement* m_pdUploadedMany;
00163 CString m_sUploadsMany;
00164 CString m_sUploadedOne;
00165 CString m_sUploadedMany;
00166
00167
00168 public:
00169 void Setup();
00170 void Update();
00171
00172
00173 public:
00174
00175
00176
00177
00178 protected:
00179
00180
00181
00182 DECLARE_MESSAGE_MAP()
00183 };
00184
00185
00186 class CHomeConnectionBox : public CRichTaskBox
00187 {
00188
00189 public:
00190 CHomeConnectionBox();
00191 virtual ~CHomeConnectionBox();
00192 DECLARE_DYNAMIC(CHomeConnectionBox)
00193
00194
00195 protected:
00196 CRichElement* m_pdConnectedHours;
00197 CRichElement* m_pdConnectedMinutes;
00198 CRichElement* m_pdCount[4][3];
00199 CString m_sCount[4][3];
00200
00201
00202 public:
00203 void Setup();
00204 void Update();
00205
00206
00207 public:
00208
00209
00210
00211
00212 protected:
00213
00214
00215
00216 DECLARE_MESSAGE_MAP()
00217 };
00218
00219 class CHomeTorrentsBox : public CRichTaskBox
00220 {
00221
00222 public:
00223 CHomeTorrentsBox();
00224 virtual ~CHomeTorrentsBox();
00225 DECLARE_DYNAMIC(CHomeTorrentsBox)
00226
00227
00228 protected:
00229 CRichElement* m_pdTorrentsNone;
00230 CRichElement* m_pdTorrentsOne;
00231 CRichElement* m_pdTorrentsMany;
00232 CString m_sTorrentsMany;
00233 CRichElement* m_pdReseedTorrent;
00234 CString m_sReseedTorrent;
00235
00236
00237 public:
00238 void Setup();
00239 void Update();
00240
00241
00242 public:
00243
00244
00245
00246
00247 protected:
00248
00249
00250
00251 DECLARE_MESSAGE_MAP()
00252 };
00253
00254 class CHomePanel : public CTaskPanel
00255 {
00256
00257 public:
00258 CHomePanel();
00259 virtual ~CHomePanel();
00260 DECLARE_DYNAMIC(CHomePanel)
00261
00262
00263 public:
00264 CHomeDownloadsBox m_boxDownloads;
00265 CHomeUploadsBox m_boxUploads;
00266 CHomeConnectionBox m_boxConnection;
00267 CHomeLibraryBox m_boxLibrary;
00268 CHomeTorrentsBox m_boxTorrents;
00269
00270
00271 public:
00272 void Setup();
00273 void Update();
00274
00275
00276 public:
00277
00278 virtual BOOL Create(CWnd* pParentWnd);
00279
00280
00281
00282 protected:
00283
00284 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00285
00286
00287 DECLARE_MESSAGE_MAP()
00288 };
00289
00290
00291
00292
00293
00294 #define IDC_HOME_PANEL 111
00295
00296 #endif // !defined(AFX_CTRLHOMEPANEL_H__02E64581_B110_4491_9F14_A0363005626E__INCLUDED_)