wxPGProperty* wxPropertyGridInterface::Append( wxPGProperty* property )
{
wxPGProperty* retp = m_pState->DoAppend(property);
-
+
wxPropertyGrid* grid = m_pState->GetGrid();
if ( grid )
grid->RefreshGrid();
wxPG_PROP_ARG_CALL_PROLOG()
wxPropertyGridPageState* state = p->GetParentState();
- wxPropertyGrid* grid = state->GetGrid();
-
- if ( grid->GetState() == state )
- grid->DoSelectProperty(NULL, wxPG_SEL_DELETING|wxPG_SEL_NOVALIDATE);
state->DoDelete( p, true );
wxNullProperty);
wxPropertyGridPageState* state = p->GetParentState();
- wxPropertyGrid* grid = state->GetGrid();
-
- if ( grid->GetState() == state )
- {
- grid->DoSelectProperty(NULL,
- wxPG_SEL_DELETING|wxPG_SEL_NOVALIDATE);
- }
state->DoDelete( p, false );
// wxPropertyGridInterface property operations
// -----------------------------------------------------------------------
+wxPGProperty* wxPropertyGridInterface::GetSelection() const
+{
+ return m_pState->GetSelection();
+}
+
+// -----------------------------------------------------------------------
+
bool wxPropertyGridInterface::ClearSelection( bool validation )
{
- int flags = wxPG_SEL_DONT_SEND_EVENT;
+ bool res = DoClearSelection(validation, wxPG_SEL_DONT_SEND_EVENT);
+ wxPropertyGrid* pg = GetPropertyGrid();
+ if ( pg )
+ pg->Refresh();
+ return res;
+}
+
+// -----------------------------------------------------------------------
+
+bool wxPropertyGridInterface::DoClearSelection( bool validation,
+ int selFlags )
+{
if ( !validation )
- flags |= wxPG_SEL_NOVALIDATE;
+ selFlags |= wxPG_SEL_NOVALIDATE;
wxPropertyGridPageState* state = m_pState;
{
wxPropertyGrid* pg = state->GetGrid();
if ( pg->GetState() == state )
- return pg->DoSelectProperty(NULL, flags);
+ return pg->DoSelectProperty(NULL, selFlags);
else
- state->SetSelection(NULL);
+ state->DoSetSelection(NULL);
}
return true;
if ( includedStates & ExpandedState )
{
wxArrayPGProperty ptrs;
- wxPropertyGridConstIterator it =
+ wxPropertyGridConstIterator it =
wxPropertyGridConstIterator( pageState,
wxPG_ITERATE_ALL_PARENTS_RECURSIVELY|wxPG_ITERATE_HIDDEN,
wxNullProperty );
{
if ( restoreStates & ExpandedState )
{
- wxPropertyGridIterator it =
+ wxPropertyGridIterator it =
wxPropertyGridIterator( pageState,
wxPG_ITERATE_ALL,
wxNullProperty );
else
{
if ( values[0].length() )
- pageState->SetSelection(GetPropertyByName(value));
+ pageState->DoSetSelection(GetPropertyByName(value));
else
pageState->DoClearSelection();
}