]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgrid.h
use renderer for drawing the item background on ports other than GTK2 and Mac too...
[wxWidgets.git] / include / wx / propgrid / propgrid.h
index 3796b332d3dd98f5c889eafea10d87b2186909f2..1c2d8de3f2bef6f9c4d5e7a14892b5fd83ad5fe6 100644 (file)
@@ -418,13 +418,10 @@ enum wxPG_KEYBOARD_ACTIONS
     wxPG_ACTION_EXPAND_PROPERTY,
     wxPG_ACTION_COLLAPSE_PROPERTY,
     wxPG_ACTION_CANCEL_EDIT,
-    wxPG_ACTION_CUT,
-    wxPG_ACTION_COPY,
-    wxPG_ACTION_PASTE,
     wxPG_ACTION_PRESS_BUTTON,  // Causes editor button (if any) to be pressed 
     wxPG_ACTION_MAX
 };
-
 /** @}
 */
 
@@ -491,8 +488,8 @@ enum wxPG_KEYBOARD_ACTIONS
 #define wxPG_FL_SPLITTER_PRE_SET            0x00400000
 // Validation failed. Clear on modify event.
 #define wxPG_FL_VALIDATION_FAILED           0x00800000
-// Set if selected is fully painted (ie. both image and text)
-//#define wxPG_FL_SELECTED_IS_FULL_PAINT      0x01000000
+// Auto sort is enabled (for categorized mode)
+#define wxPG_FL_CATMODE_AUTO_SORT           0x01000000
 // Set after page has been inserted to manager
 #define wxPG_MAN_FL_PAGE_INSERTED           0x02000000
 // Active editor control is abnormally large
@@ -785,9 +782,9 @@ public:
     /**
         Returns number of columns currently on grid.
     */
-    int GetColumnCount() const
+    unsigned int GetColumnCount() const
     {
-        return m_pState->m_colWidths.size();
+        return (unsigned int) m_pState->m_colWidths.size();
     }
 
     /** Returns colour of empty space below properties. */
@@ -838,7 +835,7 @@ public:
         editor is activate and string edited by user represents valid,
         uncommitted property value.
     */
-    wxVariant GetPendingEditedValue();
+    wxVariant GetUncommittedPropertyValue();
 
     /** Returns cell background colour of a property. */
     wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
@@ -1088,7 +1085,7 @@ public:
     */
     unsigned int GetCommonValueCount() const
     {
-        return m_commonValues.size();
+        return (unsigned int) m_commonValues.size();
     }
 
     /** Returns label of given common value.
@@ -1218,11 +1215,25 @@ public:
     // Mostly useful for page switching.
     void SwitchState( wxPropertyGridPageState* pNewState );
 
-    /** Pass this function to Connect calls in propertyclass::CreateEditor.
+    /**
+        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()
     */
-    void OnCustomEditorEvent( wxCommandEvent &event );
+    void OnCustomEditorEvent( wxEvent &event );
 
     long GetInternalFlags() const { return m_iFlags; }
+    bool HasInternalFlag( long flag ) const
+        { return (m_iFlags & flag) ? true : false; }
     void SetInternalFlag( long flag ) { m_iFlags |= flag; }
     void ClearInternalFlag( long flag ) { m_iFlags &= ~(flag); }
     void IncFrozen() { m_frozen++; }
@@ -1357,7 +1368,6 @@ protected:
                                     wxVariant& pendingValue,
                                     int flags = SendEvtChanging );
 
-#ifndef DOXYGEN
 public:
 
     // Control font changer helper.
@@ -1644,7 +1654,6 @@ protected:
     void OnMouseDoubleClick( wxMouseEvent &event );
     void OnMouseUp( wxMouseEvent &event );
     void OnKey( wxKeyEvent &event );
-    void OnKeyUp( wxKeyEvent &event );
     void OnResize( wxSizeEvent &event );
 
     // event handlers
@@ -1653,9 +1662,7 @@ protected:
     bool HandleMouseRightClick( int x, unsigned int y, wxMouseEvent &event );
     bool HandleMouseDoubleClick( int x, unsigned int y, wxMouseEvent &event );
     bool HandleMouseUp( int x, unsigned int y, wxMouseEvent &event );
-    void HandleKeyEvent( wxKeyEvent &event );
-    // Handle TAB and ESCAPE in control
-    bool HandleChildKey( wxKeyEvent& event );
+    void HandleKeyEvent( wxKeyEvent &event, bool fromChild );
 
     void OnMouseEntry( wxMouseEvent &event );
 
@@ -1672,7 +1679,6 @@ protected:
     void OnMouseMoveChild( wxMouseEvent &event );
     void OnMouseUpChild( wxMouseEvent &event );
     void OnChildKeyDown( wxKeyEvent &event );
-    void OnChildKeyUp( wxKeyEvent &event );
 
     void OnCaptureChange( wxMouseCaptureChangedEvent &event );
 
@@ -1752,6 +1758,9 @@ protected:
 
     void ImprovedClientToScreen( int* px, int* py );
 
+    // Returns True if editor control has focus
+    bool IsEditorFocused() const;
+
     // Called by focus event handlers. newFocused is the window that becomes
     // focused.
     void HandleFocusChange( wxWindow* newFocused );
@@ -1818,9 +1827,6 @@ private:
 
     bool ButtonTriggerKeyTest( int action, wxKeyEvent& event );
 
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
-private:
     DECLARE_EVENT_TABLE()
 #endif // #ifndef SWIG
 };
@@ -1848,7 +1854,7 @@ inline int wxPGProperty::GetDisplayedCommonValueCount() const
     {
         wxPropertyGrid* pg = GetGrid();
         if ( pg )
-            return pg->GetCommonValueCount();
+            return (int) pg->GetCommonValueCount();
     }
     return 0;
 }
@@ -2180,12 +2186,6 @@ protected:
 //    #undef const wxString&
 #endif
 
-// Doxygen special
-#ifdef DOXYGEN
-    #include "wx/propgrid/editor.h"
-    #include "wx/propgrid/manager.h"
-#endif
-
 // -----------------------------------------------------------------------
 
 #endif