Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlHomePanel.h

Go to the documentation of this file.
00001 //
00002 // CtrlHomePanel.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Construction
00037 public:
00038         CHomeDownloadsBox();
00039         virtual ~CHomeDownloadsBox();
00040         DECLARE_DYNAMIC(CHomeDownloadsBox)
00041 
00042 // Attributes
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 // Operations
00067 public:
00068         void    Setup();
00069         void    Update();
00070         Item*   HitTest(const CPoint& point) const;
00071         BOOL    ExecuteDownload(CDownload* pDownload);
00072 
00073 // Overrides
00074 public:
00075         //{{AFX_VIRTUAL(CHomeDownloadsBox)
00076         //}}AFX_VIRTUAL
00077 
00078 // Implementation
00079 protected:
00080         //{{AFX_MSG(CHomeDownloadsBox)
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         //}}AFX_MSG
00088 
00089         DECLARE_MESSAGE_MAP()
00090 };
00091 
00092 
00093 class CHomeLibraryBox : public CRichTaskBox
00094 {
00095 // Construction
00096 public:
00097         CHomeLibraryBox();
00098         virtual ~CHomeLibraryBox();
00099         DECLARE_DYNAMIC(CHomeLibraryBox)
00100 
00101 // Attributes
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 // Operations
00122 public:
00123         void    Setup();
00124         void    Update();
00125         Item*   HitTest(const CPoint& point) const;
00126 
00127 // Overrides
00128 public:
00129         //{{AFX_VIRTUAL(CHomeLibraryBox)
00130         //}}AFX_VIRTUAL
00131 
00132 // Implementation
00133 protected:
00134         //{{AFX_MSG(CHomeLibraryBox)
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         //}}AFX_MSG
00142 
00143         DECLARE_MESSAGE_MAP()
00144 };
00145 
00146 
00147 class CHomeUploadsBox : public CRichTaskBox
00148 {
00149 // Construction
00150 public:
00151         CHomeUploadsBox();
00152         virtual ~CHomeUploadsBox();
00153         DECLARE_DYNAMIC(CHomeUploadsBox)
00154 
00155 // Attributes
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 // Operations
00168 public:
00169         void            Setup();
00170         void            Update();
00171 
00172 // Overrides
00173 public:
00174         //{{AFX_VIRTUAL(CHomeUploadsBox)
00175         //}}AFX_VIRTUAL
00176 
00177 // Implementation
00178 protected:
00179         //{{AFX_MSG(CHomeUploadsBox)
00180         //}}AFX_MSG
00181 
00182         DECLARE_MESSAGE_MAP()
00183 };
00184 
00185 
00186 class CHomeConnectionBox : public CRichTaskBox
00187 {
00188 // Construction
00189 public:
00190         CHomeConnectionBox();
00191         virtual ~CHomeConnectionBox();
00192         DECLARE_DYNAMIC(CHomeConnectionBox)
00193 
00194 // Attributes
00195 protected:
00196         CRichElement*   m_pdConnectedHours;
00197         CRichElement*   m_pdConnectedMinutes;
00198         CRichElement*   m_pdCount[4][3];
00199         CString                 m_sCount[4][3];
00200 
00201 // Operations
00202 public:
00203         void    Setup();
00204         void    Update();
00205 
00206 // Overrides
00207 public:
00208         //{{AFX_VIRTUAL(CHomeConnectionBox)
00209         //}}AFX_VIRTUAL
00210 
00211 // Implementation
00212 protected:
00213         //{{AFX_MSG(CHomeConnectionBox)
00214         //}}AFX_MSG
00215 
00216         DECLARE_MESSAGE_MAP()
00217 };
00218 
00219 class CHomeTorrentsBox : public CRichTaskBox
00220 {
00221 // Construction
00222 public:
00223         CHomeTorrentsBox();
00224         virtual ~CHomeTorrentsBox();
00225         DECLARE_DYNAMIC(CHomeTorrentsBox)
00226 
00227 // Attributes
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 // Operations
00237 public:
00238         void    Setup();
00239         void    Update();
00240 
00241 // Overrides
00242 public:
00243         //{{AFX_VIRTUAL(CHomeTorrentsBox)
00244         //}}AFX_VIRTUAL
00245 
00246 // Implementation
00247 protected:
00248         //{{AFX_MSG(CHomeTorrentsBox)
00249         //}}AFX_MSG
00250 
00251         DECLARE_MESSAGE_MAP()
00252 };
00253 
00254 class CHomePanel : public CTaskPanel
00255 {
00256 // Construction
00257 public:
00258         CHomePanel();
00259         virtual ~CHomePanel();
00260         DECLARE_DYNAMIC(CHomePanel)
00261 
00262 // Attributes
00263 public:
00264         CHomeDownloadsBox       m_boxDownloads;
00265         CHomeUploadsBox         m_boxUploads;
00266         CHomeConnectionBox      m_boxConnection;
00267         CHomeLibraryBox         m_boxLibrary;
00268         CHomeTorrentsBox        m_boxTorrents;
00269 
00270 // Operations
00271 public:
00272         void    Setup();
00273         void    Update();
00274 
00275 // Overrides
00276 public:
00277         //{{AFX_VIRTUAL(CHomePanel)
00278         virtual BOOL Create(CWnd* pParentWnd);
00279         //}}AFX_VIRTUAL
00280 
00281 // Implementation
00282 protected:
00283         //{{AFX_MSG(CHomePanel)
00284         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00285         //}}AFX_MSG
00286 
00287         DECLARE_MESSAGE_MAP()
00288 };
00289 
00290 
00291 
00292 //{{AFX_INSERT_LOCATION}}
00293 
00294 #define IDC_HOME_PANEL  111
00295 
00296 #endif // !defined(AFX_CTRLHOMEPANEL_H__02E64581_B110_4491_9F14_A0363005626E__INCLUDED_)

Generated on Thu Dec 15 10:39:35 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2