]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/event.h
Implement setFont on the iOS port of wxStaticText.
[wxWidgets.git] / interface / wx / event.h
index 74655ab7c1dee47921d91745d2a6ebdf2a2a2587..a71070392da4a2b29646cc496e255bc8c0c702ca 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     interface of wxEvtHandler, wxEventBlocker and many
 //              wxEvent-derived classes
 // Author:      wxWidgets team
-// RCS-ID:      $Id$
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -523,11 +522,9 @@ public:
 
          @param method The method to call.
          @param x1 The (optional) first parameter to pass to the method.
-         @param x2 The (optional) second parameter to pass to the method.
-
-         Note that currently only up to 2 arguments can be passed. For more
-         complicated needs, you can use the CallAfter<T>(const T& fn) overload
-         that can call any functor.
+            Currently, 0, 1 or 2 parameters can be passed. If you need to pass
+            more than 2 arguments, you can use the CallAfter<T>(const T& fn)
+            overload that can call any functor.
 
          @note This method is not available with Visual C++ before version 8
                (Visual Studio 2005) as earlier versions of the compiler don't
@@ -566,7 +563,7 @@ public:
                (Visual Studio 2005) as earlier versions of the compiler don't
                have the required support for C++ templates to implement it.
 
-         @since 2.9.6
+         @since 3.0
      */
     template<typename T>
     void CallAfter(const T& functor);
@@ -2979,16 +2976,46 @@ public:
 class wxActivateEvent : public wxEvent
 {
 public:
+    /**
+        Specifies the reason for the generation of this event.
+
+        See GetActivationReason().
+
+        @since 3.0
+    */
+    enum Reason
+    {
+        /// Window activated by mouse click.
+        Reason_Mouse,
+        /// Window was activated with some other method than mouse click.
+        Reason_Unknown
+    };
+
     /**
         Constructor.
     */
     wxActivateEvent(wxEventType eventType = wxEVT_NULL, bool active = true,
-                    int id = 0);
+                    int id = 0, Reason ActivationReason = Reason_Unknown);
 
     /**
         Returns @true if the application or window is being activated, @false otherwise.
     */
     bool GetActive() const;
+
+    /**
+        Allows to check if the window was activated by clicking it with the
+        mouse or in some other way.
+
+        This method is currently only implemented in wxMSW and returns @c
+        Reason_Mouse there if the window was activated by a mouse click and @c
+        Reason_Unknown if it was activated in any other way (e.g. from
+        keyboard or programmatically).
+
+        Under all the other platforms, @c Reason_Unknown is always returned.
+
+        @since 3.0
+    */
+    Reason GetActivationReason() const;
 };
 
 
@@ -3471,7 +3498,7 @@ public:
                 wxHelpEvent::Origin origin = Origin_Unknown);
 
     /**
-        Returns the origin of the help event which is one of the ::wxHelpEventOrigin
+        Returns the origin of the help event which is one of the wxHelpEvent::Origin
         values.
 
         The application may handle events generated using the keyboard or mouse
@@ -3887,7 +3914,8 @@ public:
 
     /**
         Sets the flags for this event.
-        The @a flags can be a combination of the ::wxNavigationKeyEventFlags values.
+        The @a flags can be a combination of the 
+        wxNavigationKeyEvent::wxNavigationKeyEventFlags values.
     */
     void SetFlags(long flags);