Controls no longer have property names.
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 28 Feb 2014 18:26:27 +0000 (18:26 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 3 Mar 2014 19:07:25 +0000 (19:07 +0000)
[Issue#]   N/A
[Problem]  May change these so should be removed from CAPI for now.
[Cause]    N/A
[Solution] N/A

Change-Id: I9a54fc5e509595a3b18258d0da0bf4117eb93b68

20 files changed:
automated-tests/dali-test-suite/buttons/utc-Dali-Button.cpp
automated-tests/dali-test-suite/focus-manager/utc-Dali-FocusManager.cpp
automated-tests/dali-test-suite/popup/utc-Dali-Popup.cpp
automated-tests/dali-test-suite/text-view/utc-Dali-TextView.cpp
capi/dali-toolkit/public-api/controls/buttons/button.h
capi/dali-toolkit/public-api/controls/popup/popup.h
capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-custom-effect.h
capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h
capi/dali-toolkit/public-api/controls/text-view/text-view.h
capi/dali-toolkit/public-api/focus-manager/focus-manager.h
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.cpp
dali-toolkit/internal/controls/text-view/text-view-impl.cpp
dali-toolkit/internal/focus-manager/focus-manager-impl.cpp
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/popup/popup.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.cpp
dali-toolkit/public-api/controls/text-view/text-view.cpp
dali-toolkit/public-api/focus-manager/focus-manager.cpp

index 41fe94ae842ac590dbd0c6c2b99107c3b250a498..53a0e533fdd3a5543094fbb214c942d063c28967 100644 (file)
@@ -171,14 +171,14 @@ static void UtcDaliButtonSetProperty()
   PushButton pushButton = PushButton::New();
 
   //Test various properties
-  checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex(Button::PROPERTY_DIMMED), false);
+  checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex("dimmed"), false);
   DALI_TEST_CHECK( false == checkBoxButton.IsDimmed() );
-  checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex(Button::PROPERTY_DIMMED), true);
+  checkBoxButton.SetProperty(checkBoxButton.GetPropertyIndex("dimmed"), true);
   DALI_TEST_CHECK( true == checkBoxButton.IsDimmed() );
 
-  pushButton.SetProperty(pushButton.GetPropertyIndex(Button::PROPERTY_DIMMED), false);
+  pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), false);
   DALI_TEST_CHECK( false == pushButton.IsDimmed() );
-  pushButton.SetProperty(pushButton.GetPropertyIndex(Button::PROPERTY_DIMMED), true);
+  pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), true);
   DALI_TEST_CHECK( true == pushButton.IsDimmed() );
 }
 
index c614f53feb96987161e2ce022e342f320f8ddc7e..5bd16e7770ccb121837452fe99e0198737f48585 100644 (file)
@@ -394,7 +394,7 @@ static void UtcDaliFocusManagerSetAndGetCurrentFocusActor()
   application.Render();
 
   // Make the third actor not focusable
-  Property::Index propertyActorFocusable = third.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+  Property::Index propertyActorFocusable = third.GetPropertyIndex("is-focus-group");
   third.SetProperty(propertyActorFocusable, false);
   // flush the queue and render once
   application.SendNotification();
@@ -622,7 +622,7 @@ static void UtcDaliFocusManagerMoveFocusForward()
   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
 
   // Make the second actor not focusable
-  Property::Index propertyActorFocusable = second.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+  Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
   second.SetProperty(propertyActorFocusable, false);
   // flush the queue and render once
   application.SendNotification();
@@ -734,7 +734,7 @@ static void UtcDaliFocusManagerMoveFocusBackward()
   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
 
   // Make the second actor not focusable
-  Property::Index propertyActorFocusable = second.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+  Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
   second.SetProperty(propertyActorFocusable, false);
   // flush the queue and render once
   application.SendNotification();
index e5fa8af3ec6f9a5c0e51cb93f9aa6217340c62d0..acaefa622165be875ab7b5a80d15e65e14d3ff39 100644 (file)
@@ -185,7 +185,7 @@ static void UtcDaliPopoupSetProperty()
 
   //Test properties
   std::string testString = "Hello World";
