+bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction creator)
+{
+ wxCHECK_MSG( !m_extraControlCreator, false,
+ "wxFileDialog::SetExtraControl() called second time" );
+
+ m_extraControlCreator = creator;
+ return SupportsExtraControl();
+}
+
+bool wxFileDialogBase::CreateExtraControl()
+{
+ if (!m_extraControlCreator || m_extraControl)
+ return false;
+ m_extraControl = (*m_extraControlCreator)(this);
+ return true;
+}
+
+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();
+}
+