]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridiface.h
use buffered streams to reduce the number of TCP packets used per IPC command from...
[wxWidgets.git] / include / wx / propgrid / propgridiface.h
index a43aa0201abd47d7bd26941d0ef49a9fb33de3fb..3e4f83eea57bb4ed51dd2a630b7a8de0a6b3418b 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     2008-08-24
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
@@ -206,11 +206,7 @@ public:
 
     /** Resets modified status of all properties.
     */
-    void ClearModifiedStatus()
-    {
-        SetPropertyModifiedStatus(m_pState->m_properties, false);
-        m_pState->m_anyModified = false;
-    }
+    void ClearModifiedStatus();
 
     /** Collapses given category or property with children.
         Returns true if actually collapses.
@@ -234,15 +230,6 @@ public:
     */
     bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue );
 
-    /** Resets value of a property to its default. */
-    bool ClearPropertyValue( wxPGPropArg id )
-    {
-        wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
-        p->SetValue(p->GetDefaultValue());
-        RefreshProperty(p);
-        return true;
-    }
-
     /**
         Deletes a property by id. If category is deleted, all children are
         automatically deleted as well.
@@ -279,16 +266,6 @@ public:
     */
     bool ExpandAll( bool expand = true );
 
-    /** Returns list of expanded properties.
-    */
-    wxArrayPGProperty GetExpandedProperties() const
-    {
-        wxArrayPGProperty array;
-        GetPropertiesWithFlag(&array, wxPG_PROP_COLLAPSED, true,
-            wxPG_ITERATE_ALL_PARENTS_RECURSIVELY|wxPG_ITERATE_HIDDEN);
-        return array;
-    }
-
     /** Returns id of first child of given property.
         @remarks
         Does not return sub-properties!
@@ -540,6 +517,7 @@ public:
         return value.GetArrayString();
     }
 
+#if wxUSE_LONGLONG_NATIVE
     wxLongLong_t GetPropertyValueAsLongLong( wxPGPropArg id ) const
     {
         wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL_WFALLBACK("wxLongLong",
@@ -557,6 +535,7 @@ public:
         ull << value;
         return ull.GetValue();
     }
+#endif
 
     wxArrayInt GetPropertyValueAsArrayInt( wxPGPropArg id ) const
     {
@@ -796,6 +775,9 @@ public:
         PageState        = 0x08,
         /** Include splitter position. Stored for each page. */
         SplitterPosState = 0x10,
+        /** Include description box size.
+            Only applies to wxPropertyGridManager. */
+        DescBoxState     = 0x20,
 
         /**
             Include all supported user editable state information.
@@ -804,7 +786,8 @@ public:
                            ExpandedState |
                            ScrollPosState |
                            PageState |
-                           SplitterPosState
+                           SplitterPosState |
+                           DescBoxState
     };
 
     /**
@@ -850,16 +833,6 @@ public:
     static void SetBoolChoices( const wxString& trueChoice,
                                 const wxString& falseChoice );
 
-    /** Sets or clears flag(s) of all properties in given array.
-        @param flags
-        Property flags to set or clear.
-        @param inverse
-        Set to true if you want to clear flag instead of setting them.
-    */
-    void SetPropertiesFlag( const wxArrayPGProperty& srcArr,
-                            wxPGProperty::FlagType flags,
-                            bool inverse = false );
-
     /** Sets an attribute for this property.
         @param name
             Text identifier of attribute. See @ref propgrid_property_attributes.
@@ -883,15 +856,6 @@ public:
     */
     void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
 
-    /** Sets attributes from a wxPGAttributeStorage.
-    */
-    void SetPropertyAttributes( wxPGPropArg id,
-                                const wxPGAttributeStorage& attributes )
-    {
-        wxPG_PROP_ARG_CALL_PROLOG()
-        p->SetAttributes(attributes);
-    }
-
     /** Sets text, bitmap, and colours for given column's cell.
 
         @remarks
@@ -951,12 +915,19 @@ public:
     */
     void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
 
-    /** Set modified status of a property and all its children.
+    /**
+        Sets name of a property.
+
+        @param id
+            Name or pointer of property which name to change.
+
+        @param newName
+            New name for property.
     */
-    void SetPropertyModifiedStatus( wxPGPropArg id, bool modified )
+    void SetPropertyName( wxPGPropArg id, const wxString& newName )
     {
         wxPG_PROP_ARG_CALL_PROLOG()
-        p->SetModifiedStatus(modified);
+        m_pState->DoSetPropertyName( p, newName );
     }
 
     /**
@@ -1077,7 +1048,13 @@ public:
         wxVariant v(value);
         SetPropVal( id, v );
     }
-    void SetPropertyValue( wxPGPropArg id, const wxChar* value )
+#if wxUSE_WCHAR_T
+    void SetPropertyValue( wxPGPropArg id, const wchar_t* value )
+    {
+        SetPropertyValueString( id, wxString(value) );
+    }
+#endif
+    void SetPropertyValue( wxPGPropArg id, const char* value )
     {
         SetPropertyValueString( id, wxString(value) );
     }
@@ -1116,6 +1093,7 @@ public:
         SetPropVal( id, v );
     }
 
+#if wxUSE_LONGLONG_NATIVE
     /** Sets value (wxLongLong&) of a property.
     */
     void SetPropertyValue( wxPGPropArg id, wxLongLong_t value )
@@ -1130,6 +1108,8 @@ public:
         wxVariant v = WXVARIANT(wxULongLong(value));
         SetPropVal( id, v );
     }
+#endif
+
     /** Sets value (wxArrayInt&) of a property.
     */
     void SetPropertyValue( wxPGPropArg id, const wxArrayInt& value )
@@ -1421,6 +1401,27 @@ public:
 
 protected:
 
+    /**
+        In derived class, implement to set editable state component with
+        given name to given value.
+    */
+    virtual bool SetEditableStateItem( const wxString& name, wxVariant value )
+    {
+        wxUnusedVar(name);
+        wxUnusedVar(value);
+        return false;
+    }
+
+    /**
+        In derived class, implement to return editable state component with
+        given name.
+    */
+    virtual wxVariant GetEditableStateItem( const wxString& name ) const
+    {
+        wxUnusedVar(name);
+        return wxNullVariant;
+    }
+
     // Returns page state data for given (sub) page (-1 means current page).
     virtual wxPropertyGridPageState* GetPageState( int pageIndex ) const
     {