Fix wxStandardDialogLayoutAdapter compilation with wxUSE_BUTTON==0.
This class probably should not be compiled in at all in the minimal build but in the meanwhile just add #if checks around its button-related parts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -317,6 +317,7 @@ public:
|
|||||||
// Create the scrolled window
|
// Create the scrolled window
|
||||||
virtual wxScrolledWindow* CreateScrolledWindow(wxWindow* parent);
|
virtual wxScrolledWindow* CreateScrolledWindow(wxWindow* parent);
|
||||||
|
|
||||||
|
#if wxUSE_BUTTON
|
||||||
// Find a standard or horizontal box sizer
|
// Find a standard or horizontal box sizer
|
||||||
virtual wxSizer* FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder = 0);
|
virtual wxSizer* FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder = 0);
|
||||||
|
|
||||||
@@ -328,6 +329,7 @@ public:
|
|||||||
|
|
||||||
// Find 'loose' main buttons in the existing layout and add them to the standard dialog sizer
|
// Find 'loose' main buttons in the existing layout and add them to the standard dialog sizer
|
||||||
virtual bool FindLooseButtons(wxDialog* dialog, wxStdDialogButtonSizer* buttonSizer, wxSizer* sizer, int& count);
|
virtual bool FindLooseButtons(wxDialog* dialog, wxStdDialogButtonSizer* buttonSizer, wxSizer* sizer, int& count);
|
||||||
|
#endif // wxUSE_BUTTON
|
||||||
|
|
||||||
// Reparent the controls to the scrolled window, except those in buttonSizer
|
// Reparent the controls to the scrolled window, except those in buttonSizer
|
||||||
virtual void ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL);
|
virtual void ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL);
|
||||||
|
@@ -633,6 +633,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
|
|||||||
else
|
else
|
||||||
#endif // wxUSE_BOOKCTRL
|
#endif // wxUSE_BOOKCTRL
|
||||||
{
|
{
|
||||||
|
#if wxUSE_BUTTON
|
||||||
// If we have an arbitrary dialog, create a scrolling area for the main content, and a button sizer
|
// If we have an arbitrary dialog, create a scrolling area for the main content, and a button sizer
|
||||||
// for the main buttons.
|
// for the main buttons.
|
||||||
wxScrolledWindow* scrolledWindow = CreateScrolledWindow(dialog);
|
wxScrolledWindow* scrolledWindow = CreateScrolledWindow(dialog);
|
||||||
@@ -679,6 +680,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
|
|||||||
scrolledWindow->SetSizer(oldSizer);
|
scrolledWindow->SetSizer(oldSizer);
|
||||||
|
|
||||||
FitWithScrolling(dialog, scrolledWindow);
|
FitWithScrolling(dialog, scrolledWindow);
|
||||||
|
#endif // wxUSE_BUTTON
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -693,6 +695,8 @@ wxScrolledWindow* wxStandardDialogLayoutAdapter::CreateScrolledWindow(wxWindow*
|
|||||||
return scrolledWindow;
|
return scrolledWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_BUTTON
|
||||||
|
|
||||||
/// Find and remove the button sizer, if any
|
/// Find and remove the button sizer, if any
|
||||||
wxSizer* wxStandardDialogLayoutAdapter::FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder)
|
wxSizer* wxStandardDialogLayoutAdapter::FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder)
|
||||||
{
|
{
|
||||||
@@ -790,6 +794,8 @@ bool wxStandardDialogLayoutAdapter::FindLooseButtons(wxDialog* dialog, wxStdDial
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_BUTTON
|
||||||
|
|
||||||
/// Reparent the controls to the scrolled window
|
/// Reparent the controls to the scrolled window
|
||||||
void wxStandardDialogLayoutAdapter::ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer)
|
void wxStandardDialogLayoutAdapter::ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user