]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/event.h
no changes, just update the copyright in the header
[wxWidgets.git] / include / wx / event.h
index 70fd7df823d32e6e5e928adedc573a598a4c7492..b18f39bed8d536ff33af05d2e3ff6220fb65220f 100644 (file)
@@ -237,12 +237,7 @@ public:
         m_method = method;
     }
 
-    virtual void operator()(wxEvtHandler *handler, wxEvent& event)
-    {
-        wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
-
-        (realHandler->*m_method)(event);
-    }
+    virtual void operator()(wxEvtHandler *handler, wxEvent& event);
 
     virtual bool Matches(const wxEventFunctor& func) const
     {
@@ -397,7 +392,7 @@ class wxEventFunctorMethod
               <
                 Class,
                 EventArg,
-                wxConvertibleTo<Class, wxEvtHandler>::value
+                wxConvertibleTo<Class, wxEvtHandler>::value != 0
               >
 {
 private:
@@ -1110,6 +1105,14 @@ public:
         : wxCommandEvent(eventType, id)
         { }
 
+    wxThreadEvent(const wxThreadEvent& event)
+        : wxCommandEvent(event)
+    {
+        // make sure our string member (which uses COW, aka refcounting) is not
+        // shared by other wxString instances:
+        SetString(GetString().c_str());
+    }
+
     virtual wxEvent *Clone() const
     {
         wxThreadEvent* ev = new wxThreadEvent(*this);
@@ -2425,7 +2428,7 @@ public:
 
     virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); }
 
-    enum
+    enum wxNavigationKeyEventFlags
     {
         IsBackward = 0x0000,
         IsForward = 0x0001,
@@ -3401,6 +3404,13 @@ private:
     wxDECLARE_NO_ASSIGN_CLASS(wxEventConnectionRef);
 };
 
+inline void wxObjectEventFunctor::operator()(wxEvtHandler *handler, wxEvent& event)
+{
+    wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
+
+    (realHandler->*m_method)(event);
+}
+
 // Post a message to the given event handler which will be processed during the
 // next event loop iteration.
 //