X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6cf5edea273b08316390683a17851a2437103da4..327ac3ec2a475305d569d3f3ba1927a5a61d8926:/interface/wx/propgrid/property.h diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index 762f6a37f1..e2bbb158ec 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -3,7 +3,7 @@ // Purpose: interface of wxPGProperty // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -130,6 +130,15 @@ */ #define wxPG_DIR_DIALOG_MESSAGE wxS("DialogMessage") +/** + wxArrayStringProperty's string delimiter character. If this is aquotation + mark or hyphen, then strings will be quoted instead (with given + character). + + Default delimiter is quotation mark. +*/ +#define wxPG_ARRAY_DELIMITER wxS("Delimiter") + /** Sets displayed date format for wxDateProperty. */ #define wxPG_DATE_FORMAT wxS("DateFormat") @@ -278,6 +287,8 @@ wxPG_PROP_USES_COMMON_VALUE = 0x00020000, @remarks This flag cannot be used with property iterators. + + @see wxPGProperty::SetAutoUnspecified() */ wxPG_PROP_AUTO_UNSPECIFIED = 0x00040000, @@ -474,7 +485,8 @@ wxPG_PROP_BEING_DELETED = 0x00200000 @subsection wxArrayStringProperty - Allows editing of a list of strings in wxTextCtrl and in a separate dialog. + Allows editing of a list of strings in wxTextCtrl and in a separate + dialog. Supports "Delimiter" attribute, which defaults to comma (','). @subsection wxDateProperty @@ -621,7 +633,7 @@ wxPG_PROP_BEING_DELETED = 0x00200000 @endcode Since wxPGProperty derives from wxObject, you can use standard - DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS macros. From the + wxDECLARE_DYNAMIC_CLASS and wxIMPLEMENT_DYNAMIC_CLASS macros. From the above example they were omitted for sake of simplicity, and besides, they are only really needed if you need to use wxRTTI with your property class. @@ -1131,9 +1143,14 @@ public: bool AreChildrenComponents() const; /** - Sets or clears given property flag. + Sets or clears given property flag. Mainly for internal use. - @see propgrid_propflags + @remarks Setting a property flag never has any side-effect, and is + intended almost exclusively for internal use. So, for + example, if you want to disable a property, call + Enable(false) instead of setting wxPG_PROP_DISABLED flag. + + @see HasFlag(), GetFlags() */ void ChangeFlag( wxPGPropertyFlags flag, bool set ); @@ -1152,6 +1169,17 @@ public: /** Deletes all child properties. */ void Empty(); + /** + Enables or disables the property. Disabled property usually appears + as having grey text. + + @param enable + If @false, property is disabled instead. + + @see wxPropertyGridInterface::EnableProperty() + */ + void Enable( bool enable = true ); + /** Composes text from values of child properties. */ @@ -1490,6 +1518,18 @@ public: */ void SetAttribute( const wxString& name, wxVariant value ); + /** + Set if user can change the property's value to unspecified by + modifying the value of the editor control (usually by clearing + it). Currently, this can work with following properties: + wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty. + + @param enable + Whether to enable or disable this behavior (it is disabled by + default). + */ + void SetAutoUnspecified( bool enable = true ); + /** Sets property's background colour. @@ -1561,16 +1601,10 @@ public: void SetDefaultValue( wxVariant& value ); /** - Sets given property flag. + Sets or clears given property flag, recursively. This function is + primarily intended for internal use. - @see propgrid_propflags - */ - void SetFlag( wxPGPropertyFlags flag ); - - /** - Sets or clears given property flag, recursively. - - @see propgrid_propflags + @see ChangeFlag() */ void SetFlagRecursively( wxPGPropertyFlags flag, bool set );