// ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class
+#include "wx/eventfilter.h" // (and another one)
#include "wx/build.h"
#include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv
#include "wx/init.h" // we must declare wxEntry()
// wxAppConsoleBase: wxApp for non-GUI applications
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler
+class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler,
+ public wxEventFilter
{
public:
// ctor and dtor
// event processing functions
// --------------------------
- // this method allows to filter all the events processed by the program, so
- // you should try to return quickly from it to avoid slowing down the
- // program to the crawl
- //
- // return value should be -1 to continue with the normal event processing,
- // or TRUE or FALSE to stop further processing and pretend that the event
- // had been already processed or won't be processed at all, respectively
+ // Implement the inherited wxEventFilter method but just return -1 from it
+ // to indicate that default processing should take place.
virtual int FilterEvent(wxEvent& event);
// return true if we're running event loop, i.e. if the events can
wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase);
};
-#if defined(__UNIX__)
+#if defined(__UNIX__) && !defined(__CYGWIN__)
#include "wx/unix/app.h"
#else
// this has to be a class and not a typedef as we forward declare it
// it should return true if more idle events are needed, false if not
virtual bool ProcessIdle();
- // Send idle event to window and all subwindows
- // Returns true if more idle time is requested.
- virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
-
// override base class version: GUI apps always use an event loop
virtual bool UsesEventLoop() const { return true; }