- // If the owner does not have any LayoutBase child properties, add them
- if( ! DevelHandle::DoesCustomPropertyExist( owner, Toolkit::LayoutBase::ChildProperty::WIDTH_SPECIFICATION ) )
+ // If the owner does not have any LayoutItem child properties, add them
+ if( ! DevelHandle::DoesCustomPropertyExist( owner, Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION ) )
// Deriving classes can override OnChildAdd() to add their own default properties
GenerateDefaultChildPropertyValues( owner );
}
// Deriving classes can override OnChildAdd() to add their own default properties
GenerateDefaultChildPropertyValues( owner );
}
Toolkit::ChildLayoutData::WRAP_CONTENT );
child.SetProperty( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION, Extents() );
}
Toolkit::ChildLayoutData::WRAP_CONTENT );
child.SetProperty( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION, Extents() );
}
MeasureSpec parentWidthMeasureSpec,
MeasureSpec parentHeightMeasureSpec )
{
auto childOwner = child->GetOwner();
MeasureSpec parentWidthMeasureSpec,
MeasureSpec parentHeightMeasureSpec )
{
auto childOwner = child->GetOwner();
- auto desiredWidth = childOwner.GetProperty<int>( Toolkit::LayoutBase::ChildProperty::WIDTH_SPECIFICATION );
- auto desiredHeight = childOwner.GetProperty<int>( Toolkit::LayoutBase::ChildProperty::HEIGHT_SPECIFICATION );
+ auto desiredWidth = childOwner.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION );
+ auto desiredHeight = childOwner.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION );
MeasureSpec parentWidthMeasureSpec, LayoutLength widthUsed,
MeasureSpec parentHeightMeasureSpec, LayoutLength heightUsed)
{
auto childOwner = child->GetOwner();
MeasureSpec parentWidthMeasureSpec, LayoutLength widthUsed,
MeasureSpec parentHeightMeasureSpec, LayoutLength heightUsed)
{
auto childOwner = child->GetOwner();
- auto desiredWidth = childOwner.GetProperty<int>( Toolkit::LayoutBase::ChildProperty::WIDTH_SPECIFICATION );
- auto desiredHeight = childOwner.GetProperty<int>( Toolkit::LayoutBase::ChildProperty::HEIGHT_SPECIFICATION );
+ auto desiredWidth = childOwner.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION );
+ auto desiredHeight = childOwner.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION );
auto desiredMargin = childOwner.GetProperty<Extents>( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION );
auto padding = GetPadding();
auto desiredMargin = childOwner.GetProperty<Extents>( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION );
auto padding = GetPadding();
if (childDimension == Toolkit::ChildLayoutData::MATCH_PARENT)
{
// Child wants to be our size... find out how big it should be
if (childDimension == Toolkit::ChildLayoutData::MATCH_PARENT)
{
// Child wants to be our size... find out how big it should be
resultMode = MeasureSpec::Mode::UNSPECIFIED;
}
else if (childDimension == Toolkit::ChildLayoutData::WRAP_CONTENT)
{
// Child wants to determine its own size.... find out how big
// it should be
resultMode = MeasureSpec::Mode::UNSPECIFIED;
}
else if (childDimension == Toolkit::ChildLayoutData::WRAP_CONTENT)
{
// Child wants to determine its own size.... find out how big
// it should be
Toolkit::Control control = Toolkit::Control::DownCast( child );
if( control ) // Can only support adding Controls, not Actors to layout
Toolkit::Control control = Toolkit::Control::DownCast( child );
if( control ) // Can only support adding Controls, not Actors to layout
- // If the child doesn't already have a layout, then create a LayoutBase for it.
- childLayout = LayoutBase::New( control );
+ // If the child doesn't already have a layout, then create a LayoutItem for it.
+ childLayout = LayoutItem::New( control );
childLayout->SetAnimateLayout( IsLayoutAnimated() ); // @todo this essentially forces animation inheritance. Bad?
auto desiredSize = control.GetNaturalSize();
childControlDataImpl.SetLayout( *childLayout.Get() );
// HBoxLayout will apply default layout data for this object
childLayout->SetAnimateLayout( IsLayoutAnimated() ); // @todo this essentially forces animation inheritance. Bad?
auto desiredSize = control.GetNaturalSize();
childControlDataImpl.SetLayout( *childLayout.Get() );
// HBoxLayout will apply default layout data for this object
- child.SetProperty( Toolkit::LayoutBase::ChildProperty::WIDTH_SPECIFICATION, LayoutLength::IntType( desiredSize.width ) );
- child.SetProperty( Toolkit::LayoutBase::ChildProperty::HEIGHT_SPECIFICATION, LayoutLength::IntType( desiredSize.height ) );
+ child.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, LayoutLength::IntType( desiredSize.width ) );
+ child.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, LayoutLength::IntType( desiredSize.height ) );