00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "WndPanel.h"
00025 #include "CtrlDownloads.h"
00026 #include "CtrlDownloadTabBar.h"
00027
00028
00029 class CDownloadsWnd : public CPanelWnd
00030 {
00031
00032 public:
00033 CDownloadsWnd();
00034 virtual ~CDownloadsWnd();
00035
00036 DECLARE_SERIAL(CDownloadsWnd)
00037
00038
00039 public:
00040 virtual void OnSkinChange();
00041 BOOL Select(CDownload* pDownload);
00042 void Update();
00043 void DragDownloads(CPtrList* pList, CImageList* pImage, const CPoint& ptScreen);
00044 protected:
00045 void Prepare();
00046 void CancelDrag();
00047
00048
00049 protected:
00050 CDownloadsCtrl m_wndDownloads;
00051 CDownloadTabBar m_wndTabBar;
00052 CCoolBarCtrl m_wndToolBar;
00053 protected:
00054 CPtrList* m_pDragList;
00055 CImageList* m_pDragImage;
00056 CPoint m_pDragOffs;
00057 HCURSOR m_hCursMove;
00058 HCURSOR m_hCursCopy;
00059 protected:
00060 int m_nMoreSourcesLimiter;
00061 DWORD m_tMoreSourcesTimer;
00062 DWORD m_tLastUpdate;
00063 protected:
00064 DWORD m_tSel;
00065 BOOL m_bSelAny;
00066 BOOL m_bSelDownload;
00067 BOOL m_bSelSource;
00068 BOOL m_bSelTrying;
00069 BOOL m_bSelPaused;
00070 BOOL m_bSelNotPausedOrMoving;
00071 BOOL m_bSelNoPreview;
00072 BOOL m_bSelNotCompleteAndNoPreview;
00073 BOOL m_bSelCompletedAndNoPreview;
00074 BOOL m_bSelStartedAndNotMoving;
00075 BOOL m_bSelCompleted;
00076 BOOL m_bSelNotMoving;
00077 BOOL m_bSelBoostable;
00078 BOOL m_bSelSHA1orED2K;
00079 BOOL m_bSelShareState;
00080 BOOL m_bSelTorrent;
00081 BOOL m_bSelIdleSource;
00082 BOOL m_bSelActiveSource;
00083 BOOL m_bSelHttpSource;
00084 BOOL m_bSelDonkeySource;
00085 BOOL m_bSelShareConsistent;
00086 BOOL m_bSelMoreSourcesOK;
00087 BOOL m_bSelSourceAcceptConnections;
00088 BOOL m_bSelSourceExtended;
00089 BOOL m_bSelHasReviews;
00090
00091 BOOL m_bConnectOkay;
00092
00093
00094 public:
00095 virtual BOOL PreTranslateMessage(MSG* pMsg);
00096 virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00097
00098
00099 protected:
00100 DECLARE_MESSAGE_MAP()
00101 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00102 afx_msg void OnDestroy();
00103 afx_msg void OnSize(UINT nType, int cx, int cy);
00104 afx_msg void OnTimer(UINT nIDEvent);
00105 afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
00106 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00107 afx_msg void OnUpdateDownloadsResume(CCmdUI* pCmdUI);
00108 afx_msg void OnDownloadsResume();
00109 afx_msg void OnUpdateDownloadsPause(CCmdUI* pCmdUI);
00110 afx_msg void OnDownloadsPause();
00111 afx_msg void OnUpdateDownloadsClear(CCmdUI* pCmdUI);
00112 afx_msg void OnDownloadsClear();
00113 afx_msg void OnUpdateDownloadsLaunch(CCmdUI* pCmdUI);
00114 afx_msg void OnDownloadsLaunch();
00115 afx_msg void OnUpdateDownloadsViewReviews(CCmdUI* pCmdUI);
00116 afx_msg void OnDownloadsViewReviews();
00117 afx_msg void OnUpdateDownloadsSources(CCmdUI* pCmdUI);
00118 afx_msg void OnDownloadsSources();
00119 afx_msg void OnDownloadsClearCompleted();
00120 afx_msg void OnDownloadsClearPaused();
00121 afx_msg void OnUpdateTransfersDisconnect(CCmdUI* pCmdUI);
00122 afx_msg void OnTransfersDisconnect();
00123 afx_msg void OnUpdateTransfersForget(CCmdUI* pCmdUI);
00124 afx_msg void OnTransfersForget();
00125 afx_msg void OnUpdateTransfersChat(CCmdUI* pCmdUI);
00126 afx_msg void OnTransfersChat();
00127 afx_msg void OnUpdateDownloadsUrl(CCmdUI* pCmdUI);
00128 afx_msg void OnDownloadsUrl();
00129 afx_msg void OnUpdateDownloadsEnqueue(CCmdUI* pCmdUI);
00130 afx_msg void OnDownloadsEnqueue();
00131 afx_msg void OnUpdateDownloadsAutoClear(CCmdUI* pCmdUI);
00132 afx_msg void OnDownloadsAutoClear();
00133 afx_msg void OnUpdateTransfersConnect(CCmdUI* pCmdUI);
00134 afx_msg void OnTransfersConnect();
00135 afx_msg void OnUpdateDownloadsShowSources(CCmdUI* pCmdUI);
00136 afx_msg void OnDownloadsShowSources();
00137 afx_msg void OnUpdateBrowseLaunch(CCmdUI* pCmdUI);
00138 afx_msg void OnBrowseLaunch();
00139 afx_msg void OnUpdateDownloadsBoost(CCmdUI* pCmdUI);
00140 afx_msg void OnDownloadsBoost();
00141 afx_msg void OnUpdateDownloadsLaunchCopy(CCmdUI* pCmdUI);
00142 afx_msg void OnDownloadsLaunchCopy();
00143 afx_msg void OnUpdateDownloadsMonitor(CCmdUI* pCmdUI);
00144 afx_msg void OnDownloadsMonitor();
00145 afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00146 afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00147 afx_msg void OnUpdateDownloadsFileDelete(CCmdUI* pCmdUI);
00148 afx_msg void OnDownloadsFileDelete();
00149 afx_msg void OnUpdateDownloadsRate(CCmdUI* pCmdUI);
00150 afx_msg void OnDownloadsRate();
00151 afx_msg void OnUpdateDownloadsMoveUp(CCmdUI* pCmdUI);
00152 afx_msg void OnDownloadsMoveUp();
00153 afx_msg void OnUpdateDownloadsMoveDown(CCmdUI* pCmdUI);
00154 afx_msg void OnDownloadsMoveDown();
00155 afx_msg void OnDownloadsSettings();
00156 afx_msg void OnUpdateDownloadsFilterAll(CCmdUI* pCmdUI);
00157 afx_msg void OnDownloadsFilterAll();
00158 afx_msg void OnUpdateDownloadsFilterActive(CCmdUI* pCmdUI);
00159 afx_msg void OnDownloadsFilterActive();
00160 afx_msg void OnUpdateDownloadsFilterQueued(CCmdUI* pCmdUI);
00161 afx_msg void OnDownloadsFilterQueued();
00162 afx_msg void OnUpdateDownloadsFilterSources(CCmdUI* pCmdUI);
00163 afx_msg void OnDownloadsFilterSources();
00164 afx_msg void OnUpdateDownloadsFilterPaused(CCmdUI* pCmdUI);
00165 afx_msg void OnDownloadsFilterPaused();
00166 afx_msg void OnUpdateDownloadsLaunchComplete(CCmdUI* pCmdUI);
00167 afx_msg void OnDownloadsLaunchComplete();
00168 afx_msg void OnUpdateDownloadsShare(CCmdUI* pCmdUI);
00169 afx_msg void OnDownloadsShare();
00170 afx_msg void OnUpdateDownloadsCopy(CCmdUI* pCmdUI);
00171 afx_msg void OnDownloadsCopy();
00172 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00173 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00174 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00175 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00176 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
00177 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00178 afx_msg void OnUpdateDownloadsTorrentInfo(CCmdUI* pCmdUI);
00179 afx_msg void OnDownloadsTorrentInfo();
00180 afx_msg void OnUpdateDownloadGroupShow(CCmdUI* pCmdUI);
00181 afx_msg void OnDownloadGroupShow();
00182 afx_msg void OnDownloadsHelp();
00183 afx_msg void OnDownloadsFilterMenu();
00184 afx_msg void OnUpdateDownloadsClearIncomplete(CCmdUI *pCmdUI);
00185 afx_msg void OnDownloadsClearIncomplete();
00186 afx_msg void OnUpdateDownloadsClearComplete(CCmdUI *pCmdUI);
00187 afx_msg void OnDownloadsClearComplete();
00188 afx_msg void OnUpdateDownloadsEdit(CCmdUI *pCmdUI);
00189 afx_msg void OnDownloadsEdit();
00190 };
00191
00192 #define IDC_DOWNLOADS 100