// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef _WX_EVENT_H__
-#define _WX_EVENT_H__
+#ifndef _WX_EVENT_H_
+#define _WX_EVENT_H_
#include "wx/defs.h"
#include "wx/cpp.h"
#include "wx/cursor.h"
#endif
-#include "wx/thread.h"
-
#include "wx/dynarray.h"
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxList;
-
+#if wxUSE_THREADS
+ class WXDLLIMPEXP_FWD_BASE wxCriticalSection;
+#endif
#if wxUSE_GUI
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxMenu;
{
public:
wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
- wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
+ wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
{ Assign(event); }
// Was it a button event? (*doesn't* mean: is any button *down*?)
// True if the mouse is just leaving the window
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
+ // Returns the number of mouse clicks associated with this event.
+ int GetClickCount() const { return m_clickCount; }
+
+
// Find the position of the event
void GetPosition(wxCoord *xpos, wxCoord *ypos) const
{
bool m_altDown;
bool m_metaDown;
+ int m_clickCount;
+
int m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
// process an event right now
virtual bool ProcessEvent(wxEvent& event);
+ // Process an event by calling ProcessEvent and handling any exceptions
+ // thrown by event handlers. It's mostly useful when processing wx events
+ // when called from C code (e.g. in GTK+ callback) when the exception
+ // wouldn't correctly propagate to wxEventLoop.
+ bool SafelyProcessEvent(wxEvent& event);
+
// add an event to be processed later
virtual void AddPendingEvent(const wxEvent& event);
#endif // wxUSE_GUI
-#endif // _WX_EVENT_H__
+#endif // _WX_EVENT_H_