]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/propgrid/propgrid.h
fix few doxygen warnings
[wxWidgets.git] / interface / wx / propgrid / propgrid.h
index 8949055a0afbd4c71ec29eced7dfb2f060f9dfd3..16c785c43d6780767deacf6a21e6876dccc04891 100644 (file)
@@ -271,6 +271,27 @@ enum wxPG_KEYBOARD_ACTIONS
 /** @}
 */
 
 /** @}
 */
 
+/** This callback function is used for sorting properties.
+
+    Call wxPropertyGrid::SetSortFunction() to set it.
+
+    Sort function should return a value greater than 0 if position of p1 is
+    after p2. So, for instance, when comparing property names, you can use
+    following implementation:
+
+        @code
+            int MyPropertySortFunction(wxPropertyGrid* propGrid,
+                                       wxPGProperty* p1,
+                                       wxPGProperty* p2)
+            {
+                return p1->GetBaseName().compare( p2->GetBaseName() );
+            }
+        @endcode
+*/
+typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid,
+                                wxPGProperty* p1,
+                                wxPGProperty* p2);
+
 // -----------------------------------------------------------------------
 
 /**
 // -----------------------------------------------------------------------
 
 /**
@@ -451,6 +472,10 @@ public:
     /**
         Enables or disables (shows/hides) categories according to parameter
         enable.
     /**
         Enables or disables (shows/hides) categories according to parameter
         enable.
+
+        @remarks This functions deselects selected property, if any. Validation
+                failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+                selection is cleared even if editor had invalid value.
     */
     bool EnableCategories( bool enable );
 
     */
     bool EnableCategories( bool enable );
 
@@ -617,6 +642,13 @@ public:
     */
     wxColour GetSelectionForegroundColour() const;
 
     */
     wxColour GetSelectionForegroundColour() const;
 
+    /**
+        Returns the property sort function (default is @NULL).
+
+        @see SetSortFunction
+    */
+    wxPGSortCallback GetSortFunction() const;
+
     /**
         Returns current splitter x position.
     */
     /**
         Returns current splitter x position.
     */
@@ -655,20 +687,9 @@ public:
     bool IsFrozen() const;
 
     /**
     bool IsFrozen() const;
 
     /**
-        When creating custom property editors, connect required editor events to
-        this function. For instance:
-
-        @code
-            control->Connect(control->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
-                            wxEventHandler(wxPropertyGrid::OnCustomEditorEvent),
-                            NULL, propgrid);
-        @endcode
-
-        @remarks You should never need to call this function directly!
-
-        @see wxPGEditor::CreateControls(), wxEvtHandler::Connect()
+        Refreshes any active editor control.
     */
     */
-    void OnCustomEditorEvent( wxEvent &event );
+    void RefreshEditor();
 
     /**
         Redraws given property.
 
     /**
         Redraws given property.
@@ -779,6 +800,33 @@ public:
     */
     void SetSelectionTextColour(const wxColour& col);
 
     */
     void SetSelectionTextColour(const wxColour& col);
 
+
+    /**
+        Sets the property sorting function.
+
+        @param sortFunction
+            The sorting function to be used. It should return a value greater
+            than 0 if position of p1 is after p2. So, for instance, when
+            comparing property names, you can use following implementation:
+
+            @code
+                int MyPropertySortFunction(wxPropertyGrid* propGrid,
+                                           wxPGProperty* p1,
+                                           wxPGProperty* p2)
+                {
+                    return p1->GetBaseName().compare( p2->GetBaseName() );
+                }
+            @endcode
+
+        @remarks
+            Default property sort function sorts properties by their labels
+            (case-insensitively).
+
+        @see GetSortFunction, wxPropertyGridInterface::Sort,
+             wxPropertyGridInterface::SortChildren
+    */
+    void SetSortFunction( wxPGSortCallback sortFunction );
+
     /**
         Sets x coordinate of the splitter.
 
     /**
         Sets x coordinate of the splitter.
 
@@ -808,16 +856,6 @@ public:
         Shows an brief error message that is related to a property.
     */
     void ShowPropertyError( wxPGPropArg id, const wxString& msg );
         Shows an brief error message that is related to a property.
     */
     void ShowPropertyError( wxPGPropArg id, const wxString& msg );
-
-    /**
-        Sorts all items at all levels (except private children).
-    */
-    void Sort();
-
-    /**
-        Sorts children of a property.
-    */
-    void SortChildren( wxPGPropArg id );
 };
 
 
 };
 
 
@@ -848,9 +886,6 @@ public:
     */
     bool CanVeto() const;
 
     */
     bool CanVeto() const;
 
-    /** Copyer. */
-    virtual wxEvent* Clone() const;
-
     /**
         Returns highest level non-category, non-root parent of property for
         which event occurred. Useful when you have nested properties with
     /**
         Returns highest level non-category, non-root parent of property for
         which event occurred. Useful when you have nested properties with