Reworked the way child properties can be added to a property that has not yet been added to a grid or page; AddChild() deprecated, now use AddPrivateChild() instead. For public children, new member functions AppendChild() and InsertChild() should do the job.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -477,10 +477,9 @@ wxVectorProperty::wxVectorProperty( const wxString& label,
|
||||
: wxPGProperty(label,name)
|
||||
{
|
||||
SetValue( WXVARIANT(value) );
|
||||
SetParentalType(wxPG_PROP_AGGREGATE);
|
||||
AddChild( new wxFloatProperty(wxT("X"),wxPG_LABEL,value.x) );
|
||||
AddChild( new wxFloatProperty(wxT("Y"),wxPG_LABEL,value.y) );
|
||||
AddChild( new wxFloatProperty(wxT("Z"),wxPG_LABEL,value.z) );
|
||||
AddPrivateChild( new wxFloatProperty(wxT("X"),wxPG_LABEL,value.x) );
|
||||
AddPrivateChild( new wxFloatProperty(wxT("Y"),wxPG_LABEL,value.y) );
|
||||
AddPrivateChild( new wxFloatProperty(wxT("Z"),wxPG_LABEL,value.z) );
|
||||
}
|
||||
|
||||
wxVectorProperty::~wxVectorProperty() { }
|
||||
@@ -526,10 +525,9 @@ wxTriangleProperty::wxTriangleProperty( const wxString& label,
|
||||
: wxPGProperty(label,name)
|
||||
{
|
||||
SetValue( WXVARIANT(value) );
|
||||
SetParentalType(wxPG_PROP_AGGREGATE);
|
||||
AddChild( new wxVectorProperty(wxT("A"),wxPG_LABEL,value.a) );
|
||||
AddChild( new wxVectorProperty(wxT("B"),wxPG_LABEL,value.b) );
|
||||
AddChild( new wxVectorProperty(wxT("C"),wxPG_LABEL,value.c) );
|
||||
AddPrivateChild( new wxVectorProperty(wxT("A"),wxPG_LABEL,value.a) );
|
||||
AddPrivateChild( new wxVectorProperty(wxT("B"),wxPG_LABEL,value.b) );
|
||||
AddPrivateChild( new wxVectorProperty(wxT("C"),wxPG_LABEL,value.c) );
|
||||
}
|
||||
|
||||
wxTriangleProperty::~wxTriangleProperty() { }
|
||||
@@ -1727,11 +1725,12 @@ void FormMain::PopulateWithExamples ()
|
||||
// For testing purposes, combine two methods of adding children
|
||||
//
|
||||
|
||||
// AddChild() requires that we call this
|
||||
pid->SetParentalType(wxPG_PROP_MISC_PARENT);
|
||||
|
||||
pid->AddChild( new wxStringProperty(wxT("Latest Release"), wxPG_LABEL, wxT("2.8.8")));
|
||||
pid->AddChild( new wxBoolProperty(wxT("Win API"), wxPG_LABEL, true) );
|
||||
pid->AppendChild( new wxStringProperty(wxT("Latest Release"),
|
||||
wxPG_LABEL,
|
||||
wxT("2.8.10")));
|
||||
pid->AppendChild( new wxBoolProperty(wxT("Win API"),
|
||||
wxPG_LABEL,
|
||||
true) );
|
||||
|
||||
pg->Append( pid );
|
||||
|
||||
|
Reference in New Issue
Block a user