X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/258ccb95f58bd7a9f4d56db50b3f948b76911706..18e8e19b946931e18ed45fee2137257212c79fa3:/interface/wx/propgrid/propgridiface.h?ds=sidebyside
diff --git a/interface/wx/propgrid/propgridiface.h b/interface/wx/propgrid/propgridiface.h
index ca75a14c98..32932af310 100644
--- a/interface/wx/propgrid/propgridiface.h
+++ b/interface/wx/propgrid/propgridiface.h
@@ -16,6 +16,10 @@
@remarks
- In separate wxPropertyGrid component this class was known as wxPropertyContainerMethods.
+ - wxPropertyGridInterface's property operation member functions all accept
+ a special wxPGPropArg id argument, using which you can refer to properties
+ either by their pointer (for performance) or by their name (for conveniency).
+
@library{wxpropgrid}
@category{propgrid}
*/
@@ -26,16 +30,6 @@ public:
/** Destructor */
virtual ~wxPropertyGridInterface() { }
- /** Adds choice to a property that can accept one.
- @remarks
- - If you need to make sure that you modify only the set of choices of
- a single property (and not also choices of other properties with initially
- identical set), call wxPropertyGrid::SetPropertyChoicesPrivate.
- - This usually only works for wxEnumProperty and derivatives (wxFlagsProperty
- can get accept new items but its items may not get updated).
- */
- void AddPropertyChoice( wxPGPropArg id, const wxString& label, int value = wxPG_INVALID_VALUE );
-
/** Appends property to the list. wxPropertyGrid assumes ownership of the object.
Becomes child of most recently added category.
@remarks
@@ -106,14 +100,6 @@ public:
/** Deletes a property by id. If category is deleted, all children are automatically deleted as well. */
void DeleteProperty( wxPGPropArg id );
- /** Deletes choice from a property.
-
- If selected item is deleted, then the value is set to unspecified.
-
- See AddPropertyChoice for more details.
- */
- void DeletePropertyChoice( wxPGPropArg id, int index );
-
/** Disables property. */
bool DisableProperty( wxPGPropArg id ) { return EnableProperty(id,false); }
@@ -165,15 +151,21 @@ public:
//@{
/** Returns iterator class instance.
+
@param flags
- See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
- iteration over everything except private child properties.
+ See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
+ iteration over everything except private child properties.
+
@param firstProp
- Property to start iteration from. If NULL, then first child of root is used.
+ Property to start iteration from. If NULL, then first child of root is used.
+
@param startPos
- Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start from
- the first property from the top, and wxBOTTOM means that the iteration will
- instead begin from bottommost valid item.
+ Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start from
+ the first property from the top, and wxBOTTOM means that the iteration will
+ instead begin from bottommost valid item.
+
+ wxPython Note: Instead of ++ operator, use Next() method, and instead of
+ * operator, use GetProperty() method.
*/
wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL )
{
@@ -286,12 +278,6 @@ public:
*/
wxPGProperty* GetPropertyByName( const wxString& name, const wxString& subname ) const;
- /** Returns writable reference to property's list of choices (and relevant
- values). If property does not have any choices, will return reference
- to an invalid set of choices that will return false on IsOk call.
- */
- wxPGChoices& GetPropertyChoices( wxPGPropArg id );
-
/** Returns property's editor. */
const wxPGEditor* GetPropertyEditor( wxPGPropArg id ) const
{
@@ -350,8 +336,7 @@ public:
return p->GetValidator();
}
- /** Returns value as wxVariant. To get wxObject pointer from it,
- you will have to use WX_PG_VARIANT_TO_WXOBJECT(VARIANT,CLASSNAME) macro.
+ /** Returns value as wxVariant.
If property value is unspecified, Null variant is returned.
*/
@@ -370,7 +355,6 @@ public:
int GetPropertyValueAsInt( wxPGPropArg id ) const { return (int)GetPropertyValueAsLong(id); }
bool GetPropertyValueAsBool( wxPGPropArg id ) const;
double GetPropertyValueAsDouble( wxPGPropArg id ) const;
- wxObject* GetPropertyValueAsWxObjectPtr( wxPGPropArg id ) const;
void* GetPropertyValueAsVoidPtr( wxPGPropArg id ) const;
wxArrayString GetPropertyValueAsArrayString( wxPGPropArg id ) const
@@ -454,7 +438,10 @@ public:
containers.
@param flags
- See @ref propgrid_iterator_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;
@@ -536,12 +523,6 @@ public:
return p->IsCategory();
}
- /** Inserts choice to a property that can accept one.
-
- See AddPropertyChoice for more details.
- */
- void InsertPropertyChoice( wxPGPropArg id, const wxString& label, int index, int value = wxPG_INVALID_VALUE );
-
/** Returns true if property is enabled. */
bool IsPropertyEnabled( wxPGPropArg id ) const
{
@@ -678,12 +659,21 @@ public:
Value of attribute.
@param argFlags
Optional. Use wxPG_RECURSE to set the attribute to child properties recursively.
+
+ @remarks Setting attribute's value to Null variant will simply remove it
+ from property's set of attributes.
*/
void SetPropertyAttribute( wxPGPropArg id, const wxString& attrName, wxVariant value, long argFlags = 0 )
{
DoSetPropertyAttribute(id,attrName,value,argFlags);
}
+ /** Sets property attribute for all applicapple properties.
+ Be sure to use this method only after all properties have been
+ added to the grid.
+ */
+ void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
+
/** Sets attributes from a wxPGAttributeStorage.
*/
void SetPropertyAttributes( wxPGPropArg id, const wxPGAttributeStorage& attributes )
@@ -709,27 +699,6 @@ public:
p->SetCell( column, new wxPGCell(text, bitmap, fgCol, bgCol) );
}
- /** Set choices of a property to specified set of labels and values.
-
- @remarks
- This operation clears the property value.
- */
- void SetPropertyChoices( wxPGPropArg id, wxPGChoices& choices)
- {
- wxPG_PROP_ARG_CALL_PROLOG()
- p->SetChoices(choices);
- }
-
-
- /** If property's set of choices is shared, then calling this method converts
- it to private.
- */
- void SetPropertyChoicesExclusive( wxPGPropArg id )
- {
- wxPG_PROP_ARG_CALL_PROLOG()
- p->SetChoicesExclusive();
- }
-
/** Sets client data (void*) of a property.
@remarks
This untyped client data has to be deleted manually.
@@ -966,7 +935,7 @@ public:
void SetPropertyValueString( wxPGPropArg id, const wxString& value );
/** Sets value (wxVariant&) of a property.
-
+
@remarks
Use wxPropertyGrid::ChangePropertyValue() instead if you need to run through
validation process and send property change event.
@@ -987,7 +956,7 @@ public:
wxPGProperty* GetPropertyByNameA( const wxString& name ) const;
static wxPGEditor* GetEditorByName( const wxString& editorName );
-
+
virtual void RefreshProperty( wxPGProperty* p ) = 0;
};