X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fprogramming-guide%2Fsize-negotiation.h;h=960557310c95a66f2db99ba544078177049ce0cb;hb=be7711b99f7e5db0b712194636745045d4da1154;hp=2f64d837449d772b3079fbb00aa6a3628a3f5dc4;hpb=b88f2695b93192680a5779764757ada1534c57fe;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git
diff --git a/docs/content/programming-guide/size-negotiation.h b/docs/content/programming-guide/size-negotiation.h
index 2f64d83..9605573 100644
--- a/docs/content/programming-guide/size-negotiation.h
+++ b/docs/content/programming-guide/size-negotiation.h
@@ -45,34 +45,29 @@ This section details how an actor may be used with size negotiation.
Enabling Size Negotiation
-The first thing to do is to specify whether you want an actor to be included or excluded from the relayout process. The following method is used to enable or disable the relayout
-for an individual actor. Make sure this is the first thing that is called after the actor is created otherwise the actor may still be negotiated.
-@code void SetRelayoutEnabled( bool enabled ) @endcode
-Text and image actors have relayout enabled by default, while a plain Actor is disabled. Be aware that if desiring to use an Actor in relayout
-then relayout needs to be explicitly enabled first.
+Text and image actors have relayout enabled by default, while a plain Actor is disabled unless a call to SetResizePolicy is made.
Specifying Size Policies
-Actors have different size policies by default. For example ImageActor is set to USE_NATURAL_SIZE. This ensures that when an image actor is
+Actors have different size policies by default. For example ImageView is set to USE_NATURAL_SIZE. This ensures that when an image actor is
placed on the stage it will use its natural size by default. However if the user calls SetSize with non-zero sizes on the image actor then the current
size policy is overridden by the FIXED size policy and the actor will take on the size specified.
The next step is to specify how an actor will be size negotiated. The resize policies for an actor may be specified by the following method:
@code void SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) @endcode
It is common to specifiy different policies for the different dimensions of width and height to achive different layouts. Different actors have
-different resize policies specified by default. For example ImageActors are set to use USE_NATURAL_SIZE.
+different resize policies specified by default. For example ImageViews are set to use USE_NATURAL_SIZE.
The following example code snippet shows rootActor having its width policy set to ResizePolicy::FILL_TO_PARENT and its height policy set to ResizePolicy::FIT_TO_CHILDREN.
-It has an ImageActor added to it with an explicit call to USE_NATURAL_SIZE in both dimensions called on it. This will make an actor that will
+It has an ImageView added to it with an explicit call to USE_NATURAL_SIZE in both dimensions called on it. This will make an actor that will
fill up the space of its parent in the width dimension and fit to its child in the height dimension. As the image actor child is using natural size
the height of the root actor will fit to the height of the child image.
@code
Actor rootActor = Actor::New();
-rootActor.SetRelayoutEnabled( true );
rootActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
rootActor.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
-ImageActor image = ImageActor::New( Image::New( MY_IMAGE_PATH ) );
+Toolkit::ImageView image = Toolkit::ImageView::New( MY_IMAGE_PATH );
image.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
rootActor.Add( image );
@endcode
@@ -146,7 +141,7 @@ text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) );
// Image
-ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) );
+Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE_PATH );
image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
@@ -249,7 +244,7 @@ PushButton, OKAY_BUTTON - Pos: [185, 0, 0.1] Size: [165, 76, 76], Dirty: (FALSE,
The format is as follows:
-[Actor type], [Actor name] â Pos:[X, Y, Z] Size[Dimension::WIDTH, Dimension::HEIGHT, DEPTH], Dirty:(Dimension::WIDTH, Dimension::HEIGHT), Negotiated: (Dimension::WIDTH, Dimension::HEIGHT), Enabled: BOOLEAN, (Object address)
+[Actor type], [Actor name] ? Pos:[X, Y, Z] Size[Dimension::WIDTH, Dimension::HEIGHT, DEPTH], Dirty:(Dimension::WIDTH, Dimension::HEIGHT), Negotiated: (Dimension::WIDTH, Dimension::HEIGHT), Enabled: BOOLEAN, (Object address)
- Actor type: The type name of the actor E.g. PushButton
- Actor name: The name set on the actor with SetName(). Useful for debugging.
- Pos: The position of the actor