Commit fd3c77f6b5ee12427f408c3ae44dc99025416f69
1 parent
33854344
Removal of Actor::Insert API
Change-Id: I8940fb262a864c17942615c37229cb154f955486
Showing
6 changed files
with
2 additions
and
36 deletions
examples/cluster/cluster-example.cpp
| @@ -456,8 +456,8 @@ public: | @@ -456,8 +456,8 @@ public: | ||
| 456 | // fitting it inside a quarter of the stage area with the conservative BOX | 456 | // fitting it inside a quarter of the stage area with the conservative BOX |
| 457 | // filter mode: | 457 | // filter mode: |
| 458 | 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 ); | 458 | 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 ); |
| 459 | - ImageActor image = ImageActor::New(bg); | ||
| 460 | - clusterActor.SetBackgroundImage(image); | 459 | + Control clusterControl = Control::DownCast( clusterActor ); |
| 460 | + clusterControl.SetBackgroundImage( bg ); | ||
| 461 | 461 | ||
| 462 | // Add actors (pictures) as the children of the cluster | 462 | // Add actors (pictures) as the children of the cluster |
| 463 | for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++) | 463 | for (unsigned int i = 0; (i < style.GetMaximumNumberOfChildren()) && (*paths); i++, paths++) |
examples/cluster/cluster-impl.cpp
| @@ -374,23 +374,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP | @@ -374,23 +374,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP | ||
| 374 | } | 374 | } |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | -void Cluster::SetBackgroundImage( Actor image ) | ||
| 378 | -{ | ||
| 379 | - // Replaces the background image. | ||
| 380 | - if(mBackgroundImage && mBackgroundImage.GetParent()) | ||
| 381 | - { | ||
| 382 | - mBackgroundImage.GetParent().Remove(mBackgroundImage); | ||
| 383 | - } | ||
| 384 | - | ||
| 385 | - mBackgroundImage = image; | ||
| 386 | - Self().Add(mBackgroundImage); | ||
| 387 | - | ||
| 388 | - mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | ||
| 389 | - mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT ); | ||
| 390 | - | ||
| 391 | - UpdateBackground(0.0f); | ||
| 392 | -} | ||
| 393 | - | ||
| 394 | void Cluster::SetTitle( Actor text ) | 377 | void Cluster::SetTitle( Actor text ) |
| 395 | { | 378 | { |
| 396 | // Replaces the title actor. | 379 | // Replaces the title actor. |
examples/cluster/cluster-impl.h
| @@ -156,11 +156,6 @@ public: | @@ -156,11 +156,6 @@ public: | ||
| 156 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front ); | 156 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front ); |
| 157 | 157 | ||
| 158 | /** | 158 | /** |
| 159 | - * @copydoc Demo::Cluster::SetBackgroundImage | ||
| 160 | - */ | ||
| 161 | - void SetBackgroundImage( Actor image ); | ||
| 162 | - | ||
| 163 | - /** | ||
| 164 | * @copydoc Demo::Cluster::SetTitle | 159 | * @copydoc Demo::Cluster::SetTitle |
| 165 | */ | 160 | */ |
| 166 | void SetTitle( Actor text ); | 161 | void SetTitle( Actor text ); |
examples/cluster/cluster.cpp
| @@ -127,11 +127,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP | @@ -127,11 +127,6 @@ void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimeP | ||
| 127 | GetImpl(*this).RestoreChild( index, alpha, period, front ); | 127 | GetImpl(*this).RestoreChild( index, alpha, period, front ); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | -void Cluster::SetBackgroundImage( Actor image ) | ||
| 131 | -{ | ||
| 132 | - GetImpl(*this).SetBackgroundImage(image); | ||
| 133 | -} | ||
| 134 | - | ||
| 135 | void Cluster::SetTitle( Actor text ) | 130 | void Cluster::SetTitle( Actor text ) |
| 136 | { | 131 | { |
| 137 | GetImpl(*this).SetTitle(text); | 132 | GetImpl(*this).SetTitle(text); |
examples/cluster/cluster.h
| @@ -206,12 +206,6 @@ public: | @@ -206,12 +206,6 @@ public: | ||
| 206 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false ); | 206 | void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front = false ); |
| 207 | 207 | ||
| 208 | /** | 208 | /** |
| 209 | - * Sets the background image. | ||
| 210 | - * @param[in] image The background image. | ||
| 211 | - */ | ||
| 212 | - void SetBackgroundImage( Actor image ); | ||
| 213 | - | ||
| 214 | - /** | ||
| 215 | * Sets the title. | 209 | * Sets the title. |
| 216 | * | 210 | * |
| 217 | * @param[in] text Title text. | 211 | * @param[in] text Title text. |
resources/scripts/table-view.json
| @@ -44,7 +44,6 @@ | @@ -44,7 +44,6 @@ | ||
| 44 | "type":"TableView", | 44 | "type":"TableView", |
| 45 | "background-color": [0.5,0.5,0,1], | 45 | "background-color": [0.5,0.5,0,1], |
| 46 | "parent-origin": "CENTER", | 46 | "parent-origin": "CENTER", |
| 47 | - "draw-mode": "OVERLAY_2D", | ||
| 48 | "size":[400,400,1], | 47 | "size":[400,400,1], |
| 49 | "rows": 4, | 48 | "rows": 4, |
| 50 | "columns": 4, | 49 | "columns": 4, |