]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/event.h
Added hotkeys to menus "E&xit\tAlt-X" and such.
[wxWidgets.git] / include / wx / event.h
index 24a0d2b4f1a5ae1d78fbb6ddb0875866717d7113..61e6cec495df2d4a76850c80077be2c30e250967 100644 (file)
@@ -290,6 +290,8 @@ public:
     // exists only for optimization purposes
     bool IsCommandEvent() const { return m_isCommandEvent; }
 
     // exists only for optimization purposes
     bool IsCommandEvent() const { return m_isCommandEvent; }
 
+    wxObject *Clone() const;
+
 public:
     bool              m_skipped;
     wxObject*         m_eventObject;
 public:
     bool              m_skipped;
     wxObject*         m_eventObject;
@@ -778,7 +780,7 @@ public:
     {
         // GetVeto() will return FALSE anyhow...
         wxCHECK_RET( m_canVeto,
     {
         // GetVeto() will return FALSE anyhow...
         wxCHECK_RET( m_canVeto,
-                     "call to Veto() ignored (can't veto this event)" );
+                     _T("call to Veto() ignored (can't veto this event)") );
 
         m_veto = veto;
     }
 
         m_veto = veto;
     }
@@ -1194,6 +1196,10 @@ public:
 
     bool SearchDynamicEventTable( wxEvent& event );
 
 
     bool SearchDynamicEventTable( wxEvent& event );
 
+#if wxUSE_THREADS
+    void ClearEventLocker() { delete m_eventsLocker; m_eventsLocker = NULL; };
+#endif
+
 private:
     static const wxEventTableEntry         sm_eventTableEntries[];
 
 private:
     static const wxEventTableEntry         sm_eventTableEntries[];
 
@@ -1203,18 +1209,18 @@ protected:
     virtual const wxEventTable *GetEventTable() const;
 
 protected:
     virtual const wxEventTable *GetEventTable() const;
 
 protected:
-    wxEvtHandler*      m_nextHandler;
-    wxEvtHandler*      m_previousHandler;
-    bool               m_enabled;           // Is event handler enabled?
-    wxList*            m_dynamicEvents;
-    wxList*           m_pendingEvents;
+    wxEvtHandler*       m_nextHandler;
+    wxEvtHandler*       m_previousHandler;
+    bool                m_enabled;           // Is event handler enabled?
+    wxList*             m_dynamicEvents;
+    wxList*                m_pendingEvents;
 #if wxUSE_THREADS
 #if wxUSE_THREADS
-    wxCriticalSection* m_eventsLocker;
+    wxCriticalSection*  m_eventsLocker;
 #endif
 
     // optimization: instead of using costly IsKindOf() to decide whether we're
     // a window (which is true in 99% of cases), use this flag
 #endif
 
     // optimization: instead of using costly IsKindOf() to decide whether we're
     // a window (which is true in 99% of cases), use this flag
-    bool              m_isWindow;
+    bool                m_isWindow;
 };
 
 typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
 };
 
 typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
@@ -1427,5 +1433,13 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 #define EVT_UPDATE_UI(id, func) \
  { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL },\
 
 #define EVT_UPDATE_UI(id, func) \
  { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL },\
 
+/*
+ * Helper functions
+ */
+
+// Find a window with the focus, that is also a descendant of the given window.
+// This is used to determine the window to initially send commands to.
+wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
+
 #endif
         // _WX_EVENTH__
 #endif
         // _WX_EVENTH__