-#if defined(__WXMSW__)
- #include "wx/msw/dialog.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/dialog.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk/dialog.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/dialog.h"
-#elif defined(__WXPM__)
- #include "wx/os2/dialog.h"
-#elif defined(__WXSTUBS__)
- #include "wx/stubs/dialog.h"
+ // Create the scrolled window
+ virtual wxScrolledWindow* CreateScrolledWindow(wxWindow* parent);
+
+#if wxUSE_BUTTON
+ // Find a standard or horizontal box sizer
+ virtual wxSizer* FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder = 0);
+
+ // Check if this sizer contains standard buttons, and so can be repositioned in the dialog
+ virtual bool IsOrdinaryButtonSizer(wxDialog* dialog, wxBoxSizer* sizer);
+
+ // Check if this is a standard button
+ virtual bool IsStandardButton(wxDialog* dialog, wxButton* button);
+
+ // 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);
+#endif // wxUSE_BUTTON
+
+ // Reparent the controls to the scrolled window, except those in buttonSizer
+ virtual void ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL);
+ static void DoReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL);
+
+ // A function to fit the dialog around its contents, and then adjust for screen size.
+ // If scrolled windows are passed, scrolling is enabled in the required orientation(s).
+ virtual bool FitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow);
+ virtual bool FitWithScrolling(wxDialog* dialog, wxWindowList& windows);
+ static bool DoFitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow);
+ static bool DoFitWithScrolling(wxDialog* dialog, wxWindowList& windows);
+
+ // Find whether scrolling will be necessary for the dialog, returning wxVERTICAL, wxHORIZONTAL or both
+ virtual int MustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize);
+ static int DoMustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize);
+};
+
+#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
+ #include "wx/univ/dialog.h"
+#else
+ #if defined(__WXMSW__)
+ #include "wx/msw/dialog.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/dialog.h"
+ #elif defined(__WXGTK20__)
+ #include "wx/gtk/dialog.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/dialog.h"
+ #elif defined(__WXMAC__)
+ #include "wx/osx/dialog.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dialog.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/dialog.h"
+ #endif