Merge remote-tracking branch 'origin/tizen' into new_text 65/36465/2
authorPaul Wisbey <p.wisbey@samsung.com>
Fri, 6 Mar 2015 16:12:34 +0000 (16:12 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 6 Mar 2015 16:22:59 +0000 (16:22 +0000)
Conflicts:
dali-toolkit/internal/controls/text-input/text-input-decorator-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-impl.h
dali-toolkit/internal/controls/text-input/text-input-popup-impl.cpp
dali-toolkit/internal/controls/text-view/text-view-impl.cpp
dali-toolkit/internal/controls/text-view/text-view-impl.h
dali-toolkit/internal/controls/text-view/text-view-word-processor.cpp
dali-toolkit/public-api/controls/text-input/text-input.h
dali-toolkit/public-api/controls/text-view/text-view.h

Change-Id: I02bcdd172b1be75e3f6aa38c4dc8c55cdc076399

91 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
build/tizen/docs/Makefile.am
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/controls/alignment/alignment-impl.cpp
dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.h
dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp
dali-toolkit/internal/controls/cluster/cluster-impl.cpp
dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp
dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp
dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp
dali-toolkit/internal/controls/navigation-frame/page-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h
dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp
dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-connector-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-carousel-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-cube-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-carousel-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-cube-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-spiral-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.h
dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp
dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.h
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/internal/controls/view/view-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h
dali-toolkit/public-api/controls/scrollable/scrollable.h
dali-toolkit/public-api/controls/slider/slider.h
dali-toolkit/public-api/controls/super-blur-view/super-blur-view.h
dali-toolkit/public-api/controls/table-view/table-view.h
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/text-controls/text-label.h
dali-toolkit/public-api/shader-effects/displacement-effect.h
dali-toolkit/public-api/shader-effects/dissolve-effect.cpp
dali-toolkit/public-api/shader-effects/dissolve-local-effect.cpp
dali-toolkit/public-api/shader-effects/mirror-effect.h
dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp
dali-toolkit/public-api/shader-effects/motion-blur-effect.h
dali-toolkit/public-api/shader-effects/motion-stretch-effect.cpp
dali-toolkit/public-api/shader-effects/motion-stretch-effect.h
dali-toolkit/public-api/shader-effects/nine-patch-mask-effect.cpp
dali-toolkit/public-api/shader-effects/soft-button-effect.cpp
dali-toolkit/public-api/shader-effects/soft-button-effect.h
docs/content/programming-guide/properties.h
docs/content/programming-guide/type-registration.h
plugins/dali-script-v8/docs/content/constants.js
plugins/dali-script-v8/docs/content/shader-effect.js
plugins/dali-script-v8/src/constants/constants-wrapper.cpp

index 8636839..05ced5a 100644 (file)
@@ -640,86 +640,86 @@ int UtcDaliPushButtonProperties(void)
 
   // Button::PROPERTY_AUTO_REPEATING
   button.SetAutoRepeating( false );
-  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_AUTO_REPEATING ) );
-  button.SetProperty( Button::PROPERTY_AUTO_REPEATING, true );
+  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::Property::AUTO_REPEATING ) );
+  button.SetProperty( Button::Property::AUTO_REPEATING, true );
   DALI_TEST_CHECK( button.IsAutoRepeating() ) ;
-  DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_AUTO_REPEATING ) );
+  DALI_TEST_CHECK( button.GetProperty< bool >( Button::Property::AUTO_REPEATING ) );
 
   // Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY
   button.SetInitialAutoRepeatingDelay( 10.0f );
-  DALI_TEST_EQUALS( 10.0f, button.GetProperty< float >( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
-  button.SetProperty( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, 25.0f );
+  DALI_TEST_EQUALS( 10.0f, button.GetProperty< float >( Button::Property::INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+  button.SetProperty( Button::Property::INITIAL_AUTO_REPEATING_DELAY, 25.0f );
   DALI_TEST_EQUALS( 25.0f, button.GetInitialAutoRepeatingDelay(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 25.0f, button.GetProperty< float >( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+  DALI_TEST_EQUALS( 25.0f, button.GetProperty< float >( Button::Property::INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
 
   //  Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY
   button.SetNextAutoRepeatingDelay( 3.0f );
-  DALI_TEST_EQUALS( 3.0f, button.GetProperty< float >( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
-  button.SetProperty( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY, 4.0f );
+  DALI_TEST_EQUALS( 3.0f, button.GetProperty< float >( Button::Property::NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+  button.SetProperty( Button::Property::NEXT_AUTO_REPEATING_DELAY, 4.0f );
   DALI_TEST_EQUALS( 4.0f, button.GetNextAutoRepeatingDelay(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 4.0f, button.GetProperty< float >( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+  DALI_TEST_EQUALS( 4.0f, button.GetProperty< float >( Button::Property::NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
 
   //  Button::PROPERTY_TOGGLABLE
   button.SetTogglableButton( false );
-  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_TOGGLABLE ) );
-  button.SetProperty( Button::PROPERTY_TOGGLABLE, true );
+  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::Property::TOGGLABLE ) );
+  button.SetProperty( Button::Property::TOGGLABLE, true );
   DALI_TEST_CHECK( button.IsTogglableButton() ) ;
-  DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_TOGGLABLE ) );
+  DALI_TEST_CHECK( button.GetProperty< bool >( Button::Property::TOGGLABLE ) );
 
   //  Button::PROPERTY_SELECTED
   button.SetSelected( false );
-  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_SELECTED ) );
-  button.SetProperty( Button::PROPERTY_SELECTED, true );
+  DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::Property::SELECTED ) );
+  button.SetProperty( Button::Property::SELECTED, true );
   DALI_TEST_CHECK( button.IsSelected() ) ;
-  DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_SELECTED ) );
+  DALI_TEST_CHECK( button.GetProperty< bool >( Button::Property::SELECTED ) );
 
   //  Button::PROPERTY_NORMAL_STATE_ACTOR
   {
     button.SetButtonImage( ResourceImage::New( "IMAGE_PATH_1") );
-    DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+    DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( Button::Property::NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
 
     Property::Map map;
     map[ "type" ] = "ImageActor";
 
-    button.SetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR, map );
-    DALI_TEST_EQUALS( "ImageActor", button.GetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+    button.SetProperty( Button::Property::NORMAL_STATE_ACTOR, map );
+    DALI_TEST_EQUALS( "ImageActor", button.GetProperty( Button::Property::NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
   }
 
   //  Button::PROPERTY_SELECTED_STATE_ACTOR
   {
     button.SetSelectedImage( ResourceImage::New( "IMAGE_PATH_2") );
-    DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+    DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
 
     Property::Map map;
     map[ "type" ] = "Actor";
 
-    button.SetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR, map );
-    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
-    DALI_TEST_CHECK( "ImageActor" != button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
+    button.SetProperty( Button::Property::SELECTED_STATE_ACTOR, map );
+    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+    DALI_TEST_CHECK( "ImageActor" != button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
   }
 
   //  Button::PROPERTY_DISABLED_STATE_ACTOR
   {
     button.SetDisabledImage( ResourceImage::New( "IMAGE_PATH_3") );
-    DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+    DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( Button::Property::DISABLED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
 
     Property::Map map;
     map[ "type" ] = "Actor";
 
-    button.SetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR, map );
-    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+    button.SetProperty( Button::Property::DISABLED_STATE_ACTOR, map );
+    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::DISABLED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
   }
 
   //  Button::PROPERTY_LABEL_ACTOR
   {
     button.SetLabel( "LABEL_TEXT_CUSTOM" );
-    DALI_TEST_EQUALS( "TextView", button.GetProperty( Button::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+    DALI_TEST_EQUALS( "TextView", button.GetProperty( Button::Property::LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
 
     Property::Map map;
     map[ "type" ] = "Actor";
 
-    button.SetProperty( Button::PROPERTY_LABEL_ACTOR, map );
-    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+    button.SetProperty( Button::Property::LABEL_ACTOR, map );
+    DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
   }
   END_TEST;
 }
index a8a47e0..7568a11 100644 (file)
@@ -182,6 +182,20 @@ bool TestPlatformAbstraction::LoadFile( const std::string& filename, std::vector
 }
 
 /**
+ * @copydoc PlatformAbstraction::LoadShaderBinFile()
+ */
+bool TestPlatformAbstraction::LoadShaderBinFile( const std::string& filename, std::vector< unsigned char >& buffer ) const
+{
+  mTrace.PushCall("LoadShaderBinFile", "");
+  if( mLoadFileResult.loadResult )
+  {
+    buffer = mLoadFileResult.buffer;
+  }
+
+  return mLoadFileResult.loadResult;
+}
+
+/**
  * @copydoc PlatformAbstraction::SaveFile()
  */
 bool TestPlatformAbstraction::SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const
@@ -229,6 +243,7 @@ bool TestPlatformAbstraction::WasCalled(TestFuncEnum func)
     case LoadResourceFunc:                    return mTrace.FindMethod("LoadResource");
     case SaveResourceFunc:                    return mTrace.FindMethod("SaveResource");
     case LoadFileFunc:                        return mTrace.FindMethod("LoadFile");
+    case LoadShaderBinFileFunc:               return mTrace.FindMethod("LoadShaderBinFile");
     case SaveFileFunc:                        return mTrace.FindMethod("SaveFile");
     case CancelLoadFunc:                      return mTrace.FindMethod("CancelLoad");
     case GetResourcesFunc:                    return mTrace.FindMethod("GetResources");
index afb67bf..bd9b592 100644 (file)
@@ -145,6 +145,11 @@ public:
   virtual bool LoadFile( const std::string& filename, std::vector< unsigned char >& buffer ) const;
 
   /**
+   * @copydoc PlatformAbstraction::LoadShaderBinFile()
+   */
+  virtual bool LoadShaderBinFile( const std::string& filename, std::vector< unsigned char >& buffer ) const;
+
+  /**
    * @copydoc PlatformAbstraction::SaveFile()
    */
   virtual bool SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const;
@@ -165,6 +170,7 @@ public: // TEST FUNCTIONS
     SaveResourceFunc,
     SaveFileFunc,
     LoadFileFunc,
+    LoadShaderBinFileFunc,
     CancelLoadFunc,
     GetResourcesFunc,
     IsLoadingFunc,
index f1edb7a..a424aa7 100644 (file)
@@ -407,34 +407,34 @@ int UtcDaliControlBackgroundProperties(void)
 
   DALI_TEST_CHECK( !control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_CHECK( control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Empty() );
+  DALI_TEST_EQUALS( control.GetProperty( Control::Property::BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
+  DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() );
 
-  control.SetProperty( Control::PROPERTY_BACKGROUND_COLOR, Color::RED );
+  control.SetProperty( Control::Property::BACKGROUND_COLOR, Color::RED );
   DALI_TEST_CHECK( control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::RED, TEST_LOCATION );
-  DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::RED, TEST_LOCATION );
+  DALI_TEST_EQUALS( control.GetProperty( Control::Property::BACKGROUND_COLOR ).Get< Vector4 >(), Color::RED, TEST_LOCATION );
 
   Property::Map imageMap;
   imageMap[ "filename" ] = "TestImage";
   Property::Map map;
   map[ "image" ] = imageMap;
-  control.SetProperty( Control::PROPERTY_BACKGROUND, map );
+  control.SetProperty( Control::Property::BACKGROUND, map );
   DALI_TEST_CHECK( control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::RED, TEST_LOCATION );
-  DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::RED, TEST_LOCATION );
+  DALI_TEST_EQUALS( control.GetProperty( Control::Property::BACKGROUND_COLOR ).Get< Vector4 >(), Color::RED, TEST_LOCATION );
 
-  Property::Value propValue = control.GetProperty( Control::PROPERTY_BACKGROUND );
+  Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
   DALI_TEST_CHECK( propValue.HasKey( "image" ) );
   DALI_TEST_CHECK( propValue.GetValue( "image" ).HasKey( "filename" ) );
   DALI_TEST_CHECK( propValue.GetValue( "image" ).GetValue( "filename" ).Get< std::string>() == "TestImage" );
 
   Property::Map emptyMap;
-  control.SetProperty( Control::PROPERTY_BACKGROUND, emptyMap );
+  control.SetProperty( Control::Property::BACKGROUND, emptyMap );
   DALI_TEST_CHECK( !control.GetBackgroundActor() );
   DALI_TEST_EQUALS( control.GetBackgroundColor(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_EQUALS( control.GetProperty( Control::PROPERTY_BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
-  DALI_TEST_CHECK( control.GetProperty( Control::PROPERTY_BACKGROUND ).Get< Property::Map >().Empty() );
+  DALI_TEST_EQUALS( control.GetProperty( Control::Property::BACKGROUND_COLOR ).Get< Vector4 >(), Color::TRANSPARENT, TEST_LOCATION );
+  DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() );
 
   END_TEST;
 }
@@ -449,15 +449,15 @@ int UtcDaliControlSizePolicyProperties(void)
   Control::SizePolicy heightPolicy( Control::Fixed );
 
   control.GetSizePolicy( widthPolicy, heightPolicy );
-  DALI_TEST_EQUALS( "FIXED", control.GetProperty( Control::PROPERTY_WIDTH_POLICY ).Get< std::string >(), TEST_LOCATION );
-  DALI_TEST_EQUALS( "FIXED", control.GetProperty( Control::PROPERTY_HEIGHT_POLICY ).Get< std::string >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( "FIXED", control.GetProperty( Control::Property::WIDTH_POLICY ).Get< std::string >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( "FIXED", control.GetProperty( Control::Property::HEIGHT_POLICY ).Get< std::string >(), TEST_LOCATION );
 
   control.SetSizePolicy( Control::Flexible, Control::Range );
-  DALI_TEST_EQUALS( "FLEXIBLE", control.GetProperty( Control::PROPERTY_WIDTH_POLICY ).Get< std::string >(), TEST_LOCATION );
-  DALI_TEST_EQUALS( "RANGE", control.GetProperty( Control::PROPERTY_HEIGHT_POLICY ).Get< std::string >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( "FLEXIBLE", control.GetProperty( Control::Property::WIDTH_POLICY ).Get< std::string >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( "RANGE", control.GetProperty( Control::Property::HEIGHT_POLICY ).Get< std::string >(), TEST_LOCATION );
 
-  control.SetProperty( Control::PROPERTY_WIDTH_POLICY, "MAXIMUM" );
-  control.SetProperty( Control::PROPERTY_HEIGHT_POLICY, "MINIMUM" );
+  control.SetProperty( Control::Property::WIDTH_POLICY, "MAXIMUM" );
+  control.SetProperty( Control::Property::HEIGHT_POLICY, "MINIMUM" );
   control.GetSizePolicy( widthPolicy, heightPolicy );
   DALI_TEST_EQUALS( Control::Maximum, widthPolicy, TEST_LOCATION );
   DALI_TEST_EQUALS( Control::Minimum, heightPolicy, TEST_LOCATION );
@@ -471,18 +471,18 @@ int UtcDaliControlSizeProperties(void)
 
   Control control = Control::New();
 
-  DALI_TEST_EQUALS( control.GetMinimumSize(), control.GetProperty( Control::PROPERTY_MINIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
-  DALI_TEST_EQUALS( control.GetMaximumSize(), control.GetProperty( Control::PROPERTY_MAXIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( control.GetMinimumSize(), control.GetProperty( Control::Property::MINIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( control.GetMaximumSize(), control.GetProperty( Control::Property::MAXIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
 
   control.SetMinimumSize( Vector3( 100.0f, 200.0f, 300.0f ) );
-  DALI_TEST_EQUALS( Vector3( 100.0f, 200.0f, 300.0f ), control.GetProperty( Control::PROPERTY_MINIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Vector3( 100.0f, 200.0f, 300.0f ), control.GetProperty( Control::Property::MINIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
 
 
   control.SetMaximumSize( Vector3( 200.0f, 250.0f, 800.0f ) );
-  DALI_TEST_EQUALS( Vector3( 200.0f, 250.0f, 800.0f ), control.GetProperty( Control::PROPERTY_MAXIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Vector3( 200.0f, 250.0f, 800.0f ), control.GetProperty( Control::Property::MAXIMUM_SIZE ).Get< Vector3 >(), TEST_LOCATION );
 
-  control.SetProperty( Control::PROPERTY_MINIMUM_SIZE, Vector3( 1.0f, 2.0f, 3.0f ) );
-  control.SetProperty( Control::PROPERTY_MAXIMUM_SIZE, Vector3( 10.0f, 20.0f, 30.0f ) );
+  control.SetProperty( Control::Property::MINIMUM_SIZE, Vector3( 1.0f, 2.0f, 3.0f ) );
+  control.SetProperty( Control::Property::MAXIMUM_SIZE, Vector3( 10.0f, 20.0f, 30.0f ) );
   DALI_TEST_EQUALS( control.GetMinimumSize(), Vector3( 1.0f, 2.0f, 3.0f ), TEST_LOCATION );
   DALI_TEST_EQUALS( control.GetMaximumSize(), Vector3( 10.0f, 20.0f, 30.0f ), TEST_LOCATION );
 
@@ -496,15 +496,15 @@ int UtcDaliControlKeyProperties(void)
   Control control = Control::New();
   Stage::GetCurrent().Add( control );
 
-  DALI_TEST_EQUALS( control.HasKeyInputFocus(), control.GetProperty( Control::PROPERTY_KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( control.HasKeyInputFocus(), control.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
 
   control.SetKeyInputFocus();
-  DALI_TEST_EQUALS( true, control.GetProperty( Control::PROPERTY_KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( true, control.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
 
   control.ClearKeyInputFocus();
-  DALI_TEST_EQUALS( false, control.GetProperty( Control::PROPERTY_KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
+  DALI_TEST_EQUALS( false, control.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
 
-  control.SetProperty( Control::PROPERTY_KEY_INPUT_FOCUS, true );
+  control.SetProperty( Control::Property::KEY_INPUT_FOCUS, true );
   DALI_TEST_EQUALS( true, control.HasKeyInputFocus(), TEST_LOCATION );
 
   END_TEST;
index ca1ac84..a3fed65 100644 (file)
@@ -144,19 +144,19 @@ int UtcDaliRadioButtonSelectedProperty(void)
   radioButton.SetPosition( 0.0f, 0.0f );
 
   // Default selected
-  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::Property::SELECTED ) == false );
 
   // Setting false selected
-  radioButton.SetProperty( Button::PROPERTY_SELECTED, false );
-  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+  radioButton.SetProperty( Button::Property::SELECTED, false );
+  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::Property::SELECTED ) == false );
 
   // Setting true selected
-  radioButton.SetProperty( Button::PROPERTY_SELECTED, true );
-  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_SELECTED ) == true );
+  radioButton.SetProperty( Button::Property::SELECTED, true );
+  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::Property::SELECTED ) == true );
 
   // Setting false again
-  radioButton.SetProperty( Button::PROPERTY_SELECTED, false );
-  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+  radioButton.SetProperty( Button::Property::SELECTED, false );
+  DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::Property::SELECTED ) == false );
 
   // Test selecting radio buttons
   RadioButton radioButton2 = RadioButton::New( "label" );
@@ -183,8 +183,8 @@ int UtcDaliRadioButtonSelectedProperty(void)
   application.Render();
 
   // Simulate touch events
-  DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
-  DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+  DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::Property::SELECTED ) == false );
+  DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::Property::SELECTED ) == false );
 
   // Select first radio
   {
@@ -203,8 +203,8 @@ int UtcDaliRadioButtonSelectedProperty(void)
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_SELECTED ) == true );
-    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::Property::SELECTED ) == true );
+    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::Property::SELECTED ) == false );
   }
 
   // Select an already selected radio
@@ -224,8 +224,8 @@ int UtcDaliRadioButtonSelectedProperty(void)
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_SELECTED ) == true );
-    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
+    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::Property::SELECTED ) == true );
+    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::Property::SELECTED ) == false );
   }
 
   // Select second radio
@@ -245,8 +245,8 @@ int UtcDaliRadioButtonSelectedProperty(void)
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
-    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_SELECTED ) == true );
+    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::Property::SELECTED ) == false );
+    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::Property::SELECTED ) == true );
   }
 
   // Select outside radio group
@@ -266,8 +266,8 @@ int UtcDaliRadioButtonSelectedProperty(void)
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_SELECTED ) == false );
-    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_SELECTED ) == true );
+    DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::Property::SELECTED ) == false );
+    DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::Property::SELECTED ) == true );
   }
 
   END_TEST;
index 43d186f..9b9cad1 100644 (file)
@@ -818,7 +818,7 @@ int UtcDaliScrollViewConstraints(void)
   Wait(application);
 
   Property::Index scrollPositionProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_POSITION_PROPERTY_NAME);
-  Constraint constraint = Constraint::New<Vector3>( Actor::Property::Position,
+  Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
                                                        Source(scrollView, scrollPositionProperty),
                                                        TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
   constraint.SetRemoveAction(Constraint::Discard);
@@ -867,7 +867,7 @@ int UtcDaliScrollViewBind(void)
 
   Property::Index scrollPositionProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_POSITION_PROPERTY_NAME);
   // apply this constraint to scrollview
-  Constraint constraint = Constraint::New<Vector3>( Actor::Property::Position,
+  Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
                                                        Source(scrollView, scrollPositionProperty),
                                                        TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
 
index e10107b..5cda497 100644 (file)
@@ -141,7 +141,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
   scrollView.SetSize(size);
   scrollView.SetAnchorPoint(AnchorPoint::CENTER);
   scrollView.SetParentOrigin(ParentOrigin::CENTER);
-  scrollView.ApplyConstraint( Constraint::New<Dali::Vector3>( Dali::Actor::Property::Size, Dali::ParentSource( Dali::Actor::Property::Size ), Dali::EqualToConstraint() ) );
+  scrollView.ApplyConstraint( Constraint::New<Dali::Vector3>( Dali::Actor::Property::SIZE, Dali::ParentSource( Dali::Actor::Property::SIZE ), Dali::EqualToConstraint() ) );
   scrollView.SetWrapMode(false);
   scrollView.ScrollStartedSignal().Connect( &OnScrollStart );
   scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
@@ -175,7 +175,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
   container.SetAnchorPoint(AnchorPoint::CENTER);
   container.SetSize( size );
   scrollView.Add( container );
-  container.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+  container.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
 
   gPages.clear();
   for(int row = 0;row<rows;row++)
@@ -183,7 +183,7 @@ ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
     for(int column = 0;column<columns;column++)
     {
       Actor page = Actor::New();
-      page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+      page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
       page.SetParentOrigin( ParentOrigin::CENTER );
       page.SetAnchorPoint( AnchorPoint::CENTER );
       page.SetPosition( column * size.x, row * size.y );
@@ -322,7 +322,7 @@ int UtcDaliScrollViewSpiralEffectTest(void)
   {
     Actor page = *pageIter;
     page.RemoveConstraints();
-    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
     effect.ApplyToPage(page, Vector2(Math::PI_2, 0.0f));
   }
   Wait(application);
@@ -431,7 +431,7 @@ int UtcDaliScrollViewPageCubeEffectTest(void)
   {
     Actor page = *pageIter;
     page.RemoveConstraints();
-    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
     effect.ApplyToPage(page, Vector2(Math::PI_2, 0.0f));
   }
   Wait(application);
@@ -466,7 +466,7 @@ int UtcDaliScrollViewPageCarouselEffectTest(void)
   {
     Actor page = *pageIter;
     page.RemoveConstraints();
-    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+    page.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
     effect.ApplyToPage(page);
   }
   Wait(application);
index 0b0463f..8fd2fb6 100644 (file)
@@ -136,8 +136,8 @@ int UtcDaliSliderSignals(void)
   {
     marks.push_back( MIN_BOUND + ( static_cast<float>(i) / ( NUM_MARKS - 1) ) * ( MAX_BOUND - MIN_BOUND ) );
   }
-  slider.SetProperty( Slider::MARKS_PROPERTY, marks );
-  slider.SetProperty( Slider::MARK_TOLERANCE_PROPERTY, 0.1f );
+  slider.SetProperty( Slider::Property::MARKS, marks );
+  slider.SetProperty( Slider::Property::MARK_TOLERANCE, 0.1f );
 
   slider.ValueChangedSignal().Connect( &OnSliderValueChanged );
   slider.MarkSignal().Connect( &OnSliderMark );
index 53bbae6..8773187 100644 (file)
@@ -42,7 +42,6 @@ const char* const PROPERTY_NAME_CELL_PADDING = "cell-padding";
 const char* const PROPERTY_NAME_LAYOUT_ROWS = "layout-rows";
 const char* const PROPERTY_NAME_LAYOUT_COLUMNS = "layout-columns";
 
-
 static bool gObjectCreatedCallBackCalled;
 
 static void TestCallback(BaseHandle handle)
@@ -50,7 +49,6 @@ static void TestCallback(BaseHandle handle)
   gObjectCreatedCallBackCalled = true;
 }
 
-
 struct Constraint100
 {
   Constraint100( )
@@ -90,7 +88,6 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
 
 } // namespace
 
-
 int UtcDaliTableViewNew(void)
 {
   ToolkitTestApplication application;
@@ -539,32 +536,32 @@ int UtcDaliTableViewSetGetProperty(void)
 
   // Create a 1x1 table-view
   TableView tableView = TableView::New(1,1);
-  tableView.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, Constraint100() ) );
+  tableView.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, Constraint100() ) );
   DALI_TEST_CHECK( tableView );
 
   // Test "rows" property
