Commit 1c161ead142a0ff889708effe1ba6d02b64c1754

Authored by Adeel Kazmi
1 parent a832af28

Changes required after TextLabel Devel properties were made public

Change-Id: Ic5d4e71314e7cb4fd084678f1c3837adfea97fe2
examples/image-view/image-view-example.cpp
1 /* 1 /*
2 - * Copyright (c) 2015 Samsung Electronics Co., Ltd. 2 + * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@ @@ -19,7 +19,6 @@
19 #include "shared/view.h" 19 #include "shared/view.h"
20 #include <dali/dali.h> 20 #include <dali/dali.h>
21 #include <dali-toolkit/dali-toolkit.h> 21 #include <dali-toolkit/dali-toolkit.h>
22 -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>  
23 22
24 using namespace Dali; 23 using namespace Dali;
25 24
examples/property-notification/property-notification-example.cpp
@@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
17 17
18 #include <dali/devel-api/actors/actor-devel.h> 18 #include <dali/devel-api/actors/actor-devel.h>
19 #include <dali-toolkit/dali-toolkit.h> 19 #include <dali-toolkit/dali-toolkit.h>
20 -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>  
21 20
22 using namespace Dali; 21 using namespace Dali;
23 using namespace Dali::Toolkit; 22 using namespace Dali::Toolkit;
@@ -68,16 +67,16 @@ public: @@ -68,16 +67,16 @@ public:
68 mTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); 67 mTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
69 mTextLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); 68 mTextLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
70 mTextLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); 69 mTextLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
71 - mTextLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::BLACK ); 70 + mTextLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
72 stage.Add( mTextLabel ); 71 stage.Add( mTextLabel );
73 72
74 // Create an animation and animate the text color to red 73 // Create an animation and animate the text color to red
75 Animation animation = Animation::New( COLOR_ANIMATION_DURATION ); 74 Animation animation = Animation::New( COLOR_ANIMATION_DURATION );
76 - animation.AnimateTo( Property( mTextLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED ); 75 + animation.AnimateTo( Property( mTextLabel, TextLabel::Property::TEXT_COLOR ), Color::RED );
77 animation.Play(); 76 animation.Play();
78 77
79 // Set up a property notification so we are notified when the red component of the text-color reaches 50% 78 // Set up a property notification so we are notified when the red component of the text-color reaches 50%
80 - PropertyNotification notification = mTextLabel.AddPropertyNotification( DevelTextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) ); 79 + PropertyNotification notification = mTextLabel.AddPropertyNotification( TextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) );
81 notification.NotifySignal().Connect( this, &PropertyNotificationController::RedComponentNotification ); 80 notification.NotifySignal().Connect( this, &PropertyNotificationController::RedComponentNotification );
82 } 81 }
83 82
examples/text-label/text-label-example.cpp
@@ -23,7 +23,6 @@ @@ -23,7 +23,6 @@
23 // EXTERNAL INCLUDES 23 // EXTERNAL INCLUDES
24 #include <dali/devel-api/object/handle-devel.h> 24 #include <dali/devel-api/object/handle-devel.h>
25 #include <dali/devel-api/actors/actor-devel.h> 25 #include <dali/devel-api/actors/actor-devel.h>
26 -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>  
27 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> 26 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
28 #include <dali-toolkit/dali-toolkit.h> 27 #include <dali-toolkit/dali-toolkit.h>
29 #include <iostream> 28 #include <iostream>
@@ -209,7 +208,7 @@ public: @@ -209,7 +208,7 @@ public:
209 mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT ); 208 mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
210 mLabel.SetSize(mLayoutSize); 209 mLabel.SetSize(mLayoutSize);
211 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); 210 mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
212 - mLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN ); 211 + mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN );
213 mLabel.SetBackgroundColor( Color::WHITE ); 212 mLabel.SetBackgroundColor( Color::WHITE );
214 mContainer.Add( mLabel ); 213 mContainer.Add( mLabel );
215 214
@@ -256,7 +255,7 @@ public: @@ -256,7 +255,7 @@ public:
256 255
257 // Animate the text color 3 times from source color to Yellow 256 // Animate the text color 3 times from source color to Yellow
258 Animation animation = Animation::New( 2.f ); 257 Animation animation = Animation::New( 2.f );
259 - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::YELLOW, AlphaFunction::SIN ); 258 + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::YELLOW, AlphaFunction::SIN );
260 animation.SetLoopCount( 3 ); 259 animation.SetLoopCount( 3 );
261 animation.Play(); 260 animation.Play();
262 261
@@ -270,7 +269,7 @@ public: @@ -270,7 +269,7 @@ public:
270 if( button == mStyleButtons[ StyleType::TEXT_COLOR ] ) 269 if( button == mStyleButtons[ StyleType::TEXT_COLOR ] )
271 { 270 {
272 Animation animation = Animation::New( 2.f ); 271 Animation animation = Animation::New( 2.f );
273 - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), mSelectedColor, AlphaFunction::LINEAR ); 272 + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), mSelectedColor, AlphaFunction::LINEAR );
274 animation.Play(); 273 animation.Play();
275 } 274 }
276 else if( button == mStyleButtons[ StyleType::OUTLINE ] ) 275 else if( button == mStyleButtons[ StyleType::OUTLINE ] )
@@ -463,7 +462,7 @@ public: @@ -463,7 +462,7 @@ public:
463 case KEY_A: // Animate text colour 462 case KEY_A: // Animate text colour
464 { 463 {
465 Animation animation = Animation::New( 2.f ); 464 Animation animation = Animation::New( 2.f );
466 - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED, AlphaFunction::SIN ); 465 + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::RED, AlphaFunction::SIN );
467 animation.SetLoopCount( 3 ); 466 animation.SetLoopCount( 3 );
468 animation.Play(); 467 animation.Play();
469 break; 468 break;
examples/text-scrolling/text-scrolling-example.cpp
@@ -23,7 +23,6 @@ @@ -23,7 +23,6 @@
23 // EXTERNAL INCLUDES 23 // EXTERNAL INCLUDES
24 #include <dali-toolkit/dali-toolkit.h> 24 #include <dali-toolkit/dali-toolkit.h>
25 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> 25 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
26 -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>  
27 26
28 using namespace Dali; 27 using namespace Dali;
29 using namespace Dali::Toolkit; 28 using namespace Dali::Toolkit;
@@ -190,8 +189,8 @@ public: @@ -190,8 +189,8 @@ public:
190 Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); 189 Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New();
191 scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); 190 scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl );
192 CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton ); 191 CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton );
193 - mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE );  
194 - mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); 192 + mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
  193 + mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f );
195 194
196 CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); 195 CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE );
197 boxE.SetPosition( 0.0f, -100.0f, 1.0f ); 196 boxE.SetPosition( 0.0f, -100.0f, 1.0f );
@@ -201,7 +200,7 @@ public: @@ -201,7 +200,7 @@ public:
201 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500); 200 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500);
202 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500); 201 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500);
203 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3); 202 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3);
204 - mRtlLongLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP ); 203 + mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
205 204
206 mPanGestureDetector = PanGestureDetector::New(); 205 mPanGestureDetector = PanGestureDetector::New();
207 mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture ); 206 mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture );