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 EDITPATHDLG_H
7 #define EDITPATHDLG_H
8 
9 #include "scrollingdialog.h"
10 #include <wx/intl.h>
11 
12 class DLLIMPORT EditPathDlg : public wxScrollingDialog
13 {
14 	public:
15 		EditPathDlg(wxWindow* parent,
16                 const wxString& path,       // initial path
17                 const wxString& basepath,   // for relative pathes
18                 const wxString& title = _("Edit Path"),      // title of the dialog
19                 const wxString& message = _T(""),    // message displayed in the dialogs
20                 const bool wantDir = true,  // whether to open a dir or a file dialog
21                 const bool allowMultiSel = false,  // whether to allow for multiple files selection
22                 const wxString& filter = _("All files(*)|*"));  // wildcard for files
23 
24 		~EditPathDlg() override;
25 		EditPathDlg& operator=(const EditPathDlg&){ return *this; } // just to satisfy script bindings (never used)
26 
GetPath()27 		const wxString& GetPath(){ return m_Path; }
28     void EndModal(int retCode) override;
29 
30 	protected:
31         void OnUpdateUI(wxUpdateUIEvent& event);
32         void OnBrowse(wxCommandEvent& event);
33         void OnOther(wxCommandEvent& event);
34 
35         wxString m_Path;
36         wxString m_Message;
37         wxString m_Basepath;
38         wxString m_Filter;
39         bool     m_WantDir;
40         bool     m_AllowMultiSel;
41         bool     m_AskMakeRelative;
42         bool     m_ShowCreateDirButton;
43 
44 	private:
45 
46         DECLARE_EVENT_TABLE();
47 };
48 
49 #endif // EDITPATHDLG_H
50