-  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_ROWS ) == TableView::PROPERTY_ROWS );
+  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_ROWS ) == TableView::Property::ROWS );
 
-  tableView.SetProperty( TableView::PROPERTY_ROWS, 4u );
+  tableView.SetProperty( TableView::Property::ROWS, 4u );
 
   DALI_TEST_CHECK( tableView.GetRows() == 4u );
-  DALI_TEST_CHECK( tableView.GetProperty(TableView::PROPERTY_ROWS).Get<unsigned int>() == 4u );
+  DALI_TEST_CHECK( tableView.GetProperty(TableView::Property::ROWS).Get<unsigned int>() == 4u );
 
   // Test "columns" property
-  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_COLUMNS ) == TableView::PROPERTY_COLUMNS );
+  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_COLUMNS ) == TableView::Property::COLUMNS );
 
-  tableView.SetProperty( TableView::PROPERTY_COLUMNS, 5u );
+  tableView.SetProperty( TableView::Property::COLUMNS, 5u );
 
   DALI_TEST_CHECK( tableView.GetColumns() == 5u );
-  DALI_TEST_CHECK( tableView.GetProperty(TableView::PROPERTY_COLUMNS).Get<unsigned int>() == 5u );
+  DALI_TEST_CHECK( tableView.GetProperty(TableView::Property::COLUMNS).Get<unsigned int>() == 5u );
 
   // Test "cell-padding" property
-  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_CELL_PADDING ) == TableView::PROPERTY_CELL_PADDING );
+  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_CELL_PADDING ) == TableView::Property::CELL_PADDING );
 
-  tableView.SetProperty( TableView::PROPERTY_CELL_PADDING, Size( 6.f, 8.f ) );
+  tableView.SetProperty( TableView::Property::CELL_PADDING, Size( 6.f, 8.f ) );
 
   DALI_TEST_EQUALS( tableView.GetCellPadding(), Size(6.f, 8.f), TEST_LOCATION );
-  DALI_TEST_EQUALS( tableView.GetProperty(TableView::PROPERTY_CELL_PADDING).Get<Vector2>(), Vector2(6.f,8.f), TEST_LOCATION );
+  DALI_TEST_EQUALS( tableView.GetProperty(TableView::Property::CELL_PADDING).Get<Vector2>(), Vector2(6.f,8.f), TEST_LOCATION );
 
   //{ "policy": "fixed", "value": 30.0 },
   Property::Map item1;
@@ -576,7 +573,7 @@ int UtcDaliTableViewSetGetProperty(void)
   item2[ "value" ] = 0.2f;
 
   // Test "layout-rows" property
-  DALI_TEST_CHECK( tableView.GetPropertyIndex(PROPERTY_NAME_LAYOUT_ROWS) == TableView::PROPERTY_LAYOUT_ROWS );
+  DALI_TEST_CHECK( tableView.GetPropertyIndex(PROPERTY_NAME_LAYOUT_ROWS) == TableView::Property::LAYOUT_ROWS );
 
   /*
    * "layout-rows":
@@ -588,12 +585,12 @@ int UtcDaliTableViewSetGetProperty(void)
   Property::Map layoutRows;
   layoutRows[ "1" ] = item1;
   layoutRows[ "3" ] = item2;
-  tableView.SetProperty( TableView::PROPERTY_LAYOUT_ROWS, layoutRows );
+  tableView.SetProperty( TableView::Property::LAYOUT_ROWS, layoutRows );
 
   DALI_TEST_EQUALS( tableView.GetFixedHeight( 1u ), 30.f, TEST_LOCATION );
   DALI_TEST_EQUALS( tableView.GetRelativeHeight( 3u ), 0.2f, TEST_LOCATION );
 
-  Property::Map layoutRowsGet = tableView.GetProperty(TableView::PROPERTY_LAYOUT_ROWS).Get<Property::Map>();
+  Property::Map layoutRowsGet = tableView.GetProperty(TableView::Property::LAYOUT_ROWS).Get<Property::Map>();
   DALI_TEST_CHECK( layoutRowsGet.GetKey(0).compare(layoutRows.GetKey(0)) == 0 );
   DALI_TEST_CHECK( layoutRowsGet.GetValue(0).GetValue( "policy" ).Get<std::string>().compare(layoutRows.GetValue(0).GetValue( "policy" ).Get<std::string>()) == 0 );
   DALI_TEST_EQUALS( layoutRowsGet.GetValue(0).GetValue( "value" ).Get<float>(),layoutRows.GetValue(0).GetValue( "value" ).Get<float>(), TEST_LOCATION );
@@ -602,7 +599,7 @@ int UtcDaliTableViewSetGetProperty(void)
   DALI_TEST_EQUALS( layoutRowsGet.GetValue(1).GetValue( "value" ).Get<float>(),layoutRows.GetValue(1).GetValue( "value" ).Get<float>(), TEST_LOCATION );
 
   // Test "layout-columns" property
-  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_LAYOUT_COLUMNS ) == TableView::PROPERTY_LAYOUT_COLUMNS );
+  DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_LAYOUT_COLUMNS ) == TableView::Property::LAYOUT_COLUMNS );
 
   /*
    * "layout-columns":
@@ -614,12 +611,12 @@ int UtcDaliTableViewSetGetProperty(void)
   Property::Map layoutColumns;
   layoutColumns[ "2" ] = item2;
   layoutColumns[ "3" ] = item1;
-  tableView.SetProperty( TableView::PROPERTY_LAYOUT_COLUMNS, layoutColumns );
+  tableView.SetProperty( TableView::Property::LAYOUT_COLUMNS, layoutColumns );
 
   DALI_TEST_EQUALS( tableView.GetRelativeWidth( 2u ), 0.2f, TEST_LOCATION );
   DALI_TEST_EQUALS( tableView.GetFixedWidth( 3u ), 30.f, TEST_LOCATION );
 
-  Property::Map layoutColumnsGet = tableView.GetProperty(TableView::PROPERTY_LAYOUT_COLUMNS).Get<Property::Map>();
+  Property::Map layoutColumnsGet = tableView.GetProperty(TableView::Property::LAYOUT_COLUMNS).Get<Property::Map>();
   DALI_TEST_CHECK( layoutColumnsGet.GetKey(0).compare(layoutColumns.GetKey(0)) == 0 );
   DALI_TEST_CHECK( layoutColumnsGet.GetValue(0).GetValue( "policy" ).Get<std::string>().compare(layoutColumns.GetValue(0).GetValue( "policy" ).Get<std::string>()) == 0 );
   DALI_TEST_EQUALS( layoutColumnsGet.GetValue(0).GetValue( "value" ).Get<float>(),layoutColumns.GetValue(0).GetValue( "value" ).Get<float>(), TEST_LOCATION );
@@ -637,7 +634,7 @@ int UtcDaliTableViewCustomProperties(void)
 
   // Create a 10x10 table-view
   TableView tableView = TableView::New(10,10);
-  tableView.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, Constraint100() ) );
+  tableView.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, Constraint100() ) );
   DALI_TEST_CHECK( tableView );
 
   // Create a child actor with the custom properties
index 8d70825..1314654 100644 (file)
@@ -5,3 +5,6 @@ all-local:
        @cat doxygen-errors.txt
        @if [ -s doxygen-errors.txt ]; then exit 1 ; fi
        @rm doxygen-errors.txt
+# Build JavaScript API documentation using yuidoc ( Yahoo JavaScript Documentation Tool )
+# We first test yuidoc exists, then change in to the dali-script-v8 docs directory and run yuidoc
+       @if [ ! `which yuidoc` = "" ]; then cd ../../../plugins/dali-script-v8/docs && yuidoc --config yuidoc.json -e ".cpp,.js,.md"  -o generated .. ../../../docs/content/shared-javascript-and-cpp-documentation/ ; fi
\ No newline at end of file
index 1bd65a8..b550ac1 100644 (file)
@@ -770,7 +770,7 @@ Path Builder::GetPath( const std::string& name )
           if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
           {
             ret = Path::New();
-            ret.SetProperty( Path::Property::Points, points);
+            ret.SetProperty( Path::Property::POINTS, points);
 
             //control-points property
             if( OptionalChild pointsProperty = IsChild( *path, "control-points") )
@@ -778,7 +778,7 @@ Path Builder::GetPath( const std::string& name )
               Dali::Property::Value points(Property::ARRAY);
               if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
               {
-                ret.SetProperty( Path::Property::ControlPoints, points);
+                ret.SetProperty( Path::Property::CONTROL_POINTS, points);
               }
             }
             else
index 17dfff6..62f5e08 100644 (file)
@@ -21,8 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-input.h>
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
+#include <dali/public-api/object/type-registry-helper.h>
 
 namespace Dali
 {
@@ -42,7 +41,8 @@ BaseHandle Create()
   return Toolkit::Alignment::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::Alignment), typeid(Toolkit::Control), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Alignment, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 struct ScaleToFillConstraint
 {
index dfbebc4..cc84448 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
 // INTERNAL INCLUDES
@@ -52,7 +53,8 @@ BaseHandle Create()
   return Toolkit::BloomView::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::BloomView), typeid(Toolkit::Control), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::BloomView, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 // default parameters
 const float BLOOM_THRESHOLD_DEFAULT = 0.25f;
@@ -72,14 +74,13 @@ const float BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 0.5f;
 
 const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 
-const std::string BLOOM_BLUR_STRENGTH_PROPERTY_NAME( "BlurStrengthProperty" );
-
-const std::string BLOOM_THRESHOLD_PROPERTY_NAME( "uBloomThreshold" );
-const std::string RECIP_ONE_MINUS_BLOOM_THRESHOLD_PROPERTY_NAME( "uRecipOneMinusBloomThreshold" );
-const std::string BLOOM_INTENSITY_PROPERTY_NAME( "uBloomIntensity" );
-const std::string BLOOM_SATURATION_PROPERTY_NAME( "uBloomSaturation" );
-const std::string IMAGE_INTENSITY_PROPERTY_NAME( "uImageIntensity" );
-const std::string IMAGE_SATURATION_PROPERTY_NAME( "uImageSaturation" );
+const char* const BLOOM_BLUR_STRENGTH_PROPERTY_NAME = "BlurStrengthProperty";
+const char* const BLOOM_THRESHOLD_PROPERTY_NAME = "uBloomThreshold";
+const char* const RECIP_ONE_MINUS_BLOOM_THRESHOLD_PROPERTY_NAME = "uRecipOneMinusBloomThreshold";
+const char* const BLOOM_INTENSITY_PROPERTY_NAME = "uBloomIntensity";
+const char* const BLOOM_SATURATION_PROPERTY_NAME = "uBloomSaturation";
+const char* const IMAGE_INTENSITY_PROPERTY_NAME = "uImageIntensity";
+const char* const IMAGE_SATURATION_PROPERTY_NAME = "uImageSaturation";
 
 ///////////////////////////////////////////////////////
 //
index b847925..3a0a7eb 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/scripting/scripting.h>
 
@@ -32,62 +33,43 @@ namespace Dali
 namespace Toolkit
 {
 
-const Property::Index Button::PROPERTY_DISABLED                     = Internal::Button::BUTTON_PROPERTY_START_INDEX;
-const Property::Index Button::PROPERTY_AUTO_REPEATING               = Internal::Button::BUTTON_PROPERTY_START_INDEX + 1;
-const Property::Index Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY = Internal::Button::BUTTON_PROPERTY_START_INDEX + 2;
-const Property::Index Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY    = Internal::Button::BUTTON_PROPERTY_START_INDEX + 3;
-const Property::Index Button::PROPERTY_TOGGLABLE                    = Internal::Button::BUTTON_PROPERTY_START_INDEX + 4;
-const Property::Index Button::PROPERTY_SELECTED                     = Internal::Button::BUTTON_PROPERTY_START_INDEX + 5;
-const Property::Index Button::PROPERTY_NORMAL_STATE_ACTOR           = Internal::Button::BUTTON_PROPERTY_START_INDEX + 6;
-const Property::Index Button::PROPERTY_SELECTED_STATE_ACTOR         = Internal::Button::BUTTON_PROPERTY_START_INDEX + 7;
-const Property::Index Button::PROPERTY_DISABLED_STATE_ACTOR         = Internal::Button::BUTTON_PROPERTY_START_INDEX + 8;
-const Property::Index Button::PROPERTY_LABEL_ACTOR                  = Internal::Button::BUTTON_PROPERTY_START_INDEX + 9;
-
 namespace Internal
 {
 
 namespace
 {
 
-const unsigned int INITIAL_AUTOREPEATING_DELAY( 0.15f );
-const unsigned int NEXT_AUTOREPEATING_DELAY( 0.05f );
-
-// Signals
-
-const char* const SIGNAL_PRESSED =       "pressed";
-const char* const SIGNAL_RELEASED =      "released";
-const char* const SIGNAL_CLICKED =       "clicked";
-const char* const SIGNAL_STATE_CHANGED = "state-changed";
-
-// Actions
-
-const char* const ACTION_BUTTON_CLICK =  "button-click";
-
 BaseHandle Create()
 {
   // empty handle as we cannot create button (but type registered for clicked signal)
   return BaseHandle();
 }
 
-TypeRegistration typeRegistration( typeid( Toolkit::Button ), typeid( Toolkit::Control ), Create );
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Button, Toolkit::Control, Create );
+
+DALI_PROPERTY_REGISTRATION( Button, "disabled",                     BOOLEAN, DISABLED                     )
+DALI_PROPERTY_REGISTRATION( Button, "auto-repeating",               BOOLEAN, AUTO_REPEATING               )
+DALI_PROPERTY_REGISTRATION( Button, "initial-auto-repeating-delay", FLOAT,   INITIAL_AUTO_REPEATING_DELAY )
+DALI_PROPERTY_REGISTRATION( Button, "next-auto-repeating-delay",    FLOAT,   NEXT_AUTO_REPEATING_DELAY    )
+DALI_PROPERTY_REGISTRATION( Button, "togglable",                    BOOLEAN, TOGGLABLE                    )
+DALI_PROPERTY_REGISTRATION( Button, "selected",                     BOOLEAN, SELECTED                     )
+DALI_PROPERTY_REGISTRATION( Button, "normal-state-actor",           MAP,     NORMAL_STATE_ACTOR           )
+DALI_PROPERTY_REGISTRATION( Button, "selected-state-actor",         MAP,     SELECTED_STATE_ACTOR         )
+DALI_PROPERTY_REGISTRATION( Button, "disabled-state-actor",         MAP,     DISABLED_STATE_ACTOR         )
+DALI_PROPERTY_REGISTRATION( Button, "label-actor",                  MAP,     LABEL_ACTOR                  )
 
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_PRESSED , &Button::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, SIGNAL_RELEASED, &Button::DoConnectSignal );
-SignalConnectorType signalConnector3( typeRegistration, SIGNAL_CLICKED, &Button::DoConnectSignal );
-SignalConnectorType signalConnector4( typeRegistration, SIGNAL_STATE_CHANGED, &Button::DoConnectSignal );
+DALI_SIGNAL_REGISTRATION(   Button, "pressed",                               SIGNAL_PRESSED               )
+DALI_SIGNAL_REGISTRATION(   Button, "released",                              SIGNAL_RELEASED              )
+DALI_SIGNAL_REGISTRATION(   Button, "clicked",                               SIGNAL_CLICKED               )
+DALI_SIGNAL_REGISTRATION(   Button, "state-changed",                         SIGNAL_STATE_CHANGED         )
 
-TypeAction action1( typeRegistration, ACTION_BUTTON_CLICK, &Button::DoAction );
+DALI_ACTION_REGISTRATION(   Button, "button-click",                          ACTION_BUTTON_CLICK          )
 
-PropertyRegistration property1( typeRegistration, "disabled",                     Toolkit::Button::PROPERTY_DISABLED,                     Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property2( typeRegistration, "auto-repeating",               Toolkit::Button::PROPERTY_AUTO_REPEATING,               Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property3( typeRegistration, "initial-auto-repeating-delay", Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, Property::FLOAT,   &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property4( typeRegistration, "next-auto-repeating-delay",    Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY,    Property::FLOAT,   &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property5( typeRegistration, "togglable",                    Toolkit::Button::PROPERTY_TOGGLABLE,                    Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property6( typeRegistration, "selected",                     Toolkit::Button::PROPERTY_SELECTED,                     Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property7( typeRegistration, "normal-state-actor",           Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR,           Property::MAP,     &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property8( typeRegistration, "selected-state-actor",         Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR,         Property::MAP,     &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property9( typeRegistration, "disabled-state-actor",         Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR,         Property::MAP,     &Button::SetProperty, &Button::GetProperty );
-PropertyRegistration property10( typeRegistration, "label-actor",                 Toolkit::Button::PROPERTY_LABEL_ACTOR,                  Property::MAP,     &Button::SetProperty, &Button::GetProperty );
+DALI_TYPE_REGISTRATION_END()
+
+const unsigned int INITIAL_AUTOREPEATING_DELAY( 0.15f );
+const unsigned int NEXT_AUTOREPEATING_DELAY( 0.05f );
 
 } // unnamed namespace
 
@@ -632,61 +614,61 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
   {
     switch ( index )
     {
-      case Toolkit::Button::PROPERTY_DISABLED:
+      case Toolkit::Button::Property::DISABLED:
       {
         GetImplementation( button ).SetDisabled( value.Get<bool>() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_AUTO_REPEATING:
+      case Toolkit::Button::Property::AUTO_REPEATING:
       {
         GetImplementation( button ).SetAutoRepeating( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY:
+      case Toolkit::Button::Property::INITIAL_AUTO_REPEATING_DELAY:
       {
         GetImplementation( button ).SetInitialAutoRepeatingDelay( value.Get< float >() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY:
+      case Toolkit::Button::Property::NEXT_AUTO_REPEATING_DELAY:
       {
         GetImplementation( button ).SetNextAutoRepeatingDelay( value.Get< float >() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_TOGGLABLE:
+      case Toolkit::Button::Property::TOGGLABLE:
       {
         GetImplementation( button ).SetTogglableButton( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_SELECTED:
+      case Toolkit::Button::Property::SELECTED:
       {
         GetImplementation( button ).SetSelected( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR:
+      case Toolkit::Button::Property::NORMAL_STATE_ACTOR:
       {
         GetImplementation( button ).SetButtonImage( Scripting::NewActor( value.Get< Property::Map >() ) );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR:
+      case Toolkit::Button::Property::SELECTED_STATE_ACTOR:
       {
         GetImplementation( button ).SetSelectedImage( Scripting::NewActor( value.Get< Property::Map >() ) );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR:
+      case Toolkit::Button::Property::DISABLED_STATE_ACTOR:
       {
         GetImplementation( button ).SetDisabledImage( Scripting::NewActor( value.Get< Property::Map >() ) );
         break;
       }
 
-      case Toolkit::Button::PROPERTY_LABEL_ACTOR:
+      case Toolkit::Button::Property::LABEL_ACTOR:
       {
         GetImplementation( button ).SetLabel( Scripting::NewActor( value.Get< Property::Map >() ) );
         break;
@@ -705,43 +687,43 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
   {
     switch ( propertyIndex )
     {
-      case Toolkit::Button::PROPERTY_DISABLED:
+      case Toolkit::Button::Property::DISABLED:
       {
         value = GetImplementation( button ).mDisabled;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_AUTO_REPEATING:
+      case Toolkit::Button::Property::AUTO_REPEATING:
       {
         value = GetImplementation( button ).mAutoRepeating;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY:
+      case Toolkit::Button::Property::INITIAL_AUTO_REPEATING_DELAY:
       {
         value = GetImplementation( button ).mInitialAutoRepeatingDelay;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY:
+      case Toolkit::Button::Property::NEXT_AUTO_REPEATING_DELAY:
       {
         value = GetImplementation( button ).mNextAutoRepeatingDelay;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_TOGGLABLE:
+      case Toolkit::Button::Property::TOGGLABLE:
       {
         value = GetImplementation( button ).mTogglableButton;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_SELECTED:
+      case Toolkit::Button::Property::SELECTED:
       {
         value = GetImplementation( button ).mSelected;
         break;
       }
 
-      case Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR:
+      case Toolkit::Button::Property::NORMAL_STATE_ACTOR:
       {
         Property::Map map;
         Scripting::CreatePropertyMap( GetImplementation( button ).mButtonContent, map );
@@ -749,7 +731,7 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
         break;
       }
 
-      case Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR:
+      case Toolkit::Button::Property::SELECTED_STATE_ACTOR:
       {
         Property::Map map;
         Scripting::CreatePropertyMap( GetImplementation( button ).mSelectedContent, map );
@@ -757,7 +739,7 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
         break;
       }
 
-      case Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR:
+      case Toolkit::Button::Property::DISABLED_STATE_ACTOR:
       {
         Property::Map map;
         Scripting::CreatePropertyMap( GetImplementation( button ).mDisabledContent, map );
@@ -765,7 +747,7 @@ Property::Value Button::GetProperty( BaseObject* object, Property::Index propert
         break;
       }
 
-      case Toolkit::Button::PROPERTY_LABEL_ACTOR:
+      case Toolkit::Button::Property::LABEL_ACTOR:
       {
         Property::Map map;
         Scripting::CreatePropertyMap( GetImplementation( button ).mLabel, map );
index 2c4c115..f9dee5a 100644 (file)
@@ -41,14 +41,6 @@ namespace Internal
  */
 class Button : public Control
 {
-public:
-
-  // Properties
-  enum
-  {
-    BUTTON_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    BUTTON_PROPERTY_END_INDEX = BUTTON_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
 
 protected:
 
@@ -533,4 +525,3 @@ inline const Toolkit::Internal::Button& GetImplementation( const Toolkit::Button
 } // namespace Dali
 
 #endif // __DALI_TOOLKIT_INTERNAL_BUTTON_H__
-
index b535498..754cf8f 100644 (file)
@@ -454,7 +454,7 @@ void CheckBoxButton::StartCheckInAnimation( Actor& actor )
     mCheckInAnimation.AnimateTo( Property( mTickUVEffect, mTickUVEffect.GetBottomRightPropertyName() ), Vector2( 1.0f, 1.0f ) );
 
     // Actor size anim
-    mCheckInAnimation.AnimateTo( Property( actor, Actor::Property::ScaleX ), 1.0f );
+    mCheckInAnimation.AnimateTo( Property( actor, Actor::Property::SCALE_X ), 1.0f );
 
     mCheckInAnimation.FinishedSignal().Connect( this, &CheckBoxButton::CheckInAnimationFinished );
     mCheckInAnimation.Play();
index 2aa8302..e17e9b5 100644 (file)
@@ -22,6 +22,7 @@
 #include <algorithm>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 
 using namespace Dali;
 
-namespace // unnamed namespace
-{
-
-const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f;
-
-}
-
 namespace Dali
 {
 
@@ -49,23 +43,21 @@ namespace Internal
 namespace
 {
 
-// Actions
-
-const char* const ACTION_EXPAND =    "expand";
-const char* const ACTION_COLLAPSE =  "collapse";
-const char* const ACTION_TRANSFORM = "transform";
-
 BaseHandle Create()
 {
   Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New( Toolkit::ClusterStyleStandard::ClusterStyle1 );
   return Toolkit::Cluster::New( s );
 }
 
-TypeRegistration mType( typeid( Toolkit::Cluster ), typeid( Toolkit::Control ), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Cluster, Toolkit::Control, Create )
+
+DALI_ACTION_REGISTRATION( Cluster, "expand",    ACTION_EXPAND    )
+DALI_ACTION_REGISTRATION( Cluster, "collapse",  ACTION_COLLAPSE  )
+DALI_ACTION_REGISTRATION( Cluster, "transform", ACTION_TRANSFORM )
 
-TypeAction a1( mType, ACTION_EXPAND,    &Cluster::DoAction );
-TypeAction a2( mType, ACTION_COLLAPSE,  &Cluster::DoAction );
-TypeAction a3( mType, ACTION_TRANSFORM, &Cluster::DoAction );
+DALI_TYPE_REGISTRATION_END()
+
+const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f;
 
 }
 
@@ -351,9 +343,9 @@ void Cluster::TransformChild( unsigned int index, const Vector3& position, const
 
       child.RemoveConstraints();
       Animation animation = Animation::New(period.delaySeconds + period.durationSeconds);
-      animation.AnimateTo( Property(child, Actor::Property::Position), position, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::Scale), scale, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::Rotation), rotation, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::POSITION), position, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::SCALE), scale, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::ROTATION), rotation, AlphaFunctions::EaseOut, period);
       animation.Play();
     }
   }
