00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_FSPLUGINMGR_H__EC8A6B33_6965_4A53_A4E5_94455A78EAD6__INCLUDED_) 00007 #define AFX_FSPLUGINMGR_H__EC8A6B33_6965_4A53_A4E5_94455A78EAD6__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif 00012 00013 #include "list.h" 00014 #include "plugins.h" 00015 #include "fsODMenu.h" 00016 00017 typedef HWND (*fntCreateMainWindow)(HWND); 00018 typedef HMENU (*fntGetMainMenu)(); 00019 typedef HMENU (*fntGetViewMenu)(); 00020 typedef void (*fntGetMenuImages)(wgMenuItemImage**, int *); 00021 typedef void (*fntGetTBInfo)(wgTButtonInfo**, int*); 00022 typedef void (*fntGetMenuViewItems)(wgMenuViewItem** ppItems, int* cItems); 00023 typedef void (*fntGetPluginNames)(LPCSTR* ppszLongName, LPCSTR* ppszShortName); 00024 typedef void (*fntSetLanguage)(wgLanguage, HMENU, HMENU); 00025 typedef BOOL (*fntReadyToShutdown)(); 00026 typedef void (*fntShutdown)(); 00027 00028 struct fsPluginInfo 00029 { 00030 HMODULE hLib; 00031 HWND hWnd; 00032 CString strName; 00033 CString strLongName; 00034 HMENU hMenuMain; 00035 HMENU hMenuView; 00036 00037 CBitmap* pbmpMenuImages, *pbmpMenuDImages; 00038 00039 wgMenuItemImage *pMenuMainImages; 00040 int cMenuMainImages; 00041 wgMenuItemImage *pMenuViewImages; 00042 int cMenuViewImages; 00043 00044 wgMenuViewItem *pMenuViewItems; 00045 int cMenuViewItems; 00046 00047 fntGetPluginNames pfnGPN; 00048 fntGetTBInfo pfnGTBI; 00049 fntGetMenuViewItems pfnGMVI; 00050 fntSetLanguage pfnSetLanguage; 00051 fntReadyToShutdown pfnRTS; 00052 fntShutdown pfnShutdown; 00053 }; 00054 00055 class fsPluginMgr 00056 { 00057 public: 00058 00059 BOOL LoadPlugins(CWnd *pPluginsFrame); 00060 00061 int GetPluginCount(); 00062 00063 fsPluginInfo& Plugin (int iPlugin); 00064 00065 CImageList* GetImages (); 00066 00067 BOOL QueryExit(); 00068 00069 void OnNewLng (LPCSTR pszLng); 00070 00071 int OnUpdateToolBar (UINT nID); 00072 00073 void OnSetActivePlugin (int iActive); 00074 00075 void UpdateMenuMain (HMENU* phMenus); 00076 00077 void UpdateMenuView (HMENU* phMenus); 00078 00079 BOOL IsWasExit(); 00080 00081 BOOL OnAppExit(BOOL bQueryForExit = TRUE); 00082 00083 fsPluginMgr(); 00084 virtual ~fsPluginMgr(); 00085 00086 protected: 00087 int m_iActivePlugin; 00088 BOOL m_bWasExit; 00089 CWnd* m_pPluginsFrame; 00090 00091 BOOL LoadBuiltIn(); 00092 00093 fs::list <fsPluginInfo> m_vWndPlugs, m_vWndLessPlugs; 00094 CImageList m_images; 00095 }; 00096 00097 #endif
1.5.6