X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8812c6e0e780fb2dae99bc352c5061f58793e14..b7341fe06f10dbe562f077c9a5ed9ea7afa9195a:/interface/wx/propgrid/property.h?ds=sidebyside diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index c78af7a893..087010636b 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -46,6 +46,11 @@ */ #define wxPG_ATTR_INLINE_HELP wxS("InlineHelp") +/** Universal, wxArrayString. Set to enable auto-completion in any + wxTextCtrl-based property editor. +*/ +#define wxPG_ATTR_AUTOCOMPLETE wxS("AutoComplete") + /** wxBoolProperty specific, int, default 0. When 1 sets bool property to use checkbox instead of choice. */ @@ -115,7 +120,8 @@ #define wxPG_DATE_FORMAT wxS("DateFormat") /** Sets wxDatePickerCtrl window style used with wxDateProperty. Default - is wxDP_DEFAULT | wxDP_SHOWCENTURY. + is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE will enable + better unspecified value support in the editor. */ #define wxPG_DATE_PICKER_STYLE wxS("PickerStyle") @@ -192,6 +198,9 @@ Simple string property. wxPG_STRING_PASSWORD attribute may be used to echo value as asterisks and use wxTE_PASSWORD for wxTextCtrl. + wxPG_ATTR_AUTOCOMPLETE attribute may be used to enable auto-completion + (use a wxArrayString value), and is also supported by any property that + happens to use a wxTextCtrl-based editor. @remarks wxStringProperty has a special trait: if it has value of "", and also has child properties, then its displayed @@ -310,6 +319,7 @@ string wxDateTime::Format uses (altough default is recommended as it is locale-dependant), and wxPG_DATE_PICKER_STYLE allows changing window style given to DatePickerCtrl (default is wxDP_DEFAULT|wxDP_SHOWCENTURY). + Using wxDP_ALLOWNONE will enable better unspecified value support. @subsection wxEditEnumProperty @@ -1271,12 +1281,6 @@ public: */ bool SetChoices( wxPGChoices& choices ); - /** - If property has choices and they are not yet exclusive, new such copy - of them will be created. - */ - void SetChoicesExclusive(); - /** Sets client data (void*) of a property. @@ -1375,10 +1379,11 @@ public: Pointer to list variant that contains child values. Used to indicate which children should be marked as modified. Usually you just use @NULL. @param flags - Use wxPG_SETVAL_REFRESH_EDITOR to update editor control, if it - was selected. + wxPG_SETVAL_REFRESH_EDITOR is set by default, to refresh editor + and redraw properties. */ - void SetValue( wxVariant value, wxVariant* pList = NULL, int flags = 0 ); + void SetValue( wxVariant value, wxVariant* pList = NULL, + int flags = wxPG_SETVAL_REFRESH_EDITOR ); /** Set wxBitmap in front of the value. This bitmap may be ignored @@ -1423,7 +1428,15 @@ public: @class wxPGChoices Helper class for managing choices of wxPropertyGrid properties. - Each entry can have label, value, bitmap, text colour, and background colour. + Each entry can have label, value, bitmap, text colour, and background + colour. + + wxPGChoices uses reference counting, similar to other wxWidgets classes. + This means that assignment operator and copy constructor only copy the + reference and not the actual data. Use Copy() member function to create a + real copy. + + @remarks If you do not specify value for entry, index is used. @library{wxpropgrid} @category{propgrid} @@ -1438,7 +1451,10 @@ public: */ wxPGChoices(); - /** Copy constructor. */ + /** + Copy constructor, uses reference counting. To create a real copy, + use Copy() member function instead. + */ wxPGChoices( const wxPGChoices& a ); /** Constructor. */ @@ -1479,7 +1495,8 @@ public: wxPGChoiceEntry& AddAsSorted( const wxString& label, int value = wxPG_INVALID_VALUE ); /** - Assigns data from another set of choices. + Assigns choices data, using reference counting. To create a real copy, + use Copy() member function instead. */ void Assign( const wxPGChoices& a ); @@ -1493,6 +1510,11 @@ public: */ void Clear(); + /** + Returns a real copy of the choices. + */ + wxPGChoices Copy() const; + /** Returns labe of item. */ @@ -1580,7 +1602,7 @@ public: /** Creates exclusive copy of current choices. */ - void SetExclusive(); + void AllocExclusive(); /** Returns array of choice labels.