Added multiple selection feature to wxPropertyGrid (enabled by setting wxPG_EX_MULTIPLE_SELECTION style)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-08-17 18:36:00 +00:00
parent 17a5460272
commit fc72fab6c6
15 changed files with 663 additions and 197 deletions

View File

@@ -591,10 +591,23 @@ public:
}
#endif
/** Returns currently selected property. */
wxPGProperty* GetSelection() const
/**
Returns currently selected property. NULL if none.
@remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
member function returns the focused property, that is the
one which can have active editor.
*/
wxPGProperty* GetSelection() const;
/**
Returns list of currently selected properties.
@remarks wxArrayPGProperty should be compatible with std::vector API.
*/
const wxArrayPGProperty& GetSelectedProperties() const
{
return m_pState->GetSelection();
return m_pState->m_selection;
}
#ifndef SWIG
@@ -724,10 +737,19 @@ public:
return ( (p->GetFlags() & wxPG_PROP_MODIFIED) ? true : false );
}
/**
Returns true if property is selected.
*/
bool IsPropertySelected( wxPGPropArg id ) const
{
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
return m_pState->DoIsPropertySelected(p);
}
/**
Returns true if property is shown (ie hideproperty with true not
called for it).
*/
*/
bool IsPropertyShown( wxPGPropArg id ) const
{
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
@@ -1269,6 +1291,9 @@ public:
protected:
bool DoClearSelection( bool validation = false,
int selFlags = 0 );
/**
In derived class, implement to set editable state component with
given name to given value.