add support for custom controls in file dialog in wxGTK and generic versions; also allow using generic dialogs in the sample with wxGTK2 (patch 1846837)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
//----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user