return false; // Accessibility value change action is not handled by default
}
-void Control::NegotiateSize( Vector2 allocatedSize, ActorSizeContainer& container )
+void Control::NegotiateSize( const Vector2& allocatedSize, ActorSizeContainer& container )
{
Vector2 size;
allocatedSize.x, allocatedSize.y,
size.x, size.y );
- Relayout( size, container );
+ // Avoids relayout again when OnSizeSet callback arrives as a function of us or deriving class calling SetSize()
+ mImpl->mInsideRelayout = true;
+ Self().SetSize( size );
+ // Only relayout controls which requested to be relaid out.
+ OnRelayout( size, container );
+ mImpl->mInsideRelayout = false;
}
void Control::SetAsKeyboardFocusGroup(bool isFocusGroup)
}
}
-void Control::Relayout( Actor actor, Vector2 size, ActorSizeContainer& container )
+void Control::Relayout( Actor actor, const Vector2& size, ActorSizeContainer& container )
{
if ( actor )
{
{
}
-void Control::OnRelaidOut( Vector2 size, ActorSizeContainer& container )
+void Control::OnRelayout( const Vector2& size, ActorSizeContainer& container )
{
unsigned int numChildren = Self().GetChildCount();
}
}
-void Control::Relayout(Vector2 size, ActorSizeContainer& container)
-{
- // Avoids relayout again when OnSizeSet callback arrives.
- mImpl->mInsideRelayout = true;
- Self().SetSize( size );
- // @todo this really needs to be at the end of method but not sure why the scope used to be only the SetSize, needs to be cleaned up in size negotiation rework
- mImpl->mInsideRelayout = false;
-
- // Only relayout controls which requested to be relaid out.
- OnRelaidOut( size, container );
-}
-
} // namespace Internal
} // namespace Toolkit