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 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -19,7 +19,6 @@
19 19 #include "shared/view.h"
20 20 #include <dali/dali.h>
21 21 #include <dali-toolkit/dali-toolkit.h>
22   -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
23 22  
24 23 using namespace Dali;
25 24  
... ...
examples/property-notification/property-notification-example.cpp
... ... @@ -17,7 +17,6 @@
17 17  
18 18 #include <dali/devel-api/actors/actor-devel.h>
19 19 #include <dali-toolkit/dali-toolkit.h>
20   -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
21 20  
22 21 using namespace Dali;
23 22 using namespace Dali::Toolkit;
... ... @@ -68,16 +67,16 @@ public:
68 67 mTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
69 68 mTextLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
70 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 71 stage.Add( mTextLabel );
73 72  
74 73 // Create an animation and animate the text color to red
75 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 76 animation.Play();
78 77  
79 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 80 notification.NotifySignal().Connect( this, &PropertyNotificationController::RedComponentNotification );
82 81 }
83 82  
... ...
examples/text-label/text-label-example.cpp
... ... @@ -23,7 +23,6 @@
23 23 // EXTERNAL INCLUDES
24 24 #include <dali/devel-api/object/handle-devel.h>
25 25 #include <dali/devel-api/actors/actor-devel.h>
26   -#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
27 26 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
28 27 #include <dali-toolkit/dali-toolkit.h>
29 28 #include <iostream>
... ... @@ -209,7 +208,7 @@ public:
209 208 mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
210 209 mLabel.SetSize(mLayoutSize);
211 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 212 mLabel.SetBackgroundColor( Color::WHITE );
214 213 mContainer.Add( mLabel );
215 214  
... ... @@ -256,7 +255,7 @@ public:
256 255  
257 256 // Animate the text color 3 times from source color to Yellow
258 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 259 animation.SetLoopCount( 3 );
261 260 animation.Play();
262 261  
... ... @@ -270,7 +269,7 @@ public:
270 269 if( button == mStyleButtons[ StyleType::TEXT_COLOR ] )
271 270 {
272 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 273 animation.Play();
275 274 }
276 275 else if( button == mStyleButtons[ StyleType::OUTLINE ] )
... ... @@ -463,7 +462,7 @@ public:
463 462 case KEY_A: // Animate text colour
464 463 {
465 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 466 animation.SetLoopCount( 3 );
468 467 animation.Play();
469 468 break;
... ...
examples/text-scrolling/text-scrolling-example.cpp
... ... @@ -23,7 +23,6 @@
23 23 // EXTERNAL INCLUDES
24 24 #include <dali-toolkit/dali-toolkit.h>
25 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 27 using namespace Dali;
29 28 using namespace Dali::Toolkit;
... ... @@ -190,8 +189,8 @@ public:
190 189 Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New();
191 190 scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl );
192 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 195 CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE );
197 196 boxE.SetPosition( 0.0f, -100.0f, 1.0f );
... ... @@ -201,7 +200,7 @@ public:
201 200 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500);
202 201 mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500);
203 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 205 mPanGestureDetector = PanGestureDetector::New();
207 206 mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture );
... ...