2008-09-12 16:57:41 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: property.h
|
|
|
|
// Purpose: interface of wxPGProperty
|
|
|
|
// Author: wxWidgets team
|
2008-10-06 11:14:06 -04:00
|
|
|
// RCS-ID: $Id$
|
2008-09-12 16:57:41 -04:00
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
@class wxPropertyGridInterface
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
Most of the shared property manipulation interface shared by wxPropertyGrid,
|
|
|
|
wxPropertyGridPage, and wxPropertyGridManager is defined in this class.
|
|
|
|
|
|
|
|
@remarks
|
2008-09-27 11:09:33 -04:00
|
|
|
- In separate wxPropertyGrid component this class was known as
|
|
|
|
wxPropertyContainerMethods.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-21 10:13:32 -04:00
|
|
|
- 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).
|
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@library{wxpropgrid}
|
|
|
|
@category{propgrid}
|
|
|
|
*/
|
|
|
|
class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/** Destructor */
|
|
|
|
virtual ~wxPropertyGridInterface() { }
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Appends property to the list. wxPropertyGrid assumes ownership of the
|
|
|
|
object. Becomes child of most recently added category.
|
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@remarks
|
|
|
|
- wxPropertyGrid takes the ownership of the property pointer.
|
2008-09-27 11:09:33 -04:00
|
|
|
- If appending a category with name identical to a category already in
|
|
|
|
the wxPropertyGrid, then newly created category is deleted, and most
|
|
|
|
recently added category (under which properties are appended) is set
|
|
|
|
to the one with same name. This allows easier adding of items to same
|
|
|
|
categories in multiple passes.
|
|
|
|
- Does not automatically redraw the control, so you may need to call
|
|
|
|
Refresh() when calling this function after control has been shown for
|
|
|
|
the first time.
|
2008-11-06 13:05:09 -05:00
|
|
|
- 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.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
wxPGProperty* Append( wxPGProperty* property );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Same as Append(), but appends under given parent property.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Name or pointer to parent property.
|
|
|
|
|
|
|
|
@param newProperty
|
|
|
|
Property to be added.
|
|
|
|
*/
|
|
|
|
wxPGProperty* AppendIn( wxPGPropArg id, wxPGProperty* newProperty );
|
|
|
|
|
|
|
|
/**
|
|
|
|
In order to add new items into a property with private children (for
|
2008-10-22 16:48:31 -04:00
|
|
|
instance, wxFlagsProperty), you need to call this method.
|
|
|
|
After populating has been finished, you need to call EndAddChildren().
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@see EndAddChildren()
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void BeginAddChildren( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Deletes all properties.
|
2008-11-06 13:05:09 -05:00
|
|
|
|
|
|
|
@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.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
virtual void Clear() = 0;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-11-06 13:05:09 -05:00
|
|
|
Clears current selection, if any.
|
|
|
|
|
|
|
|
@param validation
|
|
|
|
If set to @false, deselecting the property will always work,
|
|
|
|
even if its editor had invalid value in it.
|
2008-09-27 11:09:33 -04:00
|
|
|
|
2008-11-06 13:05:09 -05:00
|
|
|
@return Returns @true if successful or if there was no selection. May
|
|
|
|
fail if validation was enabled and active editor had invalid
|
|
|
|
value.
|
2008-09-27 11:09:33 -04:00
|
|
|
*/
|
2008-11-06 13:05:09 -05:00
|
|
|
bool ClearSelection( bool validation = false);
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Resets modified status of all properties.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void ClearModifiedStatus();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Collapses given category or property with children.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@return Returns @true if actually collapsed.
|
2008-11-06 13:05:09 -05:00
|
|
|
|
|
|
|
@remarks This function may deselect 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.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool Collapse( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Collapses all items that can be collapsed.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-11-06 13:05:09 -05:00
|
|
|
@remarks This functions clears selection. Validation failure option
|
|
|
|
wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
|
|
|
|
is cleared even if editor had invalid value.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
bool CollapseAll();
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Changes value of a property, as if by user. Use this instead of
|
|
|
|
SetPropertyValue() if you need the value to run through validation
|
|
|
|
process, and also send the property change event.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@return Returns @true if value was successfully changed.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Deletes a property.
|
2008-11-06 13:05:09 -05:00
|
|
|
|
|
|
|
@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.
|
2008-09-27 11:09:33 -04:00
|
|
|
*/
|
2008-09-12 16:57:41 -04:00
|
|
|
void DeleteProperty( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Disables a property.
|
|
|
|
*/
|
|
|
|
bool DisableProperty( wxPGPropArg id );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns @true if all property grid data changes have been committed. Usually
|
|
|
|
only returns @false if value in active editor has been invalidated by a
|
2008-09-12 16:57:41 -04:00
|
|
|
wxValidator.
|
|
|
|
*/
|
|
|
|
bool EditorValidate();
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Enables or disables property.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Name or pointer to a property.
|
|
|
|
@param enable
|
|
|
|
If @false, property is disabled instead.
|
|
|
|
*/
|
2008-09-12 16:57:41 -04:00
|
|
|
bool EnableProperty( wxPGPropArg id, bool enable = true );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Called after population of property with fixed children has finished.
|
|
|
|
|
|
|
|
@see BeginAddChildren()
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void EndAddChildren( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Expands given category or property with children.
|
|
|
|
|
|
|
|
@return Returns @true if actually expanded.
|
2008-11-06 13:05:09 -05:00
|
|
|
|
|
|
|
@remarks This function may deselect 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.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool Expand( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Expands all items that can be expanded.
|
2008-11-06 13:05:09 -05:00
|
|
|
|
|
|
|
@remarks This functions clears selection. Validation failure option
|
|
|
|
wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
|
|
|
|
is cleared even if editor had invalid value.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool ExpandAll( bool expand = true );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns id of first child of given property.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@remarks Does not return private children!
|
|
|
|
*/
|
|
|
|
wxPGProperty* GetFirstChild( wxPGPropArg id );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
//@{
|
2008-10-22 16:48:31 -04:00
|
|
|
/**
|
|
|
|
Returns iterator class instance.
|
2008-09-21 10:13:32 -04:00
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@param flags
|
2008-09-21 10:13:32 -04:00
|
|
|
See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
|
|
|
|
iteration over everything except private child properties.
|
2008-09-12 16:57:41 -04:00
|
|
|
@param firstProp
|
2008-10-22 16:48:31 -04:00
|
|
|
Property to start iteration from. If @NULL, then first child of root
|
2008-09-27 11:09:33 -04:00
|
|
|
is used.
|
2008-09-21 10:13:32 -04:00
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@beginWxPythonOnly
|
|
|
|
<b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
|
|
|
|
instead of * operator, use GetProperty() method.
|
|
|
|
@endWxPythonOnly
|
|
|
|
*/
|
|
|
|
wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT,
|
|
|
|
wxPGProperty* firstProp = NULL );
|
|
|
|
wxPropertyGridConstIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT,
|
|
|
|
wxPGProperty* firstProp = NULL ) const;
|
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Returns iterator class instance.
|
|
|
|
|
|
|
|
@param flags
|
|
|
|
See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
|
|
|
|
iteration over everything except private child properties.
|
2008-09-12 16:57:41 -04:00
|
|
|
@param startPos
|
2008-09-27 11:09:33 -04:00
|
|
|
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.
|
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@beginWxPythonOnly
|
2008-09-27 11:09:33 -04:00
|
|
|
<b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
|
|
|
|
instead of * operator, use GetProperty() method.
|
2008-10-22 16:48:31 -04:00
|
|
|
@endWxPythonOnly
|
2008-09-27 11:09:33 -04:00
|
|
|
*/
|
|
|
|
wxPropertyGridIterator GetIterator( int flags, int startPos );
|
|
|
|
wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
//@}
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns id of first item that matches given criteria.
|
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@param flags
|
2008-09-27 11:09:33 -04:00
|
|
|
See @ref propgrid_iterator_flags.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns id of property with given name (case-sensitive).
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-10-22 16:48:31 -04:00
|
|
|
wxPGProperty* GetProperty( const wxString& name ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Adds to 'targetArr' pointers to properties that have given flags 'flags' set.
|
|
|
|
However, if @a 'inverse' is set to @true, then only properties without
|
|
|
|
given flags are stored.
|
2008-09-27 11:09:33 -04:00
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@param targetArr
|
|
|
|
@todo docme
|
2008-09-12 16:57:41 -04:00
|
|
|
@param flags
|
2008-09-27 11:09:33 -04:00
|
|
|
Property flags to use.
|
2008-10-22 16:48:31 -04:00
|
|
|
@param inverse
|
|
|
|
@todo docme
|
2008-09-12 16:57:41 -04:00
|
|
|
@param iterFlags
|
2008-09-27 11:09:33 -04:00
|
|
|
Iterator flags to use. Default is everything expect private children.
|
|
|
|
See @ref propgrid_iterator_flags.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void GetPropertiesWithFlag( wxArrayPGProperty* targetArr,
|
|
|
|
wxPGProperty::FlagType flags,
|
|
|
|
bool inverse = false,
|
|
|
|
int iterFlags = (wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES) ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns value of given attribute. If none found, returns wxNullVariant.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxVariant GetPropertyAttribute( wxPGPropArg id, const wxString& attrName ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-11-03 12:02:04 -05:00
|
|
|
/**
|
|
|
|
Returns background colour of first cell of a property.
|
|
|
|
*/
|
|
|
|
wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns pointer of property's nearest parent category. If no category
|
2008-10-22 16:48:31 -04:00
|
|
|
found, returns @NULL.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPropertyCategory* GetPropertyCategory( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
/** Returns client data (void*) of a property. */
|
2008-09-27 11:09:33 -04:00
|
|
|
void* GetPropertyClientData( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns first property which label matches given string. @NULL if none
|
2008-09-27 11:09:33 -04:00
|
|
|
found. Note that this operation is very slow when compared to
|
|
|
|
GetPropertyByName().
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
wxPGProperty* GetPropertyByLabel( const wxString& label ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns property with given name. @NULL if none found.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
wxPGProperty* GetPropertyByName( const wxString& name ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns child property 'subname' of property 'name'. Same as
|
2008-09-12 16:57:41 -04:00
|
|
|
calling GetPropertyByName("name.subname"), albeit slightly faster.
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPGProperty* GetPropertyByName( const wxString& name,
|
|
|
|
const wxString& subname ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns property's editor.
|
|
|
|
*/
|
|
|
|
const wxPGEditor* GetPropertyEditor( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns help string associated with a property.
|
|
|
|
*/
|
|
|
|
wxString GetPropertyHelpString( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns property's custom value image (@NULL of none).
|
2008-09-27 11:09:33 -04:00
|
|
|
*/
|
|
|
|
wxBitmap* GetPropertyImage( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
/** Returns label of a property. */
|
2008-09-27 11:09:33 -04:00
|
|
|
const wxString& GetPropertyLabel( wxPGPropArg id );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's name, by which it is globally accessible. */
|
|
|
|
wxString GetPropertyName( wxPGProperty* property );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-11-03 12:02:04 -05:00
|
|
|
/**
|
|
|
|
Returns text colour of first cell of a property.
|
|
|
|
*/
|
|
|
|
wxColour GetPropertyTextColour( wxPGPropArg id ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns validator of a property as a reference, which you
|
2008-09-12 16:57:41 -04:00
|
|
|
can pass to any number of SetPropertyValidator.
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxValidator* GetPropertyValidator( wxPGPropArg id );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns property's value as wxVariant.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
If property value is unspecified, Null variant is returned.
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxVariant GetPropertyValue( wxPGPropArg id );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Return's property's value as wxArrayInt. */
|
|
|
|
wxArrayInt GetPropertyValueAsArrayInt( wxPGPropArg id ) const;
|
|
|
|
|
|
|
|
/** Returns property's value as wxArrayString. */
|
|
|
|
wxArrayString GetPropertyValueAsArrayString( wxPGPropArg id ) const;
|
|
|
|
|
|
|
|
/** Returns property's value as bool */
|
2008-09-12 16:57:41 -04:00
|
|
|
bool GetPropertyValueAsBool( wxPGPropArg id ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Return's property's value as wxDateTime. */
|
|
|
|
wxDateTime GetPropertyValueAsDateTime( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as double-precision floating point number. */
|
|
|
|
double GetPropertyValueAsDouble( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as integer */
|
|
|
|
int GetPropertyValueAsInt( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as integer */
|
|
|
|
long GetPropertyValueAsLong( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as native signed 64-bit integer. */
|
|
|
|
wxLongLong_t GetPropertyValueAsLongLong( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns property's value as wxString. If property does not
|
|
|
|
use string value type, then its value is converted using
|
|
|
|
wxPGProperty::GetValueAsString().
|
|
|
|
*/
|
|
|
|
wxString GetPropertyValueAsString( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as unsigned integer */
|
|
|
|
unsigned long GetPropertyValueAsULong( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns property's value as native unsigned 64-bit integer. */
|
|
|
|
wxULongLong_t GetPropertyValueAsULongLong( wxPGPropArg id ) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a wxVariant list containing wxVariant versions of all
|
2008-09-12 16:57:41 -04:00
|
|
|
property values. Order is not guaranteed.
|
2008-09-27 11:09:33 -04:00
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@param listname
|
|
|
|
@todo docme
|
|
|
|
@param baseparent
|
|
|
|
@todo docme
|
2008-09-12 16:57:41 -04:00
|
|
|
@param flags
|
2008-09-27 11:09:33 -04:00
|
|
|
Use wxPG_KEEP_STRUCTURE to retain category structure; each sub
|
|
|
|
category will be its own wxVariantList of wxVariant.
|
|
|
|
|
|
|
|
Use wxPG_INC_ATTRIBUTES to include property attributes as well.
|
|
|
|
Each attribute will be stored as list variant named
|
|
|
|
"@@<propname>@@attr."
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
wxVariant GetPropertyValues( const wxString& listname = wxEmptyString,
|
2008-10-22 16:48:31 -04:00
|
|
|
wxPGProperty* baseparent = NULL, long flags = 0 ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
/** Returns currently selected property. */
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPGProperty* GetSelection() const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Similar to GetIterator(), but instead returns wxPGVIterator instance,
|
2008-09-12 16:57:41 -04:00
|
|
|
which can be useful for forward-iterating through arbitrary property
|
|
|
|
containers.
|
|
|
|
|
|
|
|
@param flags
|
2008-09-21 10:13:32 -04:00
|
|
|
See @ref propgrid_iterator_flags.
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
<b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
|
|
|
|
instead of * operator, use GetProperty() method.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
virtual wxPGVIterator GetVIterator( int flags ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Hides or reveals a property.
|
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@param id
|
|
|
|
@todo docme
|
2008-09-12 16:57:41 -04:00
|
|
|
@param hide
|
2008-09-27 11:09:33 -04:00
|
|
|
If @true, hides property, otherwise reveals it.
|
2008-09-12 16:57:41 -04:00
|
|
|
@param flags
|
2008-09-27 11:09:33 -04:00
|
|
|
By default changes are applied recursively. Set this parameter
|
|
|
|
wxPG_DONT_RECURSE to prevent this.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool HideProperty( wxPGPropArg id, bool hide = true, int flags = wxPG_RECURSE );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Initializes *all* property types. Causes references to most object
|
2008-09-12 16:57:41 -04:00
|
|
|
files in the library, so calling this may cause significant increase
|
|
|
|
in executable size when linking with static library.
|
|
|
|
*/
|
|
|
|
static void InitAllTypeHandlers();
|
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
/**
|
|
|
|
Inserts property to the property container.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@param priorThis
|
2008-09-27 11:09:33 -04:00
|
|
|
New property is inserted just prior to this. Available only
|
|
|
|
in the first variant. There are two versions of this function
|
|
|
|
to allow this parameter to be either an id or name to
|
|
|
|
a property.
|
|
|
|
@param newProperty
|
|
|
|
Pointer to the inserted property. wxPropertyGrid will take
|
|
|
|
ownership of this object.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@return Returns newProperty.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@remarks
|
|
|
|
|
|
|
|
- wxPropertyGrid takes the ownership of the property pointer.
|
|
|
|
|
|
|
|
- While Append may be faster way to add items, make note that when
|
|
|
|
both types of data storage (categoric and
|
|
|
|
non-categoric) are active, Insert becomes even more slow. This is
|
|
|
|
especially true if current mode is non-categoric.
|
|
|
|
|
2008-11-06 13:05:09 -05:00
|
|
|
- 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.
|
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
Example of use:
|
|
|
|
|
|
|
|
@code
|
|
|
|
|
|
|
|
// append category
|
|
|
|
wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
// insert into category - using second variant
|
|
|
|
wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
|
|
|
|
|
|
|
|
// insert before to first item - using first variant
|
|
|
|
wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
|
|
|
|
|
|
|
|
@endcode
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPGProperty* Insert( wxPGPropArg priorThis, wxPGProperty* newProperty );
|
2008-10-22 16:48:31 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
Inserts property to the property container.
|
|
|
|
See the other overload for more details.
|
|
|
|
|
|
|
|
@param parent
|
|
|
|
New property is inserted under this category. Available only
|
|
|
|
in the second variant. There are two versions of this function
|
|
|
|
to allow this parameter to be either an id or name to
|
|
|
|
a property.
|
|
|
|
@param index
|
|
|
|
Index under category. Available only in the second variant.
|
|
|
|
If index is < 0, property is appended in category.
|
|
|
|
@param newProperty
|
|
|
|
Pointer to the inserted property. wxPropertyGrid will take
|
|
|
|
ownership of this object.
|
|
|
|
|
|
|
|
@return Returns newProperty.
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
wxPGProperty* Insert( wxPGPropArg parent, int index, wxPGProperty* newProperty );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns @true if property is a category. */
|
|
|
|
bool IsPropertyCategory( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Returns @true if property is enabled. */
|
|
|
|
bool IsPropertyEnabled( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns @true if given property is expanded. Naturally, always returns
|
2008-09-27 11:09:33 -04:00
|
|
|
@false for properties that cannot be expanded.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool IsPropertyExpanded( wxPGPropArg id ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns @true if property has been modified after value set or modify
|
|
|
|
flag clear by software.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
bool IsPropertyModified( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns @true if property is shown (ie. HideProperty() with @true not
|
2008-09-27 11:09:33 -04:00
|
|
|
called for it).
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
bool IsPropertyShown( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
2008-10-22 16:48:31 -04:00
|
|
|
Returns @true if property value is set to unspecified.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
bool IsPropertyValueUnspecified( wxPGPropArg id ) const;
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Disables (limit = @true) or enables (limit = @false) wxTextCtrl editor
|
|
|
|
of a property, if it is not the sole mean to edit the value.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void LimitPropertyEditing( wxPGPropArg id, bool limit = true );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Initializes additional property editors (SpinCtrl etc.). Causes
|
|
|
|
references to most object files in the library, so calling this may
|
|
|
|
cause significant increase in executable size when linking with static
|
|
|
|
library.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
static void RegisterAdditionalEditors();
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Replaces property with id with newly created one. For example,
|
2008-09-12 16:57:41 -04:00
|
|
|
this code replaces existing property named "Flags" with one that
|
|
|
|
will have different set of items:
|
2008-09-27 11:09:33 -04:00
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@code
|
|
|
|
pg->ReplaceProperty("Flags",
|
|
|
|
wxFlagsProperty("Flags", wxPG_LABEL, newItems))
|
|
|
|
@endcode
|
2008-09-27 11:09:33 -04:00
|
|
|
|
|
|
|
@see Insert()
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
wxPGProperty* ReplaceProperty( wxPGPropArg id, wxPGProperty* property );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
@anchor propgridinterface_editablestate_flags
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
Flags for wxPropertyGridInterface::SaveEditableState() and
|
|
|
|
wxPropertyGridInterface::RestoreEditableState().
|
|
|
|
*/
|
|
|
|
enum EditableStateFlags
|
|
|
|
{
|
|
|
|
/** Include selected property. */
|
|
|
|
SelectionState = 0x01,
|
|
|
|
/** Include expanded/collapsed property information. */
|
|
|
|
ExpandedState = 0x02,
|
|
|
|
/** Include scrolled position. */
|
|
|
|
ScrollPosState = 0x04,
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Include selected page information. Only applies to
|
|
|
|
wxPropertyGridManager. */
|
2008-09-12 16:57:41 -04:00
|
|
|
PageState = 0x08,
|
|
|
|
/** Include splitter position. Stored for each page. */
|
|
|
|
SplitterPosState = 0x10,
|
2008-10-04 06:59:06 -04:00
|
|
|
/** Include description box size.
|
|
|
|
Only applies to wxPropertyGridManager. */
|
|
|
|
DescBoxState = 0x20,
|
|
|
|
|
|
|
|
/**
|
|
|
|
Include all supported user editable state information.
|
|
|
|
This is usually the default value. */
|
|
|
|
AllStates = SelectionState |
|
|
|
|
ExpandedState |
|
|
|
|
ScrollPosState |
|
|
|
|
PageState |
|
|
|
|
SplitterPosState |
|
|
|
|
DescBoxState
|
2008-09-12 16:57:41 -04:00
|
|
|
};
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Restores user-editable state. See also wxPropertyGridInterface::SaveEditableState().
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@param src
|
|
|
|
String generated by SaveEditableState.
|
|
|
|
|
|
|
|
@param restoreStates
|
|
|
|
Which parts to restore from source string. See @ref propgridinterface_editablestate_flags
|
|
|
|
"list of editable state flags".
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@return Returns @false if there was problem reading the string.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@remarks If some parts of state (such as scrolled or splitter position)
|
|
|
|
fail to restore correctly, please make sure that you call this
|
|
|
|
function after wxPropertyGrid size has been set (this may
|
|
|
|
sometimes be tricky when sizers are used).
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool RestoreEditableState( const wxString& src,
|
|
|
|
int restoreStates = AllStates );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Used to acquire user-editable state (selected property, expanded
|
|
|
|
properties, scrolled position, splitter positions).
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@param includedStates
|
|
|
|
Which parts of state to include. See @ref propgridinterface_editablestate_flags
|
|
|
|
"list of editable state flags".
|
|
|
|
*/
|
|
|
|
wxString SaveEditableState( int includedStates = AllStates ) const;
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets strings listed in the choice dropdown of a wxBoolProperty.
|
|
|
|
|
|
|
|
Defaults are "True" and "False", so changing them to, say, "Yes" and
|
|
|
|
"No" may be useful in some less technical applications.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
static void SetBoolChoices( const wxString& trueChoice,
|
|
|
|
const wxString& falseChoice );
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets an attribute for this property.
|
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@param id
|
|
|
|
@todo docme
|
|
|
|
@param attrName
|
2008-09-27 11:09:33 -04:00
|
|
|
Text identifier of attribute. See @ref propgrid_property_attributes.
|
2008-09-12 16:57:41 -04:00
|
|
|
@param value
|
2008-09-27 11:09:33 -04:00
|
|
|
Value of attribute.
|
2008-09-12 16:57:41 -04:00
|
|
|
@param argFlags
|
2008-10-22 16:48:31 -04:00
|
|
|
Optional.
|
|
|
|
Use wxPG_RECURSE to set the attribute to child properties recursively.
|
2008-09-25 12:13:32 -04:00
|
|
|
|
|
|
|
@remarks Setting attribute's value to Null variant will simply remove it
|
2008-10-22 16:48:31 -04:00
|
|
|
from property's set of attributes.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyAttribute( wxPGPropArg id, const wxString& attrName,
|
|
|
|
wxVariant value, long argFlags = 0 );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets property attribute for all applicapple properties.
|
2008-09-21 11:42:08 -04:00
|
|
|
Be sure to use this method only after all properties have been
|
|
|
|
added to the grid.
|
|
|
|
*/
|
|
|
|
void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
|
|
|
|
|
2008-11-03 12:02:04 -05:00
|
|
|
/**
|
|
|
|
Sets background colour of a property.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Property name or pointer.
|
|
|
|
|
|
|
|
@param colour
|
|
|
|
New background colour.
|
|
|
|
|
|
|
|
@param recursively
|
|
|
|
If True, child properties are affected recursively. Property
|
|
|
|
categories are skipped if this flag is used.
|
|
|
|
*/
|
|
|
|
void SetPropertyBackgroundColour( wxPGPropArg id,
|
|
|
|
const wxColour& colour,
|
|
|
|
bool recursively = true );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets text, bitmap, and colours for given column's cell.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@remarks
|
2008-09-27 11:09:33 -04:00
|
|
|
- You can set label cell by using column 0.
|
2008-09-12 16:57:41 -04:00
|
|
|
- You can use wxPG_LABEL as text to use default text for column.
|
|
|
|
*/
|
|
|
|
void SetPropertyCell( wxPGPropArg id,
|
|
|
|
int column,
|
|
|
|
const wxString& text = wxEmptyString,
|
|
|
|
const wxBitmap& bitmap = wxNullBitmap,
|
|
|
|
const wxColour& fgCol = wxNullColour,
|
2008-09-27 11:09:33 -04:00
|
|
|
const wxColour& bgCol = wxNullColour );
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets client data (void*) of a property.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@remarks
|
|
|
|
This untyped client data has to be deleted manually.
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyClientData( wxPGPropArg id, void* clientData );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-11-03 12:02:04 -05:00
|
|
|
/**
|
|
|
|
Resets text and background colours of given property.
|
|
|
|
*/
|
|
|
|
void SetPropertyColoursToDefault( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets editor for a property.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-10-22 16:48:31 -04:00
|
|
|
@param id
|
|
|
|
@todo docme
|
2008-09-12 16:57:41 -04:00
|
|
|
@param editor
|
2008-09-27 11:09:33 -04:00
|
|
|
For builtin editors, use wxPGEditor_X, where X is builtin editor's
|
|
|
|
name (TextCtrl, Choice, etc. see wxPGEditor documentation for full
|
|
|
|
list).
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets editor control of a property. As editor argument, use
|
2008-09-12 16:57:41 -04:00
|
|
|
editor name string, such as "TextCtrl" or "Choice".
|
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyEditor( wxPGPropArg id, const wxString& editorName );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets label of a property.
|
2008-09-14 09:53:21 -04:00
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@remarks
|
2008-09-14 09:53:21 -04:00
|
|
|
- Properties under same parent may have same labels. However,
|
|
|
|
property names must still remain unique.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
|
|
|
|
|
2008-09-29 13:01:04 -04:00
|
|
|
/**
|
|
|
|
Sets name of a property.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Name or pointer of property which name to change.
|
|
|
|
|
|
|
|
@param newName
|
|
|
|
New name for property.
|
|
|
|
*/
|
|
|
|
void SetPropertyName( wxPGPropArg id, const wxString& newName );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets property (and, recursively, its children) to have read-only value.
|
|
|
|
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.
|
|
|
|
|
|
|
|
@param set
|
|
|
|
Use @true to enable read-only, @false to disable it.
|
2008-09-12 16:57:41 -04:00
|
|
|
|
|
|
|
@param flags
|
2008-09-27 11:09:33 -04:00
|
|
|
By default changes are applied recursively. Set this parameter
|
|
|
|
wxPG_DONT_RECURSE to prevent this.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyReadOnly( wxPGPropArg id, bool set = true,
|
|
|
|
int flags = wxPG_RECURSE );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets property's value to unspecified. If it has children (it may be
|
|
|
|
category), then the same thing is done to them.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void SetPropertyValueUnspecified( wxPGPropArg id );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets various property values from a list of wxVariants. If property with
|
|
|
|
name is missing from the grid, new property is created under given
|
|
|
|
default category (or root if omitted).
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyValues( const wxVariantList& list,
|
|
|
|
wxPGPropArg defaultCategory = wxNullProperty );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyValues( const wxVariant& list,
|
|
|
|
wxPGPropArg defaultCategory = wxNullProperty );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Associates the help string with property.
|
|
|
|
|
|
|
|
@remarks By default, text is shown either in the manager's "description"
|
|
|
|
text box or in the status bar. If extra window style
|
|
|
|
wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as
|
|
|
|
a tooltip.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyHelpString( wxPGPropArg id, const wxString& helpString );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Set wxBitmap in front of the value.
|
|
|
|
|
|
|
|
@remarks Bitmap will be scaled to a size returned by
|
|
|
|
wxPropertyGrid::GetImageSize();
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyImage( wxPGPropArg id, wxBitmap& bmp );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets max length of property's text.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
bool SetPropertyMaxLength( wxPGPropArg id, int maxLen );
|
|
|
|
|
2008-11-03 12:02:04 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets text colour of a property.
|
|
|
|
|
|
|
|
@param id
|
|
|
|
Property name or pointer.
|
|
|
|
|
|
|
|
@param colour
|
|
|
|
New background colour.
|
|
|
|
|
|
|
|
@param recursively
|
|
|
|
If True, child properties are affected recursively. Property
|
|
|
|
categories are skipped if this flag is used.
|
|
|
|
*/
|
|
|
|
void SetPropertyTextColour( wxPGPropArg id,
|
|
|
|
const wxColour& col,
|
|
|
|
bool recursively = true );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets validator of a property.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyValidator( wxPGPropArg id, const wxValidator& validator );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (integer) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, long value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (integer) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, int value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (floating point) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, double value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (bool) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, bool value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (string) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, const wxString& value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (wxArrayString) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, const wxArrayString& value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (wxDateTime) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, const wxDateTime& value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (wxObject*) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, wxObject* value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/** Sets value (wxObject&) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, wxObject& value );
|
|
|
|
|
|
|
|
/** Sets value (native 64-bit int) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, wxLongLong_t value );
|
|
|
|
|
|
|
|
/** Sets value (native 64-bit unsigned int) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, wxULongLong_t value );
|
|
|
|
|
|
|
|
/** Sets value (wxArrayInt&) of a property. */
|
|
|
|
void SetPropertyValue( wxPGPropArg id, const wxArrayInt& value );
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets value (wxString) of a property.
|
|
|
|
|
|
|
|
@remarks This method uses wxPGProperty::SetValueFromString(), which all
|
|
|
|
properties should implement. This means that there should not be
|
|
|
|
a type error, and instead the string is converted to property's
|
|
|
|
actual value type.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void SetPropertyValueString( wxPGPropArg id, const wxString& value );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Sets value (wxVariant&) of a property.
|
2008-09-21 10:13:32 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
@remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to
|
|
|
|
run through validation process and send property change event.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
2008-09-27 11:09:33 -04:00
|
|
|
void SetPropertyValue( wxPGPropArg id, wxVariant value );
|
2008-09-12 16:57:41 -04:00
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Adjusts how wxPropertyGrid behaves when invalid value is entered
|
2008-09-12 16:57:41 -04:00
|
|
|
in a property.
|
2008-09-27 11:09:33 -04:00
|
|
|
|
2008-09-12 16:57:41 -04:00
|
|
|
@param vfbFlags
|
2008-09-27 11:09:33 -04:00
|
|
|
See @ref propgrid_vfbflags for possible values.
|
2008-09-12 16:57:41 -04:00
|
|
|
*/
|
|
|
|
void SetValidationFailureBehavior( int vfbFlags );
|
|
|
|
|
2008-09-27 11:09:33 -04:00
|
|
|
/**
|
|
|
|
Returns editor pointer of editor with given name;
|
|
|
|
*/
|
2008-09-12 16:57:41 -04:00
|
|
|
static wxPGEditor* GetEditorByName( const wxString& editorName );
|
|
|
|
};
|
|
|
|
|