Code::Blocks  SVN r11506
filepathpanel.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef FILEPATHPANEL_H
7 #define FILEPATHPANEL_H
8 
9 
10 //(*HeadersPCH(FilePathPanel)
11 #include <wx/checklst.h>
12 #include <wx/checkbox.h>
13 #include <wx/sizer.h>
14 #include <wx/button.h>
15 #include <wx/panel.h>
16 #include <wx/stattext.h>
17 #include <wx/textctrl.h>
18 //*)
19 
20 #include <wx/string.h>
21 
22 class FilePathPanel: public wxPanel
23 {
24  public:
25 
26  FilePathPanel(wxWindow* parent,wxWindowID id = -1);
27  virtual ~FilePathPanel();
28 
29  wxString GetFilename() const { return txtFilename->GetValue(); }
30  wxString GetHeaderGuard() const { return txtGuard->IsShown() ? txtGuard->GetValue() : _T(""); }
31  bool GetAddToProject() const { return chkAddToProject->GetValue(); }
32  void SetAddToProject(bool add);
33  int GetTargetIndex();
34  void SetFilePathSelectionFilter(const wxString& filter){ m_ExtFilter = filter; }
35  void ShowHeaderGuard(bool show)
36  {
37  lblGuard->Show(show);
38  txtGuard->Show(show);
39  }
40 
41  //(*Identifiers(FilePathPanel)
42  static const long ID_STATICTEXT1;
43  static const long ID_STATICTEXT2;
44  static const long ID_TEXTCTRL1;
45  static const long ID_BUTTON1;
46  static const long ID_STATICTEXT3;
47  static const long ID_TEXTCTRL2;
48  static const long ID_CHECKBOX1;
49  static const long ID_STATICTEXT4;
50  static const long ID_CHECKLISTBOX2;
51  static const long ID_BUTTON2;
52  static const long ID_BUTTON3;
53  //*)
54 
55  private:
56 
57  //(*Handlers(FilePathPanel)
58  void OntxtFilenameText(wxCommandEvent& event);
59  void OnbtnBrowseClick(wxCommandEvent& event);
61  void OnbtnAllClick(wxCommandEvent& event);
62  void OnbtnNoneClick(wxCommandEvent& event);
63  //*)
64 
65  //(*Declarations(FilePathPanel)
78  //*)
79 
82 
83  void ToggleVisibility(bool on);
84 
85  DECLARE_EVENT_TABLE()
86 };
87 
88 #endif
FilePathPanel(wxWindow *parent, wxWindowID id=-1)
wxCheckBox * chkAddToProject
Definition: filepathpanel.h:72
static const long ID_BUTTON1
Definition: filepathpanel.h:45
wxButton * btnNone
Definition: filepathpanel.h:74
static const long ID_TEXTCTRL1
Definition: filepathpanel.h:44
static const long ID_BUTTON3
Definition: filepathpanel.h:52
wxButton * btnAll
Definition: filepathpanel.h:66
wxTextCtrl * txtFilename
Definition: filepathpanel.h:73
#define _T(string)
void OntxtFilenameText(wxCommandEvent &event)
void SetFilePathSelectionFilter(const wxString &filter)
Definition: filepathpanel.h:34
static const long ID_STATICTEXT1
Definition: filepathpanel.h:42
wxBoxSizer * BoxSizer6
Definition: filepathpanel.h:77
wxStaticText * lblGuard
Definition: filepathpanel.h:67
void ToggleVisibility(bool on)
wxBoxSizer * BoxSizer2
Definition: filepathpanel.h:71
wxFlexGridSizer * FlexGridSizer1
Definition: filepathpanel.h:68
wxString m_ExtFilter
Definition: filepathpanel.h:80
wxString GetFilename() const
Definition: filepathpanel.h:29
static const long ID_BUTTON2
Definition: filepathpanel.h:51
static const long ID_STATICTEXT2
Definition: filepathpanel.h:43
bool GetAddToProject() const
Definition: filepathpanel.h:31
virtual ~FilePathPanel()
static const long ID_CHECKBOX1
Definition: filepathpanel.h:48
void OnbtnAllClick(wxCommandEvent &event)
void ShowHeaderGuard(bool show)
Definition: filepathpanel.h:35
void OnbtnBrowseClick(wxCommandEvent &event)
static const long ID_CHECKLISTBOX2
Definition: filepathpanel.h:50
wxBoxSizer * BoxSizer3
Definition: filepathpanel.h:69
static const long ID_TEXTCTRL2
Definition: filepathpanel.h:47
void SetAddToProject(bool add)
wxString GetHeaderGuard() const
Definition: filepathpanel.h:30
wxButton * btnBrowse
Definition: filepathpanel.h:75
static const long ID_STATICTEXT3
Definition: filepathpanel.h:46
wxTextCtrl * txtGuard
Definition: filepathpanel.h:76
virtual bool GetValue() const
static const long ID_STATICTEXT4
Definition: filepathpanel.h:49
wxCheckListBox * clbTargets
Definition: filepathpanel.h:70
int wxWindowID
void OnbtnNoneClick(wxCommandEvent &event)
void OnchkAddToProjectChange(wxCommandEvent &event)