index 18a5e9d..5b9a1ea 100644 (file)
@@ -470,7 +470,6 @@ void ClusterStyleRandom::ApplyStyle(Actor child, unsigned int index, AlphaFuncti
   Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
   float depthPropertyValue = child.GetProperty<float>( depthProperty );
 
-
   Apply( child,
          FirstOrderEquation( GetClusterSize(), Vector3(position.x, position.y, 0.0f), Vector3(0.0f, 0.0f, depthPropertyValue) ),
          FirstOrderEquation( GetClusterSize(), Vector3::ONE * size),
index 9f26fd7..8304e0e 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
 // INTERNAL INCLUDES
@@ -48,21 +49,24 @@ Dali::BaseHandle Create()
   return Toolkit::EffectsView::New();
 }
 
-Dali::TypeRegistration mType( typeid(Dali::Toolkit::EffectsView), typeid(Dali::Toolkit::Control), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::EffectsView, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 const Pixel::Format EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT = Pixel::RGBA8888;
 const float         ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 const Vector4       EFFECTS_VIEW_DEFAULT_BACKGROUND_COLOR( 1.0f, 1.0f, 1.0f, 0.0 );
 const bool          EFFECTS_VIEW_REFRESH_ON_DEMAND(false);
-// custom properties
+
+// Custom properties
+const char* const   EFFECT_SIZE_PROPERTY_NAME = "EffectSize";
+const char* const   EFFECT_STRENGTH_PROPERTY_NAME = "EffectStrength";
+const char* const   EFFECT_OFFSET_PROPERTY_NAME = "EffectOffset";
+const char* const   EFFECT_COLOR_PROPERTY_NAME = "EffectColor";
+
 const float         EFFECT_SIZE_DEFAULT( 1.0f );
-const std::string   EFFECT_SIZE_PROPERTY_NAME( "EffectSize" );
 const float         EFFECT_STRENGTH_DEFAULT( 0.5f );
-const std::string   EFFECT_STRENGTH_PROPERTY_NAME( "EffectStrength" );
 const Vector3       EFFECT_OFFSET_DEFAULT( 0.0f, 0.0f, 0.0f );
-const std::string   EFFECT_OFFSET_PROPERTY_NAME( "EffectOffset" );
 const Vector4       EFFECT_COLOR_DEFAULT( Color::WHITE );
-const std::string   EFFECT_COLOR_PROPERTY_NAME( "EffectColor" );
 
 const char* const EFFECTS_VIEW_FRAGMENT_SOURCE =
     "void main()\n"
@@ -267,8 +271,8 @@ void EffectsView::SetupProperties()
   mEffectStrengthPropertyIndex = self.RegisterProperty(EFFECT_STRENGTH_PROPERTY_NAME, EFFECT_STRENGTH_DEFAULT, Property::READ_WRITE);
   mEffectOffsetPropertyIndex   = self.RegisterProperty(EFFECT_OFFSET_PROPERTY_NAME, EFFECT_OFFSET_DEFAULT);
   mEffectColorPropertyIndex    = self.RegisterProperty(EFFECT_COLOR_PROPERTY_NAME, EFFECT_COLOR_DEFAULT);
-  mActorPostFilter.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Position, Source( self, mEffectOffsetPropertyIndex ), EqualToConstraint() ) );
-  mActorPostFilter.ApplyConstraint( Constraint::New<Vector4>( Actor::Property::Color, Source( self, mEffectColorPropertyIndex ), EqualToConstraint() ) );
+  mActorPostFilter.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::POSITION, Source( self, mEffectOffsetPropertyIndex ), EqualToConstraint() ) );
+  mActorPostFilter.ApplyConstraint( Constraint::New<Vector4>( Actor::Property::COLOR, Source( self, mEffectColorPropertyIndex ), EqualToConstraint() ) );
 }
 
 void EffectsView::SetBackgroundColor( const Vector4& color )
index f1359c7..c1ce8b8 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 #include <dali/integration-api/debug.h>
 
@@ -40,7 +41,6 @@
 // Manager object - re-use render targets if there are multiple GaussianBlurViews created
 
 
-
 /////////////////////////////////////////////////////////
 // IMPLEMENTATION NOTES
 
@@ -85,14 +85,14 @@ BaseHandle Create()
   return Toolkit::GaussianBlurView::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::GaussianBlurView), typeid(Toolkit::Control), Create );
-
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::GaussianBlurView, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 const unsigned int GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES = 5;
 const float GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_BELL_CURVE_WIDTH = 1.5f;
 const Pixel::Format GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT = Pixel::RGBA8888;
 const float GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH = 1.0f;                                       // default, fully blurred
-const std::string GAUSSIAN_BLUR_VIEW_STRENGTH_PROPERTY_NAME("GaussianBlurStrengthPropertyName");
+const char* const GAUSSIAN_BLUR_VIEW_STRENGTH_PROPERTY_NAME = "GaussianBlurStrengthPropertyName";
 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE = 0.5f;
 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 0.5f;
 
@@ -300,7 +300,7 @@ void GaussianBlurView::OnInitialize()
     mImageActorComposite.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
     mImageActorComposite.SetOpacity(GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
 
-    Constraint blurStrengthConstraint = Constraint::New<float>( Actor::Property::ColorAlpha, ParentSource(mBlurStrengthPropertyIndex), EqualToConstraintFloat());
+    Constraint blurStrengthConstraint = Constraint::New<float>( Actor::Property::COLOR_ALPHA, ParentSource(mBlurStrengthPropertyIndex), EqualToConstraintFloat());
     mImageActorComposite.ApplyConstraint(blurStrengthConstraint);
 
     // Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
index 2dbe35c..c5d9ef8 100644 (file)
@@ -545,7 +545,7 @@ void MaskedImageView::Initialize( unsigned int targetWidth,
   mRenderTask.SetInputEnabled( false );
   mRenderTask.SetExclusive( true );
   mRenderTask.SetClearEnabled( true );
-  mRenderTask.ApplyConstraint( Constraint::New<Vector4>( RenderTask::Property::ClearColor,
+  mRenderTask.ApplyConstraint( Constraint::New<Vector4>( RenderTask::Property::CLEAR_COLOR,
                                                          Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR ] ),
                                                          EqualToConstraint() ) );
   mRenderTask.FinishedSignal().Connect( this, &MaskedImageView::OnRenderTaskFinished );
index b9749da..6f9ad18 100644 (file)
@@ -192,7 +192,7 @@ void Magnifier::Initialize()
   mSourceActor = Actor::New();
   Stage().GetCurrent().Add(mSourceActor);
   mSourceActor.SetParentOrigin(ParentOrigin::CENTER);
-  Constraint constraint = Constraint::New<Vector3>( Actor::Property::Position,
+  Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
                                                     Source( self, mPropertySourcePosition ),
                                                     EqualToConstraint() );
   mSourceActor.ApplyConstraint(constraint);
@@ -224,23 +224,23 @@ void Magnifier::Initialize()
   // at the end of the update cycle i.e. after constraints have been applied.)
   //Property::Index propertySourcePositionDelayed = mCameraActor.RegisterProperty("delayed-source-position", Vector3::ZERO);
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         Source( mSourceActor, Actor::Property::WorldPosition ),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         Source( mSourceActor, Actor::Property::WORLD_POSITION ),
                                          CameraActorPositionConstraint(stageSize, mDefaultCameraDistance) );
   mCameraActor.ApplyConstraint(constraint);
 
   // Apply constraint to render-task viewport position
-  constraint = Constraint::New<Vector2>( RenderTask::Property::ViewportPosition,
-                                         Source( self, Actor::Property::WorldPosition ),//mPropertySourcePosition ),
-                                         Source( self, Actor::Property::Size ),
-                                         Source( self, Actor::Property::WorldScale ),
+  constraint = Constraint::New<Vector2>( RenderTask::Property::VIEWPORT_POSITION,
+                                         Source( self, Actor::Property::WORLD_POSITION ),//mPropertySourcePosition ),
+                                         Source( self, Actor::Property::SIZE ),
+                                         Source( self, Actor::Property::WORLD_SCALE ),
                                          RenderTaskViewportPositionConstraint(stageSize) );
   mTask.ApplyConstraint(constraint);
 
   // Apply constraint to render-task viewport position
-  constraint = Constraint::New<Vector2>( RenderTask::Property::ViewportSize,
-                                         Source( self, Actor::Property::Size ),
-                                         Source( self, Actor::Property::WorldScale ),
+  constraint = Constraint::New<Vector2>( RenderTask::Property::VIEWPORT_SIZE,
+                                         Source( self, Actor::Property::SIZE ),
+                                         Source( self, Actor::Property::WORLD_SCALE ),
                                          RenderTaskViewportSizeConstraint() );
   mTask.ApplyConstraint(constraint);
 }
@@ -289,8 +289,8 @@ void Magnifier::SetFrameVisibility(bool visible)
     mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
     mFrame.SetInheritScale(true);
 
-    Constraint constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                                      ParentSource( Actor::Property::WorldPosition ),
+    Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                                      ParentSource( Actor::Property::WORLD_POSITION ),
                                                       EqualToConstraint() );
     mFrame.ApplyConstraint( constraint );
 
index 3c7e78a..ac5244a 100644 (file)
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 #include <dali-toolkit/internal/controls/navigation-frame/navigation-tool-bar.h>
 #include <dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.h>
 #include <dali-toolkit/internal/controls/relayout-controller.h>
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 
 namespace Dali
 {
@@ -41,20 +42,18 @@ namespace Internal
 namespace // to register type
 {
 
-// Actions
-
-const char* const ACTION_PUSH = "push";
-const char* const ACTION_POP =  "pop";
-
 BaseHandle Create()
 {
   return Toolkit::NavigationControl::New();
 }
 
-TypeRegistration mType( typeid( Toolkit::NavigationControl ), typeid( Toolkit::Control ), Create );
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::NavigationControl, Toolkit::Control, Create )
+
+DALI_ACTION_REGISTRATION( NavigationControl, "push", ACTION_PUSH )
+DALI_ACTION_REGISTRATION( NavigationControl, "pop",  ACTION_POP  )
 
-TypeAction a1( mType, ACTION_PUSH, &NavigationControl::DoAction );
-TypeAction a2( mType, ACTION_POP, &NavigationControl::DoAction );
+DALI_TYPE_REGISTRATION_END()
 
 }
 
index a484d64..7ca18c9 100644 (file)
@@ -20,8 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
+#include <dali/public-api/object/type-registry-helper.h>
 
 namespace Dali
 {
@@ -40,7 +39,8 @@ BaseHandle Create()
   return Toolkit::Page::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::Page), typeid(CustomActor), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Page, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 } // unnamed namespace
 
index 64bac9a..8397530 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 namespace Dali
 {
@@ -33,7 +34,10 @@ namespace Internal
 namespace
 {
 using namespace Dali;
-TypeRegistration mType( typeid(Toolkit::PageTurnLandscapeView), typeid(Toolkit::PageTurnView), NULL );
+
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::PageTurnLandscapeView, Toolkit::PageTurnView, NULL )
+DALI_TYPE_REGISTRATION_END()
+
 }
 
 PageTurnLandscapeView::PageTurnLandscapeView( PageFactory& pageFactory, const Vector2& pageSize )
index 8b9d22f..d5f8b01 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 namespace Dali
 {
@@ -34,13 +35,16 @@ namespace Internal
 namespace
 {
 using namespace Dali;
-TypeRegistration mType( typeid(Toolkit::PageTurnPortraitView), typeid(Toolkit::PageTurnView), NULL );
+
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::PageTurnPortraitView, Toolkit::PageTurnView, NULL )
+DALI_TYPE_REGISTRATION_END()
 
 // the panning speed threshold, no matter how far is the pan displacement, pan fast to left/right quickly (speed > 0.3) will turn over/back the page
 const float GESTURE_SPEED_THRESHOLD(0.3f);
 
 // the animation duration of turning the previous page back when an outwards flick is detected
 const float PAGE_TURN_OVER_ANIMATION_DURATION(0.5f);
+
 }
 
 PageTurnPortraitView::PageTurnPortraitView( PageFactory& pageFactory, const Vector2& pageSize )
