Removal of Actor::Insert API 66/43866/1
authorTom Robinson <tom.robinson@samsung.com>
Tue, 14 Jul 2015 17:13:00 +0000 (18:13 +0100)
committerTom Robinson <tom.robinson@samsung.com>
Tue, 14 Jul 2015 17:13:00 +0000 (18:13 +0100)
Change-Id: I8940fb262a864c17942615c37229cb154f955486

examples/cluster/cluster-example.cpp
examples/cluster/cluster-impl.cpp
examples/cluster/cluster-impl.h
examples/cluster/cluster.cpp
examples/cluster/cluster.h
resources/scripts/table-view.json

index 7246878..0bc4532 100644 (file)
@@ -456,8 +456,8 @@ public:
     // fitting it inside a quarter of the stage area with the conservative BOX
     // filter mode:
     Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH, Dali::ImageDimensions( stageSize.x * 0.5f, stageSize.y * 0.5f ), Dali::FittingMode::SHRINK_TO_FIT, Dali::SamplingMode::BOX );
-    ImageActor image = ImageActor::New(bg);
-    clusterActor.SetBackgroundImage(image);
+    Control clusterControl = Control::DownCast( clusterActor );
+    clusterControl.SetBackgroundImage( bg );
 
     // Add actors (pictures) as the children of the cluster
     for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++)
index 3092b7c..ea54014 100644 (file)
@@ -374,23 +374,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP
   }
 }
 
-void Cluster::SetBackgroundImage( Actor image )
-{
-  // Replaces the background image.
-  if(mBackgroundImage && mBackgroundImage.GetParent())
-  {
-    mBackgroundImage.GetParent().Remove(mBackgroundImage);
-  }
-
-  mBackgroundImage = image;
-  Self().Add(mBackgroundImage);
-
-  mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
-
-  UpdateBackground(0.0f);
-}
-
 void Cluster::SetTitle( Actor text )
 {
   // Replaces the title actor.
index a81a5ea..cf3837c 100644 (file)
@@ -156,11 +156,6 @@ public:
   void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front );
 
   /**
-   * @copydoc Demo::Cluster::SetBackgroundImage
-   */
-  void SetBackgroundImage( Actor image );
-
-  /**
    * @copydoc Demo::Cluster::SetTitle
    */
   void SetTitle( Actor text );
index 76b8cf6..3706301 100644 (file)
@@ -127,11 +127,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP
   GetImpl(*this).RestoreChild( index, alpha, period, front );
 }
 
-void Cluster::SetBackgroundImage( Actor image )
-{
-  GetImpl(*this).SetBackgroundImage(image);
-}
-
 void Cluster::SetTitle( Actor text )
 {
   GetImpl(*this).SetTitle(text);
index 07a08dc..090e230 100644 (file)
@@ -206,12 +206,6 @@ public:
   void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false );
 
   /**
-   * Sets the background image.
-   * @param[in] image The background image.
-   */
-  void SetBackgroundImage( Actor image );
-
-  /**
    * Sets the title.
    *
    * @param[in] text Title text.
index 28a370c..f43a8a5 100644 (file)
@@ -44,7 +44,6 @@
       "type":"TableView",
       "background-color": [0.5,0.5,0,1],
       "parent-origin": "CENTER",
-      "draw-mode": "OVERLAY_2D",
       "size":[400,400,1],
       "rows": 4,
       "columns": 4,