1
/***************************************************************
3
* Purpose: Code::Blocks plugin
4
* Author: [AUTHOR_NAME] ([AUTHOR_EMAIL])
6
* Copyright: [AUTHOR_NAME]
8
**************************************************************/
13
// For compilers that support precompilation, includes <wx/wx.h>
14
#include <wx/wxprec.h>
20
#include <cbplugin.h> // for "class cbMimePlugin"
22
class [PLUGIN_NAME] : public cbMimePlugin
28
virtual ~[PLUGIN_NAME]();
30
/** Invoke configuration dialog. */
31
virtual int Configure();
33
/** Return the plugin's configuration priority.
34
* This is a number (default is 50) that is used to sort plugins
35
* in configuration dialogs. Lower numbers mean the plugin's
36
* configuration is put higher in the list.
38
virtual int GetConfigurationPriority() const { return 50; }
40
/** Return the configuration group for this plugin. Default is cgUnknown.
41
* Notice that you can logically OR more than one configuration groups,
42
* so you could set it, for example, as "cgCompiler | cgContribPlugin".
44
virtual int GetConfigurationGroup() const { return cgUnknown; }
46
/** Return plugin's configuration panel.
47
* @param parent The parent window.
48
* @return A pointer to the plugin's cbConfigurationPanel. It is deleted by the caller.
50
virtual cbConfigurationPanel* GetConfigurationPanel(wxWindow* parent){ return 0; }
52
/** Return plugin's configuration panel for projects.
53
* The panel returned from this function will be added in the project's
54
* configuration dialog.
55
* @param parent The parent window.
56
* @param project The project that is being edited.
57
* @return A pointer to the plugin's cbConfigurationPanel. It is deleted by the caller.
59
virtual cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, cbProject* project){ return 0; }[ENDIF HAS_CONFIGURE]
60
/** @brief Can a file be handled by this plugin?
62
* @param filename The file in question.
63
* @return The plugin should return true if it can handle this file,
66
virtual bool CanHandleFile(const wxString& filename) const;
68
/** @brief Open the file.
70
* @param filename The file to open.
71
* @return The plugin should return zero on success, other value on error.
73
virtual int OpenFile(const wxString& filename);
75
/** @brief Is this a default handler?
77
* This is a flag notifying the main app that this plugin can handle
78
* every file passed to it. Usually you 'll want to return false in
79
* this function, because you usually create specialized handler
80
* plugins (for specific MIME types)...
82
* @return True if this plugin can handle every possible MIME type,
85
virtual bool HandlesEverything() const;
87
/** Any descendent plugin should override this virtual method and
88
* perform any necessary initialization. This method is called by
89
* Code::Blocks (PluginManager actually) when the plugin has been
90
* loaded and should attach in Code::Blocks. When Code::Blocks
91
* starts up, it finds and <em>loads</em> all plugins but <em>does
92
* not</em> activate (attaches) them. It then activates all plugins
93
* that the user has selected to be activated on start-up.\n
94
* This means that a plugin might be loaded but <b>not</b> activated...\n
95
* Think of this method as the actual constructor...
97
virtual void OnAttach();
99
/** Any descendent plugin should override this virtual method and
100
* perform any necessary de-initialization. This method is called by
101
* Code::Blocks (PluginManager actually) when the plugin has been
102
* loaded, attached and should de-attach from Code::Blocks.\n
103
* Think of this method as the actual destructor...
104
* @param appShutDown If true, the application is shutting down. In this
105
* case *don't* use Manager::Get()->Get...() functions or the
106
* behaviour is undefined...
108
virtual void OnRelease(bool appShutDown);
112
#endif // [GUARD_WORD]