00001
00002
00003
00004
00005
00006 #if !defined(AFX_SPIDERWND_H__CB81C87C_5466_4ACB_A194_E982B9B99534__INCLUDED_)
00007 #define AFX_SPIDERWND_H__CB81C87C_5466_4ACB_A194_E982B9B99534__INCLUDED_
00008
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif
00012
00013 #include "plugins.h"
00014 #include "fsodmenu.h"
00015 #include "SpiderTasks.h"
00016 #include "SpiderTaskTree.h"
00017 #include "WndSplitter.h"
00018 #include "fsWebPageDownloadsMgr.h"
00019
00020 class CSpiderWnd : public CWnd
00021 {
00022 friend class CSpiderTasks;
00023
00024 public:
00025 CSpiderWnd();
00026
00027 public:
00028
00029 public:
00030
00031
00032
00033
00034 public:
00035 static HMENU Plugin_GetViewMenu();
00036 static HMENU Plugin_GetMainMenu();
00037
00038 static void Plugin_SetLanguage (wgLanguage, HMENU hMenuMain, HMENU);
00039 static void Plugin_GetPluginNames(LPCSTR *ppszLong, LPCSTR *ppszShort);
00040 static void Plugin_GetMenuViewItems(wgMenuViewItem **ppItems, int * cItems);
00041 static void Plugin_GetMenuImages(fsSetImage **ppImages, int *pcImages);
00042 static void Plugin_GetToolBarInfo(wgTButtonInfo **ppButtons, int *pcButtons);
00043 static HWND Plugin_CreateMainWindow(HWND hParent);
00044
00045 void UpdateTasksIcons();
00046
00047 afx_msg void OnSpiderDl();
00048
00049 void SetupDefSettings();
00050
00051 void SaveAll (BOOL bMsgIfErr = FALSE);
00052
00053 void SavePages(BOOL bMsgIfErr = TRUE);
00054 fsWebPageDownloadsMgr* GetMgr();
00055 fsWebPageDownloadsMgr m_mgr;
00056
00057 fsWebPageDownloader* AddWebPage (LPCSTR pszStartUrl = NULL, BOOL bReqTopMost = FALSE);
00058
00059 BOOL Create (CWnd *pParent);
00060 virtual ~CSpiderWnd();
00061
00062 protected:
00063
00064 afx_msg LRESULT OnInsert(WPARAM, LPARAM);
00065 afx_msg void OnPagesListShowCol (UINT uCmd);
00066 void UpdatePagesListColMenu(CMenu *menu);
00067 afx_msg LRESULT OnUpdateMenuView (WPARAM, LPARAM lp);
00068 void ApplyLanguageToMenuView(CMenu *menu);
00069 void ApplyLanguage();
00070 afx_msg LRESULT OnUpdateToolBar (WPARAM, LPARAM);
00071 afx_msg LRESULT OnUpdateMenu (WPARAM, LPARAM);
00072 afx_msg LRESULT OnAppQueryExit (WPARAM, LPARAM);
00073 afx_msg LRESULT OnAppExit (WPARAM, LPARAM);
00074
00075 void LoadPages();
00076
00077 static void _DownloaderEvents(fsWebPageDownloader* dldr, fsWPDEvent ev, int info, LPVOID lp);
00078
00079 afx_msg void OnShowTree();
00080 void ShowTree (BOOL bShow);
00081 BOOL m_bShowTree;
00082
00083 CWndSplitter m_wndSplitter;
00084 CSpiderTaskTree m_wndTaskTree;
00085 CSpiderTasks m_wndTasks;
00086
00087 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00088 afx_msg void OnSize(UINT nType, int cx, int cy);
00089 afx_msg void OnTimer(UINT nIDEvent);
00090 afx_msg void OnSpiderDelete();
00091 afx_msg void OnSpiderOpenfolder();
00092 afx_msg void OnSpiderOpenpage();
00093 afx_msg void OnSpiderSchedule();
00094 afx_msg void OnSpiderSettings();
00095 afx_msg void OnSpiderStartautomatically();
00096 afx_msg void OnSpiderStartdl();
00097 afx_msg void OnSpiderStopdl();
00098 afx_msg void OnSetFocus(CWnd* pOldWnd);
00099
00100 DECLARE_MESSAGE_MAP()
00101 };
00102
00103
00104
00105 #endif