]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/artprov/arttest.cpp
Correct 'markup' for GetResourceHandle after recent change in wx/gdiobj.h.
[wxWidgets.git] / samples / artprov / arttest.cpp
index 4c991b0258a05ff83b66e3f31a7de6d8d3626517..9a69a2535f0a2c70bc5a05de90afe51f4262aed6 100644 (file)
@@ -20,7 +20,7 @@
 #include "wx/wx.h"
 #endif
 
 #include "wx/wx.h"
 #endif
 
-#ifndef __WXMSW__
+#if !defined(__WXMSW__) && !defined(__WXPM__)
     #include "mondrian.xpm"
 #endif
 
     #include "mondrian.xpm"
 #endif
 
@@ -47,10 +47,12 @@ private:
     // event handlers (these functions should _not_ be virtual)
     void OnQuit(wxCommandEvent& event);
     void OnAbout(wxCommandEvent& event);
     // event handlers (these functions should _not_ be virtual)
     void OnQuit(wxCommandEvent& event);
     void OnAbout(wxCommandEvent& event);
+#if wxUSE_LOG
     void OnLogs(wxCommandEvent& event);
     void OnLogs(wxCommandEvent& event);
+#endif // wxUSE_LOG
     void OnBrowser(wxCommandEvent& event);
     void OnPlugProvider(wxCommandEvent& event);
     void OnBrowser(wxCommandEvent& event);
     void OnPlugProvider(wxCommandEvent& event);
-    
+
     DECLARE_EVENT_TABLE()
 };
 
     DECLARE_EVENT_TABLE()
 };
 
@@ -73,7 +75,9 @@ enum
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(ID_Quit,         MyFrame::OnQuit)
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(ID_Quit,         MyFrame::OnQuit)
+#if wxUSE_LOG
     EVT_MENU(ID_Logs,         MyFrame::OnLogs)
     EVT_MENU(ID_Logs,         MyFrame::OnLogs)
+#endif // wxUSE_LOG
     EVT_MENU(wxID_ABOUT,      MyFrame::OnAbout)
     EVT_MENU(ID_Browser,      MyFrame::OnBrowser)
     EVT_MENU(ID_PlugProvider, MyFrame::OnPlugProvider)
     EVT_MENU(wxID_ABOUT,      MyFrame::OnAbout)
     EVT_MENU(ID_Browser,      MyFrame::OnBrowser)
     EVT_MENU(ID_PlugProvider, MyFrame::OnPlugProvider)
@@ -152,10 +156,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
     wxMenu *helpMenu = new wxMenu;
     helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog"));
 
     wxMenu *helpMenu = new wxMenu;
     helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog"));
 
-    menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider"));   
+    menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider"));
     menuFile->AppendSeparator();
 
     menuFile->AppendSeparator();
 
+#if wxUSE_LOG
     menuFile->Append(ID_Logs, _T("&Logging test"), _T("Show some logging output"));
     menuFile->Append(ID_Logs, _T("&Logging test"), _T("Show some logging output"));
+#endif // wxUSE_LOG
     menuFile->Append(ID_Browser, _T("&Resources browser"), _T("Browse all available icons"));
     menuFile->AppendSeparator();
 
     menuFile->Append(ID_Browser, _T("&Resources browser"), _T("Browse all available icons"));
     menuFile->AppendSeparator();
 
@@ -179,6 +185,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
     Close(true);
 }
 
     Close(true);
 }
 
+#if wxUSE_LOG
 void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event))
 {
     wxLogMessage(_T("Some information."));
 void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event))
 {
     wxLogMessage(_T("Some information."));
@@ -188,6 +195,7 @@ void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event))
     wxLog::GetActiveTarget()->Flush();
     wxLogMessage(_T("Check/uncheck 'File/Plug-in art provider' and try again."));
 }
     wxLog::GetActiveTarget()->Flush();
     wxLogMessage(_T("Check/uncheck 'File/Plug-in art provider' and try again."));
 }
+#endif // wxUSE_LOG
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
@@ -208,7 +216,7 @@ void MyFrame::OnBrowser(wxCommandEvent& WXUNUSED(event))
 void MyFrame::OnPlugProvider(wxCommandEvent& event)
 {
     if ( event.IsChecked() )
 void MyFrame::OnPlugProvider(wxCommandEvent& event)
 {
     if ( event.IsChecked() )
-        wxArtProvider::PushProvider(new MyArtProvider);
+        wxArtProvider::Push(new MyArtProvider);
     else
     else
-        wxArtProvider::PopProvider();
+        wxArtProvider::Pop();
 }
 }