@@ -150,7 +154,7 @@ void PageTurnPortraitView::OnPossibleOutwardsFlick( const Vector2& panPosition,
     animation.AnimateTo( Property( mTurnEffect[mIndex], mTurnEffect[mIndex].PageTurnEffect::GetCurrentCenterPropertyName() ),
                          originalCenter,
                          AlphaFunctions::EaseOut, PAGE_TURN_OVER_ANIMATION_DURATION*0.75f );
-    animation.AnimateBy( Property( actor, Actor::Property::Rotation ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunctions::EaseOut );
+    animation.AnimateBy( Property( actor, Actor::Property::ROTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunctions::EaseOut );
     animation.Play();
     ImageActor::DownCast(actor).SetCullFace( CullBack );
     animation.FinishedSignal().Connect( this, &PageTurnPortraitView::OnTurnedOver );
index f757f95..562b8d2 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/events/hit-test-algorithm.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
 // INTERNAL INCLUDES
 
 using namespace Dali;
 
-namespace //unnamed namespace
+namespace //Unnamed namespace
 {
 // To register type
-TypeRegistration mType( typeid(Toolkit::PageTurnView), typeid(Toolkit::Control), NULL );
+
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::PageTurnView, Toolkit::Control, NULL )
+DALI_TYPE_REGISTRATION_END()
 
 // default grid density for page turn effect, 10 pixels by 10 pixels
 const float DEFAULT_GRID_DENSITY(10.0f);
@@ -311,7 +314,7 @@ void PageTurnView::OnInitialize()
   for( int i = 0; i < MAXIMUM_TURNING_NUM; i++ )
   {
     mTurnEffect[i] = Toolkit::PageTurnEffect::New( false );
-    mTurnEffect[i].SetProperty( ShaderEffect::Property::GridDensity, Property::Value( DEFAULT_GRID_DENSITY ) );
+    mTurnEffect[i].SetProperty( ShaderEffect::Property::GRID_DENSITY, Property::Value( DEFAULT_GRID_DENSITY ) );
     mTurnEffect[i].SetPageSize( mPageSize );
     mTurnEffect[i].SetShadowWidth(0.f);
     mTurnEffect[i].SetSpineShadowParameter( mSpineShadowParameter );
@@ -889,7 +892,7 @@ void PageTurnView::PanContinuing( const Vector2& gesturePosition )
         GetImpl( mTurnEffect[mIndex] ).ApplyInternalConstraint();
 
         float distance = offset.Length();
-        Constraint rotationConstraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
+        Constraint rotationConstraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
                                                                      Source( self, mPropertyPanDisplacement[mIndex] ),
                                                                      RotationConstraint(distance, mPageSize.width, mIsTurnBack[mPanActor]));
         mPanActor.ApplyConstraint( rotationConstraint );
index 3cd71d8..c7bbaf6 100755 (executable)
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/buttons/button.h>
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
+#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 #include <dali-toolkit/internal/controls/relayout-helper.h>
 #include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 
 using namespace Dali;
 
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
 namespace
 {
+
+BaseHandle Create()
+{
+  return Toolkit::Popup::New();
+}
+
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Popup, Toolkit::Control, Create )
+
+DALI_SIGNAL_REGISTRATION( Popup, "touched-outside", SIGNAL_TOUCHED_OUTSIDE )
+DALI_SIGNAL_REGISTRATION( Popup, "hidden",          SIGNAL_HIDDEN          )
+
+DALI_TYPE_REGISTRATION_END()
+
+// Properties
+const char* const PROPERTY_TITLE = "title";
+const char* const PROPERTY_STATE = "state";
+
 const float CONTENT_DEPTH = 1.0f;                                 ///< 3D Effect of buttons/title etc. appearing off the popup.
 const float POPUP_ANIMATION_DURATION = 0.5f;                      ///< Duration of hide/show animations
 const float BACKING_DEPTH = -1.0f;                                ///< Depth of backing (positioned just behind dialog, so dialog catches hit events first)
@@ -53,16 +81,6 @@ 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);
 
-// Signals
-
-const char* const SIGNAL_TOUCHED_OUTSIDE = "touched-outside";
-const char* const SIGNAL_HIDDEN =          "hidden";
-
-// Properties
-
-const char* const PROPERTY_TITLE =         "title";
-const char* const PROPERTY_STATE =         "state";
-
 /**
  * The background size should be at least as big as the Dialog.
  * In some cases a background may have graphics which are visible
@@ -99,32 +117,6 @@ Vector3 ButtonAreaSize( const Vector4& outBoarder, const Vector3& parentSize )
 
 } // unnamed namespace
 
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace
-{
-
-BaseHandle Create()
-{
-  return Toolkit::Popup::New();
-}
-
-TypeRegistration typeRegistration( typeid( Toolkit::Popup ), typeid( Toolkit::Control ), Create );
-
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TOUCHED_OUTSIDE, &Popup::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, SIGNAL_HIDDEN, &Popup::DoConnectSignal );
-
-
-}
-
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Popup
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -488,13 +480,13 @@ void Popup::HandleStateChange( Toolkit::Popup::PopupState state, float duration
 
     if(mShowing)
     {
-      mAnimation.AnimateTo( Property(mBacking, Actor::Property::ColorAlpha), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
-      mAnimation.AnimateTo( Property(mPopupBg, Actor::Property::Scale), targetSize, AlphaFunctions::EaseInOut, TimePeriod(duration * 0.5f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mPopupBg, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(duration * 0.5f, duration * 0.5f) );
     }
     else
     {
-      mAnimation.AnimateTo( Property(mBacking, Actor::Property::ColorAlpha), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
-      mAnimation.AnimateTo( Property(mPopupBg, Actor::Property::Scale), targetSize, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mPopupBg, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
     }
     mAnimation.Play();
     mAnimation.FinishedSignal().Connect(this, &Popup::OnStateAnimationFinished);
index a61f6f0..bae2b78 100755 (executable)
@@ -22,6 +22,7 @@
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
@@ -102,11 +103,6 @@ namespace Dali
 namespace Toolkit
 {
 
-const Property::Index ScrollBar::PROPERTY_INDICATOR_HEIGHT_POLICY( Internal::ScrollBar::SCROLLBAR_PROPERTY_START_INDEX );
-const Property::Index ScrollBar::PROPERTY_INDICATOR_FIXED_HEIGHT( Internal::ScrollBar::SCROLLBAR_PROPERTY_START_INDEX + 1 );
-const Property::Index ScrollBar::PROPERTY_INDICATOR_SHOW_DURATION( Internal::ScrollBar::SCROLLBAR_PROPERTY_START_INDEX + 2 );
-const Property::Index ScrollBar::PROPERTY_INDICATOR_HIDE_DURATION( Internal::ScrollBar::SCROLLBAR_PROPERTY_START_INDEX + 3 );
-
 namespace Internal
 {
 
@@ -115,21 +111,25 @@ namespace
 
 using namespace Dali;
 
-const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"Variable", "Fixed"};
-
 BaseHandle Create()
 {
   return Toolkit::ScrollBar::New();
 }
 
-TypeRegistration typeRegistration( typeid( Toolkit::ScrollBar ), typeid( Toolkit::ScrollComponent ), Create );
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollBar, Toolkit::ScrollComponent, Create );
+
+DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-height-policy", STRING, INDICATOR_HEIGHT_POLICY         )
+DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-fixed-height",  FLOAT,  INDICATOR_FIXED_HEIGHT          )
+DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-show-duration", FLOAT,  INDICATOR_SHOW_DURATION         )
+DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-hide-duration", FLOAT,  INDICATOR_HIDE_DURATION         )
 
-const char* const SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
+DALI_SIGNAL_REGISTRATION(   ScrollBar, "scroll-position-notified",        SCROLL_POSITION_NOTIFIED_SIGNAL )
+
+DALI_TYPE_REGISTRATION_END()
+
+const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"Variable", "Fixed"};
 
-PropertyRegistration property1( typeRegistration, "indicator-height-policy", Toolkit::ScrollBar::PROPERTY_INDICATOR_HEIGHT_POLICY, Property::STRING, &ScrollBar::SetProperty, &ScrollBar::GetProperty );
-PropertyRegistration property2( typeRegistration, "indicator-fixed-height",  Toolkit::ScrollBar::PROPERTY_INDICATOR_FIXED_HEIGHT,  Property::FLOAT,  &ScrollBar::SetProperty, &ScrollBar::GetProperty );
-PropertyRegistration property3( typeRegistration, "indicator-show-duration",  Toolkit::ScrollBar::PROPERTY_INDICATOR_SHOW_DURATION,  Property::FLOAT,  &ScrollBar::SetProperty, &ScrollBar::GetProperty );
-PropertyRegistration property4( typeRegistration, "indicator-hide-duration",  Toolkit::ScrollBar::PROPERTY_INDICATOR_HIDE_DURATION,  Property::FLOAT,  &ScrollBar::SetProperty, &ScrollBar::GetProperty );
 }
 
 ScrollBar::ScrollBar()
@@ -220,9 +220,9 @@ void ScrollBar::ApplyConstraints()
       mIndicator.RemoveConstraint(mIndicatorPositionConstraint);
     }
 
-    constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                           LocalSource( Actor::Property::Size ),
-                                           ParentSource( Actor::Property::Size ),
+    constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                           LocalSource( Actor::Property::SIZE ),
+                                           ParentSource( Actor::Property::SIZE ),
                                            Source( mScrollPositionObject, Toolkit::ScrollConnector::SCROLL_POSITION ),
                                            IndicatorPositionConstraint( mScrollConnector.GetMinLimit(), mScrollConnector.GetMaxLimit() ) );
     mIndicatorPositionConstraint = mIndicator.ApplyConstraint( constraint );
@@ -448,7 +448,7 @@ bool ScrollBar::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface*
   bool connected( true );
   Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( handle );
 
-  if( 0 == strcmp( signalName.c_str(), SCROLL_POSITION_NOTIFIED_SIGNAL_NAME ) )
+  if( 0 == strcmp( signalName.c_str(), SCROLL_POSITION_NOTIFIED_SIGNAL ) )
   {
     scrollBar.ScrollPositionNotifiedSignal().Connect( tracker, functor );
   }
@@ -470,22 +470,22 @@ void ScrollBar::SetProperty( BaseObject* object, Property::Index index, const Pr
     ScrollBar& scrollBarImpl( GetImpl( scrollBar ) );
     switch( index )
     {
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_HEIGHT_POLICY:
+      case Toolkit::ScrollBar::Property::INDICATOR_HEIGHT_POLICY:
       {
         scrollBarImpl.OnIndicatorHeightPolicyPropertySet( value );
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_FIXED_HEIGHT:
+      case Toolkit::ScrollBar::Property::INDICATOR_FIXED_HEIGHT:
       {
         scrollBarImpl.SetIndicatorFixedHeight(value.Get<float>());
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_SHOW_DURATION:
+      case Toolkit::ScrollBar::Property::INDICATOR_SHOW_DURATION:
       {
         scrollBarImpl.SetIndicatorShowDuration(value.Get<float>());
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_HIDE_DURATION:
+      case Toolkit::ScrollBar::Property::INDICATOR_HIDE_DURATION:
       {
         scrollBarImpl.SetIndicatorHideDuration(value.Get<float>());
         break;
@@ -505,22 +505,22 @@ Property::Value ScrollBar::GetProperty( BaseObject* object, Property::Index inde
     ScrollBar& scrollBarImpl( GetImpl( scrollBar ) );
     switch( index )
     {
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_HEIGHT_POLICY:
+      case Toolkit::ScrollBar::Property::INDICATOR_HEIGHT_POLICY:
       {
         value = INDICATOR_HEIGHT_POLICY_NAME[ scrollBarImpl.GetIndicatorHeightPolicy() ];
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_FIXED_HEIGHT:
+      case Toolkit::ScrollBar::Property::INDICATOR_FIXED_HEIGHT:
       {
         value = scrollBarImpl.GetIndicatorFixedHeight();
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_SHOW_DURATION:
+      case Toolkit::ScrollBar::Property::INDICATOR_SHOW_DURATION:
       {
         value = scrollBarImpl.GetIndicatorShowDuration();
         break;
       }
-      case Toolkit::ScrollBar::PROPERTY_INDICATOR_HIDE_DURATION:
+      case Toolkit::ScrollBar::Property::INDICATOR_HIDE_DURATION:
       {
         value = scrollBarImpl.GetIndicatorHideDuration();
         break;
index 6979c52..6826c0e 100755 (executable)
@@ -52,13 +52,6 @@ class ScrollBar : public ScrollComponentImpl
 
 public:
 
-  // Properties
-  enum
-  {
-    SCROLLBAR_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    SCROLLBAR_PROPERTY_END_INDEX = SCROLLBAR_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   // Signals
   typedef Toolkit::ScrollBar::ScrollPositionNotifiedSignalType ScrollPositionNotifiedSignalType;
 
index eb8d82a..e17f174 100755 (executable)
@@ -23,6 +23,7 @@
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/object/property-input.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
@@ -361,7 +362,8 @@ BaseHandle Create()
   return BaseHandle();
 }
 
-TypeRegistration mType( typeid(Toolkit::ScrollBarInternal), typeid(Toolkit::ScrollComponent), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollBarInternal, Toolkit::ScrollComponent, Create )
+DALI_TYPE_REGISTRATION_END()
 
 }
 
@@ -390,45 +392,45 @@ ScrollBarInternal::ScrollBarInternal(Toolkit::Scrollable& container, bool vertic
 
   // target the container to observe for scrolling
   Actor target = mContainer.Self();
-  Constraint constraint = Constraint::New<bool>( Actor::Property::Visible,
+  Constraint constraint = Constraint::New<bool>( Actor::Property::VISIBLE,
                                       Source( target, vertical ? target.GetPropertyIndex(Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL) : target.GetPropertyIndex(Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL)),
                                       ScrollBarInternalVisibilityConstraint );
   mSlider.ApplyConstraint( constraint );
   mSliderWrap.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Size,
+  constraint = Constraint::New<Vector3>( Actor::Property::SIZE,
                                                    Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                                    Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
                                                    Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ),
-                                                   Source( target, Actor::Property::Size ),
+                                                   Source( target, Actor::Property::SIZE ),
                                                    ScrollBarInternalSizeConstraint( vertical ) );
   mSlider.ApplyConstraint( constraint );
   mSliderWrap.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
+  constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
                                             Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ),
                                             ScrollBarInternalRotationConstraint( vertical ) );
   mSlider.ApplyConstraint( constraint );
   mSliderWrap.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         Source( mSlider, Actor::Property::Size),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         Source( mSlider, Actor::Property::SIZE),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ),
-                                         Source( target, Actor::Property::Size ),
+                                         Source( target, Actor::Property::SIZE ),
                                          ScrollBarInternalPositionConstraint(vertical) );
 
   mSlider.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         Source( mSlider, Actor::Property::Size),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         Source( mSlider, Actor::Property::SIZE),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ),
-                                         Source( target, Actor::Property::Size ),
+                                         Source( target, Actor::Property::SIZE ),
                                          ScrollBarInternalPositionConstraint(vertical, true) );
   mSliderWrap.ApplyConstraint( constraint );
 
@@ -444,9 +446,9 @@ ScrollBarInternal::ScrollBarInternal(Toolkit::Scrollable& container, bool vertic
   mHitArea.SetPosition(0.0f, 0.0f, 0.2f);
 
   mContainer.AddOverlay( mHitArea );
-  constraint = Constraint::New<Vector3>( Actor::Property::Size,
+  constraint = Constraint::New<Vector3>( Actor::Property::SIZE,
                                          Source( target, target.GetPropertyIndex( Toolkit::Scrollable::SCROLL_DIRECTION_PROPERTY_NAME ) ),
-                                         Source( target, Actor::Property::Size ),
+                                         Source( target, Actor::Property::SIZE ),
                                          ScrollBarInternalHitSizeConstraint(vertical, BAR_TAB_SIZE.width) );
   mHitArea.ApplyConstraint( constraint );
 
index f9f2fbb..86ade19 100644 (file)
@@ -107,10 +107,10 @@ Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex )
   for( size_t i=0;i<NUM_LAYERS;i++ )
   {
     size_t j=i*4;
-    mesh.ApplyConstraint( Constraint::New<Vector3>( mesh.GetPropertyIndex(j+2, AnimatableVertex::Property::Position ),
+    mesh.ApplyConstraint( Constraint::New<Vector3>( mesh.GetPropertyIndex(j+2, AnimatableVertex::Property::POSITION ),
                                                     Source(meshActor, bouncePropertyIndex),
                                                     VertexPositionConstraint(-0.5f, LAYER_HEIGHTS[i]) ) );
-    mesh.ApplyConstraint( Constraint::New<Vector3>( mesh.GetPropertyIndex(j+3,  AnimatableVertex::Property::Position),
+    mesh.ApplyConstraint( Constraint::New<Vector3>( mesh.GetPropertyIndex(j+3,  AnimatableVertex::Property::POSITION),
                                                     Source(meshActor, bouncePropertyIndex),
                                                     VertexPositionConstraint(-0.5f, LAYER_HEIGHTS[i]) ) );
   }
index ebe8f77..e41568b 100644 (file)
 #include <dali/public-api/events/mouse-wheel-event.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
 #include <dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h>
+#include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
 
 using std::string;
 using std::set;
 using namespace Dali;
 
-namespace // unnamed namespace
+namespace // Unnamed namespace
 {
 
 //Type registration
-TypeRegistration mType( typeid(Toolkit::ItemView), typeid(Toolkit::Scrollable), NULL );
+
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ItemView, Toolkit::Scrollable, NULL )
+DALI_TYPE_REGISTRATION_END()
 
 const float DEFAULT_MINIMUM_SWIPE_SPEED = 1.0f;
 const float DEFAULT_MINIMUM_SWIPE_DISTANCE = 3.0f;
@@ -378,7 +381,7 @@ void ItemView::OnInitialize()
                                                    LocalSource(mPropertyPosition),
                                                    LocalSource(mPropertyPositionMin),
                                                    LocalSource(mPropertyPositionMax),
-                                                   LocalSource(Actor::Property::Size),
+                                                   LocalSource(Actor::Property::SIZE),
                                                    RelativePositionConstraint);
   self.ApplyConstraint(constraint);
 
@@ -1569,28 +1572,28 @@ void ItemView::SetOvershootEnabled( bool enable )
     mOvershootOverlay.SetDrawMode(DrawMode::OVERLAY);
     self.Add(mOvershootOverlay);
 
-    Constraint constraint = Constraint::New<Vector3>( Actor::Property::Size,
+    Constraint constraint = Constraint::New<Vector3>( Actor::Property::SIZE,
                                                       ParentSource( mPropertyScrollDirection ),
                                                       Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
-                                                      ParentSource( Actor::Property::Size ),
+                                                      ParentSource( Actor::Property::SIZE ),
                                                       OvershootOverlaySizeConstraint() );
     mOvershootOverlay.ApplyConstraint(constraint);
     mOvershootOverlay.SetSize(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height);
 
-    constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
+    constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
                                               ParentSource( mPropertyScrollDirection ),
                                               Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
                                               OvershootOverlayRotationConstraint() );
     mOvershootOverlay.ApplyConstraint(constraint);
 
-    constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                           ParentSource( Actor::Property::Size ),
+    constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                           ParentSource( Actor::Property::SIZE ),
                                            ParentSource( mPropertyScrollDirection ),
                                            Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
                                            OvershootOverlayPositionConstraint() );
     mOvershootOverlay.ApplyConstraint(constraint);
 
-    constraint = Constraint::New<bool>( Actor::Property::Visible,
+    constraint = Constraint::New<bool>( Actor::Property::VISIBLE,
                                         ParentSource( mPropertyCanScrollVertical ),
                                         OvershootOverlayVisibilityConstraint() );
     mOvershootOverlay.ApplyConstraint(constraint);
index 0ce8fda..613b0e8 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-index-ranges.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 namespace Dali
@@ -35,15 +36,13 @@ namespace Internal
 namespace
 {
 
-// Signals
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollConnector, Dali::BaseHandle, NULL )
 
-const char* const DOMAIN_CHANGED_SIGNAL_NAME =          "domain-changed";
-const char* const SCROLL_POSITION_CHANGED_SIGNAL_NAME = "scroll-position-changed";
+DALI_SIGNAL_REGISTRATION( ScrollConnector, "domain-changed",          DOMAIN_CHANGED_SIGNAL_NAME          )
+DALI_SIGNAL_REGISTRATION( ScrollConnector, "scroll-position-changed", SCROLL_POSITION_CHANGED_SIGNAL_NAME )
 
-TypeRegistration typeRegistration( typeid( Toolkit::ScrollConnector ), typeid( Dali::BaseHandle ), NULL );
-
-SignalConnectorType signalConnector1( typeRegistration, DOMAIN_CHANGED_SIGNAL_NAME , &ScrollConnector::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, SCROLL_POSITION_CHANGED_SIGNAL_NAME , &ScrollConnector::DoConnectSignal );
+DALI_TYPE_REGISTRATION_END()
 
 }
 
index 4d7049e..60cb127 100644 (file)
@@ -33,7 +33,7 @@ namespace Internal
 // ScrollBase
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-const std::string ScrollBase::SCROLL_DOMAIN_OFFSET_PROPERTY_NAME( "domain-offset" );
+const char* const ScrollBase::SCROLL_DOMAIN_OFFSET_PROPERTY_NAME = "domain-offset";
 
 ScrollBase::ScrollBase()
 : Scrollable(),
index 5ded775..968e3ab 100644 (file)
@@ -182,7 +182,7 @@ public:
 
 protected:
 
-  static const std::string SCROLL_DOMAIN_OFFSET_PROPERTY_NAME;
+  static const char* const SCROLL_DOMAIN_OFFSET_PROPERTY_NAME;
 
 protected:
 
index 26c3af8..9cedb8c 100644 (file)
@@ -329,7 +329,7 @@ void ScrollOvershootEffectRipple::SetOvershoot(float amount, bool animate)
     UpdateVisibility(true);
   }
 
-  float overshootAnimationSpeed = mAttachedScrollView.Self().GetProperty<float>(Toolkit::Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED);
+  float overshootAnimationSpeed = mAttachedScrollView.Self().GetProperty<float>(Toolkit::Scrollable::Property::OVERSHOOT_ANIMATION_SPEED);
 
   if( animate && overshootAnimationSpeed > Math::MACHINE_EPSILON_0 )
   {
index 8a1cdba..3758e07 100644 (file)
@@ -230,33 +230,33 @@ void ApplyScrollCarouselConstraints(Toolkit::ScrollView scrollView,
   // Apply constraints to this actor //
   Constraint constraint;
 
-  constraint = Constraint::New<bool>( Actor::Property::Visible,
-                                      LocalSource( Actor::Property::Position ),
-                                      LocalSource( Actor::Property::Scale ),
-                                      LocalSource( Actor::Property::Size ),
+  constraint = Constraint::New<bool>( Actor::Property::VISIBLE,
+                                      LocalSource( Actor::Property::POSITION ),
+                                      LocalSource( Actor::Property::SCALE ),
+                                      LocalSource( Actor::Property::SIZE ),
                                       Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
-                                      Source(scrollView, Actor::Property::Size ),
+                                      Source(scrollView, Actor::Property::SIZE ),
                                       Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewCarouselEffect::EFFECT_ACTIVATE ) ),
                                       boost::bind( &ScrollCarouselEffectInfo::VisibilityConstraint, info, _1, _2, _3, _4, _5, _6) );
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
-                                            LocalSource( Actor::Property::Position ),
-                                            LocalSource( Actor::Property::Scale ),
-                                            LocalSource( Actor::Property::Size ),
+  constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
+                                            LocalSource( Actor::Property::POSITION ),
+                                            LocalSource( Actor::Property::SCALE ),
+                                            LocalSource( Actor::Property::SIZE ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
-                                            Source(scrollView, Actor::Property::Size ),
+                                            Source(scrollView, Actor::Property::SIZE ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewCarouselEffect::EFFECT_ACTIVATE ) ),
                                             boost::bind( &ScrollCarouselEffectInfo::RotationConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         LocalSource( Actor::Property::Scale ),
-                                         LocalSource( Actor::Property::Size ),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         LocalSource( Actor::Property::SCALE ),
+                                         LocalSource( Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewCarouselEffect::EFFECT_ACTIVATE ) ),
                                          boost::bind( &ScrollCarouselEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6) );
 
index d50ffb9..bed1846 100644 (file)
@@ -303,36 +303,36 @@ void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
 {
   // Apply constraints to this actor //
   Constraint constraint;
-  constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
-                                         Source(parentPage, Actor::Property::Position),
+  constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
+                                         Source(parentPage, Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollCubeEffectInfo::RotationConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector4>( Actor::Property::Color,
-                                         Source(parentPage, Actor::Property::Position),
+  constraint = Constraint::New<Vector4>( Actor::Property::COLOR,
+                                         Source(parentPage, Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollCubeEffectInfo::ColorConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         Source(parentPage, Actor::Property::Position),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         Source(parentPage, Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollCubeEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
index 544b81c..8b6003f 100644 (file)
@@ -336,24 +336,24 @@ void ApplyScrollDepthConstraints(Toolkit::ScrollView scrollView,
                                  float scaleExtent)
 {
   // Scale Constraint
-  Constraint constraint = Constraint::New<Vector3>( Actor::Property::Scale,
-                                         LocalSource(Actor::Property::Position),
-                                         ParentSource(Actor::Property::Position),
+  Constraint constraint = Constraint::New<Vector3>( Actor::Property::SCALE,
+                                         LocalSource(Actor::Property::POSITION),
+                                         ParentSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          ScrollDepthScaleConstraint( positionExtent, offsetExtent, positionScale, scaleExtent ) );
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
   // Position Constraint (apply last as other constraints use Actor::POSITION as a function input)
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         ParentSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         ParentSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          ScrollDepthPositionConstraint( positionExtent, offsetExtent, positionScale ) );
 
index e110975..5111cec 100644 (file)
 #include <dali/public-api/events/mouse-wheel-event.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
+#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
 
 //#define ENABLED_SCROLL_STATE_LOGGING
 
@@ -52,10 +53,6 @@ using namespace Dali;
 namespace
 {
 
-// Signals
-
-const char* const SIGNAL_SNAP_STARTED = "snap-started";
-
 const Vector2 DEFAULT_MIN_FLICK_DISTANCE(30.0f, 30.0f);                                   ///< minimum distance for pan before flick allowed
 const float DEFAULT_MIN_FLICK_SPEED_THRESHOLD(500.0f);                          ///< Minimum pan speed required for flick in pixels/s
 const float FREE_FLICK_SPEED_THRESHOLD = 200.0f;                                          ///< Free-Flick threshold in pixels/ms
@@ -208,6 +205,18 @@ namespace Internal
 namespace
 {
 
+BaseHandle Create()
+{
+  return Toolkit::ScrollView::New();
+}
+
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollView, Toolkit::Scrollable, Create )
+
+DALI_SIGNAL_REGISTRATION( ScrollView, "value-changed", SIGNAL_SNAP_STARTED )
+
+DALI_TYPE_REGISTRATION_END()
+
 /**
  * Returns whether to lock scrolling to a particular axis
  *
@@ -510,16 +519,6 @@ struct InternalFinalConstraint
   AlphaFunction mFunctionY;
 };
 
-
-BaseHandle Create()
-{
-  return Toolkit::ScrollView::New();
-}
-
-TypeRegistration typeRegistration( typeid( Toolkit::ScrollView ), typeid( Toolkit::Scrollable ), Create );
-
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_SNAP_STARTED, &ScrollView::DoConnectSignal );
-
 }
 
 
@@ -591,7 +590,7 @@ void ScrollView::OnInitialize()
   mInternalActor = Actor::New();
   mInternalActor.SetDrawMode(DrawMode::OVERLAY);
   self.Add(mInternalActor);
-  mInternalActor.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::Size, ParentSource( Actor::Property::Size ), EqualToConstraint() ) );
+  mInternalActor.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, ParentSource( Actor::Property::SIZE ), EqualToConstraint() ) );
   mInternalActor.SetParentOrigin(ParentOrigin::CENTER);
   mInternalActor.SetAnchorPoint(AnchorPoint::CENTER);
 
@@ -2613,8 +2612,8 @@ void ScrollView::UpdateMainInternalConstraint()
   if( mPanning )
   {
     constraint = Constraint::New<Vector3>( mPropertyPrePosition,
-                                                      Source( detector, PanGestureDetector::Property::LocalPosition ),
-                                                      Source( self, Actor::Property::Size ),
+                                                      Source( detector, PanGestureDetector::Property::LOCAL_POSITION ),
+                                                      Source( self, Actor::Property::SIZE ),
                                                       InternalPrePositionConstraint( mPanStartPosition, initialPanMask, mAxisAutoLock, mAxisAutoLockGradient, mLockAxis, mMaxOvershoot, mRulerX->GetDomain(), mRulerY->GetDomain() ) );
     mScrollMainInternalPrePositionConstraint = self.ApplyConstraint( constraint );
   }
@@ -2624,7 +2623,7 @@ void ScrollView::UpdateMainInternalConstraint()
                                          LocalSource( mPropertyPrePosition ),
                                          LocalSource( mPropertyPositionMin ),
                                          LocalSource( mPropertyPositionMax ),
-                                         Source( self, Actor::Property::Size ),
+                                         Source( self, Actor::Property::SIZE ),
                                          InternalPositionConstraint( mRulerX->GetDomain(),
                                                                      mRulerY->GetDomain(), mWrapMode ) );
   mScrollMainInternalPositionConstraint = self.ApplyConstraint( constraint );
@@ -2647,7 +2646,7 @@ void ScrollView::UpdateMainInternalConstraint()
                                          LocalSource( mPropertyPosition ),
                                          LocalSource( mPropertyPositionMin ),
                                          LocalSource( mPropertyPositionMax ),
-                                         LocalSource( Actor::Property::Size ),
+                                         LocalSource( Actor::Property::SIZE ),
                                          InternalRelativePositionConstraint );
   mScrollMainInternalRelativeConstraint = self.ApplyConstraint( constraint );
 
@@ -2703,17 +2702,17 @@ void ScrollView::SetInternalConstraints()
   Constraint constraint;
 
   // MoveActor (scrolling)
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
                                          Source( self, mPropertyPosition ),
                                          MoveActorConstraint );
   constraint.SetRemoveAction(Constraint::Discard);
   ApplyConstraintToBoundActors(constraint);
 
   // WrapActor (wrap functionality)
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                                 LocalSource( Actor::Property::Scale ),
-                                                 LocalSource( Actor::Property::AnchorPoint ),
-                                                 LocalSource( Actor::Property::Size ),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                                 LocalSource( Actor::Property::SCALE ),
+                                                 LocalSource( Actor::Property::ANCHOR_POINT ),
+                                                 LocalSource( Actor::Property::SIZE ),
                                                  Source( self, mPropertyPositionMin ),
                                                  Source( self, mPropertyPositionMax ),
                                                  Source( self, mPropertyWrap ),
index 216572e..fb4578e 100644 (file)
@@ -190,24 +190,24 @@ void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
 {
   // Apply constraints to this actor //
   Constraint constraint;
-  constraint = Constraint::New<Vector4>( Actor::Property::Color,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector4>( Actor::Property::COLOR,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageCarouselEffectInfo::ColorConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageCarouselEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
index 66e485e..483e0bd 100644 (file)
@@ -259,36 +259,36 @@ void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
 {
   // Apply constraints to this actor //
   Constraint constraint;
-  constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
-                                            LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
+                                            LocalSource(Actor::Property::POSITION),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                            Source(scrollView, Actor::Property::Size ),
+                                            Source(scrollView, Actor::Property::SIZE ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                             boost::bind( &ScrollPageCubeEffectInfo::RotationConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector4>( Actor::Property::Color,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector4>( Actor::Property::COLOR,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageCubeEffectInfo::ColorConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageCubeEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
index 35bd6ed..99a7ddf 100644 (file)
@@ -349,36 +349,36 @@ void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
 {
   // Apply constraints to this actor //
   Constraint constraint;
-  constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
-                                            LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
+                                            LocalSource(Actor::Property::POSITION),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                            Source(scrollView, Actor::Property::Size ),
+                                            Source(scrollView, Actor::Property::SIZE ),
                                             Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_START_PAGE_POSITION_PROPERTY_NAME ) ),
                                             boost::bind( &ScrollPageSpiralEffectInfo::RotationConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector4>( Actor::Property::Color,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector4>( Actor::Property::COLOR,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_START_PAGE_POSITION_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageSpiralEffectInfo::ColorConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
   constraint.SetRemoveAction( Constraint::Discard );
   child.ApplyConstraint( constraint );
 
-  constraint = Constraint::New<Vector3>( Actor::Property::Position,
-                                         LocalSource(Actor::Property::Position),
+  constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
+                                         LocalSource(Actor::Property::POSITION),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_FINAL_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
-                                         Source(scrollView, Actor::Property::Size ),
+                                         Source(scrollView, Actor::Property::SIZE ),
                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_START_PAGE_POSITION_PROPERTY_NAME ) ),
                                          boost::bind( &ScrollPageSpiralEffectInfo::PositionConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
 
index 87d31f8..0c73cd4 100644 (file)
@@ -17,6 +17,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
 
 using namespace Dali;
 
-namespace
-{
-
-} // unnamed namespace
-
 namespace Dali
 {
 
 namespace Toolkit
 {
 
-const Property::Index Scrollable::PROPERTY_OVERSHOOT_EFFECT_COLOR( Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX + 1 );
-const Property::Index Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED( Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX + 2 );
-
 namespace Internal
 {
 
 namespace
 {
-const Vector4 DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.25f);
-const float DEFAULT_OVERSHOOT_ANIMATION_SPEED(120.0f); // 120 pixels per second
-
-// Signals
-
-const char* const SIGNAL_SCROLL_STARTED =   "scroll-started";
-const char* const SIGNAL_SCROLL_COMPLETED = "scroll-completed";
-const char* const SIGNAL_SCROLL_UPDATED =   "scroll-updated";
 
 BaseHandle Create()
 {
@@ -58,30 +43,25 @@ BaseHandle Create()
   return BaseHandle();
 }
 
-TypeRegistration mType( typeid( Toolkit::Scrollable ), typeid( Toolkit::Control ), Create );
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Scrollable, Toolkit::Control, Create );
 
-SignalConnectorType s1( mType, SIGNAL_SCROLL_STARTED,   &Scrollable::DoConnectSignal );
-SignalConnectorType s2( mType, SIGNAL_SCROLL_COMPLETED, &Scrollable::DoConnectSignal );
-SignalConnectorType s3( mType, SIGNAL_SCROLL_UPDATED,   &Scrollable::DoConnectSignal );
+DALI_PROPERTY_REGISTRATION( Scrollable, "overshoot-effect-color",    VECTOR4, OVERSHOOT_EFFECT_COLOR    )
+DALI_PROPERTY_REGISTRATION( Scrollable, "overshoot-animation-speed", FLOAT,   OVERSHOOT_ANIMATION_SPEED )
 
-PropertyRegistration property1( mType,
-                                "overshoot-effect-color",
-                                Toolkit::Scrollable::PROPERTY_OVERSHOOT_EFFECT_COLOR,
-                                Property::VECTOR4,
-                                &Scrollable::SetProperty,
-                                &Scrollable::GetProperty );
+DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-started",                     SIGNAL_SCROLL_STARTED     )
+DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-completed",                   SIGNAL_SCROLL_COMPLETED   )
+DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-updated",                     SIGNAL_SCROLL_UPDATED     )
 
-PropertyRegistration property2( mType,
-                                "overshoot-animation-speed",
-                                Toolkit::Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED,
-                                Property::FLOAT,
-                                &Scrollable::SetProperty,
-                                &Scrollable::GetProperty );
+DALI_TYPE_REGISTRATION_END()
+
+const Vector4 DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.25f);
+const float DEFAULT_OVERSHOOT_ANIMATION_SPEED(120.0f); // 120 pixels per second
 
 }
 
-const std::string Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL( "scrollable-can-scroll-vertical" );
-const std::string Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL( "scrollable-can-scroll-horizontal" );
+const char* const Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL = "scrollable-can-scroll-vertical";
+const char* const Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL = "scrollable-can-scroll-horizontal";
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Scrollable
@@ -246,12 +226,12 @@ void Scrollable::SetProperty( BaseObject* object, Property::Index index, const P
     Scrollable& scrollableImpl( GetImpl( scrollable ) );
     switch( index )
     {
-      case Toolkit::Scrollable::PROPERTY_OVERSHOOT_EFFECT_COLOR:
+      case Toolkit::Scrollable::Property::OVERSHOOT_EFFECT_COLOR:
       {
         scrollableImpl.SetOvershootEffectColor( value.Get<Vector4>() );
         break;
       }
-      case Toolkit::Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED:
+      case Toolkit::Scrollable::Property::OVERSHOOT_ANIMATION_SPEED:
       {
         scrollableImpl.SetOvershootAnimationSpeed( value.Get<float>() );
         break;
@@ -271,12 +251,12 @@ Property::Value Scrollable::GetProperty( BaseObject* object, Property::Index ind
     Scrollable& scrollableImpl( GetImpl( scrollable ) );
     switch( index )
     {
-      case Toolkit::Scrollable::PROPERTY_OVERSHOOT_EFFECT_COLOR:
+      case Toolkit::Scrollable::Property::OVERSHOOT_EFFECT_COLOR:
       {
         value = scrollableImpl.GetOvershootEffectColor();
         break;
       }
-      case Toolkit::Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED:
+      case Toolkit::Scrollable::Property::OVERSHOOT_ANIMATION_SPEED:
       {
         value = scrollableImpl.GetOvershootAnimationSpeed();
         break;
index 1bceb81..799ed62 100644 (file)
@@ -44,8 +44,8 @@ typedef IntrusivePtr<Scrollable> ScrollablePtr;
 class Scrollable : public Control
 {
 public:
-  static const std::string SCROLLABLE_CAN_SCROLL_VERTICAL;
-  static const std::string SCROLLABLE_CAN_SCROLL_HORIZONTAL;
+  static const char* const SCROLLABLE_CAN_SCROLL_VERTICAL;
+  static const char* const SCROLLABLE_CAN_SCROLL_HORIZONTAL;
 
   /**
    * Create a new Scrollable.
index 88e8599..9bc67c7 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 #include <dali/integration-api/debug.h>
 
@@ -69,8 +70,8 @@ BaseHandle Create()
   return Toolkit::ShadowView::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::ShadowView), typeid(Toolkit::Control), Create );
-
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ShadowView, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 const float BLUR_STRENGTH_DEFAULT = 1.0f;
 
@@ -79,12 +80,11 @@ const float DEFAULT_FIELD_OF_VIEW_RADIANS = Math::PI / 4.0f; // 45 degrees
 
 const Vector4 DEFAULT_SHADOW_COLOR = Vector4(0.2f, 0.2f, 0.2f, 0.8f);
 
-const std::string SHADER_LIGHT_CAMERA_PROJECTION_MATRIX_PROPERTY_NAME( "uLightCameraProjectionMatrix" );
-const std::string SHADER_LIGHT_CAMERA_VIEW_MATRIX_PROPERTY_NAME( "uLightCameraViewMatrix" );
-const std::string SHADER_SHADOW_COLOR_PROPERTY_NAME( "uShadowColor" );
-
-const std::string BLUR_STRENGTH_PROPERTY_NAME( "BlurStrengthProperty" );
-const std::string SHADOW_COLOR_PROPERTY_NAME( "ShadowColorProperty" );
+const char* const SHADER_LIGHT_CAMERA_PROJECTION_MATRIX_PROPERTY_NAME = "uLightCameraProjectionMatrix";
+const char* const SHADER_LIGHT_CAMERA_VIEW_MATRIX_PROPERTY_NAME = "uLightCameraViewMatrix";
+const char* const SHADER_SHADOW_COLOR_PROPERTY_NAME = "uShadowColor";
+const char* const BLUR_STRENGTH_PROPERTY_NAME = "BlurStrengthProperty";
+const char* const SHADOW_COLOR_PROPERTY_NAME = "ShadowColorProperty";
 
 const char* const RENDER_SHADOW_VERTEX_SOURCE =
   " uniform mediump mat4 uLightCameraProjectionMatrix;\n"
@@ -315,15 +315,15 @@ void ShadowView::ConstrainCamera()
     // is under control of application, can't use transform inheritance)
 
     Constraint cameraOrientationConstraint =
-      Constraint::New<Quaternion> ( Actor::Property::Rotation,
-                                    Source( mShadowPlane, Actor::Property::WorldPosition ),
-                                    Source( mPointLight,  Actor::Property::WorldPosition ),
-                                    Source( mShadowPlane, Actor::Property::WorldRotation ),
+      Constraint::New<Quaternion> ( Actor::Property::ROTATION,
+                                    Source( mShadowPlane, Actor::Property::WORLD_POSITION ),
+                                    Source( mPointLight,  Actor::Property::WORLD_POSITION ),
+                                    Source( mShadowPlane, Actor::Property::WORLD_ROTATION ),
                                     &LookAt );
 
     mCameraActor.ApplyConstraint( cameraOrientationConstraint );
 
-    Constraint pointLightPositionConstraint = Constraint::New<Vector3>( Actor::Property::Position, Source( mPointLight, Actor::Property::WorldPosition ), EqualToConstraint() );
+    Constraint pointLightPositionConstraint = Constraint::New<Vector3>( Actor::Property::POSITION, Source( mPointLight, Actor::Property::WORLD_POSITION ), EqualToConstraint() );
 
     mCameraActor.ApplyConstraint( pointLightPositionConstraint );
   }
@@ -371,8 +371,8 @@ void ShadowView::SetShaderConstants()
   Property::Index lightCameraProjectionMatrixPropertyIndex = mShadowRenderShader.GetPropertyIndex(SHADER_LIGHT_CAMERA_PROJECTION_MATRIX_PROPERTY_NAME);
   Property::Index lightCameraViewMatrixPropertyIndex = mShadowRenderShader.GetPropertyIndex(SHADER_LIGHT_CAMERA_VIEW_MATRIX_PROPERTY_NAME);
 
-  Constraint projectionMatrixConstraint = Constraint::New<Dali::Matrix>( lightCameraProjectionMatrixPropertyIndex, Source( mCameraActor, CameraActor::Property::ProjectionMatrix ), EqualToConstraintMatrix());
-  Constraint viewMatrixConstraint = Constraint::New<Dali::Matrix>( lightCameraViewMatrixPropertyIndex, Source( mCameraActor, CameraActor::Property::ViewMatrix ), EqualToConstraintMatrix());
+  Constraint projectionMatrixConstraint = Constraint::New<Dali::Matrix>( lightCameraProjectionMatrixPropertyIndex, Source( mCameraActor, CameraActor::Property::PROJECTION_MATRIX ), EqualToConstraintMatrix());
+  Constraint viewMatrixConstraint = Constraint::New<Dali::Matrix>( lightCameraViewMatrixPropertyIndex, Source( mCameraActor, CameraActor::Property::VIEW_MATRIX ), EqualToConstraintMatrix());
 
   mShadowRenderShader.ApplyConstraint(projectionMatrixConstraint);
   mShadowRenderShader.ApplyConstraint(viewMatrixConstraint);
index 859926d..af62846 100755 (executable)
@@ -22,6 +22,7 @@
 #include <sstream>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
@@ -35,40 +36,46 @@ namespace Dali
 namespace Toolkit
 {
 
-// Properties
-const Property::Index Slider::LOWER_BOUND_PROPERTY             = Internal::Slider::SLIDER_PROPERTY_START_INDEX;
-const Property::Index Slider::UPPER_BOUND_PROPERTY             = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 1;
-
-const Property::Index Slider::VALUE_PROPERTY                   = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 2;
-const Property::Index Slider::HIT_REGION_PROPERTY              = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 3;
-const Property::Index Slider::BACKING_REGION_PROPERTY          = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 4;
-const Property::Index Slider::HANDLE_REGION_PROPERTY           = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 5;
-
-const Property::Index Slider::BACKING_IMAGE_NAME_PROPERTY      = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 6;
-const Property::Index Slider::HANDLE_IMAGE_NAME_PROPERTY       = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 7;
-const Property::Index Slider::PROGRESS_IMAGE_NAME_PROPERTY     = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 8;
-const Property::Index Slider::POPUP_IMAGE_NAME_PROPERTY        = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 9;
-const Property::Index Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY  = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 10;
-
-const Property::Index Slider::DISABLE_COLOR_PROPERTY           = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 11;
-const Property::Index Slider::POPUP_TEXT_COLOR_PROPERTY        = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 12;
-
-const Property::Index Slider::VALUE_PRECISION_PROPERTY         = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 13;
-
-const Property::Index Slider::SHOW_POPUP_PROPERTY              = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 14;
-const Property::Index Slider::SHOW_VALUE_PROPERTY              = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 15;
-
-const Property::Index Slider::ENABLED_PROPERTY                 = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 16;
-
-const Property::Index Slider::MARKS_PROPERTY                   = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 17;
-const Property::Index Slider::SNAP_TO_MARKS_PROPERTY           = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 18;
-const Property::Index Slider::MARK_TOLERANCE_PROPERTY          = Internal::Slider::SLIDER_PROPERTY_START_INDEX + 19;
-
 namespace Internal
 {
 
-namespace
+namespace // Unnamed namespace
+{
+
+BaseHandle Create()
 {
+  return Dali::Toolkit::Slider::New();
+}
+
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Slider, Toolkit::Control, Create )
+
+DALI_PROPERTY_REGISTRATION( Slider, "lower-bound",            FLOAT,    LOWER_BOUND            )
+DALI_PROPERTY_REGISTRATION( Slider, "upper-bound",            FLOAT,    UPPER_BOUND            )
+DALI_PROPERTY_REGISTRATION( Slider, "value",                  FLOAT,    VALUE                  )
+DALI_PROPERTY_REGISTRATION( Slider, "hit-region",             VECTOR2,  HIT_REGION             )
+DALI_PROPERTY_REGISTRATION( Slider, "backing-region",         VECTOR2,  BACKING_REGION         )
+DALI_PROPERTY_REGISTRATION( Slider, "handle-region",          VECTOR2,  HANDLE_REGION          )
+DALI_PROPERTY_REGISTRATION( Slider, "backing-image-name",     STRING,   BACKING_IMAGE_NAME     )
+DALI_PROPERTY_REGISTRATION( Slider, "handle-image-name",      STRING,   HANDLE_IMAGE_NAME      )
+DALI_PROPERTY_REGISTRATION( Slider, "progress-image-name",    STRING,   PROGRESS_IMAGE_NAME    )
+DALI_PROPERTY_REGISTRATION( Slider, "popup-image-name",       STRING,   POPUP_IMAGE_NAME       )
+DALI_PROPERTY_REGISTRATION( Slider, "popup-arrow-image-name", STRING,   POPUP_ARROW_IMAGE_NAME )
+DALI_PROPERTY_REGISTRATION( Slider, "disable-color",          VECTOR4,  DISABLE_COLOR          )
+DALI_PROPERTY_REGISTRATION( Slider, "popup-text-color",       VECTOR4,  POPUP_TEXT_COLOR       )
+DALI_PROPERTY_REGISTRATION( Slider, "value-precision",        INTEGER,  VALUE_PRECISION        )
+DALI_PROPERTY_REGISTRATION( Slider, "show-popup",             BOOLEAN,  SHOW_POPUP             )
+DALI_PROPERTY_REGISTRATION( Slider, "show-value",             BOOLEAN,  SHOW_VALUE             )
+DALI_PROPERTY_REGISTRATION( Slider, "enabled",                BOOLEAN,  ENABLED                )
+DALI_PROPERTY_REGISTRATION( Slider, "marks",                  ARRAY,    MARKS                  )
+DALI_PROPERTY_REGISTRATION( Slider, "snap-to-marks",          BOOLEAN,  SNAP_TO_MARKS          )
+DALI_PROPERTY_REGISTRATION( Slider, "mark-tolerance",         FLOAT,    MARK_TOLERANCE         )
+
+DALI_SIGNAL_REGISTRATION(   Slider, "value-changed",                    SIGNAL_VALUE_CHANGED   )
+DALI_SIGNAL_REGISTRATION(   Slider, "mark",                             SIGNAL_MARK            )
+
+DALI_TYPE_REGISTRATION_END()
+
 const float BACKING_Z = -0.1f;
 const float PROGRESS_Z = 0.1f;
 const float HANDLE_Z = 1.0f;
@@ -115,50 +122,7 @@ const bool DEFAULT_SHOW_VALUE = true;
 const bool DEFAULT_ENABLED = true;
 const bool DEFAULT_SNAP_TO_MARKS = false;
 
-// Signals
-
-const char* const SIGNAL_VALUE_CHANGED = "value-changed";
-const char* const SIGNAL_MARK =          "mark";
-
-BaseHandle Create()
-{
-  return Dali::Toolkit::Slider::New();
-}
-
-TypeRegistration typeRegistration( typeid( Dali::Toolkit::Slider ), typeid( Dali::Toolkit::Control ), Create );
-
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_VALUE_CHANGED, &Toolkit::Internal::Slider::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, SIGNAL_MARK, &Toolkit::Internal::Slider::DoConnectSignal );
-
-PropertyRegistration property1( typeRegistration, "lower-bound",  Toolkit::Slider::LOWER_BOUND_PROPERTY, Property::FLOAT, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property2( typeRegistration, "upper-bound",  Toolkit::Slider::UPPER_BOUND_PROPERTY, Property::FLOAT, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property3( typeRegistration, "value",        Toolkit::Slider::VALUE_PROPERTY,       Property::FLOAT, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property4( typeRegistration, "hit-region",     Toolkit::Slider::HIT_REGION_PROPERTY,      Property::VECTOR2, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property5( typeRegistration, "backing-region", Toolkit::Slider::BACKING_REGION_PROPERTY,  Property::VECTOR2, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property6( typeRegistration, "handle-region",  Toolkit::Slider::HANDLE_REGION_PROPERTY,   Property::VECTOR2, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property7( typeRegistration, "backing-image-name",       Toolkit::Slider::BACKING_IMAGE_NAME_PROPERTY,      Property::STRING, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property8( typeRegistration, "handle-image-name",        Toolkit::Slider::HANDLE_IMAGE_NAME_PROPERTY,       Property::STRING, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property9( typeRegistration, "progress-image-name",      Toolkit::Slider::PROGRESS_IMAGE_NAME_PROPERTY,     Property::STRING, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property10( typeRegistration, "popup-image-name",        Toolkit::Slider::POPUP_IMAGE_NAME_PROPERTY,        Property::STRING, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property11( typeRegistration, "popup-arrow-image-name",  Toolkit::Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY,  Property::STRING, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property12( typeRegistration, "disable-color",       Toolkit::Slider::DISABLE_COLOR_PROPERTY,     Property::VECTOR4, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property13( typeRegistration, "popup-text-color",    Toolkit::Slider::POPUP_TEXT_COLOR_PROPERTY,  Property::VECTOR4, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property14( typeRegistration, "value-precision",    Toolkit::Slider::VALUE_PRECISION_PROPERTY,  Property::INTEGER, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property15( typeRegistration, "show-popup",    Toolkit::Slider::SHOW_POPUP_PROPERTY,  Property::BOOLEAN, &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property16( typeRegistration, "show-value",    Toolkit::Slider::SHOW_VALUE_PROPERTY,  Property::BOOLEAN, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property17( typeRegistration, "enabled",       Toolkit::Slider::ENABLED_PROPERTY,  Property::BOOLEAN, &Slider::SetProperty, &Slider::GetProperty );
-
-PropertyRegistration property18( typeRegistration, "marks",          Toolkit::Slider::MARKS_PROPERTY,          Property::ARRAY,    &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property19( typeRegistration, "snap-to-marks",  Toolkit::Slider::SNAP_TO_MARKS_PROPERTY,  Property::BOOLEAN,  &Slider::SetProperty, &Slider::GetProperty );
-PropertyRegistration property20( typeRegistration, "mark-tolerance", Toolkit::Slider::MARK_TOLERANCE_PROPERTY, Property::FLOAT,    &Slider::SetProperty, &Slider::GetProperty );
-
-} // namespace
+} // Unnamed namespace
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Slider
@@ -801,16 +765,14 @@ bool Slider::MarkReached( float value, int& outIndex )
       outIndex = current;
       return true;
     }
+
+    if( value < mark )
+    {
+      tail = current - 1;
+    }
     else
     {
-      if( value < mark )
-      {
-        tail = current - 1;
-      }
-      else
-      {
-        head = current + 1;
-      }
+      head = current + 1;
     }
   }
 
@@ -1031,121 +993,121 @@ void Slider::SetProperty( BaseObject* object, Property::Index propertyIndex, con
 
     switch ( propertyIndex )
     {
-      case Toolkit::Slider::LOWER_BOUND_PROPERTY:
+      case Toolkit::Slider::Property::LOWER_BOUND:
       {
         sliderImpl.SetLowerBound( value.Get< float >() );
         break;
       }
 
-      case Toolkit::Slider::UPPER_BOUND_PROPERTY:
+      case Toolkit::Slider::Property::UPPER_BOUND:
       {
         sliderImpl.SetUpperBound( value.Get< float >() );
         break;
       }
 
-      case Toolkit::Slider::VALUE_PROPERTY:
+      case Toolkit::Slider::Property::VALUE:
       {
         sliderImpl.SetValue( value.Get< float >() );
         break;
       }
 
-      case Toolkit::Slider::HIT_REGION_PROPERTY:
+      case Toolkit::Slider::Property::HIT_REGION:
       {
         sliderImpl.SetHitRegion( value.Get< Vector2 >() );
         break;
       }
 
-      case Toolkit::Slider::BACKING_REGION_PROPERTY:
+      case Toolkit::Slider::Property::BACKING_REGION:
       {
         sliderImpl.SetBackingRegion( value.Get< Vector2 >() );
         break;
       }
 
-      case Toolkit::Slider::HANDLE_REGION_PROPERTY:
+      case Toolkit::Slider::Property::HANDLE_REGION:
       {
         sliderImpl.SetHandleRegion( value.Get< Vector2 >() );
         break;
       }
 
-      case Toolkit::Slider::BACKING_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::BACKING_IMAGE_NAME:
       {
         sliderImpl.SetBackingImageName( value.Get< std::string >() );
         break;
       }
 
-      case Toolkit::Slider::HANDLE_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::HANDLE_IMAGE_NAME:
       {
         sliderImpl.SetHandleImageName( value.Get< std::string >() );
         break;
       }
 
-      case Toolkit::Slider::PROGRESS_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::PROGRESS_IMAGE_NAME:
       {
         sliderImpl.SetProgressImageName( value.Get< std::string >() );
         break;
       }
 
-      case Toolkit::Slider::POPUP_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_IMAGE_NAME:
       {
         sliderImpl.SetPopupImageName( value.Get< std::string >() );
         break;
       }
 
-      case Toolkit::Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_ARROW_IMAGE_NAME:
       {
         sliderImpl.SetPopupArrowImageName( value.Get< std::string >() );
         break;
       }
 
-      case Toolkit::Slider::DISABLE_COLOR_PROPERTY:
+      case Toolkit::Slider::Property::DISABLE_COLOR:
       {
         sliderImpl.SetDisableColor( value.Get< Vector4 >() );
         break;
       }
 
-      case Toolkit::Slider::POPUP_TEXT_COLOR_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_TEXT_COLOR:
       {
         sliderImpl.SetPopupTextColor( value.Get< Vector4 >() );
         break;
       }
 
-      case Toolkit::Slider::VALUE_PRECISION_PROPERTY:
+      case Toolkit::Slider::Property::VALUE_PRECISION:
       {
         sliderImpl.SetValuePrecision( value.Get< int >() );
         break;
       }
 
-      case Toolkit::Slider::SHOW_POPUP_PROPERTY:
+      case Toolkit::Slider::Property::SHOW_POPUP:
       {
         sliderImpl.SetShowPopup( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Slider::SHOW_VALUE_PROPERTY:
+      case Toolkit::Slider::Property::SHOW_VALUE:
       {
         sliderImpl.SetShowValue( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Slider::ENABLED_PROPERTY:
+      case Toolkit::Slider::Property::ENABLED:
       {
         sliderImpl.SetEnabled( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Slider::MARKS_PROPERTY:
+      case Toolkit::Slider::Property::MARKS:
       {
         sliderImpl.SetMarks( value.Get< Property::Array >() );
         break;
       }
 
-      case Toolkit::Slider::SNAP_TO_MARKS_PROPERTY:
+      case Toolkit::Slider::Property::SNAP_TO_MARKS:
       {
         sliderImpl.SetSnapToMarks( value.Get< bool >() );
         break;
       }
 
-      case Toolkit::Slider::MARK_TOLERANCE_PROPERTY:
+      case Toolkit::Slider::Property::MARK_TOLERANCE:
       {
         sliderImpl.SetMarkTolerance( value.Get< float >() );
         break;
@@ -1166,122 +1128,122 @@ Property::Value Slider::GetProperty( BaseObject* object, Property::Index propert
 
     switch ( propertyIndex )
     {
-      case Toolkit::Slider::LOWER_BOUND_PROPERTY:
+      case Toolkit::Slider::Property::LOWER_BOUND:
       {
         value = sliderImpl.GetLowerBound();
         break;
       }
 
-      case Toolkit::Slider::UPPER_BOUND_PROPERTY:
+      case Toolkit::Slider::Property::UPPER_BOUND:
       {
         value = sliderImpl.GetUpperBound();
         break;
       }
 
-      case Toolkit::Slider::VALUE_PROPERTY:
+      case Toolkit::Slider::Property::VALUE:
       {
         value = sliderImpl.GetValue();
         break;
       }
 
-      case Toolkit::Slider::HIT_REGION_PROPERTY:
+      case Toolkit::Slider::Property::HIT_REGION:
       {
         value = sliderImpl.GetHitRegion();
         break;
       }
 
-      case Toolkit::Slider::BACKING_REGION_PROPERTY:
+      case Toolkit::Slider::Property::BACKING_REGION:
       {
         value = sliderImpl.GetBackingRegion();
         break;
       }
 
-      case Toolkit::Slider::HANDLE_REGION_PROPERTY:
+      case Toolkit::Slider::Property::HANDLE_REGION:
       {
         value = sliderImpl.GetHandleRegion();
         break;
       }
 
-      case Toolkit::Slider::BACKING_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::BACKING_IMAGE_NAME:
       {
         value = sliderImpl.GetBackingImageName();
         break;
       }
 
-      case Toolkit::Slider::HANDLE_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::HANDLE_IMAGE_NAME:
       {
         value = sliderImpl.GetHandleImageName();
         break;
       }
 
-      case Toolkit::Slider::PROGRESS_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::PROGRESS_IMAGE_NAME:
       {
         value = sliderImpl.GetProgressImageName();
         break;
       }
 
-      case Toolkit::Slider::POPUP_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_IMAGE_NAME:
       {
         value = sliderImpl.GetPopupImageName();
         break;
       }
 
-      case Toolkit::Slider::POPUP_ARROW_IMAGE_NAME_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_ARROW_IMAGE_NAME:
       {
         value = sliderImpl.GetPopupArrowImageName();
         break;
       }
 
-      case Toolkit::Slider::DISABLE_COLOR_PROPERTY:
+      case Toolkit::Slider::Property::DISABLE_COLOR:
       {
         value = sliderImpl.GetDisableColor();
         break;
       }
 
-      case Toolkit::Slider::POPUP_TEXT_COLOR_PROPERTY:
+      case Toolkit::Slider::Property::POPUP_TEXT_COLOR:
       {
         value = sliderImpl.GetPopupTextColor();
         break;
       }
 
-      case Toolkit::Slider::VALUE_PRECISION_PROPERTY:
+      case Toolkit::Slider::Property::VALUE_PRECISION:
       {
         value = sliderImpl.GetValuePrecision();
         break;
       }
 
-      case Toolkit::Slider::SHOW_POPUP_PROPERTY:
+      case Toolkit::Slider::Property::SHOW_POPUP:
       {
         value = sliderImpl.GetShowPopup();
         break;
       }
 
-      case Toolkit::Slider::SHOW_VALUE_PROPERTY:
+      case Toolkit::Slider::Property::SHOW_VALUE:
       {
         value = sliderImpl.GetShowValue();
         break;
       }
 
-      case Toolkit::Slider::ENABLED_PROPERTY:
+      case Toolkit::Slider::Property::ENABLED:
       {
         value = sliderImpl.IsEnabled();
         break;
       }
 
-      case Toolkit::Slider::MARKS_PROPERTY:
+      case Toolkit::Slider::Property::MARKS:
       {
         // TODO: Need to be able to return a PropertyArray
         // value = sliderImpl.GetMarks();
         break;
       }
 
-      case Toolkit::Slider::SNAP_TO_MARKS_PROPERTY:
+      case Toolkit::Slider::Property::SNAP_TO_MARKS:
       {
         value = sliderImpl.GetSnapToMarks();
         break;
       }
 
-      case Toolkit::Slider::MARK_TOLERANCE_PROPERTY:
+      case Toolkit::Slider::Property::MARK_TOLERANCE:
       {
         value = sliderImpl.GetMarkTolerance();
         break;
index 884f9b5..d99d48c 100755 (executable)
@@ -48,13 +48,6 @@ class Slider : public Control
 {
 public:
 
-  // Properties
-  enum
-  {
-    SLIDER_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    SLIDER_PROPERTY_END_INDEX = SLIDER_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   typedef Property::Array MarkList;
 
   /**
index b469f83..1b15f2b 100644 (file)
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
 
-namespace //unnamed namespace
+namespace //Unnamed namespace
 {
 
 using namespace Dali;
@@ -81,13 +82,12 @@ namespace Dali
 namespace Toolkit
 {
 
-const Property::Index SuperBlurView::PROPERTY_IMAGE( Internal::SuperBlurView::SUPER_BLUR_VIEW_PROPERTY_START_INDEX );
-
 namespace Internal
 {
 
 namespace
 {
+
 const unsigned int DEFAULT_BLUR_LEVEL(5u); ///< The default blur level when creating SuperBlurView from the type registry
 
 BaseHandle Create()
@@ -95,10 +95,12 @@ BaseHandle Create()
   return Toolkit::SuperBlurView::New( DEFAULT_BLUR_LEVEL );
 }
 
-// Type registration
-TypeRegistration typeRegistration( typeid(Toolkit::SuperBlurView), typeid(Toolkit::Control), Create );
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::SuperBlurView, Toolkit::Control, Create )
+
+DALI_PROPERTY_REGISTRATION( SuperBlurView, "image", MAP, IMAGE )
 
-PropertyRegistration property1( typeRegistration, "image", Toolkit::SuperBlurView::PROPERTY_IMAGE,   Property::MAP, &SuperBlurView::SetProperty, &SuperBlurView::GetProperty );
+DALI_TYPE_REGISTRATION_END()
 
 } // unnamed namespace
 
@@ -150,7 +152,7 @@ void SuperBlurView::OnInitialize()
 
   for(unsigned int i=0; i < mBlurLevels; i++)
   {
-    mImageActors[i].ApplyConstraint( Constraint::New<float>( Actor::Property::ColorAlpha, ParentSource( mBlurStrengthPropertyIndex ), ActorOpacityConstraint(mBlurLevels, i) ) );
+    mImageActors[i].ApplyConstraint( Constraint::New<float>( Actor::Property::COLOR_ALPHA, ParentSource( mBlurStrengthPropertyIndex ), ActorOpacityConstraint(mBlurLevels, i) ) );
   }
 
   Self().SetSize(Stage::GetCurrent().GetSize());
@@ -277,24 +279,20 @@ void SuperBlurView::SetProperty( BaseObject* object, Property::Index propertyInd
 {
   Toolkit::SuperBlurView superBlurView = Toolkit::SuperBlurView::DownCast( Dali::BaseHandle( object ) );
 
-  if ( superBlurView )
+  if( superBlurView )
   {
     SuperBlurView& superBlurViewImpl( GetImpl( superBlurView ) );
 
-    switch ( propertyIndex )
+    if( propertyIndex == Toolkit::SuperBlurView::Property::IMAGE )
     {
-      case Toolkit::SuperBlurView::PROPERTY_IMAGE:
+      Dali::Image image = Scripting::NewImage( value );
+      if ( image )
+      {
+        superBlurViewImpl.SetImage( image );
+      }
+      else
       {
-        Dali::Image image = Scripting::NewImage( value );
-        if ( image )
-        {
-          superBlurViewImpl.SetImage( image );
-        }
-        else
-        {
-          DALI_LOG_ERROR( "Cannot create image from property value\n" );
-        }
-        break;
+        DALI_LOG_ERROR( "Cannot create image from property value\n" );
       }
     }
   }
@@ -306,22 +304,18 @@ Property::Value SuperBlurView::GetProperty( BaseObject* object, Property::Index
 
   Toolkit::SuperBlurView pushButton = Toolkit::SuperBlurView::DownCast( Dali::BaseHandle( object ) );
 
-  if ( pushButton )
+  if( pushButton )
   {
     SuperBlurView& superBlurViewImpl( GetImpl( pushButton ) );
 
-    switch ( propertyIndex )
+    if( propertyIndex == Toolkit::SuperBlurView::Property::IMAGE )
     {
-      case Toolkit::SuperBlurView::PROPERTY_IMAGE:
+      Property::Map map;
+      if( !superBlurViewImpl.mImageActors.empty() && superBlurViewImpl.mImageActors[0] )
       {
-        Property::Map map;
-        if ( !superBlurViewImpl.mImageActors.empty() && superBlurViewImpl.mImageActors[0] )
-        {
-          Scripting::CreatePropertyMap( superBlurViewImpl.mImageActors[0], map );
-        }
-        value = Property::Value( map );
-        break;
+        Scripting::CreatePropertyMap( superBlurViewImpl.mImageActors[0], map );
       }
+      value = Property::Value( map );
     }
   }
 
index db9c613..ebbe453 100644 (file)
@@ -39,14 +39,6 @@ namespace Internal
  */
 class SuperBlurView : public Control
 {
-public:
-
-  // Properties
-  enum
-  {
-    SUPER_BLUR_VIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    SUPER_BLUR_VIEW_PROPERTY_END_INDEX = SUPER_BLUR_VIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
 
 public:
 
index 30c66f3..e18fd6d 100644 (file)
@@ -22,6 +22,7 @@
 #include <sstream>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
 
@@ -110,41 +111,39 @@ namespace Dali
 namespace Toolkit
 {
 
-const Property::Index TableView::PROPERTY_ROWS( Internal::TableView::TABLEVIEW_PROPERTY_START_INDEX );
-const Property::Index TableView::PROPERTY_COLUMNS( Internal::TableView::TABLEVIEW_PROPERTY_START_INDEX + 1 );
-const Property::Index TableView::PROPERTY_CELL_PADDING( Internal::TableView::TABLEVIEW_PROPERTY_START_INDEX + 2 );
-const Property::Index TableView::PROPERTY_LAYOUT_ROWS( Internal::TableView::TABLEVIEW_PROPERTY_START_INDEX + 3 );
-const Property::Index TableView::PROPERTY_LAYOUT_COLUMNS( Internal::TableView::TABLEVIEW_PROPERTY_START_INDEX + 4 );
-
 namespace Internal
 {
 
 namespace
 {
 
+// Type registration
+BaseHandle Create()
+{
+  return Toolkit::TableView::New( 0, 0 );
+}
+
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TableView, Toolkit::Control, Create );
+
+DALI_PROPERTY_REGISTRATION( TableView, "rows",           UNSIGNED_INTEGER, ROWS           )
+DALI_PROPERTY_REGISTRATION( TableView, "columns",        UNSIGNED_INTEGER, COLUMNS        )
+DALI_PROPERTY_REGISTRATION( TableView, "cell-padding",   VECTOR2,          CELL_PADDING   )
+DALI_PROPERTY_REGISTRATION( TableView, "layout-rows",    MAP,              LAYOUT_ROWS    )
+DALI_PROPERTY_REGISTRATION( TableView, "layout-columns", MAP,              LAYOUT_COLUMNS )
+
+DALI_TYPE_REGISTRATION_END()
+
 const Scripting::StringEnum< Toolkit::TableView::LayoutPolicy > LAYOUT_POLICY_STRING_TABLE[] =
 {
  { "fixed",    Toolkit::TableView::Fixed    },
  { "relative", Toolkit::TableView::Relative },
- { "fill",     Toolkit::TableView::Fill }
+ { "fill",     Toolkit::TableView::Fill     }
 };
 
 const unsigned int LAYOUT_POLICY_STRING_TABLE_COUNT = sizeof(LAYOUT_POLICY_STRING_TABLE) / sizeof( LAYOUT_POLICY_STRING_TABLE[0] );
 
-// Type registration
-BaseHandle Create()
-{
-  return Toolkit::TableView::New(0, 0);
-}
-TypeRegistration mType( typeid(Toolkit::TableView), typeid(Toolkit::Control), Create );
-
-PropertyRegistration property1( mType, "rows", Toolkit::TableView::PROPERTY_ROWS, Property::UNSIGNED_INTEGER, &TableView::SetProperty, &TableView::GetProperty );
-PropertyRegistration property2( mType, "columns", Toolkit::TableView::PROPERTY_COLUMNS, Property::UNSIGNED_INTEGER, &TableView::SetProperty, &TableView::GetProperty );
-PropertyRegistration property3( mType, "cell-padding", Toolkit::TableView::PROPERTY_CELL_PADDING, Property::VECTOR2, &TableView::SetProperty, &TableView::GetProperty );
-PropertyRegistration property4( mType, "layout-rows", Toolkit::TableView::PROPERTY_LAYOUT_ROWS, Property::MAP, &TableView::SetProperty, &TableView::GetProperty );
-PropertyRegistration property5( mType, "layout-columns", Toolkit::TableView::PROPERTY_LAYOUT_COLUMNS, Property::MAP, &TableView::SetProperty, &TableView::GetProperty );
-
-} // namespace
+} // Unnamed namespace
 
 Toolkit::TableView TableView::New( unsigned int initialRows, unsigned int initialColumns )
 {
@@ -717,7 +716,7 @@ void TableView::SetProperty( BaseObject* object, Property::Index index, const Pr
     TableView& tableViewImpl( GetImpl( tableView ) );
     switch( index )
     {
-      case Toolkit::TableView::PROPERTY_ROWS:
+      case Toolkit::TableView::Property::ROWS:
       {
         if( value.Get<unsigned int>() != tableViewImpl.GetRows() )
         {
@@ -725,7 +724,7 @@ void TableView::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TableView::PROPERTY_COLUMNS:
+      case Toolkit::TableView::Property::COLUMNS:
       {
         if( value.Get<unsigned int>() != tableViewImpl.GetColumns() )
         {
@@ -733,17 +732,17 @@ void TableView::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TableView::PROPERTY_CELL_PADDING:
+      case Toolkit::TableView::Property::CELL_PADDING:
       {
         tableViewImpl.SetCellPadding( value.Get<Vector2>() );
         break;
       }
-      case Toolkit::TableView::PROPERTY_LAYOUT_ROWS:
+      case Toolkit::TableView::Property::LAYOUT_ROWS:
       {
         SetHeightOrWidthProperty( tableViewImpl, &TableView::SetFixedHeight, &TableView::SetRelativeHeight, value );
         break;
       }
-      case Toolkit::TableView::PROPERTY_LAYOUT_COLUMNS:
+      case Toolkit::TableView::Property::LAYOUT_COLUMNS:
       {
         SetHeightOrWidthProperty( tableViewImpl, &TableView::SetFixedWidth, &TableView::SetRelativeWidth, value );
         break;
@@ -763,27 +762,27 @@ Property::Value TableView::GetProperty( BaseObject* object, Property::Index inde
     TableView& tableViewImpl( GetImpl( tableView ) );
     switch( index )
     {
-      case Toolkit::TableView::PROPERTY_ROWS:
+      case Toolkit::TableView::Property::ROWS:
       {
         value = tableViewImpl.GetRows();
         break;
       }
-      case Toolkit::TableView::PROPERTY_COLUMNS:
+      case Toolkit::TableView::Property::COLUMNS:
       {
         value = tableViewImpl.GetColumns();
         break;
       }
-      case Toolkit::TableView::PROPERTY_CELL_PADDING:
+      case Toolkit::TableView::Property::CELL_PADDING:
       {
         value = tableViewImpl.GetCellPadding();
         break;
       }
-      case Toolkit::TableView::PROPERTY_LAYOUT_ROWS:
+      case Toolkit::TableView::Property::LAYOUT_ROWS:
       {
         value = tableViewImpl.GetRowHeightsPropertyValue();
         break;
       }
-      case Toolkit::TableView::PROPERTY_LAYOUT_COLUMNS:
+      case Toolkit::TableView::Property::LAYOUT_COLUMNS:
       {
         value = tableViewImpl.GetColumnWidthsPropertyValue();
         break;
@@ -1210,6 +1209,7 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
           break;
         }
         case Toolkit::Control::Down:
+
         {
           if(++currentRow > numberOfRows - 1)
           {
index 9939a05..154c341 100644 (file)
@@ -40,13 +40,6 @@ class TableView : public Control
 {
 public:
 
-  // Properties
-  enum
-  {
-    TABLEVIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    TABLEVIEW_PROPERTY_END_INDEX = TABLEVIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   /**
    * Structure for the layout data
    */
index 224530b..2c87bbc 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
@@ -56,12 +57,10 @@ BaseHandle Create()
   return Toolkit::TextField::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::TextField), typeid(Toolkit::Control), Create );
-
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextField, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( TextField, "rendering-backend",       INT,       RENDERING_BACKEND       )
+DALI_PROPERTY_REGISTRATION( TextField, "rendering-backend",       INTEGER,   RENDERING_BACKEND       )
 DALI_PROPERTY_REGISTRATION( TextField, "placeholder-text",        STRING,    PLACEHOLDER_TEXT        )
 DALI_PROPERTY_REGISTRATION( TextField, "text",                    STRING,    TEXT                    )
 DALI_PROPERTY_REGISTRATION( TextField, "font-family",             STRING,    FONT_FAMILY             )
@@ -105,7 +104,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
 
     switch( index )
     {
-      case Toolkit::TextField::PROPERTY_RENDERING_BACKEND:
+      case Toolkit::TextField::Property::RENDERING_BACKEND:
       {
         unsigned int backend = value.Get< unsigned int >();
 
@@ -116,7 +115,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_PLACEHOLDER_TEXT:
+      case Toolkit::TextField::Property::PLACEHOLDER_TEXT:
       {
         if( impl.mController )
         {
@@ -124,7 +123,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_TEXT:
+      case Toolkit::TextField::Property::TEXT:
       {
         if( impl.mController )
         {
@@ -132,7 +131,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_IMAGE:
+      case Toolkit::TextField::Property::CURSOR_IMAGE:
       {
         ResourceImage image = ResourceImage::New( value.Get< std::string >() );
 
@@ -142,7 +141,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_PRIMARY_CURSOR_COLOR:
+      case Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
         {
@@ -150,7 +149,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_SECONDARY_CURSOR_COLOR:
+      case Toolkit::TextField::Property::SECONDARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
         {
@@ -158,7 +157,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_ENABLE_CURSOR_BLINK:
+      case Toolkit::TextField::Property::ENABLE_CURSOR_BLINK:
       {
         if( impl.mController )
         {
@@ -166,7 +165,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_BLINK_INTERVAL:
+      case Toolkit::TextField::Property::CURSOR_BLINK_INTERVAL:
       {
         if( impl.mDecorator )
         {
@@ -174,7 +173,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_BLINK_DURATION:
+      case Toolkit::TextField::Property::CURSOR_BLINK_DURATION:
       {
         if( impl.mDecorator )
         {
@@ -182,7 +181,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_GRAB_HANDLE_IMAGE:
+      case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
       {
         ResourceImage image = ResourceImage::New( value.Get< std::string >() );
 
@@ -192,7 +191,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_DECORATION_BOUNDING_BOX:
+      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
       {
         if( impl.mDecorator )
         {
@@ -216,22 +215,22 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
 
     switch( index )
     {
-      case Toolkit::TextField::PROPERTY_RENDERING_BACKEND:
+      case Toolkit::TextField::Property::RENDERING_BACKEND:
       {
         value = impl.mRenderingBackend;
         break;
       }
-      case Toolkit::TextField::PROPERTY_PLACEHOLDER_TEXT:
+      case Toolkit::TextField::Property::PLACEHOLDER_TEXT:
       {
         DALI_LOG_WARNING( "UTF-8 text representation was discarded\n" );
         break;
       }
-      case Toolkit::TextField::PROPERTY_TEXT:
+      case Toolkit::TextField::Property::TEXT:
       {
         DALI_LOG_WARNING( "UTF-8 text representation was discarded\n" );
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_IMAGE:
+      case Toolkit::TextField::Property::CURSOR_IMAGE:
       {
         if( impl.mDecorator )
         {
@@ -243,7 +242,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_PRIMARY_CURSOR_COLOR:
+      case Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
         {
@@ -251,7 +250,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_SECONDARY_CURSOR_COLOR:
+      case Toolkit::TextField::Property::SECONDARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
         {
@@ -259,12 +258,12 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_ENABLE_CURSOR_BLINK:
+      case Toolkit::TextField::Property::ENABLE_CURSOR_BLINK:
       {
         //value = impl.mController->GetEnableCursorBlink(); TODO
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_BLINK_INTERVAL:
+      case Toolkit::TextField::Property::CURSOR_BLINK_INTERVAL:
       {
         if( impl.mDecorator )
         {
@@ -272,7 +271,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_CURSOR_BLINK_DURATION:
+      case Toolkit::TextField::Property::CURSOR_BLINK_DURATION:
       {
         if( impl.mDecorator )
         {
@@ -280,7 +279,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_GRAB_HANDLE_IMAGE:
+      case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
       {
         if( impl.mDecorator )
         {
@@ -292,7 +291,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::PROPERTY_DECORATION_BOUNDING_BOX:
+      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
       {
         if( impl.mDecorator )
         {
index 3f98cbd..32a7db2 100644 (file)
@@ -42,13 +42,6 @@ class TextField : public Control, public Text::ControlInterface
 {
 public:
 
-  // Properties
-  enum
-  {
-    TEXTFIELD_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    TEXTFIELD_PROPERTY_END_INDEX = TEXTFIELD_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   /**
    * @copydoc Dali::Toollkit::TextField::New()
    */
index 8b1cb70..bb0607d 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -57,7 +58,7 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextLabel, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( TextLabel, "rendering-backend", INT,     RENDERING_BACKEND )
+DALI_PROPERTY_REGISTRATION( TextLabel, "rendering-backend", INTEGER, RENDERING_BACKEND )
 DALI_PROPERTY_REGISTRATION( TextLabel, "text",              STRING,  TEXT              )
 DALI_PROPERTY_REGISTRATION( TextLabel, "font-family",       STRING,  FONT_FAMILY       )
 DALI_PROPERTY_REGISTRATION( TextLabel, "font-style",        STRING,  FONT_STYLE        )
@@ -92,7 +93,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
     TextLabel& impl( GetImpl( label ) );
     switch( index )
     {
-      case Toolkit::TextLabel::PROPERTY_RENDERING_BACKEND:
+      case Toolkit::TextLabel::Property::RENDERING_BACKEND:
       {
         unsigned int backend = value.Get< int >();
 
@@ -104,7 +105,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_TEXT:
+      case Toolkit::TextLabel::Property::TEXT:
       {
         if( impl.mController )
         {
@@ -113,7 +114,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_FONT_FAMILY:
+      case Toolkit::TextLabel::Property::FONT_FAMILY:
       {
         if( impl.mController )
         {
@@ -127,7 +128,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_FONT_STYLE:
+      case Toolkit::TextLabel::Property::FONT_STYLE:
       {
         if( impl.mController )
         {
@@ -141,7 +142,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_POINT_SIZE:
+      case Toolkit::TextLabel::Property::POINT_SIZE:
       {
         if( impl.mController )
         {
@@ -155,7 +156,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_MULTI_LINE:
+      case Toolkit::TextLabel::Property::MULTI_LINE:
       {
         if( impl.mController )
         {
@@ -185,12 +186,12 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
     TextLabel& impl( GetImpl( label ) );
     switch( index )
     {
-      case Toolkit::TextLabel::PROPERTY_RENDERING_BACKEND:
+      case Toolkit::TextLabel::Property::RENDERING_BACKEND:
       {
         value = impl.mRenderingBackend;
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_TEXT:
+      case Toolkit::TextLabel::Property::TEXT:
       {
         if( impl.mController )
         {
@@ -202,7 +203,7 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
         DALI_LOG_WARNING( "UTF-8 text representation was discarded\n" );
         break;
       }
-      case Toolkit::TextLabel::PROPERTY_MULTI_LINE:
+      case Toolkit::TextLabel::Property::MULTI_LINE:
       {
         if( impl.mController )
         {
index 5c62137..de54bf0 100644 (file)
@@ -40,13 +40,6 @@ class TextLabel : public Control, public Text::ControlInterface
 {
 public:
 
-  // Properties
-  enum
-  {
-    TEXTLABEL_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
-    TEXTLABEL_PROPERTY_END_INDEX = TEXTLABEL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   /**
    * @copydoc Dali::Toollkit::TextLabel::New()
    */
index 207ffe6..e0dbd86 100644 (file)
 #include <dali/public-api/actors/renderable-actor.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
 
-// EXTERNAL INCLUDES
-
 namespace Dali
 {
 
@@ -40,12 +39,14 @@ namespace Internal
 
 namespace
 {
+
 BaseHandle Create()
 {
   return Toolkit::ToolBar::New();
 }
 
-TypeRegistration mType( typeid(Toolkit::ToolBar), typeid(Toolkit::Control), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ToolBar, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
 
 const float DEFAULT_RELATIVE_SIZE( 0.1f );
 const Toolkit::Alignment::Type DEFAULT_ALIGNMENT( Toolkit::Alignment::HorizontalLeft );
index 9e4eb86..9a486ed 100644 (file)
@@ -22,8 +22,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
+#include <dali/public-api/object/type-registry-helper.h>
 
 namespace Dali
 {
@@ -34,26 +33,19 @@ namespace Toolkit
 namespace Internal
 {
 
-namespace // to register type
+namespace
 {
 
-// Signals
-
-const char* const SIGNAL_ORIENTATION_ANIMATION_START = "orientation-animation-start";
-
 BaseHandle Create()
 {
   return Toolkit::View::New();
 }
 
-TypeRegistration typeRegistration( typeid( Toolkit::View ), typeid( Toolkit::Control ), Create );
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::View, Toolkit::Control, Create )
 
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_ORIENTATION_ANIMATION_START , &View::DoConnectSignal );
+DALI_SIGNAL_REGISTRATION( View, "orientation-animation-start", SIGNAL_ORIENTATION_ANIMATION_START )
 
-}
-
-namespace
-{
+DALI_TYPE_REGISTRATION_END()
 
 const float ROTATION_ANIMATION_DURATION = 0.5f;
 
index 4e26bc7..014e215 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/integration-api/debug.h>
 
@@ -44,23 +45,16 @@ namespace Toolkit
 namespace Internal
 {
 
-namespace // unnamed namespace
+namespace // Unnamed namespace
 {
 
-// Signals
-
-const char* const SIGNAL_PRE_FOCUS_CHANGE =        "keyboard-pre-focus-change";
-const char* const SIGNAL_FOCUS_CHANGED =           "keyboard-focus-changed";
-const char* const SIGNAL_FOCUS_GROUP_CHANGED =     "keyboard-focus-group-changed";
-const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED = "keyboard-focused-actor-activated";
-
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_KEYBOARD_FOCUS_MANAGER");
 #endif
 
-const std::string IS_FOCUS_GROUP_PROPERTY_NAME("is-keyboard-focus-group"); // This property will be replaced by a flag in Control.
+const char* const IS_FOCUS_GROUP_PROPERTY_NAME = "is-keyboard-focus-group"; // This property will be replaced by a flag in Control.
 
-const char* FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "keyboard_focus.png";
+const char* const FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "keyboard_focus.png";
 const Vector4 FOCUS_BORDER_IMAGE_BORDER = Vector4(7.0f, 7.0f, 7.0f, 7.0f);
 
 BaseHandle Create()
@@ -81,12 +75,14 @@ BaseHandle Create()
   return handle;
 }
 
-TypeRegistration KEYBOARD_FOCUS_MANAGER_TYPE( typeid(Dali::Toolkit::KeyboardFocusManager), typeid(Dali::BaseHandle), Create, true /* Create instance at startup */ );
+DALI_TYPE_REGISTRATION_BEGIN_CREATE( Toolkit::KeyboardFocusManager, Dali::BaseHandle, Create, true )
+
+DALI_SIGNAL_REGISTRATION( KeyboardFocusManager, "keyboard-pre-focus-change",        SIGNAL_PRE_FOCUS_CHANGE        )
+DALI_SIGNAL_REGISTRATION( KeyboardFocusManager, "keyboard-focus-changed",           SIGNAL_FOCUS_CHANGED           )
+DALI_SIGNAL_REGISTRATION( KeyboardFocusManager, "keyboard-focus-group-changed",     SIGNAL_FOCUS_GROUP_CHANGED     )
+DALI_SIGNAL_REGISTRATION( KeyboardFocusManager, "keyboard-focused-actor-activated", SIGNAL_FOCUSED_ACTOR_ACTIVATED )
 
-SignalConnectorType signalConnector1( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_PRE_FOCUS_CHANGE , &KeyboardFocusManager::DoConnectSignal );
-SignalConnectorType signalConnector2( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUS_CHANGED , &KeyboardFocusManager::DoConnectSignal );
-SignalConnectorType signalConnector3( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUS_GROUP_CHANGED , &KeyboardFocusManager::DoConnectSignal );
-SignalConnectorType signalConnector4( KEYBOARD_FOCUS_MANAGER_TYPE, SIGNAL_FOCUSED_ACTOR_ACTIVATED , &KeyboardFocusManager::DoConnectSignal );
+DALI_TYPE_REGISTRATION_END()
 
 } // unnamed namespace
 
index 1ee0e9e..fa453dd 100644 (file)
@@ -23,6 +23,7 @@
 #include <sstream>
 #include <dali/public-api/adaptor-framework/singleton-service.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -72,7 +73,9 @@ BaseHandle Create()
 
   return handle;
 }
-TypeRegistration STYLE_MANAGER_TYPE( typeid(Dali::Toolkit::StyleManager), typeid(Dali::BaseHandle), Create, true /* Create instance at startup */ );
+
+DALI_TYPE_REGISTRATION_BEGIN_CREATE( Toolkit::StyleManager, Dali::BaseHandle, Create, true )
+DALI_TYPE_REGISTRATION_END()
 
 } // namespace
 
index 1c16683..14645f6 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
 namespace Dali
@@ -36,13 +37,12 @@ namespace Internal
 namespace
 {
 
-// Signals
+// Setup properties, signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::CubeTransitionEffect, Dali::BaseHandle, NULL );
 
-const char* const SIGNAL_TRANSITION_COMPLETED = "transition-completed";
+DALI_SIGNAL_REGISTRATION( CubeTransitionEffect, "transition-completed", SIGNAL_TRANSITION_COMPLETED )
 
-TypeRegistration typeRegistration( typeid( Toolkit::CubeTransitionEffect ), typeid( Dali::BaseHandle ), NULL );
-
-SignalConnectorType signalConnector1( typeRegistration, SIGNAL_TRANSITION_COMPLETED , &CubeTransitionEffect::DoConnectSignal );
+DALI_TYPE_REGISTRATION_END()
 
 }
 
index d67e38f..a3d0ca2 100644 (file)
@@ -59,17 +59,34 @@ class DALI_IMPORT_API Button : public Control
 {
 public:
 
-  // Properties
-  static const Dali::Property::Index PROPERTY_DISABLED;                     ///< name "disabled",                     @see SetDisabled(),                  type BOOLEAN
-  static const Dali::Property::Index PROPERTY_AUTO_REPEATING;               ///< name "auto-repeating",               @see SetAutoRepeating(),             type BOOLEAN
-  static const Dali::Property::Index PROPERTY_INITIAL_AUTO_REPEATING_DELAY; ///< name "initial-auto-repeating-delay", @see SetInitialAutoRepeatingDelay(), type FLOAT
-  static const Dali::Property::Index PROPERTY_NEXT_AUTO_REPEATING_DELAY;    ///< name "next-auto-repeating-delay",    @see SetNextAutoRepeatingDelay(),    type FLOAT
-  static const Dali::Property::Index PROPERTY_TOGGLABLE;                    ///< name "togglable",                    @see SetTogglableButton(),           type BOOLEAN
-  static const Dali::Property::Index PROPERTY_SELECTED;                     ///< name "selected",                     @see SetSelected(),                  type BOOLEAN
-  static const Dali::Property::Index PROPERTY_NORMAL_STATE_ACTOR;           ///< name "normal-state-actor",           @see SetButtonImage(),               type MAP
-  static const Dali::Property::Index PROPERTY_SELECTED_STATE_ACTOR;         ///< name "selected-state-actor",         @see SetSelectedImage(),             type MAP
-  static const Dali::Property::Index PROPERTY_DISABLED_STATE_ACTOR;         ///< name "disabled-state-actor",         @see SetDisabledImage(),             type MAP
-  static const Dali::Property::Index PROPERTY_LABEL_ACTOR;                  ///< name "label-actor",                  @see SetLabel(),                     type MAP
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the Button class.
+   */
+  struct Property
+  {
+    enum
+    {
+      DISABLED = PROPERTY_START_INDEX, ///< name "disabled",                     @see SetDisabled(),                  type BOOLEAN
+      AUTO_REPEATING,                  ///< name "auto-repeating",               @see SetAutoRepeating(),             type BOOLEAN
+      INITIAL_AUTO_REPEATING_DELAY,    ///< name "initial-auto-repeating-delay", @see SetInitialAutoRepeatingDelay(), type FLOAT
+      NEXT_AUTO_REPEATING_DELAY,       ///< name "next-auto-repeating-delay",    @see SetNextAutoRepeatingDelay(),    type FLOAT
+      TOGGLABLE,                       ///< name "togglable",                    @see SetTogglableButton(),           type BOOLEAN
+      SELECTED,                        ///< name "selected",                     @see SetSelected(),                  type BOOLEAN
+      NORMAL_STATE_ACTOR,              ///< name "normal-state-actor",           @see SetButtonImage(),               type MAP
+      SELECTED_STATE_ACTOR,            ///< name "selected-state-actor",         @see SetSelectedImage(),             type MAP
+      DISABLED_STATE_ACTOR,            ///< name "disabled-state-actor",         @see SetDisabledImage(),             type MAP
+      LABEL_ACTOR,                     ///< name "label-actor",                  @see SetLabel(),                     type MAP
+    };
+  };
 
 public:
 
index b88b3d7..16a009b 100644 (file)
@@ -27,6 +27,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/geometry/mesh.h>
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
 
@@ -45,29 +46,9 @@ namespace Dali
 namespace Toolkit
 {
 
-const Property::Index Control::PROPERTY_BACKGROUND_COLOR      = Internal::Control::CONTROL_PROPERTY_START_INDEX;
-const Property::Index Control::PROPERTY_BACKGROUND            = Internal::Control::CONTROL_PROPERTY_START_INDEX + 1;
-const Property::Index Control::PROPERTY_WIDTH_POLICY          = Internal::Control::CONTROL_PROPERTY_START_INDEX + 2;
-const Property::Index Control::PROPERTY_HEIGHT_POLICY         = Internal::Control::CONTROL_PROPERTY_START_INDEX + 3;
-const Property::Index Control::PROPERTY_MINIMUM_SIZE          = Internal::Control::CONTROL_PROPERTY_START_INDEX + 4;
-const Property::Index Control::PROPERTY_MAXIMUM_SIZE          = Internal::Control::CONTROL_PROPERTY_START_INDEX + 5;
-const Property::Index Control::PROPERTY_KEY_INPUT_FOCUS       = Internal::Control::CONTROL_PROPERTY_START_INDEX + 6;
-
 namespace
 {
 
-// Signals
-
-const char* const SIGNAL_KEY_EVENT =    "key-event";
-const char* const SIGNAL_TAPPED =       "tapped";
-const char* const SIGNAL_PANNED =       "panned";
-const char* const SIGNAL_PINCHED =      "pinched";
-const char* const SIGNAL_LONG_PRESSED = "long-pressed";
-
-// Actions
-
-const char* const ACTION_CONTROL_ACTIVATED = "control-activated";
-
 const Scripting::StringEnum< Control::SizePolicy > SIZE_POLICY_STRING_TABLE[] =
 {
   { "FIXED",      Control::Fixed      },
@@ -91,17 +72,20 @@ BaseHandle Create()
   return Internal::Control::New();
 }
 
-TypeRegistration CONTROL_TYPE( typeid(Control), typeid(CustomActor), Create );
+// Setup signals and actions using the type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Control, CustomActor, Create );
+
+// Note: Properties are registered separately below,
 
-// Property Registration after Internal::Control::Impl definition below
+DALI_SIGNAL_REGISTRATION( Control, "key-event",                 SIGNAL_KEY_EVENT         )
+DALI_SIGNAL_REGISTRATION( Control, "tapped",                    SIGNAL_TAPPED            )
+DALI_SIGNAL_REGISTRATION( Control, "panned",                    SIGNAL_PANNED            )
+DALI_SIGNAL_REGISTRATION( Control, "pinched",                   SIGNAL_PINCHED           )
+DALI_SIGNAL_REGISTRATION( Control, "long-pressed",              SIGNAL_LONG_PRESSED      )
 
-TypeAction ACTION_TYPE_1( CONTROL_TYPE, ACTION_CONTROL_ACTIVATED, &Internal::Control::DoAction );
+DALI_ACTION_REGISTRATION( Control, "control-activated",         ACTION_CONTROL_ACTIVATED )
 
-SignalConnectorType SIGNAL_CONNECTOR_1( CONTROL_TYPE, SIGNAL_KEY_EVENT,     &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_2( CONTROL_TYPE, SIGNAL_TAPPED,        &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_3( CONTROL_TYPE, SIGNAL_PANNED,        &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_4( CONTROL_TYPE, SIGNAL_PINCHED,       &Internal::Control::DoConnectSignal );
-SignalConnectorType SIGNAL_CONNECTOR_5( CONTROL_TYPE, SIGNAL_LONG_PRESSED,  &Internal::Control::DoConnectSignal );
+DALI_TYPE_REGISTRATION_END()
 
 /**
  * Structure which holds information about the background of a control
@@ -231,7 +215,7 @@ void SetupBackgroundActor( Actor actor, Property::Index constrainingIndex, const
   actor.SetZ( BACKGROUND_ACTOR_Z_POSITION );
 
   Constraint constraint = Constraint::New<Vector3>( constrainingIndex,
-                                                    ParentSource( Actor::Property::Size ),
+                                                    ParentSource( Actor::Property::SIZE ),
                                                     EqualToConstraint() );
   actor.ApplyConstraint( constraint );
 }
@@ -339,13 +323,13 @@ public:
 
       switch ( index )
       {
-        case Toolkit::Control::PROPERTY_BACKGROUND_COLOR:
+        case Toolkit::Control::Property::BACKGROUND_COLOR:
         {
           controlImpl.SetBackgroundColor( value.Get< Vector4 >() );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_BACKGROUND:
+        case Toolkit::Control::Property::BACKGROUND:
         {
           if ( value.HasKey( "image" ) )
           {
@@ -365,31 +349,31 @@ public:
           break;
         }
 
-        case Toolkit::Control::PROPERTY_WIDTH_POLICY:
+        case Toolkit::Control::Property::WIDTH_POLICY:
         {
           controlImpl.mImpl->mWidthPolicy = Scripting::GetEnumeration< Toolkit::Control::SizePolicy >( value.Get< std::string >().c_str(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_HEIGHT_POLICY:
+        case Toolkit::Control::Property::HEIGHT_POLICY:
         {
           controlImpl.mImpl->mHeightPolicy = Scripting::GetEnumeration< Toolkit::Control::SizePolicy >( value.Get< std::string >().c_str(), SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_MINIMUM_SIZE:
+        case Toolkit::Control::Property::MINIMUM_SIZE:
         {
           controlImpl.SetMinimumSize( value.Get< Vector3 >() );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_MAXIMUM_SIZE:
+        case Toolkit::Control::Property::MAXIMUM_SIZE:
         {
           controlImpl.SetMaximumSize( value.Get< Vector3 >() );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS:
+        case Toolkit::Control::Property::KEY_INPUT_FOCUS:
         {
           if ( value.Get< bool >() )
           {
@@ -423,13 +407,13 @@ public:
 
       switch ( index )
       {
-        case Toolkit::Control::PROPERTY_BACKGROUND_COLOR:
+        case Toolkit::Control::Property::BACKGROUND_COLOR:
         {
           value = controlImpl.GetBackgroundColor();
           break;
         }
 
-        case Toolkit::Control::PROPERTY_BACKGROUND:
+        case Toolkit::Control::Property::BACKGROUND:
         {
           Property::Map map;
 
@@ -450,31 +434,31 @@ public:
           break;
         }
 
-        case Toolkit::Control::PROPERTY_WIDTH_POLICY:
+        case Toolkit::Control::Property::WIDTH_POLICY:
         {
           value = std::string( Scripting::GetEnumerationName< Toolkit::Control::SizePolicy >( controlImpl.mImpl->mWidthPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_HEIGHT_POLICY:
+        case Toolkit::Control::Property::HEIGHT_POLICY:
         {
           value = std::string( Scripting::GetEnumerationName< Toolkit::Control::SizePolicy >( controlImpl.mImpl->mHeightPolicy, SIZE_POLICY_STRING_TABLE, SIZE_POLICY_STRING_TABLE_COUNT ) );
           break;
         }
 
-        case Toolkit::Control::PROPERTY_MINIMUM_SIZE:
+        case Toolkit::Control::Property::MINIMUM_SIZE:
         {
           value = controlImpl.mImpl->GetMinimumSize();
           break;
         }
 
-        case Toolkit::Control::PROPERTY_MAXIMUM_SIZE:
+        case Toolkit::Control::Property::MAXIMUM_SIZE:
         {
           value = controlImpl.mImpl->GetMaximumSize();
           break;
         }
 
-        case Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS:
+        case Toolkit::Control::Property::KEY_INPUT_FOCUS:
         {
           value = controlImpl.HasKeyInputFocus();
           break;
@@ -583,7 +567,7 @@ public:
   bool mIsKeyboardFocusGroup:1;           ///< Stores whether the control is a focus group.
   bool mInitialized:1;
 
-  // Properties - these need to be members of Internal::Control::Impl as they need to functions within this class.
+  // Properties - these need to be members of Internal::Control::Impl as they need to function within this class.
   static PropertyRegistration PROPERTY_1;
   static PropertyRegistration PROPERTY_2;
   static PropertyRegistration PROPERTY_3;
@@ -593,13 +577,14 @@ public:
   static PropertyRegistration PROPERTY_7;
 };
 
-PropertyRegistration Control::Impl::PROPERTY_1( CONTROL_TYPE, "background-color", Toolkit::Control::PROPERTY_BACKGROUND_COLOR, Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_2( CONTROL_TYPE, "background",       Toolkit::Control::PROPERTY_BACKGROUND,       Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_3( CONTROL_TYPE, "width-policy",     Toolkit::Control::PROPERTY_WIDTH_POLICY,     Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_4( CONTROL_TYPE, "height-policy",    Toolkit::Control::PROPERTY_HEIGHT_POLICY,    Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_5( CONTROL_TYPE, "minimum-size",     Toolkit::Control::PROPERTY_MINIMUM_SIZE,     Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_6( CONTROL_TYPE, "maximum-size",     Toolkit::Control::PROPERTY_MAXIMUM_SIZE,     Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-PropertyRegistration Control::Impl::PROPERTY_7( CONTROL_TYPE, "key-input-focus",  Toolkit::Control::PROPERTY_KEY_INPUT_FOCUS,  Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+// Properties registered without macro to use specific member variables.
+PropertyRegistration Control::Impl::PROPERTY_1( typeRegistration, "background-color", Toolkit::Control::Property::BACKGROUND_COLOR, Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_2( typeRegistration, "background",       Toolkit::Control::Property::BACKGROUND,      Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "width-policy",     Toolkit::Control::Property::WIDTH_POLICY,     Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_4( typeRegistration, "height-policy",    Toolkit::Control::Property::HEIGHT_POLICY,    Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_5( typeRegistration, "minimum-size",     Toolkit::Control::Property::MINIMUM_SIZE,     Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_6( typeRegistration, "maximum-size",     Toolkit::Control::Property::MAXIMUM_SIZE,     Property::VECTOR3, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+PropertyRegistration Control::Impl::PROPERTY_7( typeRegistration, "key-input-focus",  Toolkit::Control::Property::KEY_INPUT_FOCUS,   Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 
 Toolkit::Control Control::New()
 {
@@ -788,7 +773,7 @@ void Control::SetBackgroundColor( const Vector4& color )
     // Create Mesh Actor
     MeshActor meshActor = MeshActor::New( CreateMesh() );
 
-    SetupBackgroundActor( meshActor, Actor::Property::Scale, color );
+    SetupBackgroundActor( meshActor, Actor::Property::SCALE, color );
 
     // Set the background actor before adding so that we do not inform deriving classes
     background.actor = meshActor;
@@ -819,7 +804,7 @@ void Control::SetBackground( Image image )
   }
 
   ImageActor imageActor = ImageActor::New( image );
-  SetupBackgroundActor( imageActor, Actor::Property::Size, background.color );
+  SetupBackgroundActor( imageActor, Actor::Property::SIZE, background.color );
 
   // Set the background actor before adding so that we do not inform derived classes
   background.actor = imageActor;
index fcb1454..72c0535 100644 (file)
@@ -62,13 +62,6 @@ class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTracker
 {
 public:
 
-  // Properties
-  enum
-  {
-    CONTROL_PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX,
-    CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
-  };
-
   // Creation & Destruction
 
   /**
index ada7c17..4ff673e 100644 (file)
@@ -65,16 +65,32 @@ class DALI_IMPORT_API Control : public CustomActor
 {
 public:
 
-  /// @name Properties
-  /** @{ */
-  static const Dali::Property::Index PROPERTY_BACKGROUND_COLOR;    ///< name "background-color",        @see SetBackgroundColor,        type VECTOR4
-  static const Dali::Property::Index PROPERTY_BACKGROUND;          ///< name "background",              @see SetBackground,             type MAP
-  static const Dali::Property::Index PROPERTY_WIDTH_POLICY;        ///< name "width-policy",            @see SetSizePolicy,             type STRING
-  static const Dali::Property::Index PROPERTY_HEIGHT_POLICY;       ///< name "height-policy",           @see SetSizePolicy,             type STRING
-  static const Dali::Property::Index PROPERTY_MINIMUM_SIZE;        ///< name "minimum-size",            @see SetMinimumSize,            type VECTOR3
-  static const Dali::Property::Index PROPERTY_MAXIMUM_SIZE;        ///< name "maximum-size",            @see SetMaximumSize,            type VECTOR3
-  static const Dali::Property::Index PROPERTY_KEY_INPUT_FOCUS;     ///< name "key-input-focus",         @see SetKeyInputFocus,          type BOOLEAN
-  /** @} */
+  /**
+   * @brief The start and end property ranges for control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX,        ///< Start index is used by the property registration macro.
+    CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,             ///< Start index of Control properties.
+    CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices.
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the Control class.
+   */
+  struct Property
+  {
+    enum
+    {
+      BACKGROUND_COLOR = PROPERTY_START_INDEX, ///< name "background-color", @see SetBackgroundColor, type VECTOR4
+      BACKGROUND,                              ///< name "background",       @see SetBackground,      type MAP
+      WIDTH_POLICY,                            ///< name "width-policy",     @see SetSizePolicy,      type STRING
+      HEIGHT_POLICY,                           ///< name "height-policy",    @see SetSizePolicy,      type STRING
+      MINIMUM_SIZE,                            ///< name "minimum-size",     @see SetMinimumSize,     type VECTOR3
+      MAXIMUM_SIZE,                            ///< name "maximum-size",     @see SetMaximumSize,     type VECTOR3
+      KEY_INPUT_FOCUS,                         ///< name "key-input-focus",  @see SetKeyInputFocus,   type BOOLEAN
+    };
+  };
 
   /**
    * @brief Describes how a control could be resized.
index c9b04d8..0e84d9e 100755 (executable)
@@ -53,15 +53,32 @@ class DALI_IMPORT_API ScrollBar : public ScrollComponent
 {
 public:
 
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the ScrollBar class.
+   */
+  struct Property
+  {
+    enum
+    {
+      INDICATOR_HEIGHT_POLICY = PROPERTY_START_INDEX, ///< name "indicator-height-policy", @see SetIndicatorHeightPolicy(), type STRING
+      INDICATOR_FIXED_HEIGHT,                         ///< name "indicator-fixed-height",  @see SetIndicatorFixedHeight(),  type FLOAT
+      INDICATOR_SHOW_DURATION,                        ///< name "indicator-show-duration", @see SetIndicatorShowDuration(), type FLOAT
+      INDICATOR_HIDE_DURATION,                        ///< name "indicator-hide-duration", @see SetIndicatorHideDuration(), type FLOAT
+    };
+  };
+
   // Signals
   typedef Signal< void ( float ) > ScrollPositionNotifiedSignalType;
 
-  // Properties
-  static const Dali::Property::Index PROPERTY_INDICATOR_HEIGHT_POLICY;         ///< name "indicator-height-policy", @see SetIndicatorHeightPolicy(), type STRING
-  static const Dali::Property::Index PROPERTY_INDICATOR_FIXED_HEIGHT;          ///< name "indicator-fixed-height",  @see SetIndicatorFixedHeight(),  type FLOAT
-  static const Dali::Property::Index PROPERTY_INDICATOR_SHOW_DURATION;         ///< name "indicator-show-duration", @see SetIndicatorShowDuration(), type FLOAT
-  static const Dali::Property::Index PROPERTY_INDICATOR_HIDE_DURATION;         ///< name "indicator-hide-duration", @see SetIndicatorHideDuration(), type FLOAT
-
 public:
 
   /**
index 33acbc4..13f2612 100644 (file)
@@ -200,10 +200,10 @@ void ItemLayout::ApplyConstraints( Actor& actor, const int itemId, const float d
     if (GetPositionConstraint(itemId, positionConstraint))
     {
       WrappedVector3Constraint wrapped(positionConstraint, itemId);
-      Constraint constraint = Constraint::New<Vector3>( Actor::Property::Position,
+      Constraint constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
                                                         Source( scrollPositionObject, scrollPositionProperty ),
                                                         ParentSource( scrollSpeedProperty ),
-                                                        ParentSource( Actor::Property::Size ),
+                                                        ParentSource( Actor::Property::SIZE ),
                                                         wrapped );
       constraint.SetApplyTime(durationSeconds);
       constraint.SetAlphaFunction(mAlphaFunction);
@@ -215,10 +215,10 @@ void ItemLayout::ApplyConstraints( Actor& actor, const int itemId, const float d
     {
       WrappedQuaternionConstraint wrapped(rotationConstraint, itemId);
 
-      Constraint constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
+      Constraint constraint = Constraint::New<Quaternion>( Actor::Property::ROTATION,
                                                            Source( scrollPositionObject, scrollPositionProperty ),
                                                            ParentSource( scrollSpeedProperty ),
-                                                           ParentSource( Actor::Property::Size ),
+                                                           ParentSource( Actor::Property::SIZE ),
                                                            wrapped );
       constraint.SetApplyTime(durationSeconds);
       constraint.SetAlphaFunction(mAlphaFunction);
@@ -231,10 +231,10 @@ void ItemLayout::ApplyConstraints( Actor& actor, const int itemId, const float d
     {
       WrappedVector3Constraint wrapped(scaleConstraint, itemId);
 
-      Constraint constraint = Constraint::New<Vector3>( Actor::Property::Scale,
+      Constraint constraint = Constraint::New<Vector3>( Actor::Property::SCALE,
                                                         Source( scrollPositionObject, scrollPositionProperty ),
                                                         ParentSource( scrollSpeedProperty ),
-                                                        ParentSource( Actor::Property::Size ),
+                                                        ParentSource( Actor::Property::SIZE ),
                                                         wrapped );
       constraint.SetApplyTime(durationSeconds);
       constraint.SetAlphaFunction(mAlphaFunction);
@@ -247,10 +247,10 @@ void ItemLayout::ApplyConstraints( Actor& actor, const int itemId, const float d
     {
       WrappedVector4Constraint wrapped(colorConstraint, itemId);
 
-      Constraint constraint = Constraint::New<Vector4>( Actor::Property::Color,
+      Constraint constraint = Constraint::New<Vector4>( Actor::Property::COLOR,
                                                         Source( scrollPositionObject, scrollPositionProperty ),
                                                         ParentSource( scrollSpeedProperty ),
-                                                        ParentSource( Actor::Property::Size ),
+                                                        ParentSource( Actor::Property::SIZE ),
                                                         wrapped );
 
       constraint.SetApplyTime(durationSeconds);
@@ -265,10 +265,10 @@ void ItemLayout::ApplyConstraints( Actor& actor, const int itemId, const float d
     {
       WrappedBoolConstraint wrapped(visibilityConstraint, itemId);
 
-      Constraint constraint = Constraint::New<bool>( Actor::Property::Visible,
+      Constraint constraint = Constraint::New<bool>( Actor::Property::VISIBLE,
                                                      Source( scrollPositionObject, scrollPositionProperty ),
                                                      ParentSource( scrollSpeedProperty ),
-                                                     ParentSource( Actor::Property::Size ),
+                                                     ParentSource( Actor::Property::SIZE ),
                                                      wrapped );
 
       constraint.SetApplyTime(durationSeconds);
index c81fe2e..92659ed 100644 (file)
@@ -128,7 +128,7 @@ struct ItemRange
  * An ItemLayout also describes the direction of input gestures, used to scroll through the layout.
  * Whilst scrolling, the layout provides a range of items that are within a layout-area (3D bounding volume).
  */
-class ItemLayout : public RefObject
+class DALI_IMPORT_API ItemLayout : public RefObject
 {
 public:
 
index 3065a2c..f28a9da 100644 (file)
@@ -66,11 +66,26 @@ public:
   static const std::string SCROLL_POSITION_MAX_PROPERTY_NAME;           ///< Property, name "scroll-position-max",      type VECTOR3
   static const std::string SCROLL_DIRECTION_PROPERTY_NAME;              ///< Property, name "scroll-direction",         type VECTOR2
 
-  /// @name Properties
-  /** @{ */
-  static const Dali::Property::Index PROPERTY_OVERSHOOT_EFFECT_COLOR;         ///< Property, name "overshoot-effect-color",  @see SetOvershootEffectColor(),  type VECTOR4
-  static const Dali::Property::Index PROPERTY_OVERSHOOT_ANIMATION_SPEED;      ///< Property, name "overshoot-animation-speed",  @see SetOvershootAnimationSpeed(),  type FLOAT
-  /** @} */
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the Scrollable class.
+   */
+  struct Property
+  {
+    enum
+    {
+      OVERSHOOT_EFFECT_COLOR = PROPERTY_START_INDEX, ///< Property, name "overshoot-effect-color",    @see SetOvershootEffectColor(),    type VECTOR4
+      OVERSHOOT_ANIMATION_SPEED,                     ///< Property, name "overshoot-animation-speed", @see SetOvershootAnimationSpeed(), type FLOAT
+    };
+  };
 
 public:
 
index a9427c0..d3f7740 100644 (file)
@@ -45,34 +45,44 @@ class DALI_IMPORT_API Slider : public Control
 {
 public:
 
-  // Properties
-  static const Dali::Property::Index LOWER_BOUND_PROPERTY;            ///< Property, name "lower-bound",       type FLOAT
-  static const Dali::Property::Index UPPER_BOUND_PROPERTY;            ///< Property, name "upper-bound",       type FLOAT
-  static const Dali::Property::Index VALUE_PROPERTY;                  ///< Property, name "value",             type FLOAT
-
-  static const Dali::Property::Index HIT_REGION_PROPERTY;             ///< Property, name "hit-region",        type VECTOR2
-  static const Dali::Property::Index BACKING_REGION_PROPERTY;         ///< Property, name "backing-region",    type VECTOR2
-  static const Dali::Property::Index HANDLE_REGION_PROPERTY;          ///< Property, name "handle-region",     type VECTOR2
-
-  static const Dali::Property::Index BACKING_IMAGE_NAME_PROPERTY;     ///< Property, name "backing-image-name",  type STRING
-  static const Dali::Property::Index HANDLE_IMAGE_NAME_PROPERTY;      ///< Property, name "handle-image-name",   type STRING
-  static const Dali::Property::Index PROGRESS_IMAGE_NAME_PROPERTY;    ///< Property, name "progress-image-name", type STRING
-  static const Dali::Property::Index POPUP_IMAGE_NAME_PROPERTY;       ///< Property, name "popup-image-name",    type STRING
-  static const Dali::Property::Index POPUP_ARROW_IMAGE_NAME_PROPERTY; ///< Property, name "popup-arrow-image-name", type STRING
-
-  static const Dali::Property::Index DISABLE_COLOR_PROPERTY;          ///< Property, name "disable-color",    type VECTOR4
-  static const Dali::Property::Index POPUP_TEXT_COLOR_PROPERTY;       ///< Property, name "popup-text-color", type VECTOR4
-
-  static const Dali::Property::Index VALUE_PRECISION_PROPERTY;        ///< Property, name "value-precision",  type INT
-
-  static const Dali::Property::Index SHOW_POPUP_PROPERTY;             ///< Property, name "show-popup",       type BOOLEAN
-  static const Dali::Property::Index SHOW_VALUE_PROPERTY;             ///< Property, name "show-value",       type BOOLEAN
-
-  static const Dali::Property::Index ENABLED_PROPERTY;                ///< Property, name "enabled",          type BOOLEAN
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserving 1000 property indices
+  };
 
-  static const Dali::Property::Index MARKS_PROPERTY;                  ///< Property, name "marks",            type Property::Array<float>
-  static const Dali::Property::Index SNAP_TO_MARKS_PROPERTY;          ///< Property, name "snap-to-marks",    type BOOLEAN
-  static const Dali::Property::Index MARK_TOLERANCE_PROPERTY;         ///< Property, name "mark-tolerance",   type FLOAT
+  /**
+   * @brief An enumeration of properties belonging to the Slider class.
+   */
+  struct Property
+  {
+    enum
+    {
+      LOWER_BOUND = PROPERTY_START_INDEX, ///< Property, name "lower-bound",            type FLOAT
+      UPPER_BOUND,                        ///< Property, name "upper-bound",            type FLOAT
+      VALUE,                              ///< Property, name "value",                  type FLOAT
+      HIT_REGION,                         ///< Property, name "hit-region",             type VECTOR2
+      BACKING_REGION,                     ///< Property, name "backing-region",         type VECTOR2
+      HANDLE_REGION,                      ///< Property, name "handle-region",          type VECTOR2
+      BACKING_IMAGE_NAME,                 ///< Property, name "backing-image-name",     type STRING
+      HANDLE_IMAGE_NAME,                  ///< Property, name "handle-image-name",      type STRING
+      PROGRESS_IMAGE_NAME,                ///< Property, name "progress-image-name",    type STRING
+      POPUP_IMAGE_NAME,                   ///< Property, name "popup-image-name",       type STRING
+      POPUP_ARROW_IMAGE_NAME,             ///< Property, name "popup-arrow-image-name", type STRING
+      DISABLE_COLOR,                      ///< Property, name "disable-color",          type VECTOR4
+      POPUP_TEXT_COLOR,                   ///< Property, name "popup-text-color",       type VECTOR4
+      VALUE_PRECISION,                    ///< Property, name "value-precision",        type INTEGER
+      SHOW_POPUP,                         ///< Property, name "show-popup",             type BOOLEAN
+      SHOW_VALUE,                         ///< Property, name "show-value",             type BOOLEAN
+      ENABLED,                            ///< Property, name "enabled",                type BOOLEAN
+      MARKS,                              ///< Property, name "marks",                  type Property::Array<FLOAT>
+      SNAP_TO_MARKS,                      ///< Property, name "snap-to-marks",          type BOOLEAN
+      MARK_TOLERANCE,                     ///< Property, name "mark-tolerance",         type FLOAT
+    };
+  };
 
 public:
 
index 734ea8f..6bc6e42 100644 (file)
@@ -56,8 +56,25 @@ class DALI_IMPORT_API SuperBlurView : public Control
 {
 public:
 
-  // Properties
-  static const Dali::Property::Index PROPERTY_IMAGE;     ///< name "image",    @see SetImage,    type MAP
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the SuperBlurView class.
+   */
+  struct Property
+  {
+    enum
+    {
+      IMAGE = PROPERTY_START_INDEX, ///< name "image",    @see SetImage,    type MAP
+    };
+  };
 
   /**
    * @brief Signal type for notifications.
index ffcf342..549a145 100644 (file)
@@ -45,14 +45,19 @@ class DALI_IMPORT_API TableView : public Control
 {
 public:
 
-  /// @name Properties
-  /** @{ */
-  static const Dali::Property::Index PROPERTY_ROWS;                       ///< name "rows",                      type UNSIGNED_INTEGER
-  static const Dali::Property::Index PROPERTY_COLUMNS;                    ///< name "columns",                   type UNSIGNED_INTEGER
-  static const Dali::Property::Index PROPERTY_CELL_PADDING;               ///< name "cell-padding",              type VECTOR2
-
-  /*
-   * PROPERTY_LAYOUT_ROWS set the height of the rows
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the TableView class.
+   *
+   * LayoutRows: set the height of the rows.
    * It has the format as follows in script:
    * @code
    * "layout-rows":
@@ -61,11 +66,8 @@ public:
         "2": { "policy": "relative", "value": 0.33 }   //@see SetRelativeHeight
       }
    * @endcode
-   */
-  static const Dali::Property::Index PROPERTY_LAYOUT_ROWS;                ///< name "layout-rows",               type MAP
-
-  /*
-   * PROPERTY_LAYOUT_COLUMNS set the height of the rows
+   *
+   * LayoutColumns: set the height of the rows.
    * It has the format as follows in script:
    * @code
    * "layout-columns":
@@ -75,16 +77,23 @@ public:
       }
    * @endcode
    */
-  static const Dali::Property::Index PROPERTY_LAYOUT_COLUMNS;             ///< name "layout-columns",            type MAP
-  /** @} */
-
+  struct Property
+  {
+    enum
+    {
+      ROWS = PROPERTY_START_INDEX, ///< name "rows",           type UNSIGNED_INTEGER
+      COLUMNS,                     ///< name "columns",        type UNSIGNED_INTEGER
+      CELL_PADDING,                ///< name "cell-padding",   type VECTOR2
+      LAYOUT_ROWS,                 ///< name "layout-rows",    type MAP
+      LAYOUT_COLUMNS,              ///< name "layout-columns", type MAP
+    };
+  };
 
   // Custom properties for where to put the actor, these properties should be registered to the child which would be added to the table
   static const std::string CELL_INDICES_PROPERTY_NAME;           ///< Property, name "cell-indices", type VECTOR2
   static const std::string ROW_SPAN_PROPERTY_NAME;               ///< Property, name "row-span",     type FLOAT (Currently builder unable to differentiate integer and float from Json string)
   static const std::string COLUMN_SPAN_PROPERTY_NAME;            ///< Property, name "column-span",  type FLOAT (Currently builder unable to differentiate integer and float from Json string)
 
-
   /**
    * @brief Describes how the size of a row / column been set
    */
index be8779b..821b35c 100644 (file)
@@ -55,20 +55,20 @@ public:
   {
     enum
     {
-      PROPERTY_RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "rendering-backend",       The type or rendering e.g. bitmap-based,                                  type INT
-      PROPERTY_PLACEHOLDER_TEXT,                         ///< name "placeholder-text",        The text to display when the TextField is empty,                          type STRING
-      PROPERTY_TEXT,                                     ///< name "text",                    The text to display in UTF-8 format,                                      type STRING
-      PROPERTY_FONT_FAMILY,                              ///< name "font-family",             The requested font family,                                                type STRING
-      PROPERTY_FONT_STYLE,                               ///< name "font-style",              The requested font style e.g. Regular/Italic,                             type STRING
-      PROPERTY_POINT_SIZE,                               ///< name "point-size",              The size of font in points,                                               type FLOAT
-      PROPERTY_CURSOR_IMAGE,                             ///< name "cursor-image",            The image to display for cursors,                                         type STRING
-      PROPERTY_PRIMARY_CURSOR_COLOR,                     ///< name "primary-cursor-color",    The color to apply to the primary cursor,                                 type VECTOR4
-      PROPERTY_SECONDARY_CURSOR_COLOR,                   ///< name "secondary-cursor-color",  The color to apply to the secondary cursor,                               type VECTOR4
-      PROPERTY_ENABLE_CURSOR_BLINK,                      ///< name "enable-cursor-blink",     Whether the cursor should blink or not,                                   type BOOLEAN
-      PROPERTY_CURSOR_BLINK_INTERVAL,                    ///< name "cursor-blink-interval",   The time interval between cursor on/off states,                           type FLOAT
-      PROPERTY_CURSOR_BLINK_DURATION,                    ///< name "cursor-blink-duration",   The cursor will stop blinking after this duration (if non-zero),          type FLOAT
-      PROPERTY_GRAB_HANDLE_IMAGE,                        ///< name "grab-handle-image",       The image to display for grab handle,                                     type STRING
-      PROPERTY_DECORATION_BOUNDING_BOX                   ///< name "decoration-bounding-box", The decorations (handles etc) will positioned within this area on-screen, type RECTANGLE
+      RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "rendering-backend",       The type or rendering e.g. bitmap-based,                                  type INT
+      PLACEHOLDER_TEXT,                         ///< name "placeholder-text",        The text to display when the TextField is empty,                          type STRING
+      TEXT,                                     ///< name "text",                    The text to display in UTF-8 format,                                      type STRING
+      FONT_FAMILY,                              ///< name "font-family",             The requested font family,                                                type STRING
+      FONT_STYLE,                               ///< name "font-style",              The requested font style e.g. Regular/Italic,                             type STRING
+      POINT_SIZE,                               ///< name "point-size",              The size of font in points,                                               type FLOAT
+      CURSOR_IMAGE,                             ///< name "cursor-image",            The image to display for cursors,                                         type STRING
+      PRIMARY_CURSOR_COLOR,                     ///< name "primary-cursor-color",    The color to apply to the primary cursor,                                 type VECTOR4
+      SECONDARY_CURSOR_COLOR,                   ///< name "secondary-cursor-color",  The color to apply to the secondary cursor,                               type VECTOR4
+      ENABLE_CURSOR_BLINK,                      ///< name "enable-cursor-blink",     Whether the cursor should blink or not,                                   type BOOLEAN
+      CURSOR_BLINK_INTERVAL,                    ///< name "cursor-blink-interval",   The time interval between cursor on/off states,                           type FLOAT
+      CURSOR_BLINK_DURATION,                    ///< name "cursor-blink-duration",   The cursor will stop blinking after this duration (if non-zero),          type FLOAT
+      GRAB_HANDLE_IMAGE,                        ///< name "grab-handle-image",       The image to display for grab handle,                                     type STRING
+      DECORATION_BOUNDING_BOX                   ///< name "decoration-bounding-box", The decorations (handles etc) will positioned within this area on-screen, type RECTANGLE
     };
   };
 
index cc3cf24..e36b44a 100644 (file)
@@ -57,12 +57,12 @@ public:
   {
     enum
     {
-      PROPERTY_RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "rendering-backend", The type or rendering e.g. bitmap-based,      type INT
-      PROPERTY_TEXT,                                     ///< name "text",              The text to display in UTF-8 format,          type STRING
-      PROPERTY_FONT_FAMILY,                              ///< name "font-family",       The requested font family,                    type STRING
-      PROPERTY_FONT_STYLE,                               ///< name "font-style",        The requested font style e.g. Regular/Italic, type STRING
-      PROPERTY_POINT_SIZE,                               ///< name "point-size",        The size of font in points,                   type FLOAT
-      PROPERTY_MULTI_LINE,                               ///< name "multi-line",        The single-line or multi-line layout option,  type BOOLEAN
+      RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "rendering-backend", The type or rendering e.g. bitmap-based,      type INT
+      TEXT,                                     ///< name "text",              The text to display in UTF-8 format,          type STRING
+      FONT_FAMILY,                              ///< name "font-family",       The requested font family,                    type STRING
+      FONT_STYLE,                               ///< name "font-style",        The requested font style e.g. Regular/Italic, type STRING
+      POINT_SIZE,                               ///< name "point-size",        The size of font in points,                   type FLOAT
+      MULTI_LINE,                               ///< name "multi-line",        The single-line or multi-line layout option,  type BOOLEAN
     };
   };
 
index 04d02f6..c6d68af 100644 (file)
@@ -106,7 +106,7 @@ DissolveEffect DissolveEffect::New( bool useHighPrecision )
   Dali::Toolkit::DissolveEffect handle( shaderEffectCustom );
 
   handle.SetUniform( DISTORTION_PROPERTY_NAME, 0.0f );
-  handle.SetProperty( ShaderEffect::Property::GridDensity, Dali::Property::Value(50.0f) );
+  handle.SetProperty( ShaderEffect::Property::GRID_DENSITY, Dali::Property::Value(50.0f) );
 
   handle.SetCentralLine( Vector2(1.0f,0.5f), Vector2(-1.0f, 0.0f) );
 
index 4a6fab3..bc20944 100644 (file)
@@ -108,7 +108,7 @@ DissolveLocalEffect DissolveLocalEffect::New( unsigned int numberOfDimples )
     handle.SetRadius(i, 0.f);
     handle.SetDistortion( i, 0.f );
   }
-  handle.SetProperty( ShaderEffect::Property::GridDensity, Dali::Property::Value(5.f) );
+  handle.SetProperty( ShaderEffect::Property::GRID_DENSITY, Dali::Property::Value(5.f) );
   handle.SetTransparency( 0.5f );
 
   return handle;
index 574c906..155a6e2 100644 (file)
@@ -88,4 +88,3 @@ private: // Not intended for application developers
 } // namespace Dali
 
 #endif // __DALI_TOOLKIT_MIRROR_EFFECT_H__
-
index 837fe15..de80751 100644 (file)
@@ -89,7 +89,7 @@ MotionBlurEffect MotionBlurEffect::Apply( RenderableActor renderable )
   Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_BLUR_MODEL_LASTFRAME );
 
   Constraint constraint = Constraint::New<Matrix>( uModelProperty,
-                                                   Source( renderable, Actor::Property::WorldMatrix ),
+                                                   Source( renderable, Actor::Property::WORLD_MATRIX ),
                                                    EqualToConstraint() );
 
   // and set up constraint.
index de70fb5..22383f0 100644 (file)
@@ -103,7 +103,7 @@ MotionStretchEffect MotionStretchEffect::Apply( RenderableActor renderable )
   Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_STRETCH_MODELVIEW_LASTFRAME );
 
   Constraint constraint = Constraint::New<Matrix>( uModelProperty,
-                                                   Source( renderable, Actor::Property::WorldMatrix ),
+                                                   Source( renderable, Actor::Property::WORLD_MATRIX ),
                                                    EqualToConstraint() );
 
   // and set up constraint.
index f717d5c..0aef67f 100644 (file)
@@ -91,7 +91,7 @@ static void DoApply( ImageActor actor, const std::string& maskImage, const Vecto
 
   maskEffect.SetUniform( "uImageSize", Vector2(0,0) /*Constrained to actor size*/ );
   maskEffect.ApplyConstraint( Constraint::New<Vector2>( maskEffect.GetPropertyIndex("uImageSize"),
-                                                        Source(actor, Actor::Property::Size),
+                                                        Source(actor, Actor::Property::SIZE),
                                                         NinePatchMaskEffectSizeConstraint() ) );
 
   maskEffect.SetUniform( "uMaskSize", maskSize );
index a8d452b..4c124cb 100644 (file)
@@ -10,8 +10,8 @@ shows the index range of the different properties in place.
   <tr> <td>Default</td>         <td>Properties defined within DALi Core, e.g. Dali::Actor, Dali::ShaderEffect default properties etc.</td> <td style="text-align:center;">0 to 9999999</td>         </tr>
   <tr> <td>Registered</td>      <td>Properties registered using Dali::PropertyRegistration</td>                                            <td style="text-align:center;">10000000 to 19999999</td> </tr>
   <tr> <td>Control</td>         <td>Property range reserved by Dali::Toolkit::Control</td>                                                 <td style="text-align:center;">10000000 to 10001000<br>
-                                                                                      \link Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_START_INDEX CONTROL_PROPERTY_START_INDEX\endlink
-                                                                                      to \link Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX CONTROL_PROPERTY_END_INDEX\endlink</td> </tr>
+                                                                                      \link Dali::Toolkit::Control::CONTROL_PROPERTY_START_INDEX CONTROL_PROPERTY_START_INDEX\endlink
+                                                                                      to \link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX CONTROL_PROPERTY_END_INDEX\endlink</td> </tr>
   <tr> <td>Derived Control</td> <td>Property range for control deriving directly from Dali::Toolkit::Control</td>                          <td style="text-align:center;">10001001 to 19999999</td> </tr>
   <tr> <td>Custom</td>          <td>Custom properties added to instance using Dali::Handle::RegisterProperty</td>                          <td style="text-align:center;">50000000 onwards</td>     </tr>
 </table>
index 3f3663f..bef67d0 100644 (file)
@@ -193,10 +193,10 @@ Dali::PROPERTY_REGISTRATION_MAX_INDEX.
 
 Furthermore, if deriving from \link Dali::Toolkit::Control Control\endlink, the control writer
 needs to be aware of their parent class's property range. Control reserves a property range between
-\link Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_START_INDEX ControlImpl::CONTROL_PROPERTY_START_INDEX\endlink
-and \link Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX Internal::Control::CONTROL_PROPERTY_END_INDEX\endlink.
+\link Dali::Toolkit::Control::CONTROL_PROPERTY_START_INDEX ControlImpl::CONTROL_PROPERTY_START_INDEX\endlink
+and \link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX Control::CONTROL_PROPERTY_END_INDEX\endlink.
 Any deriving control should start their property indices from
-\link Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX Internal::Control::CONTROL_PROPERTY_END_INDEX\endlink + 1.
+\link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX Control::CONTROL_PROPERTY_END_INDEX\endlink + 1.
 
 Please have a look at \ref property-indices for more information.
 
index a6b2e1e..d70d538 100644 (file)
@@ -4,7 +4,7 @@
 
 Constants accessible under the dali global object.
   
-    actor.parentOrigin = dali.BACK_TOP_LEFT;
+    actor.parentOrigin = dali.TOP_LEFT;
     actor.color = dali.COLOR_RED;
     actor.setBlendFunc( dali.BLEND_FACTOR_ONE_MINUS_SRC_COLOR, dali.BLEND_FACTOR_SRC_ALPHA_SATURATE );
 
@@ -12,15 +12,6 @@ Constants accessible under the dali global object.
 | Constant Name | value |
 |---------------|-------|
 |  ** actor.parentOrigin and actor.anchorPoint  **      |                      |
-|BACK_TOP_LEFT      |  (0.0f, 0.0f, 0.0f)  |
-|BACK_TOP_CENTER    |  (0.5f, 0.0f, 0.0f)  |
-|BACK_TOP_RIGHT     |  (1.0f, 0.0f, 0.0f)  |
-|BACK_CENTER_LEFT   |  (0.0f, 0.5f, 0.0f)  |
-|BACK_CENTER        |  (0.5f, 0.5f, 0.0f)  |
-|BACK_CENTER_RIGHT  |  (1.0f, 0.5f, 0.0f)  |
-|BACK_BOTTOM_LEFT   |  (0.0f, 1.0f, 0.0f)  |
-|BACK_BOTTOM_CENTER  |  (0.5f, 1.0f, 0.0f)  |
-|BACK_BOTTOM_RIGHT   |  (1.0f, 1.0f, 0.0f)  |
 |TOP_LEFT            |  (0.0f, 0.0f, 0.5f)  |
 |TOP_CENTER          |  (0.5f, 0.0f, 0.5f)  |
 |TOP_RIGHT          |  (1.0f, 0.0f, 0.5f)  |
@@ -31,16 +22,6 @@ Constants accessible under the dali global object.
 |BOTTOM_CENTER       |  (0.5f, 1.0f, 0.5f)  |
 |BOTTOM_RIGHT        |  (1.0f, 1.0f, 0.5f)  |
 
-|FRONT_TOP_LEFT      |  (0.0f, 0.0f, 1.0f)  |
-|FRONT_TOP_CENTER    |  (0.5f, 0.0f, 1.0f)  |
-|FRONT_TOP_RIGHT     |  (1.0f, 0.0f, 1.0f)  |
-|FRONT_CENTER_LEFT   |  (0.0f, 0.5f, 1.0f)  |
-|FRONT_CENTER        |  (0.5f, 0.5f, 1.0f)  |
-|FRONT_CENTER_RIGHT  |  (1.0f, 0.5f, 1.0f)  |
-|FRONT_BOTTOM_LEFT   |  (0.0f, 1.0f, 1.0f)  |
-|FRONT_BOTTOM_CENTER |  (0.5f, 1.0f, 1.0f)  |
-|FRONT_BOTTOM_RIGHT  |  (1.0f, 1.0f, 1.0f)  |
-
 
 |** Vector3 ** | |
 |VECTOR3_ONE                  |  (1.0f, 1.0f, 1.0f)         |
index ea1eba8..eedfafa 100644 (file)
@@ -168,7 +168,7 @@ var animOptions = {
 // if we go to 1.0 then it will go to a full box
 shaderAnim.animateTo( revealEffect, "uRadius", 0.5,animOptions);
 shaderAnim.play();
-
+```
 * * *
 ### Example of paper twisting in the wind with color (Vertex + Fragment Shader)
 
@@ -185,7 +185,7 @@ vertices. To do this we can break the image into a grid using the gridX and grid
 
 <img src="../assets/img/shader-grid-hint.png">
 
-
+```
 createTwistEffect = function()
 {
 
index 1124956..e7c4c16 100644 (file)
@@ -65,16 +65,6 @@ struct IntegerPair
 
 const Vector3Pair Vector3Table[] =
 {
-    { "BACK_TOP_LEFT"      , ParentOrigin::BACK_TOP_LEFT      },
-    { "BACK_TOP_CENTER"    , ParentOrigin::BACK_TOP_CENTER    },
-    { "BACK_TOP_RIGHT"     , ParentOrigin::BACK_TOP_RIGHT     },
-    { "BACK_CENTER_LEFT"   , ParentOrigin::BACK_CENTER_LEFT   },
-    { "BACK_CENTER"        , ParentOrigin::BACK_CENTER        },
-    { "BACK_CENTER_RIGHT"  , ParentOrigin::BACK_CENTER_RIGHT  },
-    { "BACK_BOTTOM_LEFT"   , ParentOrigin::BACK_BOTTOM_LEFT   },
-    { "BACK_BOTTOM_CENTER" , ParentOrigin::BACK_BOTTOM_CENTER },
-    { "BACK_BOTTOM_RIGHT"  , ParentOrigin::BACK_BOTTOM_RIGHT  },
-
     { "TOP_LEFT"            , ParentOrigin::TOP_LEFT          },
     { "TOP_CENTER"          , ParentOrigin::TOP_CENTER        },
     { "TOP_RIGHT"           , ParentOrigin::TOP_RIGHT         },
@@ -85,17 +75,6 @@ const Vector3Pair Vector3Table[] =
     { "BOTTOM_CENTER"       , ParentOrigin::BOTTOM_CENTER     },
     { "BOTTOM_RIGHT"        , ParentOrigin::BOTTOM_RIGHT      },
 
-    { "FRONT_TOP_LEFT"      , ParentOrigin::FRONT_TOP_LEFT     },
-    { "FRONT_TOP_CENTER"    , ParentOrigin::FRONT_TOP_CENTER   },
-    { "FRONT_TOP_RIGHT"     , ParentOrigin::FRONT_TOP_RIGHT    },
-    { "FRONT_CENTER_LEFT"   , ParentOrigin::FRONT_CENTER_LEFT  },
-    { "FRONT_CENTER"        , ParentOrigin::FRONT_CENTER       },
-    { "FRONT_CENTER_RIGHT"  , ParentOrigin::FRONT_CENTER_RIGHT },
-    { "FRONT_BOTTOM_LEFT"   , ParentOrigin::FRONT_BOTTOM_LEFT  },
-    { "FRONT_BOTTOM_CENTER" , ParentOrigin::FRONT_BOTTOM_CENTER},
-    { "FRONT_BOTTOM_RIGHT"  , ParentOrigin::FRONT_BOTTOM_RIGHT },
-
-
     { "VECTOR3_ONE"                  ,      Vector3::ONE                        },
     { "VECTOR3_XAXIS"                ,      Vector3::XAXIS                      },
     { "VECTOR3_YAXIS"                ,      Vector3::YAXIS                      },