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

WndMain.h

Go to the documentation of this file.
00001 //
00002 // WndMain.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 #pragma once
00023 
00024 #include "WindowManager.h"
00025 #include "CtrlCoolBar.h"
00026 #include "CtrlCoolMenuBar.h"
00027 #include "CtrlMainTabBar.h"
00028 #include "CtrlWndTabBar.h"
00029 #include "CtrlMonitorBar.h"
00030 #include "WndMonitor.h"
00031 #include "WndHashProgressBar.h"
00032 
00033 class CChildWnd;
00034 class CURLActionDlg;
00035 
00036 
00037 class CMainWnd : public CMDIFrameWnd
00038 {
00039 // Construction
00040 public:
00041         CMainWnd();
00042         virtual ~CMainWnd();
00043 
00044         DECLARE_DYNCREATE(CMainWnd)
00045 
00046 // Attributes
00047 public:
00048         CWindowManager          m_pWindows;
00049         CCoolMenuBarCtrl        m_wndMenuBar;
00050         CMainTabBarCtrl         m_wndNavBar;
00051         CCoolBarCtrl            m_wndToolBar;
00052         CWndTabBar                      m_wndTabBar;
00053         CStatusBar                      m_wndStatusBar;
00054         CMonitorBarCtrl         m_wndMonitorBar;
00055         CRemoteWnd                      m_wndRemoteWnd;
00056         CHashProgressBar        m_wndHashProgressBar;
00057 public:
00058         HINSTANCE                       m_hInstance;
00059         BOOL                            m_bTrayHide;
00060         BOOL                            m_bTrayIcon;
00061         NOTIFYICONDATA          m_pTray;
00062         BOOL                            m_bTimer;
00063         CString                         m_sMsgStatus;
00064         CSkinWindow*            m_pSkin;
00065         CURLActionDlg*          m_pURLDialog;
00066         DWORD                           m_tURLTime;
00067         
00068 // Operations
00069 public:
00070         void            SetGUIMode(int nMode, BOOL bSaveState = TRUE);
00071         void            CloseToTray();
00072         void            OpenFromTray(int nShowCmd = SW_SHOW);
00073         void            UpdateMessages();
00074         void            LocalSystemChecks();
00075 
00076 // Overrides
00077 public:
00078         virtual void OnUpdateFrameTitle(BOOL bAddToTitle);
00079         virtual void GetMessageString(UINT nID, CString& rMessage) const;
00080         virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00081         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00082         virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00083 
00084 // Implementation
00085 protected:
00086         DECLARE_MESSAGE_MAP()
00087         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00088         afx_msg void OnDestroy();
00089         afx_msg void OnClose();
00090         afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00091         afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00092         afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00093         afx_msg void OnSysColorChange();
00094         afx_msg void OnTimer(UINT nIDEvent);
00095         afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00096         afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
00097         afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
00098         afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
00099         afx_msg UINT OnNcHitTest(CPoint point);
00100         afx_msg void OnNcPaint();
00101         afx_msg BOOL OnNcActivate(BOOL bActive);
00102         afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
00103         afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
00104         afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
00105         afx_msg void OnSize(UINT nType, int cx, int cy);
00106         afx_msg void OnEndSession(BOOL bEnding);
00107         afx_msg LONG OnWinsock(WPARAM wParam, LPARAM lParam);
00108         afx_msg LONG OnHandleURL(UINT wParam, LONG lParam);
00109         afx_msg LONG OnHandleCollection(UINT wParam, LONG lParam);
00110         afx_msg LONG OnVersionCheck(WPARAM wParam, LPARAM lParam);
00111         afx_msg LONG OnOpenChat(WPARAM wParam, LPARAM lParam);
00112         afx_msg LONG OnOpenSearch(WPARAM wParam, LPARAM lParam);
00113         afx_msg LONG OnTray(UINT wParam, LONG lParam);
00114         afx_msg LONG OnLog(WPARAM wParam, LPARAM lParam);
00115         afx_msg LONG OnSkinChanged(UINT wParam, LONG lParam);
00116         afx_msg LONG OnSetMessageString(WPARAM wParam, LPARAM lParam);
00117         afx_msg LONG OnSetText(WPARAM wParam, LPARAM lParam);
00118         afx_msg LONG OnMediaKey(WPARAM wParam, LPARAM lParam);
00119         afx_msg LONG OnDevModeChange(WPARAM wParam, LPARAM lParam);
00120         afx_msg LONG OnDisplayChange(WPARAM wParam, LPARAM lParam);
00121         afx_msg void OnUpdatePluginRange(CCmdUI* pCmdUI);
00122         afx_msg void OnUpdateViewSystem(CCmdUI* pCmdUI);
00123         afx_msg void OnViewSystem();
00124         afx_msg void OnUpdateViewNeighbours(CCmdUI* pCmdUI);
00125         afx_msg void OnViewNeighbours();
00126         afx_msg void OnUpdateNetworkConnect(CCmdUI* pCmdUI);
00127         afx_msg void OnNetworkConnect();
00128         afx_msg void OnUpdateNetworkDisconnect(CCmdUI* pCmdUI);
00129         afx_msg void OnNetworkDisconnect();
00130         afx_msg void OnUpdateViewPackets(CCmdUI* pCmdUI);
00131         afx_msg void OnViewPackets();
00132         afx_msg void OnUpdateViewHosts(CCmdUI* pCmdUI);
00133         afx_msg void OnViewHosts();
00134         afx_msg void OnNetworkConnectTo();
00135         afx_msg void OnUpdateViewSearchMonitor(CCmdUI* pCmdUI);
00136         afx_msg void OnViewSearchMonitor();
00137         afx_msg void OnNetworkExit();
00138         afx_msg void OnUpdateNetworkSearch(CCmdUI* pCmdUI);
00139         afx_msg void OnNetworkSearch();
00140         afx_msg void OnUpdateViewResultsMonitor(CCmdUI* pCmdUI);
00141         afx_msg void OnViewResultsMonitor();
00142         afx_msg void OnUpdateNetworkConnectTo(CCmdUI* pCmdUI);
00143         afx_msg void OnUpdateViewDownloads(CCmdUI* pCmdUI);
00144         afx_msg void OnViewDownloads();
00145         afx_msg void OnUpdateViewLibrary(CCmdUI* pCmdUI);
00146         afx_msg void OnViewLibrary();
00147         afx_msg void OnUpdateViewUploads(CCmdUI* pCmdUI);
00148         afx_msg void OnViewUploads();
00149         afx_msg void OnToolsSettings();
00150         afx_msg void OnHelpAbout();
00151         afx_msg void OnHelpHomepage();
00152         afx_msg void OnHelpWeb1();
00153         afx_msg void OnHelpWeb2();
00154         afx_msg void OnHelpWeb3();
00155         afx_msg void OnHelpWeb4();
00156         afx_msg void OnHelpWeb5();
00157         afx_msg void OnHelpWeb6();
00158         afx_msg void OnHelpFaq();
00159         afx_msg void OnHelpGuide();
00160         afx_msg void OnHelpForums();
00161         afx_msg void OnHelpUpdate();
00162         afx_msg void OnHelpRouter();
00163         afx_msg void OnHelpSecurity();
00164         afx_msg void OnHelpCodec();
00165         afx_msg void OnUpdateViewTraffic(CCmdUI* pCmdUI);
00166         afx_msg void OnViewTraffic();
00167         afx_msg void OnWindowCascade();
00168         afx_msg void OnToolsWizard();
00169         afx_msg void OnTrayOpen();
00170         afx_msg void OnUpdateNetworkAutoClose(CCmdUI* pCmdUI);
00171         afx_msg void OnNetworkAutoClose();
00172         afx_msg void OnUpdateToolsDownload(CCmdUI* pCmdUI);
00173         afx_msg void OnToolsDownload();
00174         afx_msg void OnUpdateViewSecurity(CCmdUI* pCmdUI);
00175         afx_msg void OnViewSecurity();
00176         afx_msg void OnUpdateWindowCascade(CCmdUI* pCmdUI);
00177         afx_msg void OnUpdateWindowTileHorz(CCmdUI* pCmdUI);
00178         afx_msg void OnUpdateWindowTileVert(CCmdUI* pCmdUI);
00179         afx_msg void OnUpdateTabConnect(CCmdUI* pCmdUI);
00180         afx_msg void OnTabConnect();
00181         afx_msg void OnUpdateTabNetwork(CCmdUI* pCmdUI);
00182         afx_msg void OnTabNetwork();
00183         afx_msg void OnUpdateTabLibrary(CCmdUI* pCmdUI);
00184         afx_msg void OnTabLibrary();
00185         afx_msg void OnUpdateTabTransfers(CCmdUI* pCmdUI);
00186         afx_msg void OnTabTransfers();
00187         afx_msg void OnUpdateViewTabbed(CCmdUI* pCmdUI);
00188         afx_msg void OnViewTabbed();
00189         afx_msg void OnUpdateViewWindowed(CCmdUI* pCmdUI);
00190         afx_msg void OnViewWindowed();
00191         afx_msg void OnUpdateViewDiscovery(CCmdUI* pCmdUI);
00192         afx_msg void OnViewDiscovery();
00193         afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);
00194         afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
00195         afx_msg void OnUpdateTabHome(CCmdUI* pCmdUI);
00196         afx_msg void OnTabHome();
00197         afx_msg void OnToolsReskin();
00198         afx_msg void OnUpdateWindowTabBar(CCmdUI* pCmdUI);
00199         afx_msg void OnWindowTabBar();
00200         afx_msg void OnUpdateWindowToolBar(CCmdUI* pCmdUI);
00201         afx_msg void OnWindowToolBar();
00202         afx_msg void OnUpdateWindowMonitor(CCmdUI* pCmdUI);
00203         afx_msg void OnWindowMonitor();
00204         afx_msg void OnNetworkBrowseTo();
00205         afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
00206         afx_msg void OnToolsSkin();
00207         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
00208         afx_msg void OnToolsLanguage();
00209         afx_msg void OnToolsSeedTorrent();
00210         afx_msg void OnToolsReseedTorrent();
00211         afx_msg void OnDiskSpace();
00212         afx_msg void OnDiskWriteFail();
00213         afx_msg void OnConnectionFail();
00214         afx_msg void OnNoDonkeyServers();
00215         afx_msg void OnUpdateViewMedia(CCmdUI* pCmdUI);
00216         afx_msg void OnViewMedia();
00217         afx_msg void OnUpdateTabMedia(CCmdUI* pCmdUI);
00218         afx_msg void OnTabMedia();
00219         afx_msg void OnUpdateTabSearch(CCmdUI* pCmdUI);
00220         afx_msg void OnTabSearch();
00221         afx_msg void OnToolsProfile();
00222         afx_msg void OnUpdateViewHelp(CCmdUI* pCmdUI);
00223         afx_msg void OnViewHelp();
00224         afx_msg void OnUpdateTabHelp(CCmdUI* pCmdUI);
00225         afx_msg void OnTabHelp();
00226         afx_msg void OnLibraryFolders();
00227         afx_msg void OnHelpWarnings();
00228         afx_msg void OnHelpPromote();
00229         afx_msg void OnUpdateNetworkG2(CCmdUI* pCmdUI);
00230         afx_msg void OnNetworkG2();
00231         afx_msg void OnUpdateNetworkG1(CCmdUI* pCmdUI);
00232         afx_msg void OnNetworkG1();
00233         afx_msg void OnUpdateNetworkED2K(CCmdUI* pCmdUI);
00234         afx_msg void OnNetworkED2K();
00235         afx_msg void OnUpdateViewBasic(CCmdUI* pCmdUI);
00236         afx_msg void OnViewBasic();
00237         afx_msg void OnUpdateLibraryHashPriority(CCmdUI* pCmdUI);
00238         afx_msg void OnLibraryHashPriority();
00239         afx_msg void OnUpdateWindowNavBar(CCmdUI *pCmdUI);
00240         afx_msg void OnWindowNavBar();
00241         afx_msg void OnUpdateWindowRemote(CCmdUI *pCmdUI);
00242         afx_msg void OnWindowRemote();
00243         afx_msg void OnRemoteClose();
00244         afx_msg void OnUpdateMediaCommand(CCmdUI *pCmdUI);
00245         afx_msg void OnMediaCommand();
00246 
00247 // COM
00248 protected:
00249         BEGIN_INTERFACE_PART(DropTarget, IDropTarget)
00250                 STDMETHOD(DragEnter)(IDataObject FAR* pDataObj, DWORD grfKeyState, POINTL pt, DWORD FAR* pdwEffect);
00251                 STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD FAR* pdwEffect);
00252                 STDMETHOD(DragLeave)();
00253                 STDMETHOD(Drop)(IDataObject FAR* pDataObj, DWORD grfKeyState, POINTL pt, DWORD FAR* pdwEffect);
00254         protected:
00255                 CString ObjectToURL(IDataObject* pObject);
00256                 BOOL    ObjectToFiles(IDataObject* pObject);
00257                 BOOL    IsTorrentFile() const;
00258         protected:
00259                 CStringList     m_pFiles;
00260         END_INTERFACE_PART(DropTarget)
00261         
00262         DECLARE_INTERFACE_MAP()
00263 };
00264 
00265 #define IDW_MENU_BAR            0xE810
00266 #define IDW_TOOL_BAR            AFX_IDW_TOOLBAR
00267 #define IDW_NAV_BAR                     0xE811
00268 #define IDW_TAB_BAR                     0xE812
00269 #define IDW_MONITOR_BAR         0xE813

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