+wxSize wxFileDialogBase::GetExtraControlSize()
+{
+ if ( !m_extraControlCreator )
+ return wxDefaultSize;
+
+ // create the extra control in an empty dialog just to find its size: this
+ // is not terribly efficient but we do need to know the size before
+ // creating the native dialog and this seems to be the only way
+ wxDialog dlg(NULL, wxID_ANY, "");
+ return (*m_extraControlCreator)(&dlg)->GetSize();
+}
+
+void wxFileDialogBase::SetPath(const wxString& path)
+{
+ wxString ext;
+ wxFileName::SplitPath(path, &m_dir, &m_fileName, &ext);
+ if ( !ext.empty() )
+ m_fileName << wxT('.') << ext;
+ m_path = path;
+}
+
+void wxFileDialogBase::SetDirectory(const wxString& dir)
+{
+ m_dir = dir;
+ m_path = wxFileName(m_dir, m_fileName).GetFullPath();
+}
+
+void wxFileDialogBase::SetFilename(const wxString& name)
+{
+ m_fileName = name;
+ m_path = wxFileName(m_dir, m_fileName).GetFullPath();
+}
+