Added limited support for wxEventLoop (you can't derive from a

wx.PyEventLoop version yet...)  Updated and moved the sample showing
how to replace the MainLoop to samples/mainloop/mainloop.py.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-09-23 01:02:00 +00:00
parent 9213ca5d47
commit 96d49f0eea
6 changed files with 211 additions and 125 deletions

55
wxPython/src/_evtloop.i Normal file
View File

@@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
// Name: _evtloop.i
// Purpose: SWIG interface for wxEventLoop
//
// Author: Robin Dunn
//
// Created: 18-Sept-2004
// RCS-ID: $Id$
// Copyright: (c) 2004 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
// TODO: wxPyEventLoop that virtualizes all the methods...
//---------------------------------------------------------------------------
%newgroup
%{
#include <wx/evtloop.h>
%}
class wxEventLoop
{
public:
wxEventLoop();
virtual ~wxEventLoop();
// start the event loop, return the exit code when it is finished
virtual int Run();
// exit from the loop with the given exit code
virtual void Exit(int rc = 0);
// return true if any events are available
virtual bool Pending() const;
// dispatch a single event, return false if we should exit from the loop
virtual bool Dispatch();
// is the event loop running now?
virtual bool IsRunning() const;
// return currently active (running) event loop, may be NULL
static wxEventLoop *GetActive();
// set currently active (running) event loop
static void SetActive(wxEventLoop* loop);
};
//---------------------------------------------------------------------------