-  popup.SetProperty(popup.GetPropertyIndex(Popup::PROPERTY_TITLE), testString);
+  popup.SetProperty(popup.GetPropertyIndex("title"), testString);
   DALI_TEST_EQUALS( testString, popup.GetTitle().GetText(), TEST_LOCATION );
 }
 
index f0fd63d850d22faa33b0a4a6af90b3024c50139e..49b6e859a0d94eb5b1f025de32902e32eae1df0f 100644 (file)
@@ -32,6 +32,19 @@ using namespace Toolkit;
 namespace
 {
 
+const char* const PROPERTY_TEXT = "text";
+const char* const PROPERTY_MULTILINE_POLICY = "multiline-policy";
+const char* const PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
+const char* const PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
+const char* const PROPERTY_LINE_JUSTIFICATION = "line-justification";
+const char* const PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
+const char* const PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
+const char* const PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
+const char* const PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
+const char* const PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
+const char* const PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
+const char* const PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
+
 bool TestEqual( float x, float y )
 {
   return !( fabsf( x - y ) > Math::MACHINE_EPSILON_1000 );
@@ -716,73 +729,73 @@ static void UtcDaliTextViewSetProperty()
   Stage::GetCurrent().Add( view );
 
   //Test multiline policy property
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByNewLineChar");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByNewLineChar");
   DALI_TEST_CHECK( Toolkit::TextView::SplitByNewLineChar == view.GetMultilinePolicy() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByWord");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByWord");
   DALI_TEST_CHECK( Toolkit::TextView::SplitByWord == view.GetMultilinePolicy() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_MULTILINE_POLICY), "SplitByChar");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_MULTILINE_POLICY), "SplitByChar");
   DALI_TEST_CHECK( Toolkit::TextView::SplitByChar == view.GetMultilinePolicy() );
 
   //Test width exceed policy property
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "Original");
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "Original");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "Original");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "Original");
   DALI_TEST_CHECK( Toolkit::TextView::Original == view.GetWidthExceedPolicy() );
   DALI_TEST_CHECK( Toolkit::TextView::Original == view.GetHeightExceedPolicy() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "Fade");
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "Fade");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "Fade");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "Fade");
   DALI_TEST_CHECK( Toolkit::TextView::Fade == view.GetWidthExceedPolicy() );
   DALI_TEST_CHECK( Toolkit::TextView::Fade == view.GetHeightExceedPolicy() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_WIDTH_EXCEED_POLICY), "ShrinkToFit");
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HEIGHT_EXCEED_POLICY), "ShrinkToFit");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_WIDTH_EXCEED_POLICY), "ShrinkToFit");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_HEIGHT_EXCEED_POLICY), "ShrinkToFit");
   DALI_TEST_CHECK( Toolkit::TextView::ShrinkToFit == view.GetWidthExceedPolicy() );
   DALI_TEST_CHECK( Toolkit::TextView::ShrinkToFit == view.GetHeightExceedPolicy() );
 
   //Test line justification property
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Left");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Left");
   DALI_TEST_CHECK( Toolkit::TextView::Left == view.GetLineJustification() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Center");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Center");
   DALI_TEST_CHECK( Toolkit::TextView::Center == view.GetLineJustification() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Right");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Right");
   DALI_TEST_CHECK( Toolkit::TextView::Right == view.GetLineJustification() );
 
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_JUSTIFICATION), "Justified");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_JUSTIFICATION), "Justified");
   DALI_TEST_CHECK( Toolkit::TextView::Justified == view.GetLineJustification() );
 
   //Test fade boundary property
   unsigned int testValue = 23;
   PixelSize leftFadeBoundary(testValue);
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_LEFT), testValue);
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_LEFT), testValue);
   DALI_TEST_CHECK( leftFadeBoundary == view.GetFadeBoundary().mLeft );
 
   testValue = 26;
   PixelSize rightFadeBoundary(testValue);
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_RIGHT), testValue);
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_RIGHT), testValue);
   DALI_TEST_CHECK( rightFadeBoundary == view.GetFadeBoundary().mRight );
 
   testValue = 2;
   PixelSize topFadeBoundary(testValue);
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_TOP), testValue);
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_TOP), testValue);
   DALI_TEST_CHECK( topFadeBoundary == view.GetFadeBoundary().mTop );
 
   testValue = 11;
   PixelSize bottomFadeBoundary(testValue);
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_FADE_BOUNDARY_BOTTOM), testValue);
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_FADE_BOUNDARY_BOTTOM), testValue);
   DALI_TEST_CHECK( bottomFadeBoundary == view.GetFadeBoundary().mBottom );
 
   //Test Line height offset property
   float testOffsetValue = 14.04f;
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_LINE_HEIGHT_OFFSET), testOffsetValue);
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_LINE_HEIGHT_OFFSET), testOffsetValue);
   DALI_TEST_CHECK( PointSize(testOffsetValue) == view.GetLineHeightOffset() );
 
   //Test alignment property
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_HORIZONTAL_ALIGNMENT), "HorizontalLeft");
-  view.SetProperty(view.GetPropertyIndex(TextView::PROPERTY_VERTICAL_ALIGNMENT), "VerticalTop");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_HORIZONTAL_ALIGNMENT), "HorizontalLeft");
+  view.SetProperty(view.GetPropertyIndex(PROPERTY_VERTICAL_ALIGNMENT), "VerticalTop");
   DALI_TEST_CHECK( (Toolkit::Alignment::HorizontalLeft | Toolkit::Alignment::VerticalTop) == view.GetTextAlignment() );
 }
 
