]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
reset deferred position/size if the window was moved immediately (#10073)
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index 25ac9147169986aab62602ba3b224aefc1a84e91..0a3c4638ba2bea4797623b80603cdf2f4287b7a3 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "../sample.xpm"
 
+#include "wx/apptrait.h"
 #include "wx/datetime.h"
 #include "wx/image.h"
 #include "wx/bookctrl.h"
     #include "wx/fdrepdlg.h"
 #endif // wxUSE_FINDREPLDLG
 
-#if wxUSE_SPINCTRL
 #include "wx/spinctrl.h"
-#endif
-
 #include "wx/propdlg.h"
 
 #include "dialogs.h"
@@ -2138,7 +2136,8 @@ wxPanel* SettingsDialog::CreateAestheticSettingsPage(wxWindow* parent)
 // TestMessageBoxDialog
 // ----------------------------------------------------------------------------
 
-TestMessageBoxDialog::BtnInfo TestMessageBoxDialog::ms_btnInfo[] =
+/* static */
+const TestMessageBoxDialog::BtnInfo TestMessageBoxDialog::ms_btnInfo[] =
 {
     { wxYES,    "&Yes"    },
     { wxNO,     "&No"     },
@@ -2326,3 +2325,31 @@ void TestMessageBoxDialog::OnClose(wxCommandEvent& WXUNUSED(event))
 }
 
 #endif // USE_SETTINGS_DIALOG
+
+#if wxUSE_LOG
+
+// ----------------------------------------------------------------------------
+// custom log target
+// ----------------------------------------------------------------------------
+
+class MyLogGui : public wxLogGui
+{
+private:
+    virtual void DoShowSingleLogMessage(const wxString& message,
+                                        const wxString& title,
+                                        int style)
+    {
+        wxMessageDialog dlg(NULL, message, title,
+                            wxOK | wxCANCEL | wxCANCEL_DEFAULT | style);
+        dlg.SetOKCancelLabels(wxID_COPY, wxID_OK);
+        dlg.SetExtendedMessage("Note that this is a custom log dialog.");
+        dlg.ShowModal();
+    }
+};
+
+wxLog *MyAppTraits::CreateLogTarget()
+{
+    return new MyLogGui;
+}
+
+#endif // wxUSE_LOG