// Created: 2008-08-24
// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
return iface->GetPropertyByNameA(*m_ptr.stringName);
else if ( m_flags & IsCharPtr )
return iface->GetPropertyByNameA(m_ptr.charName);
-#if wxUSE_WCHAR_T
else if ( m_flags & IsWCharPtr )
return iface->GetPropertyByNameA(m_ptr.wcharName);
-#endif
return NULL;
}
state->DoDelete( p, false );
- // Mark the property as 'unattached'
- p->m_parentState = NULL;
- p->m_parent = NULL;
-
RefreshGrid(state);
return p;
bool wxPropertyGridInterface::ClearSelection( bool validation )
{
bool res = DoClearSelection(validation, wxPG_SEL_DONT_SEND_EVENT);
- GetPropertyGrid()->Refresh();
+ wxPropertyGrid* pg = GetPropertyGrid();
+ if ( pg )
+ pg->Refresh();
return res;
}
return false;
// If active, Set active Editor.
- if ( grid->GetState() == state && p == grid->GetSelection() )
+ if ( grid && grid->GetState() == state && p == grid->GetSelection() )
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
}
else
return false;
// If active, Disable as active Editor.
- if ( grid->GetState() == state && p == grid->GetSelection() )
+ if ( grid && grid->GetState() == state && p == grid->GetSelection() )
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
}
- state->DoEnableProperty(p, enable);
+ p->DoEnable(enable);
RefreshProperty( p );
if ( !page ) break;
page->DoGetRoot()->SetFlagRecursively(wxPG_PROP_MODIFIED, false);
+ page->m_anyModified = false;
pageIndex++;
}
GetPropertyGrid()->RefreshEditor();
}
+bool wxPropertyGridInterface::SetColumnProportion( unsigned int column,
+ int proportion )
+{
+ wxCHECK(m_pState, false);
+ wxPropertyGrid* pg = m_pState->GetGrid();
+ wxCHECK(pg, false);
+ wxCHECK(pg->HasFlag(wxPG_SPLITTER_AUTO_CENTER), false);
+ m_pState->DoSetColumnProportion(column, proportion);
+ return true;
+}
+
// -----------------------------------------------------------------------
// wxPropertyGridInterface property value setting and getting
// -----------------------------------------------------------------------
{
wxPropertyGrid* pg = GetPropertyGrid();
- pg->DoClearSelection();
-
unsigned int pageIndex = 0;
for (;;)
page->DoSort(flags);
pageIndex++;
}
+
+ // Fix positions of any open editor controls
+ if ( pg )
+ pg->CorrectEditorWidgetPosY();
}
// -----------------------------------------------------------------------
void
wxPropertyGridInterface::SetPropertyBackgroundColour( wxPGPropArg id,
const wxColour& colour,
- bool recursively )
+ int flags )
{
wxPG_PROP_ARG_CALL_PROLOG()
- p->SetBackgroundColour( colour, recursively );
- RefreshProperty( p );
+ p->SetBackgroundColour(colour, flags);
+ RefreshProperty(p);
}
// -----------------------------------------------------------------------
void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id,
const wxColour& colour,
- bool recursively )
+ int flags )
{
wxPG_PROP_ARG_CALL_PROLOG()
- p->SetTextColour( colour, recursively );
- RefreshProperty( p );
+ p->SetTextColour(colour, flags);
+ RefreshProperty(p);
}
// -----------------------------------------------------------------------