~registry/codeblocks/trunk

« back to all changes in this revision

Viewing changes to src/include/configurationpanel.h

  • Committer: mandrav
  • Date: 2007-02-12 14:55:28 UTC
  • Revision ID: svn-v4:98b59c6a-2706-0410-b7d6-d2fa1a1880c9:trunk:3594
* First part of directories layout re-organization: moved all sdk header files to a new dir named "include".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef CONFIGURATIONPANEL_H
 
2
#define CONFIGURATIONPANEL_H
 
3
 
 
4
#include "settings.h"
 
5
#include <wx/dialog.h>
 
6
#include <wx/panel.h>
 
7
#include <wx/string.h>
 
8
 
 
9
class wxButton;
 
10
class wxWindow;
 
11
 
 
12
/** @brief Base class for plugin configuration panels. */
 
13
class DLLIMPORT cbConfigurationPanel : public wxPanel
 
14
{
 
15
    public:
 
16
        cbConfigurationPanel(){}
 
17
        virtual ~cbConfigurationPanel(){}
 
18
 
 
19
        /// @return the panel's title.
 
20
        virtual wxString GetTitle() const = 0;
 
21
        /// @return the panel's bitmap base name. You must supply two bitmaps: <basename>.png and <basename>-off.png...
 
22
        virtual wxString GetBitmapBaseName() const = 0;
 
23
        /// Called when the user chooses to apply the configuration.
 
24
        virtual void OnApply() = 0;
 
25
        /// Called when the user chooses to cancel the configuration.
 
26
        virtual void OnCancel() = 0;
 
27
};
 
28
 
 
29
/// @brief A simple dialog that wraps a cbConfigurationPanel.
 
30
class DLLIMPORT cbConfigurationDialog : public wxDialog
 
31
{
 
32
        public:
 
33
                cbConfigurationDialog(wxWindow* parent, int id, const wxString& title);
 
34
                void AttachConfigurationPanel(cbConfigurationPanel* panel);
 
35
                ~cbConfigurationDialog();
 
36
 
 
37
                void EndModal(int retCode);
 
38
        protected:
 
39
        cbConfigurationPanel* m_pPanel;
 
40
        wxButton* m_pOK;
 
41
        wxButton* m_pCancel;
 
42
        private:
 
43
 
 
44
};
 
45
 
 
46
#endif // CONFIGURATIONPANEL_H