00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_APPLICATION_H__CFDDF7CA_51F3_4E66_992D_3BF640D0A212__INCLUDED_)
00023 #define AFX_APPLICATION_H__CFDDF7CA_51F3_4E66_992D_3BF640D0A212__INCLUDED_
00024
00025 #pragma once
00026
00027
00028 class CApplication : public CComObject
00029 {
00030
00031 public:
00032 CApplication();
00033 virtual ~CApplication();
00034
00035
00036 public:
00037
00038
00039 public:
00040 IApplication* GetApp();
00041 IUserInterface* GetUI();
00042
00043
00044 public:
00045
00046
00047
00048
00049 protected:
00050
00051
00052
00053 DECLARE_MESSAGE_MAP()
00054
00055
00056 protected:
00057 BEGIN_INTERFACE_PART(Application, IApplication)
00058 DECLARE_DISPATCH()
00059 STDMETHOD(get_Application)(IApplication FAR* FAR* ppApplication);
00060 STDMETHOD(get_Version)(BSTR FAR* psVersion);
00061 STDMETHOD(CheckVersion)(BSTR sVersion);
00062 STDMETHOD(CreateXML)(ISXMLElement FAR* FAR* ppXML);
00063 STDMETHOD(get_UserInterface)(IUserInterface FAR* FAR* ppUserInterface);
00064 STDMETHOD(get_Library)(ILibrary FAR* FAR* ppLibrary);
00065 END_INTERFACE_PART(Application)
00066
00067 BEGIN_INTERFACE_PART(UserInterface, IUserInterface)
00068 DECLARE_DISPATCH()
00069 STDMETHOD(get_Application)(IApplication FAR* FAR* ppApplication);
00070 STDMETHOD(get_UserInterface)(IUserInterface FAR* FAR* ppUserInterface);
00071 STDMETHOD(NewWindow)(BSTR bsName, IPluginWindowOwner FAR* pOwner, IPluginWindow FAR* FAR* ppWindow);
00072 STDMETHOD(get_MainWindowHwnd)(HWND FAR* phWnd);
00073 STDMETHOD(get_ActiveView)(IGenericView FAR* FAR* ppView);
00074 STDMETHOD(RegisterCommand)(BSTR bsName, HICON hIcon, UINT* pnCommandID);
00075 STDMETHOD(AddFromString)(BSTR sXML);
00076 STDMETHOD(AddFromResource)(HINSTANCE hInstance, UINT nID);
00077 STDMETHOD(AddFromXML)(ISXMLElement FAR* pXML);
00078 STDMETHOD(GetMenu)(BSTR bsName, VARIANT_BOOL bCreate, ISMenu FAR* FAR* ppMenu);
00079 STDMETHOD(GetToolbar)(BSTR bsName, VARIANT_BOOL bCreate, ISToolbar FAR* FAR* ppToolbar);
00080 END_INTERFACE_PART(UserInterface)
00081
00082 DECLARE_INTERFACE_MAP()
00083
00084 };
00085
00086 extern CApplication Application;
00087
00088
00089
00090 #endif // !defined(AFX_APPLICATION_H__CFDDF7CA_51F3_4E66_992D_3BF640D0A212__INCLUDED_)