]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/evtloop.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/evtloop.h
3 // Purpose: wxEventLoop class for MSW
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003-2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_EVTLOOP_H_
13 #define _WX_MSW_EVTLOOP_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT wxEventLoop
: public wxEventLoopManual
24 // implement base class pure virtuals
25 virtual void Exit(int rc
= 0);
26 virtual bool Pending() const;
27 virtual bool Dispatch();
29 // MSW-specific methods
30 // --------------------
32 // preprocess a message, return true if processed (i.e. no further
33 // dispatching required)
34 virtual bool PreProcessMessage(WXMSG
*msg
);
36 // process a single message
37 virtual void ProcessMessage(WXMSG
*msg
);
39 // set the critical window: this is the window such that all the events
40 // except those to this window (and its children) stop to be processed
41 // (typical examples: assert or crash report dialog)
43 // calling this function with NULL argument restores the normal event
45 static void SetCriticalWindow(wxWindowMSW
*win
) { ms_winCritical
= win
; }
47 // return true if there is no critical window or if this window is [a child
48 // of] the critical one
49 static bool AllowProcessing(wxWindowMSW
*win
)
51 return !ms_winCritical
|| IsChildOfCriticalWindow(win
);
55 // check if the given window is a child of ms_winCritical (which must be
57 static bool IsChildOfCriticalWindow(wxWindowMSW
*win
);
60 // critical window or NULL
61 static wxWindowMSW
*ms_winCritical
;
64 #endif // _WX_MSW_EVTLOOP_H_