]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
compilation fix for other (than GTK/MSW) ports
[wxWidgets.git] / src / common / dlgcmn.cpp
index 235f5416da6d7ac55f0e0b66c4636164940afb42..889553866568a5986f144b26865850e5a55f927f 100644 (file)
     #include "wx/stattext.h"
     #include "wx/sizer.h"
     #include "wx/button.h"
+    #include "wx/containr.h"
 #endif
 
+
 //--------------------------------------------------------------------------
 // wxDialogBase
 //--------------------------------------------------------------------------
 
+// FIXME - temporary hack in absence of wxtopLevelWindow, should be always used
+#ifdef wxTopLevelWindowNative
+BEGIN_EVENT_TABLE(wxDialogBase, wxTopLevelWindow)
+    WX_EVENT_TABLE_CONTROL_CONTAINER(wxDialogBase)
+END_EVENT_TABLE()
+
+WX_DELEGATE_TO_CONTROL_CONTAINER(wxDialogBase)
+#endif
+
+void wxDialogBase::Init()
+{
+    m_returnCode = 0;
+#ifdef wxTopLevelWindowNative // FIXME - temporary hack, should be always used!
+    m_container.SetContainerWindow(this);
+#endif
+}
+
+#if wxUSE_STATTEXT && wxUSE_TEXTCTRL
+
 wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
 {
     wxBoxSizer *box = new wxBoxSizer( wxVERTICAL );
@@ -86,6 +107,10 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString &message )
     return box;
 }
 
+#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
+
+#if wxUSE_BUTTON
+
 wxSizer *wxDialogBase::CreateButtonSizer( long flags )
 {
     wxBoxSizer *box = new wxBoxSizer( wxHORIZONTAL );
@@ -174,3 +199,4 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags )
     return box;
 }
 
+#endif // wxUSE_BUTTON