Quick fix of Popup after removing PropagateRelayoutFlags()
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / size-negotiation-controls.h
index d0a8a93..2f3ac40 100644 (file)
@@ -34,7 +34,7 @@ method derived from Actor when passing back controls to be negotiated using the
 
 <h3>Initialization</h3>
 Size negotiation is enabled on controls by default. If a control is desired to not have size negotiation enabled then simply pass in the
-NO_SIZE_NEGOTIATION flag into the Control constructor. This will then call SetRelayoutEnabled( false ) on the base class.
+DISABLE_SIZE_NEGOTIATION flag into the Control constructor.
 
 The other step to perform is to set default resize policies for width and height.
 
@@ -74,24 +74,10 @@ A table view is added to the popup to specify layout. It will fill to the width
 mPopupLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
 mPopupLayout.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
 @endcode
-Override the OnRelayout method to position and resize the buttons. The trick to this is that the buttons do not know they are part of a popup and are
-about to be resized so could already have had their sizes negotiated. The call to PropagateRelayoutFlags on the button will ensure that it and all
-its child dependents are ready for a new size negotiation pass. The container.Add call will add the button to the relayout queue to be processed this frame.
-The buttonSize parameter is the desired size for the button. The desired size will only be set if the size policy of the button has already been changed to
-ResizePolicy::USE_ASSIGNED_SIZE, which is what happens when a button is added to the popup.
+Override the OnRelayout method to position and resize the buttons.
 @code
-void Popup::AddButton( Toolkit::Button button )
-...
-button.SetResizePolicy( ResizePolicy::USE_ASSIGNED_SIZE, Dimension::ALL_DIMENSIONS );
-...
-
 void Popup::OnRelayout( const Vector2& size, RelayoutContainer& container )
 ...
-button.SetPosition( buttonPosition );
-
-button.PropagateRelayoutFlags();    // Reset relayout flags for relayout
-container.Add( button, buttonSize );
-...
 @endcode
 Another aspect to the popup is that depending which resize policies are active on it then the inner table view requires different resize policies itself.
 OnSetResizePolicy can be overridden to receive notice that the resize policy has changed on the control and action can be taken.