]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/modules/lseditor/plugin.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: General interfaces for all plug-ins in wxStudio
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleskandars Gluchovas
9 // Licence: GNU General Public License wxWindows licence v2.0
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wxstldefs.h"
19 typedef wxsPluginBase
* wxsPluginBasePtrT
;
20 #ifdef wxUSE_TEMPLATE_STL
21 typedef vector
<wxsPluginBasePtrT
> wxsPluginListT
;
23 typedef WXSTL_VECTOR_SHALLOW_COPY(wxsPluginBasePtrT
) wxsPluginListT
;
27 class wxsPluginManager
: public wxObject
31 wxsPluginListT
& GetPlugins();
33 // allows to present plugin-specific features
34 // as items in the menu-bar
36 void RegisterMenuCommand( const string
& itemName
,
37 const string
& menuName
,
39 wxsPluginBase
* forPlugin
);
41 // should be called by plugin, when it's being destroyed
43 void UnregisterPlugin( wxsPluginBase
* plugin
);
48 // Used by create settings panel:
55 class wxsPluginBase
: public wxObject
58 wxsPluginManager
* mpPluginMgr
;
63 virtual ~wxsPluginBase();
65 virtual void InitPlugin() {}
69 wxsPluginManager
& GetPluginManager();
70 void SetPluginManager( wxsPluginManager
* mgr
);
74 // Current Types = UNKNOWN,EDITOR,CLASSBROWSER,FILEBROWSER,CLASSINFO,TOOL
75 virtual WXS_PLUGIN_TYPE
GetType() = 0;
76 virtual string
GetCategory() = 0;
78 virtual string
GetName() = 0;
79 // will return a help panel
80 virtual wxWindow
* CreateSettingsPanel(wxWindow
*parent
, int type
) {return NULL
;}
81 virtual wxsPluginBase
* Clone() = 0;
83 virtual string
Command( const string
& name
, const string
& args
)
85 { return "NO_SUPPORTED"; }
88 // base clas for all plugins which are presented as windows
90 class wxsComponent
: public wxsPluginBase
93 virtual void Create( wxWindow
* parent
, wxWindowID id
) = 0;
94 virtual wxWindow
* GetWindow() = 0;