@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}
*/
/** 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
/** 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); }
//@{
/** 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.
+
+ <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and instead of
+ * operator, use GetProperty() method.
*/
wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL )
{
*/
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
{
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.
*/
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
containers.
@param flags
- See @ref propgrid_iterator_flags.
+ See @ref propgrid_iterator_flags.
+
+ <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and instead of
+ * operator, use GetProperty() method.
*/
virtual wxPGVIterator GetVIterator( int flags ) const;
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
{
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 )
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.
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.
wxPGProperty* GetPropertyByNameA( const wxString& name ) const;
static wxPGEditor* GetEditorByName( const wxString& editorName );
-
+
virtual void RefreshProperty( wxPGProperty* p ) = 0;
};