44 const
bool allowMultiSel,
49 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
51 XRCCTRL(*
this,
"txtPath",
wxTextCtrl)->SetValue(path);
55 XRCCTRL(*
this,
"lblText",
wxStaticText)->SetLabel(
_(
"File:"));
60 m_AllowMultiSel = allowMultiSel;
62 m_Basepath = basepath;
64 m_AskMakeRelative =
true;
65 m_ShowCreateDirButton =
false;
66 XRCCTRL(*
this,
"txtPath",
wxTextCtrl)->SetFocus();
70 SetMaxSize(
wxSize(-1, GetMinHeight()));
82 btn->Enable(!XRCCTRL(*
this,
"txtPath",
wxTextCtrl)->GetValue().IsEmpty());
112 if (initial_val != val)
115 if (tmp.
Replace(val, initial_val) != 0)
118 XRCCTRL(*
this,
"txtPath",
wxTextCtrl)->SetValue(tmp);
141 s_LastPath = multi[0];
155 for (
unsigned int i = 0; i < multi.
GetCount(); ++i)
186 XRCCTRL(*
this,
"txtPath",
wxTextCtrl)->SetValue(result);
197 txtPath->SetValue(user_var);
void EndModal(int retCode)
UserVariableManager * GetUserVariableManager() const
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
DLLIMPORT wxString ChooseDirectory(wxWindow *parent, const wxString &message=_("Select directory"), const wxString &initialPath=_T(""), const wxString &basePath=_T(""), bool askToMakeRelative=false, bool showCreateDirButton=false)
void OnBrowse(wxCommandEvent &event)
void OnUpdateUI(wxUpdateUIEvent &event)
DLLIMPORT wxString GetStringFromArray(const wxArrayString &array, const wxString &separator=DEFAULT_ARRAY_SEP, bool SeparatorAtEnd=true)
wxString & Remove(size_t pos)
bool MakeRelativeTo(const wxString &pathBase=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
static wxString s_LastPath
wxString GetVariable(wxWindow *parent, const wxString &old)
size_t Replace(const wxString &strOld, const wxString &strNew, bool replaceAll=true)
virtual wxString GetPath() const
MacrosManager * GetMacrosManager() const
const wxString & _(const wxString &string)
void SetMinSize(wxPropertyGrid *grid)
DLLIMPORT const wxString DEFAULT_ARRAY_SEP
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
wxString GetPath(int flags=wxPATH_GET_VOLUME, wxPathFormat format=wxPATH_NATIVE) const
void ReplaceEnvVars(wxString &buffer)
wxString GetFullName() const
virtual void GetPaths(wxArrayString &paths) const
void OnOther(wxCommandEvent &event)
void EndModal(int retCode) override
int Find(wxUniChar ch, bool fromEnd=false) const
static wxXmlResource * Get()
bool MakeAbsolute(const wxString &cwd=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.