]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fldlgcmn.cpp
added support for double arguments to wxCmdLineParser (patch 1907289)
[wxWidgets.git] / src / common / fldlgcmn.cpp
index 71c0a977ce4594e94190a893c8a97a093f935950..7c6e7fda2c653ee2cd529f710fc1346f7e5e0925 100644 (file)
@@ -35,8 +35,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileDialogBase, wxDialog)
 
 void wxFileDialogBase::Init()
 {
-    m_filterIndex =
+    m_filterIndex = 0;
     m_windowStyle = 0;
+    m_extraControl = NULL;
+    m_extraControlCreator = NULL;
 }
 
 bool wxFileDialogBase::Create(wxWindow *parent,
@@ -149,6 +151,23 @@ wxString wxFileDialogBase::AppendExtension(const wxString &filePath,
     return filePath + ext;
 }
 
+bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction c)
+{
+    wxCHECK_MSG( !m_extraControlCreator, false,
+                 "wxFileDialog::SetExtraControl() called second time" );
+
+    m_extraControlCreator = c;
+    return SupportsExtraControl();
+}
+
+bool wxFileDialogBase::CreateExtraControl()
+{
+    if (!m_extraControlCreator || m_extraControl)
+        return false;
+    m_extraControl = (*m_extraControlCreator)(this);
+    return true;
+}
+
 //----------------------------------------------------------------------------
 // wxFileDialog convenience functions
 //----------------------------------------------------------------------------