Code::Blocks  SVN r11506
pluginsconfigurationdlg.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  *
5  * $Revision: 11437 $
6  * $Id: pluginsconfigurationdlg.cpp 11437 2018-08-07 07:13:40Z fuscated $
7  * $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/sdk/pluginsconfigurationdlg.cpp $
8  */
9 
10 #include "sdk_precomp.h"
11 
12 #ifndef CB_PRECOMP
13  #include <wx/button.h>
14  #include <wx/checkbox.h>
15  #include <wx/filename.h>
16  #include <wx/intl.h>
17  #include <wx/listctrl.h>
18  #include <wx/string.h>
19  #include <wx/utils.h>
20  #include <wx/xrc/xmlres.h>
21 
22  #include "manager.h"
23  #include "configmanager.h"
24  #include "pluginmanager.h"
25  #include "cbplugin.h" // IsAttached
26 #endif
27 
28 #include "annoyingdialog.h"
29 #include "ccmanager.h"
30 #include <wx/dirdlg.h>
31 #include <wx/filedlg.h>
32 #include <wx/html/htmlwin.h>
33 #include <wx/progdlg.h>
34 #include <wx/settings.h>
35 #include <wx/tooltip.h>
36 
37 #include "pluginsconfigurationdlg.h" // class's header file
38 
40 {
41  wxString initialInfo;
42  initialInfo << _T("<html><body><font color=\"#0000AA\">");
43  initialInfo << _("Tip: The above list allows for multiple selections.");
44  initialInfo << _T("</font><br /><br /><b><font color=\"red\">");
45  initialInfo << _("Have you saved your work first?");
46  initialInfo << _T("</font></b><br /><i><font color=\"black\">\n");
47  initialInfo << _("If a plugin is not well-written, it could cause Code::Blocks to crash ");
48  initialInfo << _("when performing any operation on it...");
49  initialInfo << _T("<br></font></b><br /><i><font color=\"green\">\n");
50  initialInfo << _("Some additional plugins can be found here:");
51  initialInfo << _T("</font></b><br /><i><font color=\"black\">\n");
52  initialInfo << _T("<A href=\"http://wiki.codeblocks.org/index.php?title=Announcement_for_plugins/patches\">");
53  initialInfo << _T("http://wiki.codeblocks.org/index.php?title=Announcement_for_plugins/patches\n </A>");
54 
56  {
57  initialInfo << _T("</font></i><br /><br /><b><font color=\"red\">");
58  initialInfo << _("Code::Blocks started up in \"safe-mode\"");
59  initialInfo << _T("</font></b><br /><i><font color=\"black\">\n");
60  initialInfo << _("All plugins were disabled on startup so that you can troubleshoot ");
61  initialInfo << _("problematic plugins. Enable plugins at will now...");
62  }
63 
64  initialInfo << _T("</font></i><br /></body></html>\n");
65  return initialInfo;
66 }
67 
68 #if wxCHECK_VERSION(3, 0, 0)
69 inline int wxCALLBACK sortByTitle(wxIntPtr item1, wxIntPtr item2, cb_unused wxIntPtr sortData)
70 #else
71 inline int wxCALLBACK sortByTitle(long item1, long item2, cb_unused long sortData)
72 #endif
73 {
74  const PluginElement* elem1 = (const PluginElement*)item1;
75  const PluginElement* elem2 = (const PluginElement*)item2;
76 
77  return elem1->info.title.CompareTo(elem2->info.title.wx_str());
78 }
79 
81  EVT_BUTTON(XRCID("btnEnable"), PluginsConfigurationDlg::OnToggle)
82  EVT_BUTTON(XRCID("btnDisable"), PluginsConfigurationDlg::OnToggle)
83  EVT_BUTTON(XRCID("btnInstall"), PluginsConfigurationDlg::OnInstall)
84  EVT_BUTTON(XRCID("btnUninstall"), PluginsConfigurationDlg::OnUninstall)
85  EVT_BUTTON(XRCID("btnExport"), PluginsConfigurationDlg::OnExport)
86  EVT_LIST_ITEM_SELECTED(XRCID("lstPlugins"), PluginsConfigurationDlg::OnSelect)
87 
88  EVT_UPDATE_UI(-1, PluginsConfigurationDlg::OnUpdateUI)
89  EVT_HTML_LINK_CLICKED(XRCID("htmlInfo"), PluginsConfigurationDlg::OnLinkClicked)
90 END_EVENT_TABLE()
91 
92 // class constructor
94 {
95  wxXmlResource::Get()->LoadObject(this, parent, _T("dlgConfigurePlugins"),_T("wxScrollingDialog"));
96  XRCCTRL(*this, "wxID_CANCEL", wxButton)->SetDefault();
97  FillList();
98 
99  // install options
100  ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("plugins"));
101  bool globalInstall = cfg->ReadBool(_T("/install_globally"), true);
102  bool confirmation = cfg->ReadBool(_T("/install_confirmation"), true);
103 
104  // verify user can install globally
106  if (access != dacReadWrite)
107  {
108  globalInstall = false;
109  // disable checkbox
110  XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->Enable(false);
111  }
112  XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->SetValue(globalInstall);
113  XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->SetValue(confirmation);
114 
115  // Set default font size based on system default font size
116 #ifdef __linux__
117  /* NOTE (mandrav#1#): wxWidgets documentation on wxHtmlWindow::SetFonts(),
118  states that the sizes array accepts values from -2 to +4.
119  My tests (under linux at least) have showed that it actually
120  expects real point sizes. */
121 
123  int sizes[7] = {};
124  for (int i = 0; i < 7; ++i)
125  sizes[i] = systemFont.GetPointSize();
126  XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetFonts(wxEmptyString, wxEmptyString, &sizes[0]);
127 #endif
128 
129  XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetPage(GetInitialInfo());
130 
131  XRCCTRL(*this, "lstPlugins", wxListCtrl)->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(PluginsConfigurationDlg::OnMouseMotion));
132  XRCCTRL(*this, "lstPlugins", wxListCtrl)->Connect(wxEVT_MOTION, wxMouseEventHandler(PluginsConfigurationDlg::OnMouseMotion));
133 }
134 
136 {
137  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
138  if (list->GetColumnCount() == 0)
139  {
140  list->InsertColumn(0, _T("Title"));
141  list->InsertColumn(1, _T("Version"));
142  list->InsertColumn(2, _T("Enabled"), wxLIST_FORMAT_CENTER);
143  list->InsertColumn(3, _T("Filename"));
144  }
145 
147  const PluginElementsArray& plugins = man->GetPlugins();
148 
149  // populate Plugins checklist
150  list->DeleteAllItems();
151  for (unsigned int i = 0; i < plugins.GetCount(); ++i)
152  {
153  const PluginElement* elem = plugins[i];
154 
155  long idx = list->InsertItem(i, elem->info.title);
156  list->SetItem(idx, 1, elem->info.version);
157  list->SetItem(idx, 2, elem->plugin->IsAttached() ? _("Yes") : _("No"));
158  list->SetItem(idx, 3, UnixFilename(elem->fileName).AfterLast(wxFILE_SEP_PATH));
159  list->SetItemData(idx, (wxIntPtr)elem);
160 
161  if (!elem->plugin->IsAttached())
163  else
165  }
166 
171 
172  list->SortItems(sortByTitle, 0);
173 }
174 
175 // class destructor
177 {
178  XRCCTRL(*this, "lstPlugins", wxListCtrl)->Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(PluginsConfigurationDlg::OnMouseMotion));
179  XRCCTRL(*this, "lstPlugins", wxListCtrl)->Disconnect(wxEVT_MOTION, wxMouseEventHandler(PluginsConfigurationDlg::OnMouseMotion));
180 }
181 
183 {
184  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
185  if (list->GetSelectedItemCount() == 0)
186  return;
187  bool isEnable = event.GetId() == XRCID("btnEnable");
188 
189  wxBusyCursor busy;
190 
191  wxProgressDialog pd(wxString::Format(_("%s plugin(s)"), isEnable ? _("Enabling") : _("Disabling")),
192  _T("A description wide enough for the dialog ;)"),
193  list->GetSelectedItemCount(),
194  this,
196 
197  int count = 0;
198  long sel = -1;
199  bool skip = false;
200  while (true)
201  {
203  if (sel == -1)
204  break;
205 
206  const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
207  if (elem && elem->plugin)
208  {
209  pd.Update(++count,
210  wxString::Format(_("%s \"%s\"..."), isEnable ? _("Enabling") : _("Disabling"), elem->info.title.c_str()),
211  &skip);
212  if (skip)
213  break;
214 
215  if (!isEnable && elem->plugin->IsAttached())
217  else if (isEnable && !elem->plugin->IsAttached())
218  Manager::Get()->GetPluginManager()->AttachPlugin(elem->plugin, true); // ignore safe-mode here
219  else
220  continue;
221 
222  wxListItem item;
223  item.SetId(sel);
224  item.SetColumn(2);
226  list->GetItem(item);
227 
228  list->SetItem(sel, 2, elem->plugin->IsAttached() ? _("Yes") : _("No"));
229  if (!elem->plugin->IsAttached())
231  else
233 
234  // update configuration
235  wxString baseKey;
236  baseKey << _T("/") << elem->info.name;
237  Manager::Get()->GetConfigManager(_T("plugins"))->Write(baseKey, elem->plugin->IsAttached());
238  }
239  }
240 }
241 
243 {
244  wxFileDialog fd(this,
245  _("Select plugin to install"),
247  _T("Code::Blocks Plugins (*.cbplugin)|*.cbplugin"),
248  wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | compatibility::wxHideReadonly);
249  if (fd.ShowModal() != wxID_OK)
250  return;
251 
252  wxBusyCursor busy;
253 
254  wxArrayString paths;
255  fd.GetPaths(paths);
256 
257  // install in global or user dirs?
258  bool globalInstall = XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->GetValue();
259  bool confirm = XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->GetValue();
260 
261  wxString failure;
262  for (size_t i = 0; i < paths.GetCount(); ++i)
263  {
264  if (!Manager::Get()->GetPluginManager()->InstallPlugin(paths[i], globalInstall, confirm))
265  failure << paths[i] << _T('\n');
266  }
267 
268  FillList();
269  if (!failure.IsEmpty())
270  cbMessageBox(_("One or more plugins were not installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
271 }
272 
274 {
275  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
276  if (list->GetSelectedItemCount() == 0)
277  return;
278 
279  wxBusyCursor busy;
280 
281  long sel = -1;
282  wxString failure;
283  while (true)
284  {
286  if (sel == -1)
287  break;
288 
289  const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
290  if (elem && elem->plugin)
291  {
292  if (!Manager::Get()->GetPluginManager()->UninstallPlugin(elem->plugin))
293  failure << elem->info.title << _T('\n');
294  }
295  }
296 
297  FillList();
298  if (!failure.IsEmpty())
299  cbMessageBox(_("One or more plugins were not un-installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
300 
301  XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetPage(GetInitialInfo());
302 }
303 
305 {
306  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
307  if (list->GetSelectedItemCount() == 0)
308  return;
309 
310  ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("plugins_configuration"));
311  wxDirDialog dd(this, _("Select directory to export plugin"), cfg->Read(_T("/last_export_path")), wxDD_NEW_DIR_BUTTON);
312  if (dd.ShowModal() != wxID_OK)
313  return;
314  cfg->Write(_T("/last_export_path"), dd.GetPath());
315 
316  wxBusyCursor busy;
317  wxProgressDialog pd(_("Exporting plugin(s)"),
318  _T("A description wide enough for the dialog ;)"),
319  list->GetSelectedItemCount(),
320  this,
323 
324  int count = 0;
325  long sel = -1;
326  bool skip = false;
327  bool confirmed = false;
328  wxString failure;
329  wxArrayString files; // avoid exporting different plugins from the same file twice
330  while (true)
331  {
333  if (sel == -1)
334  break;
335 
336  const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
337  if (!elem || !elem->plugin)
338  {
339  failure << list->GetItemText(sel) << _T('\n');
340  continue;
341  }
342 
343  // avoid duplicates
344  if (files.Index(elem->fileName) != wxNOT_FOUND)
345  continue;
346  files.Add(elem->fileName);
347 
348  // normalize version
349  wxString version = elem->info.version;
350  version.Replace(_T("/"), _T("_"), true);
351  version.Replace(_T("\\"), _T("_"), true);
352  version.Replace(_T("?"), _T("_"), true);
353  version.Replace(_T("*"), _T("_"), true);
354  version.Replace(_T(">"), _T("_"), true);
355  version.Replace(_T("<"), _T("_"), true);
356  version.Replace(_T(" "), _T("_"), true);
357  version.Replace(_T("\t"), _T("_"), true);
358  version.Replace(_T("|"), _T("_"), true);
359 
360  wxFileName fname;
361  fname.SetPath(dd.GetPath());
362  fname.SetName(wxFileName(elem->fileName).GetName() + _T('-') + version);
363  fname.SetExt(_T("cbplugin"));
364 
365  pd.Update(++count,
366  wxString::Format(_("Exporting \"%s\"..."), elem->info.title.c_str()),
367  &skip);
368  if (skip)
369  break;
370 
371  wxString filename = fname.GetFullPath();
372 
373  if (!confirmed && wxFileExists(filename))
374  {
375  AnnoyingDialog dlg(_("Overwrite confirmation"),
376  wxString::Format(_("%s already exists.\n"
377  "Are you sure you want to overwrite it?"), filename.c_str()),
381  _("&Yes"), _("Yes to &all"), _("&No"));
382  switch (dlg.ShowModal())
383  {
385  continue;
386  break;
387 
389  confirmed = true;
390  break;
391 
392  default:
393  break;
394  }
395  }
396 
397  if (!Manager::Get()->GetPluginManager()->ExportPlugin(elem->plugin, filename))
398  failure << list->GetItemText(sel) << _T('\n');
399  }
400 
401  if (!failure.IsEmpty())
402  cbMessageBox(_("Failed exporting one or more plugins:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
403 }
404 
406 {
407  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
408  if (list->GetSelectedItemCount() != 1)
409  return;
410 
411  long sel = list->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
412  const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
413  if (!elem)
414  return;
415 
416  wxString description(elem->info.description);
417  description.Replace(_T("\n"), _T("<br />\n"));
418 
419  wxString info;
420  info << _T("<html><body>\n");
421  info << _T("<h3>") << elem->info.title << _T(" ");
422  info << _T("<font color=\"#0000AA\">") << elem->info.version << _T("</font></h3>");
423  info << _T("<i><font color=\"#808080\" size=\"-1\">") << UnixFilename(elem->fileName) << _T("</font></i><br />\n");
424  info << _T("<br />\n");
425  info << description << _T("<br />\n");
426  info << _T("</body></html>\n");
427 
428  XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetPage(info);
429 }
430 
432 {
433  event.Skip();
434  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
435  if (event.Leaving())
436  {
437  if (list->GetToolTip())
438  list->UnsetToolTip();
439  return;
440  }
441  int flags = 0;
442  long idx = list->HitTest(event.GetPosition(), flags);
443  wxString path;
444  if (flags & wxLIST_HITTEST_ONITEM)
445  {
446  const PluginElement* elem = (const PluginElement*)list->GetItemData(idx);
447  if (elem)
448  path = elem->fileName;
449  }
450  if (list->GetToolTip())
451  {
452  if (path.IsEmpty())
453  list->UnsetToolTip();
454  else if (path != list->GetToolTip()->GetTip())
455  list->SetToolTip(path);
456  }
457  else if (!path.IsEmpty())
458  list->SetToolTip(path);
459 }
460 
462 {
463  static long lastSelection = -2;
464  static bool lastSelectionMultiple = false;
465  event.Skip();
466 
467  wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
468  long sel = list->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
469 
470  // no need to overdraw all the time
471  if (sel == lastSelection && (lastSelectionMultiple && list->GetSelectedItemCount() > 1))
472  return;
473  lastSelection = sel;
474  lastSelectionMultiple = list->GetSelectedItemCount() > 1;
475 
476  bool en = sel != -1;
477  const PluginElement* elem = en ? (const PluginElement*)list->GetItemData(sel) : nullptr;
478  bool hasPlugin = elem && elem->plugin;
479  bool isAttached = hasPlugin && elem->plugin->IsAttached();
480 
481  XRCCTRL(*this, "btnEnable", wxButton)->Enable(en && (lastSelectionMultiple || (hasPlugin && !isAttached)));
482  XRCCTRL(*this, "btnDisable", wxButton)->Enable(en && (lastSelectionMultiple || (hasPlugin && isAttached)));
483  XRCCTRL(*this, "btnUninstall", wxButton)->Enable(en);
484  XRCCTRL(*this, "btnExport", wxButton)->Enable(en);
485 }
486 
488 {
489  ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("plugins"));
490 
491  cfg->Write(_T("/install_globally"), XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->GetValue());
492  cfg->Write(_T("/install_confirmation"), XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->GetValue());
493 
495 
497 }
498 
499 void PluginsConfigurationDlg::OnLinkClicked(wxHtmlLinkEvent& event)
500 {
501  wxLaunchDefaultBrowser(event.GetLinkInfo().GetHref());
502 }
static bool GetSafeMode()
wxString AfterLast(wxUniChar ch) const
void EndModal(int retCode)
Definition: sc_dialog.cpp:112
wxString name
Definition: pluginmanager.h:40
#define wxLIST_HITTEST_ONITEM
static wxString GetFolder(SearchDirs dir)
Access one of Code::Blocks&#39; folders.
virtual int ShowModal()
PluginManager * GetPluginManager() const
Definition: manager.cpp:444
wxString fileName
Definition: pluginmanager.h:55
int GetSelectedItemCount() const
#define wxICON_WARNING
const int version
ConfigManager * GetConfigManager(const wxString &name_space) const
Definition: manager.cpp:474
Current user has read-write access to the directory.
Definition: globals.h:381
static wxFont GetFont(wxSystemFont index)
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
Definition: manager.cpp:182
long GetNextItem(long item, int geometry=wxLIST_NEXT_ALL, int state=wxLIST_STATE_DONTCARE) const
Dialog for Enabling/Disabling/Installing/Uninstalling a plug-in.
void OnMouseMotion(wxMouseEvent &event)
bool wxFileExists(const wxString &filename)
void NotifyPluginStatus()
Let CCManager know that a change (e.g.
Definition: ccmanager.cpp:411
bool ReadBool(const wxString &name, bool defaultVal=false)
int Index(const wxString &sz, bool bCase=true, bool bFromEnd=false) const
const PluginElementsArray & GetPlugins() const
wxCStrData c_str() const
#define wxLIST_STATE_SELECTED
#define _T(string)
wxString title
Definition: pluginmanager.h:41
#define wxPD_ESTIMATED_TIME
PluginInfo info
Definition: pluginmanager.h:54
wxString GetName() const
bool ExportPlugin(cbPlugin *plugin, const wxString &filename)
void OnUninstall(wxCommandEvent &event)
#define wxPD_CAN_ABORT
#define wxNOT_FOUND
void SetPath(const wxString &path, wxPathFormat format=wxPATH_NATIVE)
void SetId(long id)
DLLIMPORT DirAccessCheck cbDirAccessCheck(const wxString &dir)
Check what access the current user has in a directory.
Definition: globals.cpp:1271
wxPoint GetPosition() const
wxEventType wxEVT_LEAVE_WINDOW
int wxCALLBACK sortByTitle(wxIntPtr item1, wxIntPtr item2, cb_unused wxIntPtr sortData)
#define wxLIST_MASK_TEXT
PluginManager manages plugins.
Definition: pluginmanager.h:76
long InsertItem(wxListItem &info)
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
bool DetachPlugin(cbPlugin *plugin)
DLLIMPORT wxString UnixFilename(const wxString &filename, wxPathFormat format=wxPATH_NATIVE)
Definition: globals.cpp:228
bool SetItemData(long item, long data)
wxArtID wxART_QUESTION
#define wxDD_NEW_DIR_BUTTON
#define wxPD_AUTO_HIDE
size_t Replace(const wxString &strOld, const wxString &strNew, bool replaceAll=true)
CCManager * GetCCManager() const
Definition: manager.cpp:494
void SetItemTextColour(long item, const wxColour &col)
DirAccessCheck
Result values of cbDirAccessCheck()
Definition: globals.h:378
#define wxPD_APP_MODAL
static wxColour GetColour(wxSystemColour index)
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
bool DeleteAllItems()
void OnSelect(wxListEvent &event)
void EndModal(int retCode) override
const wxStringCharType * wx_str() const
void OnToggle(wxCommandEvent &event)
wxString GetItemText(long item, int col=0) const
wxString wxEmptyString
void SetColumn(int col)
wxString version
Definition: pluginmanager.h:42
const wxString & _(const wxString &string)
void OnLinkClicked(wxHtmlLinkEvent &event)
bool SortItems(wxListCtrlCompare fnSortCallBack, wxIntPtr data)
Plugins folder in base dir.
Definition: configmanager.h:79
#define wxPD_ELAPSED_TIME
bool AttachPlugin(cbPlugin *plugin, bool ignoreSafeMode=false)
bool IsEmpty() const
wxEventType wxEVT_MOTION
void OnInstall(wxCommandEvent &event)
int GetColumnCount() const
virtual void GetPaths(wxArrayString &paths) const
void OnExport(wxCommandEvent &event)
wxUIntPtr GetItemData(long item) const
long InsertColumn(long col, const wxListItem &info)
void SetExt(const wxString &ext)
virtual int GetPointSize() const
bool Leaving() const
size_t Add(const wxString &str, size_t copies=1)
bool InstallPlugin(const wxString &pluginName, bool forAllUsers=true, bool askForConfirmation=true)
static wxString GetInitialInfo()
bool SetItem(wxListItem &info)
bool SetColumnWidth(int col, int width)
size_t GetCount() const
long HitTest(const wxPoint &point, int &flags, long *ptrSubItem=NULL) const
static wxXmlResource * Get()
bool IsAttached() const
See whether this plugin is attached or not.
Definition: cbplugin.h:187
bool wxLaunchDefaultBrowser(const wxString &url, int flags=0)
cbPlugin * plugin
Definition: pluginmanager.h:58
ssize_t wxIntPtr
#define wxPD_REMAINING_TIME
void SetName(const wxString &name)
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
void OnUpdateUI(wxUpdateUIEvent &event)
static wxString Format(const wxString &format,...)
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
Dialog that contains a "Don&#39;t annoy me" checkbox.
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
Definition: globals.cpp:1395
bool GetItem(wxListItem &info) const
void SetMask(long mask)
wxString description
Definition: pluginmanager.h:43