54 template<>
PluginManager* Mgr<PluginManager>::instance =
nullptr;
74 long new_major, new_minor, new_release;
75 long old_major, old_minor, old_release;
80 #define SIGN(a) (a>0?1:(a<0?-1:0)) 82 result +=
SIGN(new_major - old_major) << 2;
83 result +=
SIGN(new_minor - old_minor) << 1;
84 result +=
SIGN(new_release - old_release) << 0;
87 if (result < 0)
return -1;
88 else if (result > 0)
return 1;
100 typedef std::map<wxString, RefCountedLib>
Libs;
105 Libs::iterator it = s_Libs.find(filename);
106 if (it != s_Libs.end())
110 return it->second.lib;
113 it = s_Libs.insert(s_Libs.end(), std::make_pair(filename,
RefCountedLib()));
116 it->second.lib->
Load(filename);
117 return it->second.lib;
123 for (it = s_Libs.begin(); it != s_Libs.end(); ++it)
148 for (it = s_Libs.begin(); it != s_Libs.end(); ++it)
169 : m_pCurrentlyLoadingLib(
nullptr),
170 m_pCurrentlyLoadingManifestDoc(
nullptr)
196 if (!s_SafeMode || ignoreSafeMode)
233 cbPlugin* existingPlugin = FindPluginByName(basename);
236 if (askForConfirmation)
238 wxString msg =
_(
"A plugin with the same name is already installed.\n");
241 const PluginInfo* existingInfo = GetPluginInfo(existingPlugin);
244 msg =
_(
"The plugin you are trying to install, is older " 245 "than the one currently installed.");
250 _(
"If you want to proceed, the installed plugin will be " 251 "uninstalled first.\n" 252 "Do you want to proceed?"),
258 if (!UninstallPlugin(existingPlugin))
275 wxProgressDialog pd(
_(
"Installing: ") + basename,
_T(
"A description wide enough for the dialog ;)"), 5);
278 wxString resourceName = basename +
_T(
".zip");
279 wxString settingsOnName = basename + _T(
".png");
280 wxString settingsOffName = basename + _T(
"-off.png");
281 if (!platform::windows && resourceName.
StartsWith(_T(
"lib")))
282 resourceName.
Remove(0, 3);
283 if (!platform::windows && settingsOnName.
StartsWith(_T(
"lib")))
284 settingsOnName.
Remove(0, 3);
285 if (!platform::windows && settingsOffName.
StartsWith(_T(
"lib")))
286 settingsOffName.
Remove(0, 3);
291 pd.
Update(1,
_(
"Extracting plugin"));
294 if (!ExtractFile(actualName,
300 pd.
Update(2,
_(
"Extracting plugin resources"));
303 if (!ExtractFile(actualName,
305 resourceDir + _T(
'/') + resourceName))
309 pd.
Update(3,
_(
"Extracting plugin icons for \"Settings\" dialog"));
312 ExtractFile(actualName,
314 resourceDir + _T(
"/images/settings/") + settingsOnName,
319 ExtractFile(actualName,
321 resourceDir + _T(
"/images/settings/") + settingsOffName,
327 ReadExtraFilesFromManifestFile(localName, extraFiles);
328 for (
size_t i = 0; i < extraFiles.
GetCount(); ++i)
330 ExtractFile(actualName,
332 resourceDir + _T(
"/") + extraFiles[i],
336 pd.
Update(4,
_(
"Loading plugin"));
340 ScanForPlugins(pluginDir);
342 cbPlugin* plugin = FindPluginByFileName(pluginFilename);
343 const PluginInfo* info = GetPluginInfo(plugin);
344 if (!plugin || !info)
352 pd.
Update(5,
_(
"Updating menus and toolbars"));
374 for (
size_t i = 0; i < m_Plugins.GetCount(); ++i)
377 if (elem && elem->
plugin == plugin)
384 resourceFilename = fname.
GetName() +
_T(
".zip");
385 settingsOnFilename = fname.
GetName() +
_T(
".png");
386 settingsOffFilename = fname.
GetName() +
_T(
"-off.png");
387 if (!platform::windows && resourceFilename.
StartsWith(
_T(
"lib")))
388 resourceFilename.
Remove(0, 3);
389 if (!platform::windows && settingsOnFilename.
StartsWith(
_T(
"lib")))
390 settingsOnFilename.
Remove(0, 3);
391 if (!platform::windows && settingsOffFilename.
StartsWith(
_T(
"lib")))
392 settingsOffFilename.
Remove(0, 3);
397 ReadExtraFilesFromManifestFile(resourceFilename, extrafiles);
398 for (
size_t n = 0; n < extrafiles.
GetCount(); ++n)
409 cbMessageBox(
_(
"You don't have the needed privileges to uninstall this plugin.\n" 410 "Ask your administrator to uninstall this plugin for you..."),
420 _T(
"A description wide enough for the dialog ;)"), 3);
422 pd.
Update(1,
_(
"Detaching plugin"));
423 DetachPlugin(plugin);
426 pd.Update(2,
_(
"Updating menus and toolbars"));
428 event.SetPlugin(plugin);
432 pd.Update(3,
_(
"Unloading plugin"));
433 UnloadPlugin(plugin);
450 if (!resourceFilename.
IsEmpty())
465 for (
size_t i = 0; i < extrafiles.
GetCount(); ++i)
467 if (!extrafiles[i].IsEmpty() &&
wxFileExists(extrafiles[i]))
478 cbMessageBox(
_(
"Plugin could not be completely uninstalled because its files could not be removed.\n\n" 479 "This can happen if the plugin's file is in-use like, for " 480 "example, when the same plugin file provides more than one " 482 "In this case either uninstall all other plugins " 483 "which are provided by the same file, or remove it yourself " 484 "(manually) when you shut down Code::Blocks.\n" 485 "The files that could not be deleted are:\n\n") +
486 pluginFilename +
_T(
'\n') +
487 resourceFilename +
_T(
'\n') +
488 settingsOnFilename +
_T(
'\n') +
509 for (
size_t i = 0; i < m_Plugins.GetCount(); ++i)
512 if (elem && elem->
plugin == plugin)
521 resourceFilename = fname.
GetName() +
_T(
".zip");
522 if (!platform::windows && resourceFilename.
StartsWith(
_T(
"lib")))
523 resourceFilename.
Remove(0, 3);
525 sourcefiles.
Add(resourceFilename);
528 resourceFilename = fname.
GetName() +
_T(
".png");
529 if (!platform::windows && resourceFilename.
StartsWith(
_T(
"lib")))
530 resourceFilename.
Remove(0, 3);
531 resourceFilename.
Prepend(
_T(
"images/settings/"));
533 if (!resourceFilename.
IsEmpty())
534 sourcefiles.
Add(resourceFilename);
537 resourceFilename = fname.
GetName() +
_T(
"-off.png");
538 if (!platform::windows && resourceFilename.
StartsWith(
_T(
"lib")))
539 resourceFilename.
Remove(0, 3);
540 resourceFilename.
Prepend(
_T(
"images/settings/"));
542 if (!resourceFilename.
IsEmpty())
543 sourcefiles.
Add(resourceFilename);
546 resourceFilename = fname.
GetName() +
_T(
".zip");
547 if (!platform::windows && resourceFilename.
StartsWith(
_T(
"lib")))
548 resourceFilename.
Remove(0, 3);
549 ReadExtraFilesFromManifestFile(resourceFilename, extrafilesdest);
550 for (
size_t n = 0; n < extrafilesdest.
GetCount(); ++n)
572 for (
size_t i = 0; i < sourcefiles.
GetCount(); ++i)
574 if (sourcefiles[i].IsEmpty())
581 for (
size_t i = 0; i < extrafiles.
GetCount(); ++i)
583 if (extrafiles[i].IsEmpty() || extrafilesdest[i].
IsEmpty())
591 zip.
SetComment(
_T(
"This is a redistributable plugin for the Code::Blocks IDE.\n" 592 "See http://www.codeblocks.org for details..."));
630 dst_filename.
c_str());
640 while (!is->Eof() && is->CanRead())
642 memset(tmp, 0,
sizeof(tmp));
643 is->Read(tmp,
sizeof(tmp) - 1);
644 output.
Write(tmp, is->LastRead());
671 if (name.
IsEmpty() || !createProc || !freeProc || !versionProc)
675 if (FindPluginByName(name))
680 if (!ReadManifestFile(m_CurrentlyLoadingFilename, name, &info) ||
691 versionProc(&major, &minor, &release);
698 fmt.
Printf(
_(
"SDK version mismatch for %s (%d.%d.%d). Expecting %d.%d.%d"),
719 m_RegisteredPlugins.push_back(pr);
726 if (!m_pCurrentlyLoadingManifestDoc)
753 while (!is->Eof() && is->CanRead())
755 memset(tmp, 0,
sizeof(tmp));
756 is->Read(tmp,
sizeof(tmp) - 1);
757 contents <<
cbC2U((
const char*)tmp);
770 m_pCurrentlyLoadingManifestDoc =
new TiXmlDocument;
771 if (!m_pCurrentlyLoadingManifestDoc->Parse(
cbU2C(contents)))
778 TiXmlElement* root = m_pCurrentlyLoadingManifestDoc->FirstChildElement(
"CodeBlocks_plugin_manifest_file");
785 TiXmlElement*
version = root->FirstChildElement(
"SdkVersion");
822 if (pluginName.
IsEmpty() || !infoOut)
825 TiXmlElement* plugin = root->FirstChildElement(
"Plugin");
828 const char* name = plugin->Attribute(
"name");
829 if (name &&
cbC2U(name) == pluginName)
831 infoOut->
name = pluginName;
832 TiXmlElement* value = plugin->FirstChildElement(
"Value");
835 if (value->Attribute(
"title"))
836 infoOut->
title =
cbC2U(value->Attribute(
"title"));
837 if (value->Attribute(
"version"))
839 if (value->Attribute(
"description"))
841 if (value->Attribute(
"author"))
842 infoOut->
author =
cbC2U(value->Attribute(
"author"));
843 if (value->Attribute(
"authorEmail"))
845 if (value->Attribute(
"authorWebsite"))
847 if (value->Attribute(
"thanksTo"))
849 if (value->Attribute(
"license"))
852 value = value->NextSiblingElement(
"Value");
857 plugin = plugin->NextSiblingElement(
"Plugin");
893 while (!is->Eof() && is->CanRead())
895 memset(tmp, 0,
sizeof(tmp));
896 is->Read(tmp,
sizeof(tmp) - 1);
897 contents <<
cbC2U((
const char*)tmp);
911 if (!doc.Parse(
cbU2C(contents)))
914 TiXmlElement* root = doc.FirstChildElement(
"CodeBlocks_plugin_manifest_file");
918 TiXmlElement* extra = root->FirstChildElement(
"Extra");
921 const char* file = extra->Attribute(
"file");
927 extra = extra->NextSiblingElement(
"Extra");
933 static const wxString PluginsMask = platform::windows ?
_T(
"*.dll")
934 : (platform::darwin || platform::macosx) ? _T(
"*.dylib")
958 bool matched =
false;
959 for (
size_t i = 0; i < bbplugins.
GetCount(); ++i)
961 if (bbplugins[i] == filename)
975 m_pCurrentlyLoadingManifestDoc =
nullptr;
976 if (ReadManifestFile(filename))
978 if (LoadPlugin(path + wxFILE_SEP_PATH + filename))
981 failed << _T(
'\n') << filename;
983 if (m_pCurrentlyLoadingManifestDoc)
985 delete m_pCurrentlyLoadingManifestDoc;
986 m_pCurrentlyLoadingManifestDoc =
nullptr;
994 _(
"One or more plugins were not loaded.\n" 995 "This usually happens when a plugin is built for\n" 996 "a different version of the Code::Blocks SDK.\n" 997 "Check the application log for more info.\n\n" 998 "List of failed plugins:\n") + failed,
1007 m_RegisteredPlugins.clear();
1010 m_CurrentlyLoadingFilename = pluginName;
1012 if (!m_pCurrentlyLoadingLib->IsLoaded())
1016 m_pCurrentlyLoadingLib =
nullptr;
1017 m_CurrentlyLoadingFilename.Clear();
1026 std::vector<PluginRegistration>::iterator it;
1027 for (it = m_RegisteredPlugins.begin(); it != m_RegisteredPlugins.end(); ++it)
1043 plugElem->
fileName = m_CurrentlyLoadingFilename;
1045 plugElem->
library = m_pCurrentlyLoadingLib;
1048 m_Plugins.Add(plugElem);
1050 m_CompilerPlugins.push_back(static_cast<cbCompilerPlugin*>(plug));
1052 SetupLocaleDomain(pr.
name);
1057 if (m_RegisteredPlugins.empty())
1062 m_pCurrentlyLoadingLib =
nullptr;
1063 m_CurrentlyLoadingFilename.Clear();
1074 msg.
Printf(
_(
"Plugin \"%s\" failed to load last time Code::Blocks was executed.\n" 1075 "Do you want to disable this plugin from loading?"), probPlugin.
c_str());
1077 probPlugin =
_T(
"");
1081 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1083 elem = m_Plugins[i];
1094 if (loadIt && !probPlugin.
IsEmpty())
1096 loadIt = elem->
info.
title != probPlugin;
1117 msg.
Printf(
_(
"Plugin \"%s\" failed to load...\n" 1118 "Do you want to disable this plugin from loading next time?"), elem->
info.
title.
c_str());
1131 while (m_Plugins.GetCount())
1133 UnloadPlugin(m_Plugins[0]->plugin);
1135 m_CompilerPlugins.clear();
1146 DetachPlugin(plugin);
1149 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1152 if (plugElem->
plugin == plugin)
1156 auto removeIter = std::remove(m_CompilerPlugins.begin(), m_CompilerPlugins.end(), plugin);
1157 if (removeIter != m_CompilerPlugins.end())
1158 m_CompilerPlugins.erase(removeIter);
1171 m_Plugins.RemoveAt(i);
1180 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1183 if (plugElem->
info.
name == pluginName)
1192 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1195 if (plugElem->
info.
name == pluginName)
1204 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1207 if (plugElem->
fileName == pluginFileName)
1217 if (plugElem && plugElem->
info.
name == pluginName)
1218 return &plugElem->
info;
1225 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1228 if (plugElem->
plugin == plugin)
1229 return &plugElem->
info;
1266 return (*first)->GetConfigurationPriority() - (*second)->GetConfigurationPriority();
1273 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1275 cbPlugin* plug = m_Plugins[i]->plugin;
1285 arrayToFill.Clear();
1286 for (
unsigned int i = 0; i < arr.GetCount(); ++i)
1291 arrayToFill.Add(pnl);
1297 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1299 cbPlugin* plug = m_Plugins[i]->plugin;
1304 arrayToFill.Add(pnl);
1311 if (m_CompilerPlugins.empty())
1313 return m_CompilerPlugins.front();
1318 return GetOffersFor(
ptTool);
1323 return GetOffersFor(
ptMime);
1349 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1351 cbPlugin* plug = m_Plugins[i]->plugin;
1376 std::map<wxString, cbPlugin*> sortedPlugins;
1377 for (
unsigned int i = 0; i < m_Plugins.GetCount(); ++i)
1379 cbPlugin* plug = m_Plugins[i]->plugin;
1381 sortedPlugins[m_Plugins[i]->info.name] = plug;
1385 for (
auto &pair : sortedPlugins)
1399 for (
size_t i = 0; i < ids.GetCount(); ++i)
1401 Connect(ids[i], -1, wxEVT_COMMAND_MENU_SELECTED,
1402 (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
1409 m_FindMenuItemCount = 0;
1410 m_FindMenuItemFirst = 0;
1411 m_LastNonPluginMenuId = 0;
1417 m_FindMenuItemFirst += count;
1419 m_FindMenuItemCount += count;
1424 return m_FindMenuItemCount;
1429 return m_FindMenuItemFirst;
1434 m_LastNonPluginMenuId = id;
1439 wxString labelNoAmpersands = label;
1442 labelNoAmpersands.
erase(std::remove(labelNoAmpersands.
begin(), labelNoAmpersands.
end(),
'&'),
1443 labelNoAmpersands.
end());
1447 const int count = int(items.size());
1448 for (
int ii = 0; ii < count; ++ii)
1450 if (items[ii]->GetId() == m_LastNonPluginMenuId)
1457 if (position == -1 || (position >= count))
1464 for (
int ii = position; ii < count; ++ii)
1466 const wxString &itemLabel = items[ii]->GetItemLabelText();
1467 if (labelNoAmpersands.
CmpNoCase(itemLabel) <= 0)
1485 PluginsArray mimes = GetMimeOffers();
1486 for (
unsigned int i = 0; i < mimes.GetCount(); ++i)
1506 for (; i <= catalogNum; ++i)
1509 if (catalogName.
Cmp(DomainName) == 0)
1539 if (p && p->IsRunning())
1549 if (!compiler || !compiler->IsRunning())
1551 compiler->KillProcess();
1552 while (compiler->IsRunning())
void Attach()
Attach is not a virtual function, so you can't override it.
CreatePluginProc createProc
wxString AfterLast(wxUniChar ch) const
wxString F(const wxChar *msg,...)
sprintf-like function
static void Display(const wxString &title, const wxString &message, unsigned int delay=5000, unsigned int hysteresis=1)
int Execute(const wxString &command)
virtual bool Update(int value, const wxString &newmsg=wxEmptyString, bool *skip=NULL)
void RemoveLibrary(wxDynamicLibrary *lib)
static wxString GetFolder(SearchDirs dir)
Access one of Code::Blocks' folders.
bool wxRemoveFile(const wxString &file)
const_iterator begin() const
Data folder in user's dir.
void RegisterPlugin(const wxString &name, CreatePluginProc createProc, FreePluginProc freeProc, PluginSDKVersionProc versionProc)
PluginsArray GetSmartIndentOffers()
void Assign(const wxFileName &filepath)
ConfigManager * GetConfigManager(const wxString &name_space) const
int ReadInt(const wxString &name, int defaultVal=0)
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
Dialog for Enabling/Disabling/Installing/Uninstalling a plug-in.
int Cmp(const wxString &s) const
int SortByConfigurationPriority(cbPlugin **first, cbPlugin **second)
Information about the plugin.
static bool IsAppShuttingDown()
void cbStopRunningCompilers(PluginManager *manager)
#define PLUGIN_SDK_VERSION_MINOR
bool GetFirst(wxString *filename, const wxString &filespec=wxEmptyString, int flags=wxDIR_DEFAULT) const
void GetConfigurationPanels(int group, wxWindow *parent, ConfigurationPanelsArray &arrayToFill)
~PluginManager() override
bool wxFileExists(const wxString &filename)
void LogWarning(const wxString &msg, int i=app_log)
bool ReadBool(const wxString &name, bool defaultVal=false)
void SetPlugin(cbPlugin *plugin)
virtual bool CanHandleFile(const wxString &filename) const =0
Can a file be handled by this plugin?
std::map< wxString, RefCountedLib > Libs
Event used to request from the main app to add a window to the docking system.
bool wxDirExists(const wxString &dirname)
#define PLUGIN_SDK_VERSION_MAJOR
PluginsArray GetDebuggerOffers()
int ExecutePlugin(const wxString &pluginName)
int ScanForPlugins(const wxString &path)
const DLLIMPORT wxString DYNAMICLIB_DOT_EXT
wxString & Remove(size_t pos)
virtual PluginType GetType() const
The plugin must return its type on request.
bool ExportPlugin(cbPlugin *plugin, const wxString &filename)
wxString AfterFirst(wxUniChar ch) const
Base class for mime plugins.
wxDynamicLibrary * LoadLibrary(const wxString &filename)
A generic Code::Blocks event.
int CmpNoCase(const wxString &s) const
static wxString LocateDataFile(const wxString &filename, int search_dirs=sdAllKnown)
Locate a file in an installation- and platform-independent way.
Base class for compiler plugins.
void Release(bool appShutDown)
Release is not a virtual function, so you can't override it.
wxWindow * GetAppWindow() const
const PluginInfo * GetPluginInfo(const wxString &pluginName)
cbMimePlugin * GetMIMEHandlerForFile(const wxString &filename)
DLLIMPORT const wxWX2MBbuf cbU2C(const wxString &str)
Return multibyte (C string) representation of the string.
wxFSFile * OpenFile(const wxString &location, int flags=wxFS_READ)
void LogError(const wxString &msg, int i=app_log)
PluginSDKVersionProc versionProc
wxString BeforeFirst(wxUniChar ch, wxString *rest=NULL) const
PluginManager manages plugins.
PluginType
Known plugin types.
int CompareVersions(const wxString &new_version, const wxString &old_version)
PluginsArray GetCodeCompletionOffers()
bool Contains(const wxString &str) const
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
bool DetachPlugin(cbPlugin *plugin)
void SetComment(const wxString &comment)
DLLIMPORT wxString UnixFilename(const wxString &filename, wxPathFormat format=wxPATH_NATIVE)
Represents a Code::Blocks project.
const CompilerPlugins & GetCompilerPlugins() const
ModuleType
The type of module offering a context menu.
DLLIMPORT wxString cbC2U(const char *str)
Return str as a proper unicode-compatible string.
void GetProjectConfigurationPanels(wxWindow *parent, cbProject *project, ConfigurationPanelsArray &arrayToFill)
void(* FreePluginProc)(cbPlugin *)
cbPlugin * FindPluginByFileName(const wxString &pluginFileName)
void SetupLocaleDomain(const wxString &DomainName)
void RemoveAllEventSinksFor(void *owner)
static bool IsBatchBuild()
cbPlugin * FindPluginByName(const wxString &pluginName)
LogManager * GetLogManager() const
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
cbPlugin *(* CreatePluginProc)()
const wxStringCharType * wx_str() const
wxDynamicLibrary * library
void NotifyPlugins(CodeBlocksEvent &event)
MacrosManager * GetMacrosManager() const
static bool Access(const wxString &name, wxFile::OpenMode mode)
const wxString & _(const wxString &string)
bool cbHasRunningCompilers(const PluginManager *manager)
void ReplaceMacros(wxString &buffer, ProjectBuildTarget *target=nullptr, bool subrequest=false)
Base class for plugin configuration panels.
void ShowErrorMessage(bool safe=true)
Display exception error message.
static void Yield()
Whenever you need to call wxYield(), call Manager::Yield(). It's safer.
bool PutNextEntry(wxZipEntry *entry)
wxArray< int > wxArrayInt
Plugins folder in user's dir.
Plugins folder in base dir.
PluginsArray GetMimeOffers()
bool ToLong(long *val, int base=10) const
bool AttachPlugin(cbPlugin *plugin, bool ignoreSafeMode=false)
wxString & erase(size_type pos=0, size_type n=npos)
EVTIMPORT const wxEventType cbEVT_PLUGIN_UNINSTALLED
#define PLUGIN_SDK_VERSION_RELEASE
bool GetNext(wxString *filename) const
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
DLLIMPORT wxArrayString cbReadBatchBuildPlugins()
Read the list of batch build plugins and return them.
void Log(const wxString &msg, int i=app_log, Logger::level lv=Logger::info)
wxString GetFullName() const
bool UninstallPlugin(cbPlugin *plugin, bool removeFiles=true)
void DebugLog(const wxString &msg, Logger::level lv=Logger::info)
const_iterator end() const
bool ProcessEvent(CodeBlocksEvent &event)
void wxMilliSleep(unsigned long milliseconds)
void SetExt(const wxString &ext)
wxString & Prepend(const wxString &str)
cbCompilerPlugin * GetFirstCompiler() const
size_t Add(const wxString &str, size_t copies=1)
bool ReadManifestFile(const wxString &pluginFilename, const wxString &pluginName=wxEmptyString, PluginInfo *infoOut=nullptr)
virtual cbConfigurationPanel * GetProjectConfigurationPanel(cb_optional wxWindow *parent, cb_optional cbProject *project)
Return plugin's configuration panel for projects.
bool LoadPlugin(const wxString &pluginName)
bool InstallPlugin(const wxString &pluginName, bool forAllUsers=true, bool askForConfirmation=true)
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
wxInputStream * GetStream() const
virtual int GetConfigurationGroup() const
Return the configuration group for this plugin.
PluginsArray GetOffersFor(PluginType type)
bool Load(const wxString &name, int flags=wxDL_DEFAULT)
bool IsAttached() const
See whether this plugin is attached or not.
DLLIMPORT bool CreateDirRecursively(const wxString &full_path, int perms=0755)
PluginElement * FindElementByName(const wxString &pluginName)
int Printf(const wxString &pszFormat,...)
void VersionStringToNumbers(const wxString &version, long *major, long *minor, long *release)
void(* PluginSDKVersionProc)(int *, int *, int *)
EVTIMPORT const wxEventType cbEVT_PLUGIN_INSTALLED
Code::Blocks error handling unit.
static wxString Format(const wxString &format,...)
size_t Write(const void *buffer, size_t count)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
Event used to request from the main app to manage the view layouts.
void UnloadPlugin(cbPlugin *plugin)
virtual cbConfigurationPanel * GetConfigurationPanel(cb_optional wxWindow *parent)
Return plugin's configuration panel.