index 6cdb6968951779d3805336681b7d28ed427d9298..f52106eaebba2a68ea9504b0b3224ab919e99709 100644 (file)
@@ -53,14 +53,9 @@ class Button;
 class Button : public Control
 {
 public:
-  //Signal Names
-  static const char* const SIGNAL_CLICKED;
 
-  /**
-   * The names of custom properties installed by this control.
-   */
-  // Property Names
-  static const char* const PROPERTY_DIMMED;      ///< name "dimmed", type bool.
+  // Signal Names
+  static const char* const SIGNAL_CLICKED;
 
 public:
 
index 968acb9d6fad1259edba4008ef1b072b45abb1b1..3b847c390beecd19764f11aa60b7843430d5eb64 100644 (file)
@@ -79,13 +79,6 @@ public:
   static const char* const SIGNAL_TOUCHED_OUTSIDE;
   static const char* const SIGNAL_HIDDEN;
 
-  /**
-   * The names of custom properties installed by this control.
-   */
-  // Property Names
-  static const char* const PROPERTY_TITLE;     ///< name "title", type string.
-  static const char* const PROPERTY_STATE;     ///< name "state", type string.
-
   /**
    * Current popup state
    */
index 9201fa7a4a5e5238db0a7c800164f41033a450d2..8c4be1bef8c929c7d49f38255cb34bdd88278307 100644 (file)
@@ -60,9 +60,6 @@ class ScrollViewCustomEffect;
  */
 class ScrollViewCustomEffect : public ScrollViewEffect
 {
-  static const std::string ANCHOR_POINT_PROPERTY_NAME;
-  static const std::string SCROLL_AMOUNT_PROPERTY_NAME;               ///< Property, name "scroll-amount",           type VECTOR3
-
 public:
   enum EFlag
   {
index 0767a16ba5faa6d68fdbe1ec0a2476cddf4542ea..26f7070fcde1a0d0136dcdb3aa30ea636ac79e36 100644 (file)
@@ -48,10 +48,6 @@ class ScrollViewTwistEffect : public ScrollViewEffect
 
 public:
 
-  static const std::string EFFECT_TIME;
-  static const std::string EFFECT_REFERENCE;
-  static const std::string EFFECT_DEPTH;
-  static const std::string EFFECT_ACTIVATE;
   static const float DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK;
 
 public:
index 8d9a1568b29b373d23f9612f72fc60f185b25a1b..1e866dd29077ed2641cd3cd6c5231e77e66a0f42 100644 (file)
@@ -99,25 +99,9 @@ class TextView;
 class TextView : public Control
 {
 public:
-  //Signal Names
-  static const char* const SIGNAL_TEXT_SCROLLED; ///< Signal emitted when the scroll position changes. @see SignalScrolled()
 
-  /**
-   * The names of custom properties installed by this control.
-   */
-  // Property Names
-  static const char* const PROPERTY_TEXT;                  ///< name "text", type std::string
-  static const char* const PROPERTY_MULTILINE_POLICY;      ///< name "multiline-policy", type std::string
-  static const char* const PROPERTY_WIDTH_EXCEED_POLICY;   ///< name "width-exceed-policy", type std::string
-  static const char* const PROPERTY_HEIGHT_EXCEED_POLICY;  ///< name "height-exceed-policy", type std::string
-  static const char* const PROPERTY_LINE_JUSTIFICATION;    ///< name "line-justification", type std::string
-  static const char* const PROPERTY_FADE_BOUNDARY_LEFT;    ///< name "fade-boundary-left", type int
-  static const char* const PROPERTY_FADE_BOUNDARY_RIGHT;   ///< name "fade-boundary-right", type int
-  static const char* const PROPERTY_FADE_BOUNDARY_TOP;     ///< name "fade-boundary-top", type int
-  static const char* const PROPERTY_FADE_BOUNDARY_BOTTOM;  ///< name "fade-boundary-bottom", type int
-  static const char* const PROPERTY_LINE_HEIGHT_OFFSET;    ///< name "line-height-offset", type float
-  static const char* const PROPERTY_HORIZONTAL_ALIGNMENT;  ///< name "horizontal-alignment", type std::string
-  static const char* const PROPERTY_VERTICAL_ALIGNMENT;    ///< name "vertical-alignment", type std::string
+  // Signal Names
+  static const char* const SIGNAL_TEXT_SCROLLED; ///< Signal emitted when the scroll position changes. @see SignalScrolled()
 
   /**
    * Structure used to retrieve Layout info per character.
index d43dde72deee8325f495139768eef22f1a8ace96..970eb9a6c57a49baf8c550d94246958415fb9cfe 100644 (file)
@@ -47,15 +47,11 @@ class FocusManager;
  class FocusManager : public BaseHandle
  {
  public:
-  //Signal Names
+  // Signal Names
   static const char* const SIGNAL_FOCUS_CHANGED;
   static const char* const SIGNAL_FOCUS_OVERSHOT;
   static const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED;
 
-  // Property Names
-  static const std::string ACTOR_FOCUSABLE;  ///< name "focusable", type bool
-  static const std::string IS_FOCUS_GROUP;  ///< name "is-focus-group", type bool
-
   /**
    * Accessibility needs four information which will be read by screen-reader.
    * Reading order : Label -> Trait -> Optional (Value and Hint)
index 86a3f4f564079614a51468b892f4bbf77bdf3c61..bd74b57017ccd680358053c5d14f4b75cc127006 100644 (file)
 
 #include "button-impl.h"
 
+namespace
+{
+const char* const PROPERTY_DIMMED = "dimmed";
+} // unnamed namespace
+
 namespace Dali
 {
 
@@ -198,7 +203,7 @@ void Button::OnInitialize()
   OnButtonInitialize();
 
   Actor self = Self();
-  mPropertyDimmed = self.RegisterProperty( Dali::Toolkit::Button::PROPERTY_DIMMED, false, Property::READ_WRITE );
+  mPropertyDimmed = self.RegisterProperty( PROPERTY_DIMMED, false, Property::READ_WRITE );
 
   self.SetKeyboardFocusable( true );
 }
index db01ab0f0c58ecf60bb8b79484a8cab954029d19..8f1c9ef00a90c295dc0682d12317a1b7fd10b501 100755 (executable)
@@ -43,6 +43,9 @@ const float POPUP_BUTTON_BG_HEIGHT = 96.f;                    ///< Height of But
 const Vector3 DEFAULT_DIALOG_SIZE = Vector3(POPUP_TITLE_WIDTH/POPUP_WIDTH, 0.5f, 0.0f);
 const Vector3 DEFAULT_BOTTOM_SIZE = Vector3(1.0f, 0.2f, 0.0f);
 
+const char* const PROPERTY_TITLE = "title";
+const char* const PROPERTY_STATE = "state";
+
 // Constraints ///////////////////////////////////////////////////////////////////////////
 
 /**
@@ -210,8 +213,8 @@ void Popup::OnInitialize()
   // Hide content by default.
   SetState( Toolkit::Popup::POPUP_HIDE, 0.0f );
 
-  mPropertyTitle = self.RegisterProperty( Dali::Toolkit::Popup::PROPERTY_TITLE, "", Property::READ_WRITE );
-  mPropertyState = self.RegisterProperty( Dali::Toolkit::Popup::PROPERTY_STATE, "POPUP_HIDE", Property::READ_WRITE );
+  mPropertyTitle = self.RegisterProperty( PROPERTY_TITLE, "", Property::READ_WRITE );
+  mPropertyState = self.RegisterProperty( PROPERTY_STATE, "POPUP_HIDE", Property::READ_WRITE );
 
   // Make self as keyboard focusable and focus group
   self.SetKeyboardFocusable(true);
index 8d78c44b962b5784d5baf10e1a12b2f8e19ea16e..681afe601783554b8c8df66c86997a6ef8aea3d3 100755 (executable)
@@ -23,6 +23,11 @@ using namespace Dali;
 namespace // unnamed namespace
 {
 
+const char * const EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
+const char * const EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
+const char * const EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
+const char * const EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
+
 const float TWISTEFFECT_ANIMATION_MAX_TIME = 60.0f;         ///< Animation time (every time finishes, checks if it needs to go again)
 const float TWISTEFFECT_DEFAULT_DROPOFF = 0.7f;             ///< Default drop off amount
 const float TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_X = 720.0f;  ///< Default drop off distance
@@ -509,7 +514,7 @@ void ScrollViewTwistEffect::Apply(Actor child)
   if( mFlags & FlagScale )
   {
     constraint = Constraint::New<Vector3>( Actor::SCALE,
-                                           Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_DEPTH ) ),
+                                           Source(scrollView, scrollView.GetPropertyIndex( EFFECT_DEPTH ) ),
                                            ScrollTwistScaleConstraint(mScaleFactor) );
     constraint.SetRemoveAction( Constraint::Discard );
     child.ApplyConstraint( constraint );
@@ -518,10 +523,10 @@ void ScrollViewTwistEffect::Apply(Actor child)
   constraint = Constraint::New<Vector3>( Actor::POSITION,
                                           ParentSource(Actor::POSITION),
                                           Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
-                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_REFERENCE ) ),
-                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_TIME ) ),
+                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_REFERENCE ) ),
+                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_TIME ) ),
                                           Source(scrollView, Actor::SIZE),
-                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
                                          ScrollTwistPositionConstraint(mDelayMin, mDelayMax) );
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
@@ -537,7 +542,7 @@ void ScrollViewTwistEffect::Apply(Actor child)
                                                 Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
                                                 Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
                                                 Source(scrollView, Actor::SIZE ),
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+                                                Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
                                                 ScrollDropoffTwistRotationConstraint(mMaxSwingAngle, mDropOff, mDropOffDistance, mDropOffFunction) );
     }
     else
@@ -545,7 +550,7 @@ void ScrollViewTwistEffect::Apply(Actor child)
       constraint = Constraint::New<Quaternion>( Actor::ROTATION,
                                                 Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
                                                 Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE) ),
+                                                Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
                                                 ScrollTwistRotationConstraint(mMaxSwingAngle) );
     }
     constraint.SetRemoveAction( Constraint::Discard );
@@ -575,10 +580,10 @@ void ScrollViewTwistEffect::OnAttach(Toolkit::ScrollView& scrollView)
   // Create effect-time property if not already created.
   if(mPropertyTime == Property::INVALID_INDEX)
   {
-    mPropertyTime = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_TIME, 0.0f );
-    mPropertyReference = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_REFERENCE, Vector3::ZERO );
-    mPropertyDepth = SafeRegisterProperty( scrollView, Toolkit::ScrollViewTwistEffect::EFFECT_DEPTH, 0.0f);
-    mPropertyActivate = SafeRegisterProperty(scrollView,Toolkit::ScrollViewTwistEffect::EFFECT_ACTIVATE,1.0f);
+    mPropertyTime = SafeRegisterProperty( scrollView, EFFECT_TIME, 0.0f );
+    mPropertyReference = SafeRegisterProperty( scrollView, EFFECT_REFERENCE, Vector3::ZERO );
+    mPropertyDepth = SafeRegisterProperty( scrollView, EFFECT_DEPTH, 0.0f);
+    mPropertyActivate = SafeRegisterProperty(scrollView, EFFECT_ACTIVATE, 1.0f);
   }
 
   // Connect to the scroll view signals
index add65d2a37fdaf52ece2e1b726047b8b8a8ed3b3..aa30efdf6a1b6fdf06251805c73176ccc0d6d30b 100644 (file)
@@ -38,6 +38,19 @@ namespace Internal
 namespace
 {
 
+const char* const PROPERTY_TEXT = "text";
+const char* const PROPERTY_MULTILINE_POLICY = "multiline-policy";
+const char* const PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
+const char* const PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
+const char* const PROPERTY_LINE_JUSTIFICATION = "line-justification";
+const char* const PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
+const char* const PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
+const char* const PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
+const char* const PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
+const char* const PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
+const char* const PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
+const char* const PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
+
 // Currently on desktop machines 2k x 2k is the maximum frame buffer size, on target is 4k x 4k.
 const float MAX_OFFSCREEN_RENDERING_SIZE = 2048.f;
 
@@ -1144,29 +1157,29 @@ void TextView::OnInitialize()
 {
   Actor self = Self();
 
-  mPropertyText = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_TEXT, "", Property::READ_WRITE );
+  mPropertyText = self.RegisterProperty( PROPERTY_TEXT, "", Property::READ_WRITE );
 
-  mPropertyMultilinePolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_MULTILINE_POLICY, "SplitByNewLineChar", Property::READ_WRITE );
+  mPropertyMultilinePolicy = self.RegisterProperty( PROPERTY_MULTILINE_POLICY, "SplitByNewLineChar", Property::READ_WRITE );
 
-  mPropertyWidthExceedPolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_WIDTH_EXCEED_POLICY, "Original", Property::READ_WRITE );
+  mPropertyWidthExceedPolicy = self.RegisterProperty( PROPERTY_WIDTH_EXCEED_POLICY, "Original", Property::READ_WRITE );
 
-  mPropertyHeightExceedPolicy = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_HEIGHT_EXCEED_POLICY, "Original", Property::READ_WRITE );
+  mPropertyHeightExceedPolicy = self.RegisterProperty( PROPERTY_HEIGHT_EXCEED_POLICY, "Original", Property::READ_WRITE );
 
-  mPropertyLineJustification = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_LINE_JUSTIFICATION, "Left", Property::READ_WRITE );
+  mPropertyLineJustification = self.RegisterProperty( PROPERTY_LINE_JUSTIFICATION, "Left", Property::READ_WRITE );
 
-  mPropertyFadeBoundaryLeft = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_LEFT, static_cast< int >( 0 ), Property::READ_WRITE );
+  mPropertyFadeBoundaryLeft = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_LEFT, static_cast< int >( 0 ), Property::READ_WRITE );
 
-  mPropertyFadeBoundaryRight = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_RIGHT, static_cast< int >( 0 ), Property::READ_WRITE );
+  mPropertyFadeBoundaryRight = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_RIGHT, static_cast< int >( 0 ), Property::READ_WRITE );
 
-  mPropertyFadeBoundaryTop = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_TOP, static_cast< int >( 0 ), Property::READ_WRITE );
+  mPropertyFadeBoundaryTop = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_TOP, static_cast< int >( 0 ), Property::READ_WRITE );
 
-  mPropertyFadeBoundaryBottom = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_FADE_BOUNDARY_BOTTOM, static_cast< int >( 0 ), Property::READ_WRITE );
+  mPropertyFadeBoundaryBottom = self.RegisterProperty( PROPERTY_FADE_BOUNDARY_BOTTOM, static_cast< int >( 0 ), Property::READ_WRITE );
 
-  mPropertyLineHeightOffset = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_LINE_HEIGHT_OFFSET, 0.0f, Property::READ_WRITE );
+  mPropertyLineHeightOffset = self.RegisterProperty( PROPERTY_LINE_HEIGHT_OFFSET, 0.0f, Property::READ_WRITE );
 
-  mPropertyHorizontalAlignment = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_HORIZONTAL_ALIGNMENT, "HorizontalCenter", Property::READ_WRITE );
+  mPropertyHorizontalAlignment = self.RegisterProperty( PROPERTY_HORIZONTAL_ALIGNMENT, "HorizontalCenter", Property::READ_WRITE );
 
-  mPropertyVerticalAlignment = self.RegisterProperty( Dali::Toolkit::TextView::PROPERTY_VERTICAL_ALIGNMENT, "VerticalCenter", Property::READ_WRITE );
+  mPropertyVerticalAlignment = self.RegisterProperty( PROPERTY_VERTICAL_ALIGNMENT, "VerticalCenter", Property::READ_WRITE );
 
 }
 
index ad3a8e8c75188ff85919f93f73a8062cfab89597..80e5c2d91db204cf7c453a28ab4fc5ef218953ff 100644 (file)
@@ -38,6 +38,9 @@ namespace // unnamed namespace
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FOCUS_MANAGER");
 #endif
 
+const char * const ACTOR_FOCUSABLE("focusable");
+const char * const IS_FOCUS_GROUP("is-focus-group");
+
 const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "B16-8_TTS_focus.png";
 const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
 
@@ -57,7 +60,7 @@ bool IsActorFocusableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType
        && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
       {
         // Check whether the actor is focusable
-        Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+        Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
         if(propertyActorFocusable != Property::INVALID_INDEX)
         {
           hittable = actor.GetProperty<bool>(propertyActorFocusable);
@@ -162,10 +165,10 @@ void FocusManager::SetFocusOrder(Actor actor, const unsigned int order)
     mFocusIDContainer.erase(GetFocusOrder(actor));
 
     // Create actor focusable property if not already created.
-    Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+    Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
     if(propertyActorFocusable == Property::INVALID_INDEX)
     {
-      propertyActorFocusable = actor.RegisterProperty(Toolkit::FocusManager::ACTOR_FOCUSABLE, true);
+      propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, true);
     }
 
     if(order == 0)
@@ -293,7 +296,7 @@ bool FocusManager::DoSetCurrentFocusActor(const unsigned int actorID)
   {
     // Check whether the actor is focusable
     bool actorFocusable = false;
-    Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+    Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
     if(propertyActorFocusable != Property::INVALID_INDEX)
     {
       actorFocusable = actor.GetProperty<bool>(propertyActorFocusable);
@@ -477,10 +480,10 @@ void FocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
   if(actor)
   {
     // Create focus group property if not already created.
-    Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(Toolkit::FocusManager::IS_FOCUS_GROUP);
+    Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
     if(propertyIsFocusGroup == Property::INVALID_INDEX)
     {
-      propertyIsFocusGroup = actor.RegisterProperty(Toolkit::FocusManager::IS_FOCUS_GROUP, isFocusGroup);
+      propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
     }
     else
     {
@@ -496,7 +499,7 @@ bool FocusManager::IsFocusGroup(Actor actor) const
 
   if(actor)
   {
-    Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(Toolkit::FocusManager::IS_FOCUS_GROUP);
+    Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
     if(propertyIsFocusGroup != Property::INVALID_INDEX)
     {
       isFocusGroup = actor.GetProperty<bool>(propertyIsFocusGroup);
@@ -603,10 +606,10 @@ void FocusManager::SetFocusable(Actor actor, bool focusable)
   if(actor)
   {
     // Create actor focusable property if not already created.
-    Property::Index propertyActorFocusable = actor.GetPropertyIndex(Toolkit::FocusManager::ACTOR_FOCUSABLE);
+    Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
     if(propertyActorFocusable == Property::INVALID_INDEX)
     {
-      propertyActorFocusable = actor.RegisterProperty(Toolkit::FocusManager::ACTOR_FOCUSABLE, focusable);
+      propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
     }
     else
     {
index aa03116180291802132606c2e0f241f2075fe89a..1fbe69e6eff38b578dbd5689e8d5fda3bf4dbe91 100644 (file)
@@ -29,7 +29,6 @@ namespace Toolkit
 {
 
 const char* const Button::SIGNAL_CLICKED = "clicked";
-const char* const Button::PROPERTY_DIMMED = "dimmed";
 
 Button::Button()
 {}
index 735e64fa4413467c622dd59c78d0e6ec1d518fae..d36c1e5d401d5f8d3dbcfb323f97407828b62e17 100644 (file)
@@ -32,8 +32,6 @@ namespace Toolkit
 
 const char* const Popup::SIGNAL_TOUCHED_OUTSIDE = "touched-outside";
 const char* const Popup::SIGNAL_HIDDEN = "hidden";
-const char* const Popup::PROPERTY_TITLE = "title";
-const char* const Popup::PROPERTY_STATE = "state";
 
 Popup::Popup()
 {
index d3236cabeec09baeb17fe81247103312b2a79c6d..8d13a27f89b1c7c55fae5a89daa37226a89d12d0 100644 (file)
@@ -27,11 +27,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const std::string ScrollViewTwistEffect::EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
-const std::string ScrollViewTwistEffect::EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
-const std::string ScrollViewTwistEffect::EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
-const std::string ScrollViewTwistEffect::EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
-
 const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
 
 ScrollViewTwistEffect ScrollViewTwistEffect::New()
index 7ea334eefe32f8e1c46a0468a81a7ecbe299aaf5..f03d94addb509923837657e088ca16275d1cc633 100644 (file)
@@ -30,18 +30,6 @@ namespace Toolkit
 
 
 const char* const TextView::SIGNAL_TEXT_SCROLLED = "scrolled";
-const char* const TextView::PROPERTY_TEXT = "text";
-const char* const TextView::PROPERTY_MULTILINE_POLICY = "multiline-policy";
-const char* const TextView::PROPERTY_WIDTH_EXCEED_POLICY = "width-exceed-policy";
-const char* const TextView::PROPERTY_HEIGHT_EXCEED_POLICY = "height-exceed-policy";
-const char* const TextView::PROPERTY_LINE_JUSTIFICATION = "line-justification";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_LEFT = "fade-boundary-left";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_RIGHT = "fade-boundary-right";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_TOP = "fade-boundary-top";
-const char* const TextView::PROPERTY_FADE_BOUNDARY_BOTTOM = "fade-boundary-bottom";
-const char* const TextView::PROPERTY_LINE_HEIGHT_OFFSET = "line-height-offset";
-const char* const TextView::PROPERTY_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
-const char* const TextView::PROPERTY_VERTICAL_ALIGNMENT = "vertical-alignment";
 
 TextView::CharacterLayoutInfo::CharacterLayoutInfo()
 : mSize(),
index 8364ae2363649de3d70c47e125c3ac44ad628687..d172135c660f83b1919559f838720bc22204eb22 100644 (file)
@@ -33,8 +33,6 @@ namespace Toolkit
 const char* const FocusManager::SIGNAL_FOCUS_CHANGED = "focus-changed";
 const char* const FocusManager::SIGNAL_FOCUS_OVERSHOT = "focus-overshot";
 const char* const FocusManager::SIGNAL_FOCUSED_ACTOR_ACTIVATED = "focused-actor-activated";
-const std::string FocusManager::ACTOR_FOCUSABLE("focusable");
-const std::string FocusManager::IS_FOCUS_GROUP("is-focus-group");
 
 FocusManager::FocusManager()
 {