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 cbToolPlugin"
22
class [PLUGIN_NAME] : public cbToolPlugin
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; }
61
/** @brief Execute the plugin.
63
* This is the only function needed by a cbToolPlugin.
64
* This will be called when the user selects the plugin from the "Plugins"
67
virtual int Execute();
69
/** Any descendent plugin should override this virtual method and
70
* perform any necessary initialization. This method is called by
71
* Code::Blocks (PluginManager actually) when the plugin has been
72
* loaded and should attach in Code::Blocks. When Code::Blocks
73
* starts up, it finds and <em>loads</em> all plugins but <em>does
74
* not</em> activate (attaches) them. It then activates all plugins
75
* that the user has selected to be activated on start-up.\n
76
* This means that a plugin might be loaded but <b>not</b> activated...\n
77
* Think of this method as the actual constructor...
79
virtual void OnAttach();
81
/** Any descendent plugin should override this virtual method and
82
* perform any necessary de-initialization. This method is called by
83
* Code::Blocks (PluginManager actually) when the plugin has been
84
* loaded, attached and should de-attach from Code::Blocks.\n
85
* Think of this method as the actual destructor...
86
* @param appShutDown If true, the application is shutting down. In this
87
* case *don't* use Manager::Get()->Get...() functions or the
88
* behaviour is undefined...
90
virtual void OnRelease(bool appShutDown);
93
#endif // [GUARD_WORD]