Code::Blocks  SVN r11506
configurationpanel.h
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 
6 #ifndef CONFIGURATIONPANEL_H
7 #define CONFIGURATIONPANEL_H
8 
9 #include "globals.h"
10 #include "settings.h"
11 #include "scrollingdialog.h"
12 #include <wx/panel.h>
13 #include <wx/string.h>
14 
15 class wxButton;
16 class wxWindow;
17 
20 {
21  public:
22  cbConfigurationPanel() : m_parentDialog(0) { ; }
23  ~cbConfigurationPanel() override{}
24 
26  virtual wxString GetTitle() const = 0;
28  virtual wxString GetBitmapBaseName() const = 0;
30  virtual void OnApply() = 0;
32  virtual void OnCancel() = 0;
33 
35  void SetParentDialog(wxWindow* dialog)
36  {
37  m_parentDialog = dialog;
38  }
41  {
42  return m_parentDialog;
43  }
46  int cbMessageBox(const wxString& message, const wxString& caption = wxEmptyString, int style = wxOK, wxWindow *parent = NULL, int x = -1, int y = -1)
47  {
48  if (parent)
49  return ::cbMessageBox(message, caption, style, parent, x, y);
50  else
51  return ::cbMessageBox(message, caption, style, m_parentDialog, x, y);
52  }
53  private:
55 };
56 
59 {
60  public:
61  cbConfigurationDialog(wxWindow* parent, int id, const wxString& title);
62  void AttachConfigurationPanel(cbConfigurationPanel* panel);
63  ~cbConfigurationDialog() override;
64 
65  void EndModal(int retCode) override;
66  protected:
70  private:
71 
72 };
73 
74 #endif // CONFIGURATIONPANEL_H
A simple dialog that wraps a cbConfigurationPanel.
wxWindow * SetParentDialog()
Gets the panel&#39;s parent dialog.
void EndModal(int retCode)
Definition: sc_dialog.cpp:112
cbConfigurationPanel * m_pPanel
~cbConfigurationPanel() override
#define DLLIMPORT
Definition: settings.h:16
Base class for plugin configuration panels.
int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
Call global cbMessageBox with m_parentDialog as parent window when no parent window specified...
void SetParentDialog(wxWindow *dialog)
Sets the panel&#39;s parent dialog.
#define NULL
Definition: prefix.cpp:59
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