There is no way to exclude the sample from the build under Windows so make it
compile and link even if wxUSE_UIACTIONSIMULATOR==0 but just give an error
message on startup in this case instead of working as expected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63741
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-#if wxUSE_UIACTIONSIMULATOR
-
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/uiaction.h"
+#if wxUSE_UIACTIONSIMULATOR
+ #include "wx/uiaction.h"
+#endif
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// resources
virtual bool OnInit();
};
virtual bool OnInit();
};
+#if wxUSE_UIACTIONSIMULATOR
+
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
EVT_MENU(RunSimulation, MyFrame::OnRunSimulation)
END_EVENT_TABLE()
EVT_MENU(RunSimulation, MyFrame::OnRunSimulation)
END_EVENT_TABLE()
+#endif // wxUSE_UIACTIONSIMULATOR
+
// ============================================================================
// implementation
// ============================================================================
// ============================================================================
// implementation
// ============================================================================
if ( !wxApp::OnInit() )
return false;
if ( !wxApp::OnInit() )
return false;
+#if wxUSE_UIACTIONSIMULATOR
MyFrame *frame = new MyFrame("wxUIActionSimulator sample application");
frame->Show(true);
return true;
MyFrame *frame = new MyFrame("wxUIActionSimulator sample application");
frame->Show(true);
return true;
+#else // !wxUSE_UIACTIONSIMULATOR
+ wxLogError("wxUSE_UIACTIONSIMULATOR must be 1 for this sample");
+ return false;
+#endif // wxUSE_UIACTIONSIMULATOR/!wxUSE_UIACTIONSIMULATOR
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
+#if wxUSE_UIACTIONSIMULATOR
+
// frame constructor
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
// frame constructor
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)