]> git.saurik.com Git - wxWidgets.git/commitdiff
fix the signature of the documented functions and document some (relatively) new...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 20 Mar 2008 22:32:46 +0000 (22:32 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 20 Mar 2008 22:32:46 +0000 (22:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/accel.h
interface/animate.h

index 263dc02be64db2bdc7de14883b518880857c0c1e..761ac864a6a9ad7b453376d5c2bac7ff8dad9a66 100644 (file)
@@ -42,11 +42,6 @@ enum wxAcceleratorEntryFlags
 class wxAcceleratorEntry
 {
 public:
-    /**
-        Default ctor.
-    */
-    wxAcceleratorEntry();
-
     /**
         Constructor.
 
@@ -56,9 +51,17 @@ public:
         @param keyCode
             The keycode to be detected. See @ref page_keycodes for a full list of keycodes.
         @param cmd
-            The menu or control command identifier.
+            The menu or control command identifier (ID).
+        @param item
+            The menu item associated with this accelerator.
+    */
+    wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
+                       wxMenuItem *item = NULL);
+
+    /**
+        Copy ctor.
     */
-    wxAcceleratorEntry(int flags, int keyCode, int cmd);
+    wxAcceleratorEntry(const wxAcceleratorEntry& entry);
 
     /**
         Returns the command identifier for the accelerator table entry.
@@ -75,6 +78,11 @@ public:
     */
     int GetKeyCode() const;
 
+    /**
+        Returns the menu item associated with this accelerator entry.
+    */
+    wxMenuItem *GetMenuItem() const;
+
     /**
         Sets the accelerator entry parameters.
 
@@ -84,10 +92,39 @@ public:
         @param keyCode
             The keycode to be detected. See @ref page_keycodes for a full list of keycodes.
         @param cmd
-            The menu or control command identifier.
+            The menu or control command identifier (ID).
+        @param item
+            The menu item associated with this accelerator.
+    */
+    void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL);
 
+    /**
+        Returns @true if this object is correctly initialized.
     */
-    void Set(int flags, int keyCode, int cmd);
+    bool IsOk() const;
+
+    /**
+        Returns a wxString for this accelerator.
+        This function formats it using the @c "flags-keycode" format
+        where @c flags maybe a hyphen-separed list of @c "shift|alt|ctrl".
+    */
+    wxString ToString() const;
+
+    /**
+        Parses the given string and sets the accelerator accordingly.
+
+        @param str
+            Should be a string in the form "flags-keycode"
+
+        @returns @true if the given string correctly initialized this object
+                 (i.e. if IsOk() returns true after this call)
+    */
+    bool FromString(const wxString& str);
+
+
+    wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry);
+    bool operator==(const wxAcceleratorEntry& entry) const;
+    bool operator!=(const wxAcceleratorEntry& entry) const;
 };
 
 
@@ -144,7 +181,7 @@ public:
         @param entries
             The array of entries.
     */
-    wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
+    wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
 
     /**
         Loads the accelerator table from a Windows resource (Windows only).
@@ -164,14 +201,6 @@ public:
         Returns @true if the accelerator table is valid.
     */
     bool IsOk() const;
-
-    /**
-        Assignment operator, using @ref overview_refcount "reference counting".
-
-        @param accel
-            Accelerator table to assign.
-    */
-    wxAcceleratorTable operator =(const wxAcceleratorTable& accel);
 };
 
 
index ba94909798a2c970188f30fd391cd7d6be68a9a5..83f5731c74e241e4d8aa887f18f269224c99a7f3 100644 (file)
@@ -62,7 +62,7 @@ public:
         all the parameters.
     */
     wxAnimationCtrl(wxWindow* parent, wxWindowID id,
-                    const wxAnimation& anim,
+                    const wxAnimation& anim = wxNullAnimation,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = wxAC_DEFAULT_STYLE,
@@ -94,7 +94,7 @@ public:
                  creation failed.
     */
     bool Create(wxWindow* parent, wxWindowID id,
-                const wxAnimation& anim,
+                const wxAnimation& anim = wxNullAnimation,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxAC_DEFAULT_STYLE,
@@ -187,7 +187,9 @@ public:
 class wxAnimation : public wxGDIObject
 {
 public:
-    wxAnimation();
+    /**
+        Copy ctor.
+    */
     wxAnimation(const wxAnimation& anim);
 
     /**
@@ -266,7 +268,7 @@ public:
     /**
         Assignment operator, using @ref overview_refcount "reference counting".
     */
-    wxAnimation operator =(const wxAnimation& brush);
+    wxAnimation& operator =(const wxAnimation& brush);
 };