Extract CreateSeparatedSizer() from wxDialog::CreateSeparatedButtonSizer().

Extract the code adding a separating wxStaticLine to the sizer in its own
function to be able to reuse it in upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-30 21:48:16 +00:00
parent a01d6442f4
commit b14cca2a84
3 changed files with 38 additions and 5 deletions

View File

@@ -218,12 +218,8 @@ wxSizer *wxDialogBase::CreateButtonSizer(long flags)
#endif // __SMARTPHONE__/!__SMARTPHONE__
}
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
wxSizer *wxDialogBase::CreateSeparatedSizer(wxSizer *sizer)
{
wxSizer *sizer = CreateButtonSizer(flags);
if ( !sizer )
return NULL;
// Mac Human Interface Guidelines recommend not to use static lines as
// grouping elements
#if wxUSE_STATLINE && !defined(__WXMAC__)
@@ -237,6 +233,15 @@ wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
return sizer;
}
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
{
wxSizer *sizer = CreateButtonSizer(flags);
if ( !sizer )
return NULL;
return CreateSeparatedSizer(sizer);
}
#if wxUSE_BUTTON
wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )