wxPropertyGridInterface docs cleanup and fixes, removed some rarely needed member functions with simple workarounds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -820,7 +820,7 @@ void FormMain::OnMove( wxMoveEvent& event )
|
||||
|
||||
id = m_pPropGridManager->GetPropertyByName( wxT("Position") );
|
||||
if ( id )
|
||||
m_pPropGridManager->SetPropertyValue( id, wxPoint(x,y) );
|
||||
m_pPropGridManager->SetPropertyValue( id, WXVARIANT(wxPoint(x,y)) );
|
||||
|
||||
// Should always call event.Skip() in frame's MoveEvent handler
|
||||
event.Skip();
|
||||
@@ -858,7 +858,7 @@ void FormMain::OnResize( wxSizeEvent& event )
|
||||
|
||||
id = m_pPropGridManager->GetPropertyByName ( wxT("Size") );
|
||||
if ( id )
|
||||
m_pPropGridManager->SetPropertyValue( id, wxSize(w,h) );
|
||||
m_pPropGridManager->SetPropertyValue( id, WXVARIANT(wxSize(w,h)) );
|
||||
|
||||
// Should always call event.Skip() in frame's SizeEvent handler
|
||||
event.Skip();
|
||||
@@ -1567,7 +1567,6 @@ void FormMain::PopulateWithExamples ()
|
||||
pg->Append( new wxSizeProperty( wxT("SizeProperty"), wxT("Size"), GetSize() ) );
|
||||
pg->Append( new wxPointProperty( wxT("PointProperty"), wxT("Position"), GetPosition() ) );
|
||||
|
||||
|
||||
// UInt samples
|
||||
pg->Append( new wxUIntProperty( wxT("UIntProperty"), wxPG_LABEL, wxULongLong(wxULL(0xFEEEFEEEFEEE))));
|
||||
pg->SetPropertyAttribute( wxT("UIntProperty"), wxPG_UINT_PREFIX, wxPG_PREFIX_NONE );
|
||||
@@ -2267,8 +2266,8 @@ void FormMain::OnInsertPropClick( wxCommandEvent& WXUNUSED(event) )
|
||||
GenerateUniquePropertyLabel( m_pPropGridManager, propLabel );
|
||||
|
||||
m_pPropGridManager->Insert( m_pPropGridManager->GetPropertyParent(id),
|
||||
m_pPropGridManager->GetPropertyIndex(id),
|
||||
new wxStringProperty(propLabel) );
|
||||
id->GetIndexInParent(),
|
||||
new wxStringProperty(propLabel) );
|
||||
|
||||
}
|
||||
|
||||
@@ -2334,9 +2333,8 @@ void FormMain::OnInsertCatClick( wxCommandEvent& WXUNUSED(event) )
|
||||
GenerateUniquePropertyLabel( m_pPropGridManager, propLabel );
|
||||
|
||||
m_pPropGridManager->Insert( m_pPropGridManager->GetPropertyParent(id),
|
||||
m_pPropGridManager->GetPropertyIndex(id),
|
||||
new wxPropertyCategory (propLabel) );
|
||||
|
||||
id->GetIndexInParent(),
|
||||
new wxPropertyCategory (propLabel) );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
@@ -759,8 +759,8 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
wxColour emptyCol;
|
||||
pgman->SetPropertyValue(wxT("ColourProperty"),emptyCol);
|
||||
pgman->SetPropertyValue(wxT("ColourProperty"),(wxObject*)wxBLACK);
|
||||
pgman->SetPropertyValue(wxT("Size"),wxSize(150,150));
|
||||
pgman->SetPropertyValue(wxT("Position"),wxPoint(150,150));
|
||||
pgman->SetPropertyValue(wxT("Size"),WXVARIANT(wxSize(150,150)));
|
||||
pgman->SetPropertyValue(wxT("Position"),WXVARIANT(wxPoint(150,150)));
|
||||
pgman->SetPropertyValue(wxT("MultiChoiceProperty"),test_arrint_1);
|
||||
#if wxUSE_DATETIME
|
||||
pgman->SetPropertyValue(wxT("DateProperty"),dt1);
|
||||
@@ -785,9 +785,9 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
col << pgman->GetPropertyValue(wxT("ColourProperty"));
|
||||
if ( col != *wxBLACK )
|
||||
RT_FAILURE();
|
||||
if ( pg->GetPropertyValueAsSize(wxT("Size")) != wxSize(150,150) )
|
||||
if ( wxSizeRefFromVariant(pg->GetPropertyValue(wxT("Size"))) != wxSize(150,150) )
|
||||
RT_FAILURE();
|
||||
if ( pg->GetPropertyValueAsPoint(wxT("Position")) != wxPoint(150,150) )
|
||||
if ( wxPointRefFromVariant(pg->GetPropertyValue(wxT("Position"))) != wxPoint(150,150) )
|
||||
RT_FAILURE();
|
||||
if ( !(pg->GetPropertyValueAsArrayInt(wxT("MultiChoiceProperty")) == test_arrint_1) )
|
||||
RT_FAILURE();
|
||||
@@ -807,8 +807,8 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
pg->SetPropertyValue(wxT("EnumProperty"),80);
|
||||
pg->SetPropertyValue(wxT("ArrayStringProperty"),test_arrstr_2);
|
||||
pg->SetPropertyValue(wxT("ColourProperty"),(wxObject*)wxWHITE);
|
||||
pg->SetPropertyValue(wxT("Size"),wxSize(300,300));
|
||||
pg->SetPropertyValue(wxT("Position"),wxPoint(300,300));
|
||||
pg->SetPropertyValue(wxT("Size"),WXVARIANT(wxSize(300,300)));
|
||||
pg->SetPropertyValue(wxT("Position"),WXVARIANT(wxPoint(300,300)));
|
||||
pg->SetPropertyValue(wxT("MultiChoiceProperty"),test_arrint_2);
|
||||
#if wxUSE_DATETIME
|
||||
pg->SetPropertyValue(wxT("DateProperty"),dt2);
|
||||
@@ -833,9 +833,9 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
||||
col << pgman->GetPropertyValue(wxT("ColourProperty"));
|
||||
if ( col != *wxWHITE )
|
||||
RT_FAILURE();
|
||||
if ( pgman->GetPropertyValueAsSize(wxT("Size")) != wxSize(300,300) )
|
||||
if ( wxSizeRefFromVariant(pgman->GetPropertyValue(wxT("Size"))) != wxSize(300,300) )
|
||||
RT_FAILURE();
|
||||
if ( pgman->GetPropertyValueAsPoint(wxT("Position")) != wxPoint(300,300) )
|
||||
if ( wxPointRefFromVariant(pgman->GetPropertyValue(wxT("Position"))) != wxPoint(300,300) )
|
||||
RT_FAILURE();
|
||||
if ( !(pgman->GetPropertyValueAsArrayInt(wxT("MultiChoiceProperty")) == test_arrint_2) )
|
||||
RT_FAILURE();
|
||||
|
Reference in New Issue
Block a user