1
/***************************************************************
3
* Purpose: Code::Blocks plugin
8
**************************************************************/
10
#ifndef WXSMITHAUI_H_INCLUDED
11
#define WXSMITHAUI_H_INCLUDED
13
// For compilers that support precompilation, includes <wx/wx.h>
14
#include <wx/wxprec.h>
20
#include <cbplugin.h> // for "class cbPlugin"
22
class wxSmithAui : public cbPlugin
28
virtual ~wxSmithAui();
31
/** This method is called by Code::Blocks and is used by the plugin
32
* to add any menu items it needs on Code::Blocks's menu bar.\n
33
* It is a pure virtual method that needs to be implemented by all
34
* plugins. If the plugin does not need to add items on the menu,
36
* @param menuBar the wxMenuBar to create items in
38
virtual void BuildMenu(wxMenuBar* menuBar){}
40
/** This method is called by Code::Blocks core modules (EditorManager,
41
* ProjectManager etc) and is used by the plugin to add any menu
42
* items it needs in the module's popup menu. For example, when
43
* the user right-clicks on a project file in the project tree,
44
* ProjectManager prepares a popup menu to display with context
45
* sensitive options for that file. Before it displays this popup
46
* menu, it asks all attached plugins (by asking PluginManager to call
47
* this method), if they need to add any entries
48
* in that menu. This method is called.\n
49
* If the plugin does not need to add items in the menu,
51
* @param type the module that's preparing a popup menu
52
* @param menu pointer to the popup menu
53
* @param data pointer to FileTreeData object (to access/modify the file tree)
55
virtual void BuildModuleMenu(const ModuleType type, wxMenu* menu, const FileTreeData* data = 0){}
57
/** This method is called by Code::Blocks and is used by the plugin
58
* to add any toolbar items it needs on Code::Blocks's toolbar.\n
59
* It is a pure virtual method that needs to be implemented by all
60
* plugins. If the plugin does not need to add items on the toolbar,
62
* @param toolBar the wxToolBar to create items on
63
* @return The plugin should return true if it needed the toolbar, false if not
65
virtual bool BuildToolBar(wxToolBar* toolBar){ return false; }
67
/** Any descendent plugin should override this virtual method and
68
* perform any necessary initialization. This method is called by
69
* Code::Blocks (PluginManager actually) when the plugin has been
70
* loaded and should attach in Code::Blocks. When Code::Blocks
71
* starts up, it finds and <em>loads</em> all plugins but <em>does
72
* not</em> activate (attaches) them. It then activates all plugins
73
* that the user has selected to be activated on start-up.\n
74
* This means that a plugin might be loaded but <b>not</b> activated...\n
75
* Think of this method as the actual constructor...
77
virtual void OnAttach();
79
/** Any descendent plugin should override this virtual method and
80
* perform any necessary de-initialization. This method is called by
81
* Code::Blocks (PluginManager actually) when the plugin has been
82
* loaded, attached and should de-attach from Code::Blocks.\n
83
* Think of this method as the actual destructor...
84
* @param appShutDown If true, the application is shutting down. In this
85
* case *don't* use Manager::Get()->Get...() functions or the
86
* behaviour is undefined...
88
virtual void OnRelease(bool appShutDown);
92
#endif // WXSMITHAUI_H_INCLUDED