Code::Blocks
SVN r11506
|
Base class for mime plugins. More...
#include <cbplugin.h>
Public Member Functions | |
cbMimePlugin () | |
virtual bool | CanHandleFile (const wxString &filename) const =0 |
Can a file be handled by this plugin? More... | |
virtual int | OpenFile (const wxString &filename)=0 |
Open the file. More... | |
virtual bool | HandlesEverything () const =0 |
Is this a default handler? More... | |
Public Member Functions inherited from cbPlugin | |
cbPlugin () | |
In default cbPlugin's constructor the associated PluginInfo structure is filled with default values. More... | |
~cbPlugin () override | |
cbPlugin destructor. More... | |
virtual PluginType | GetType () const |
The plugin must return its type on request. More... | |
virtual int | GetConfigurationPriority () const |
Return the plugin's configuration priority. More... | |
virtual int | GetConfigurationGroup () const |
Return the configuration group for this plugin. More... | |
virtual cbConfigurationPanel * | GetConfigurationPanel (cb_optional wxWindow *parent) |
Return plugin's configuration panel. More... | |
virtual cbConfigurationPanel * | GetProjectConfigurationPanel (cb_optional wxWindow *parent, cb_optional cbProject *project) |
Return plugin's configuration panel for projects. More... | |
virtual void | BuildMenu (cb_optional wxMenuBar *menuBar) |
This method is called by Code::Blocks and is used by the plugin to add any menu items it needs on Code::Blocks's menu bar. More... | |
virtual void | BuildModuleMenu (cb_optional const ModuleType type, cb_optional wxMenu *menu, cb_optional const FileTreeData *data=nullptr) |
This method is called by Code::Blocks core modules (EditorManager, ProjectManager etc) and is used by the plugin to add any menu items it needs in the module's popup menu. More... | |
virtual bool | BuildToolBar (cb_optional wxToolBar *toolBar) |
This method is called by Code::Blocks and is used by the plugin to add any toolbar items it needs on Code::Blocks's toolbar. More... | |
virtual int | GetToolBarPriority () |
This method return the priority of the plugin's toolbar, the less value indicates a more preceding position when C::B starts with no configuration file. More... | |
virtual void | CreateStatusField (cbStatusBar *statusBar) |
This method is called by Code::Blocks and is used by the plugin to add a field on Code::Blocks's statusbar. More... | |
bool | IsAttached () const |
See whether this plugin is attached or not. More... | |
virtual bool | CanDetach () const |
See whether this plugin can be detached (unloaded) or not. More... | |
Private Member Functions | |
void | BuildMenu (cb_unused wxMenuBar *menuBar) override |
void | RemoveMenu (cb_unused wxMenuBar *menuBar) |
void | BuildModuleMenu (cb_unused const ModuleType type, cb_unused wxMenu *menu, cb_unused const FileTreeData *data=nullptr) override |
bool | BuildToolBar (cb_unused wxToolBar *toolBar) override |
void | RemoveToolBar (cb_unused wxToolBar *toolBar) |
Additional Inherited Members | |
Protected Member Functions inherited from cbPlugin | |
virtual void | OnAttach () |
Any descendent plugin should override this virtual method and perform any necessary initialization. More... | |
virtual void | OnRelease (cb_optional bool appShutDown) |
Any descendent plugin should override this virtual method and perform any necessary de-initialization. More... | |
virtual void | NotImplemented (const wxString &log) const |
This method logs a "Not implemented" message and is provided for convenience only. More... | |
Protected Attributes inherited from cbPlugin | |
PluginType | m_Type |
Holds the plugin's type. More... | |
bool | m_IsAttached |
Holds the "attached" state. More... | |
Base class for mime plugins.
Mime plugins are called by Code::Blocks to operate on files that Code::Blocks wouldn't know how to handle on itself.
Definition at line 684 of file cbplugin.h.
cbMimePlugin::cbMimePlugin | ( | ) |
Definition at line 995 of file cbplugin.cpp.
References cbPlugin::m_Type, and ptMime.
|
inlineoverrideprivate |
Definition at line 717 of file cbplugin.h.
|
inlineoverrideprivate |
Definition at line 719 of file cbplugin.h.
|
inlineoverrideprivate |
Definition at line 720 of file cbplugin.h.
|
pure virtual |
Can a file be handled by this plugin?
filename | The file in question. |
Referenced by PluginManager::GetMIMEHandlerForFile(), and ProjectManagerUI::ShowMenu().
|
pure virtual |
Is this a default handler?
This is a flag notifying the main app that this plugin can handle every file passed to it. Usually you 'll want to return false in this function, because you usually create specialized handler plugins (for specific MIME types)...
|
pure virtual |
Open the file.
filename | The file to open. |
Referenced by ProjectManagerUI::DoOpenFile(), ProjectManager::LoadProject(), ProjectManagerUI::OnOpenWith(), MainFrame::OpenGeneric(), and BuildLogger::OpenLink().
|
inlineprivate |
Definition at line 718 of file cbplugin.h.
|
inlineprivate |
Definition at line 721 of file cbplugin.h.