X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e607eac25c66866c3ad05313eb65510dd31ab557..b09857ae000a60704207d63290be937584805fb0:/interface/wx/propgrid/propgridiface.h diff --git a/interface/wx/propgrid/propgridiface.h b/interface/wx/propgrid/propgridiface.h index 2b1cb12d27..98585bf42e 100644 --- a/interface/wx/propgrid/propgridiface.h +++ b/interface/wx/propgrid/propgridiface.h @@ -3,7 +3,7 @@ // Purpose: interface of wxPGProperty // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------- @@ -135,16 +135,26 @@ public: bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); /** - Deletes a property. + Removes and deletes a property and any children. - @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. + @param id + Pointer or name of a property. + + @remarks If you delete a property in a wxPropertyGrid event + handler, the actual deletion is postponed until the next + idle event. + + 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. */ void DeleteProperty( wxPGPropArg id ); /** Disables a property. + + @see EnableProperty(), wxPGProperty::Enable() */ bool DisableProperty( wxPGPropArg id ); @@ -156,12 +166,15 @@ public: bool EditorValidate(); /** - Enables or disables property. + Enables or disables property. Disabled property usually appears as + having grey text. @param id Name or pointer to a property. @param enable If @false, property is disabled instead. + + @see wxPGProperty::Enable() */ bool EnableProperty( wxPGPropArg id, bool enable = true ); @@ -192,6 +205,13 @@ public: */ bool ExpandAll( bool expand = true ); + /** + Returns auto-resize proportion of the given column. + + @see SetColumnProportion() + */ + int GetColumnProportion( unsigned int column ) const; + /** Returns id of first child of given property. @@ -210,10 +230,6 @@ public: Property to start iteration from. If @NULL, then first child of root is used. - @beginWxPythonOnly - wxPython Note: Instead of ++ operator, use Next() method, and - instead of * operator, use GetProperty() method. - @endWxPythonOnly */ wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ); @@ -233,10 +249,6 @@ public: from the first property from the top, and wxBOTTOM means that the iteration will instead begin from bottommost valid item. - @beginWxPythonOnly - wxPython Note: Instead of ++ operator, use Next() method, and - instead of * operator, use GetProperty() method. - @endWxPythonOnly */ wxPropertyGridIterator GetIterator( int flags, int startPos ); wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const; @@ -255,7 +267,7 @@ public: If there is no property with such name, @NULL pointer is returned. @remarks Properties which have non-category, non-root parent - can not be accessed globally by their name. Instead, use + cannot be accessed globally by their name. Instead, use "." instead of "". */ wxPGProperty* GetProperty( const wxString& name ) const; @@ -311,7 +323,7 @@ public: If there is no property with such name, @NULL pointer is returned. @remarks Properties which have non-category, non-root parent - can not be accessed globally by their name. Instead, use + cannot be accessed globally by their name. Instead, use "." instead of "". */ wxPGProperty* GetPropertyByName( const wxString& name ) const; @@ -441,9 +453,6 @@ public: @param flags See @ref propgrid_iterator_flags. - - wxPython Note: Instead of ++ operator, use Next() method, and - instead of * operator, use GetProperty() method. */ virtual wxPGVIterator GetVIterator( int flags ) const; @@ -582,12 +591,17 @@ public: static void RegisterAdditionalEditors(); /** - Removes and returns a property. + Removes a property. Does not delete the property object, but + instead returns it. @param id Pointer or name of a property. @remarks Removed property cannot have any children. + + Also, if you remove property in a wxPropertyGrid event + handler, the actual removal is postponed until the next + idle event. */ wxPGProperty* RemoveProperty( wxPGPropArg id ); @@ -678,6 +692,20 @@ public: static void SetBoolChoices( const wxString& trueChoice, const wxString& falseChoice ); + /** + Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER + window style needs to be used to indicate that columns are auto- + resizable. + + @returns Returns @false on failure. + + @remarks You should call this for individual pages of + wxPropertyGridManager (if used). + + @see GetColumnProportion() + */ + bool SetColumnProportion( unsigned int column, int proportion ); + /** Sets an attribute for this property. @@ -794,9 +822,6 @@ public: In other words, user cannot change the value in the editor, but they can still copy it. - @remarks This is mainly for use with textctrl editor. Only some other - editors fully support it. - @param id Property name or pointer. @@ -806,6 +831,9 @@ public: @param flags By default changes are applied recursively. Set this parameter wxPG_DONT_RECURSE to prevent this. + + @remarks This is mainly for use with textctrl editor. Only some other + editors fully support it. */ void SetPropertyReadOnly( wxPGPropArg id, bool set = true, int flags = wxPG_RECURSE );