]> git.saurik.com Git - wxWidgets.git/blame - include/wx/evtloop.h
Window management and sizer layout corrections
[wxWidgets.git] / include / wx / evtloop.h
CommitLineData
3808e191
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/evtloop.h
3// Purpose: declares wxEventLoop class
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 01.06.01
7// RCS-ID: $Id$
8// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_EVTLOOP_H_
13#define _WX_EVTLOOP_H_
14
15#ifdef __GNUG__
16 #pragma interface "evtloop.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// wxEventLoop: a GUI event loop
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxEventLoop
24{
25public:
26 // ctor
27 wxEventLoop() { m_impl = NULL; }
28
29 // dtor
30 virtual ~wxEventLoop();
31
32 // start the event loop, return the exit code when it is finished
33 virtual int Run();
34
35 // exit from the loop with the given exit code
36 virtual void Exit(int rc = 0);
37
38 // return TRUE if any events are available
39 virtual bool Pending() const;
40
41 // dispatch a single event, return FALSE if we should exit from the loop
42 virtual bool Dispatch();
43
44 // is the event loop running now?
45 virtual bool IsRunning() const;
b9f246f7
VS
46
47 // return currently active (running) event loop, may be NULL
48 static wxEventLoop *GetActive() { return ms_activeLoop; }
3808e191
JS
49
50protected:
51 // the pointer to the port specific implementation class
52 class WXDLLEXPORT wxEventLoopImpl *m_impl;
b9f246f7
VS
53 // the pointer to currently active loop
54 static wxEventLoop *ms_activeLoop;
3808e191
JS
55};
56
57#endif // _WX_EVTLOOP_H_