Merge "(Control Renderers) Change renderer type values to uppercase" into devel/master
authorDavid Steele <david.steele@samsung.com>
Wed, 20 Jul 2016 10:12:11 +0000 (03:12 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 20 Jul 2016 10:12:11 +0000 (03:12 -0700)
25 files changed:
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlRenderer.cpp
automated-tests/src/dali-toolkit/utc-Dali-DebugRenderer.cpp
automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp
automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp
dali-toolkit/internal/controls/renderers/debug/debug-renderer.cpp
dali-toolkit/internal/controls/renderers/mesh/mesh-renderer.cpp
dali-toolkit/internal/controls/renderers/renderer-string-constants.cpp
dali-toolkit/internal/controls/renderers/renderer-string-constants.h
dali-toolkit/internal/filters/emboss-filter.cpp
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json
docs/content/example-code/properties.cpp
docs/content/programming-guide/background.h
docs/content/programming-guide/image-view.h
docs/content/programming-guide/properties.h
docs/content/shared-javascript-and-cpp-documentation/control-renderers.md
node-addon/examples/scripts/item-template.json
node-addon/item-template.json
plugins/dali-script-v8/docs/content/animation.js
plugins/dali-script-v8/docs/content/image-view.js
plugins/dali-script-v8/docs/content/item-factory.js

index 1ecf233..fdf25e7 100644 (file)
@@ -396,7 +396,7 @@ int UtcDaliControlBackgroundColor(void)
   Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
   Property::Map* resultMap = propValue.GetMap();
   DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
-  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "color" );
+  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "COLOR" );
   DALI_TEST_CHECK( resultMap->Find( "mixColor" ) );
   DALI_TEST_CHECK( resultMap->Find( "mixColor" )->Get<Vector4>() == Color::RED );
 
@@ -427,7 +427,7 @@ int UtcDaliControlBackgroundImage(void)
   Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
   Property::Map* resultMap = propValue.GetMap();
   DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
-  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "IMAGE" );
   DALI_TEST_CHECK( resultMap->Find( "url" ) );
   DALI_TEST_CHECK( resultMap->Find( "url" )->Get<std::string>() == "TestImage" );
 
@@ -451,24 +451,24 @@ int UtcDaliControlBackgroundProperties(void)
   DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() );
 
   Property::Map imageMap;
-  imageMap[ "rendererType" ] = "image";
+  imageMap[ "rendererType" ] = "IMAGE";
   imageMap[ "url" ] = "TestImage";
   control.SetProperty( Control::Property::BACKGROUND, imageMap );
   Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
   Property::Map* resultMap = propValue.GetMap();
   DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
-  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "IMAGE" );
   DALI_TEST_CHECK( resultMap->Find( "url" ) );
   DALI_TEST_CHECK( resultMap->Find( "url" )->Get<std::string>() == "TestImage" );
 
   Property::Map rendererMap;
-  rendererMap["rendererType"] = "color";
+  rendererMap["rendererType"] = "COLOR";
   rendererMap["mixColor"] = Color::CYAN;
   control.SetProperty( Control::Property::BACKGROUND, rendererMap );
   propValue = control.GetProperty( Control::Property::BACKGROUND );
   resultMap = propValue.GetMap();
   DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
-  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "color" );
+  DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "COLOR" );
   DALI_TEST_CHECK( resultMap->Find( "mixColor" ) );
   DALI_TEST_CHECK( resultMap->Find( "mixColor" )->Get<Vector4>() == Color::CYAN );
 
index fdb576e..80608a1 100644 (file)
@@ -52,7 +52,7 @@ int UtcDaliControlRendererCopyAndAssignment(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -85,7 +85,7 @@ int UtcDaliControlRendererSetGetDepthIndex(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -119,7 +119,7 @@ int UtcDaliControlRendererSize(void)
 
   // color renderer
   Dali::Property::Map map;
-  map[ "rendererType" ] = "color";
+  map[ "rendererType" ] = "COLOR";
   map[ "mixColor" ] = Color::MAGENTA;
   ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
   colorRenderer.SetSize( rendererSize );
@@ -149,7 +149,7 @@ int UtcDaliControlRendererSize(void)
   // border renderer
   float borderSize = 5.f;
   map.Clear();
-  map[ "rendererType" ] = "border";
+  map[ "rendererType" ] = "BORDER";
   map[ "borderColor"  ] = Color::RED;
   map[ "borderSize"   ] = borderSize;
   ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
@@ -160,7 +160,7 @@ int UtcDaliControlRendererSize(void)
 
   // gradient renderer
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
   propertyMap.Insert("startPosition",   start);
@@ -196,7 +196,7 @@ int UtcDaliControlRendererSetOnOffStage(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -269,7 +269,7 @@ int UtcDaliControlRendererGetPropertyMap1(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer colorRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -278,7 +278,7 @@ int UtcDaliControlRendererGetPropertyMap1(void)
 
   Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "color" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "COLOR" );
 
   Property::Value* colorValue = resultMap.Find( "mixColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -305,7 +305,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "border");
+  propertyMap.Insert("rendererType",  "BORDER");
   propertyMap.Insert("borderColor",  Color::BLUE);
   propertyMap.Insert("borderSize",  5.f);
   ControlRenderer borderRenderer = factory.CreateControlRenderer( propertyMap );
@@ -316,7 +316,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
   // check the property values from the returned map from control renderer
   Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
 
   Property::Value* colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -327,7 +327,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
   DALI_TEST_CHECK( sizeValue->Get<float>() == 5.f );
 
   Property::Map propertyMap1;
-  propertyMap1[ "rendererType" ] = "border";
+  propertyMap1[ "rendererType" ] = "BORDER";
   propertyMap1[ "borderColor"  ] = Color::CYAN;
   propertyMap1[ "borderSize"   ] = 10.0f;
   borderRenderer = factory.CreateControlRenderer( propertyMap1 );
@@ -335,7 +335,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
 
   typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
 
   colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -357,7 +357,7 @@ int UtcDaliControlRendererGetPropertyMap3(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
@@ -380,7 +380,7 @@ int UtcDaliControlRendererGetPropertyMap3(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
 
   value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -424,7 +424,7 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 center(100.f, 100.f);
   float radius = 100.f;
@@ -448,7 +448,7 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
 
   value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -493,7 +493,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_IMAGE_FILE_NAME );
   propertyMap.Insert( "desiredWidth",   20 );
   propertyMap.Insert( "desiredHeight",   30 );
@@ -510,7 +510,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -543,7 +543,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
 
   value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -579,7 +579,7 @@ int UtcDaliControlRendererGetPropertyMap6(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_NPATCH_FILE_NAME );
   propertyMap.Insert( "borderOnly",  true );
   ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap );
@@ -590,7 +590,7 @@ int UtcDaliControlRendererGetPropertyMap6(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -611,7 +611,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // request SvgRenderer with a property map
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_SVG_FILE_NAME );
   ControlRenderer svgRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -620,7 +620,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -633,7 +633,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // check the property values from the returned map from control renderer
   value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -651,7 +651,7 @@ int UtcDaliControlRendererGetPropertyMap8(void)
   //Request MeshRenderer using a property map.
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType", "mesh" );
+  propertyMap.Insert( "rendererType", "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_LOCATION );
@@ -664,7 +664,7 @@ int UtcDaliControlRendererGetPropertyMap8(void)
   //Check values in the result map are identical to the initial map's values.
   Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "mesh" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "MESH" );
 
   value = resultMap.Find( "objectUrl", Property::STRING );
   DALI_TEST_CHECK( value );
index 82ffc09..57543d0 100644 (file)
@@ -40,7 +40,7 @@ bool IsDebugRenderer( ControlRenderer& renderer )
   Property::Value* typeValue = propertyMap.Find( "rendererType",  Property::STRING );
   if ( typeValue )
   {
-    isDebugRendererType = ( typeValue->Get<std::string>() == "debug" );
+    isDebugRendererType = ( typeValue->Get<std::string>() == "DEBUG" );
   }
 
   Actor actor = Actor::New();
@@ -73,7 +73,7 @@ int UtcDaliDebugRendererGetRenderer1(void)
 
   // Test that color renderer is replaced with debug renderer
   Property::Map propertyMap1;
-  propertyMap1.Insert("rendererType",  "color");
+  propertyMap1.Insert("rendererType",  "COLOR");
   propertyMap1.Insert("mixColor",  Color::BLUE);
   ControlRenderer colorRenderer = factory.CreateControlRenderer(propertyMap1);
   DALI_TEST_CHECK( colorRenderer );
@@ -81,7 +81,7 @@ int UtcDaliDebugRendererGetRenderer1(void)
 
   // Test that border renderer is replaced with debug renderer
   Property::Map propertyMap2;
-  propertyMap2.Insert("rendererType",  "border");
+  propertyMap2.Insert("rendererType",  "BORDER");
   propertyMap2.Insert("borderColor",  Color::BLUE);
   propertyMap2.Insert("borderSize",  2.f);
   ControlRenderer borderRenderer = factory.CreateControlRenderer(propertyMap2);
@@ -90,7 +90,7 @@ int UtcDaliDebugRendererGetRenderer1(void)
 
   // Test that gradient renderer is replaced with debug renderer
   Property::Map propertyMap3;
-  propertyMap3.Insert("rendererType",  "gradient");
+  propertyMap3.Insert("rendererType",  "GRADIENT");
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
   propertyMap3.Insert("startPosition", start);
@@ -110,7 +110,7 @@ int UtcDaliDebugRendererGetRenderer1(void)
 
   // Test that image renderer is replaced with debug renderer
   Property::Map propertyMap4;
-  propertyMap4.Insert( "rendererType",  "image" );
+  propertyMap4.Insert( "rendererType",  "IMAGE" );
   propertyMap4.Insert( "url",  TEST_IMAGE_FILE_NAME );
   ControlRenderer imageRenderer = factory.CreateControlRenderer( propertyMap4 );
   DALI_TEST_CHECK( imageRenderer );
@@ -118,7 +118,7 @@ int UtcDaliDebugRendererGetRenderer1(void)
 
   // Test that n patch renderer is replaced with debug renderer
   Property::Map propertyMap5;
-  propertyMap5.Insert( "rendererType",  "image" );
+  propertyMap5.Insert( "rendererType",  "IMAGE" );
   propertyMap5.Insert( "url",  TEST_NPATCH_FILE_NAME );
   ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap4 );
   DALI_TEST_CHECK( nPatchRenderer );
@@ -139,7 +139,7 @@ int UtcDaliDebugRendererGetRenderer2(void)
 
   // Test that color renderer is replaced with debug renderer
   Dali::Property::Map map;
-  map[ "rendererType" ] = "color";
+  map[ "rendererType" ] = "COLOR";
   map[ "mixColor" ] = Color::CYAN;
 
   ControlRenderer colorRenderer = factory.CreateControlRenderer( map);
@@ -148,7 +148,7 @@ int UtcDaliDebugRendererGetRenderer2(void)
 
   // Test that border renderer is replaced with debug renderer
   map.Clear();
-  map[ "rendererType" ] = "border";
+  map[ "rendererType" ] = "BORDER";
   map[ "borderColor"  ] = Color::GREEN;
   map[ "borderSize"   ] = 2.f;
   ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
index 8b6a072..f132ae0 100644 (file)
@@ -293,7 +293,7 @@ int UtcDaliRendererFactoryGetColorRenderer1(void)
 
   Property::Map propertyMap;
   Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  testColor);
 
   ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
@@ -320,7 +320,7 @@ int UtcDaliRendererFactoryGetColorRenderer2(void)
 
   Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
   Dali::Property::Map map;
-  map[ "rendererType" ] = "color";
+  map[ "rendererType" ] = "COLOR";
   map[ "mixColor" ] = testColor;
   ControlRenderer controlRenderer = factory.CreateControlRenderer( map );
   DALI_TEST_CHECK( controlRenderer );
@@ -350,7 +350,7 @@ int UtcDaliRendererFactoryGetBorderRenderer1(void)
   Property::Map propertyMap;
   Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
   float testSize = 5.f;
-  propertyMap.Insert("rendererType",  "border");
+  propertyMap.Insert("rendererType",  "BORDER");
   propertyMap.Insert("borderColor",  testColor);
   propertyMap.Insert("borderSize",  testSize);
 
@@ -398,7 +398,7 @@ int UtcDaliRendererFactoryGetBorderRenderer2(void)
   float testSize = 5.f;
 
   Dali::Property::Map propertyMap;
-  propertyMap[ "rendererType" ] = "border";
+  propertyMap[ "rendererType" ] = "BORDER";
   propertyMap[ "borderColor"  ] = testColor;
   propertyMap[ "borderSize"   ] = testSize;
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
@@ -432,7 +432,7 @@ int UtcDaliRendererFactoryGetBorderRenderer2(void)
 
   // enable the anti-aliasing
   Dali::Property::Map map;
-  map[ "rendererType" ] = "border";
+  map[ "rendererType" ] = "BORDER";
   map[ "borderColor"  ] = testColor;
   map[ "borderSize"   ] = testSize;
   map[ "antiAliasing"   ] = true;
@@ -456,7 +456,7 @@ int UtcDaliRendererFactoryGetLinearGradientRenderer(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
@@ -496,7 +496,7 @@ int UtcDaliRendererFactoryGetRadialGradientRenderer(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 center(100.f, 100.f);
   float radius = 100.f;
@@ -541,7 +541,7 @@ int UtcDaliRendererFactoryDefaultOffsetsGradientRenderer(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
@@ -576,7 +576,7 @@ int UtcDaliRendererFactoryGetImageRenderer1(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_IMAGE_FILE_NAME );
 
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
@@ -658,7 +658,7 @@ int UtcDaliRendererFactoryGetNPatchRenderer1(void)
   Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
 
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_NPATCH_FILE_NAME );
   {
     tet_infoline( "whole grid" );
@@ -722,7 +722,7 @@ int UtcDaliRendererFactoryGetNPatchRenderer2(void)
   Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
 
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_NPATCH_FILE_NAME );
   {
     ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
@@ -960,7 +960,7 @@ int UtcDaliRendererFactoryGetMeshRenderer1(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
 
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
@@ -1012,7 +1012,7 @@ int UtcDaliRendererFactoryGetMeshRenderer2(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", "" );
   propertyMap.Insert( "texturesPath", "" );
@@ -1068,7 +1068,7 @@ int UtcDaliRendererFactoryGetMeshRenderer3(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
@@ -1124,7 +1124,7 @@ int UtcDaliRendererFactoryGetMeshRenderer4(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", TEST_SIMPLE_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
@@ -1180,7 +1180,7 @@ int UtcDaliRendererFactoryGetMeshRendererN1(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
 
@@ -1231,7 +1231,7 @@ int UtcDaliRendererFactoryGetMeshRendererN2(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", "invalid" );
   propertyMap.Insert( "texturesPath", "also invalid" );
@@ -1283,7 +1283,7 @@ int UtcDaliRendererFactoryGetMeshRendererN3(void)
 
   //Set up renderer properties.
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "mesh" );
+  propertyMap.Insert( "rendererType",  "MESH" );
   propertyMap.Insert( "objectUrl", "invalid" );
   propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
index fcfc821..4f1e000 100644 (file)
@@ -333,7 +333,7 @@ int UtcDaliSetPropertyP(void)
 
   {
     Property::Map map;
-    map["rendererType"] = "image";
+    map["rendererType"] = "IMAGE";
     map["size"] = Vector2(200, 200);
     map["url"] = "track2.png";
     slider.SetProperty(Slider::Property::TRACK_VISUAL,       map);
index 9adf9cd..db745a4 100644 (file)
@@ -41,7 +41,7 @@ Actor CreateColorActor( const Vector4& color )
 
   RendererFactory factory = RendererFactory::Get();
   Dali::Property::Map map;
-  map[ "rendererType" ] = "color";
+  map[ "rendererType" ] = "COLOR";
   map[ "mixColor" ] = color;
   ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
   colorRenderer.SetOnStage( solidColorActor );
index af8cd5c..5e99442 100644 (file)
@@ -566,7 +566,7 @@ void Button::SetColor( const Vector4& color, Button::PaintState selectedState )
       Toolkit::ControlRenderer colorRenderer;
 
       Property::Map map;
-      map["rendererType"] = "color";
+      map["rendererType"] = "COLOR";
       map["mixColor"] = color;
 
       colorRenderer = rendererFactory.CreateControlRenderer( map );
index 9d4d089..4fb7e85 100644 (file)
@@ -161,7 +161,7 @@ void EffectsView::SetType( Toolkit::EffectsView::EffectType type )
 
     Actor self = Self();
     Property::Map rendererMap;
-    rendererMap.Insert( "rendererType", "image" );
+    rendererMap.Insert( "rendererType", "IMAGE" );
 
     switch( type )
     {
index 1fc45ca..68dd38e 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali-toolkit/internal/controls/renderers/renderer-factory-impl.h>
 #include <dali-toolkit/internal/controls/renderers/renderer-factory-cache.h>
 #include <dali-toolkit/internal/controls/renderers/control-renderer-data-impl.h>
+#include <dali-toolkit/internal/controls/renderers/renderer-string-constants.h>
 
 namespace Dali
 {
@@ -35,9 +36,6 @@ namespace Internal
 
 namespace
 {
-const char * const RENDERER_TYPE("rendererType");
-const char * const RENDERER_TYPE_VALUE("debug");
-
 const char * const POSITION_ATTRIBUTE_NAME("aPosition");
 const char * const INDEX_NAME("indices");
 
@@ -82,7 +80,7 @@ void DebugRenderer::DoSetOnStage( Actor& actor )
 void DebugRenderer::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
-  map.Insert( RENDERER_TYPE, RENDERER_TYPE_VALUE );
+  map.Insert( RENDERER_TYPE, DEBUG_RENDERER );
 }
 
 void DebugRenderer::InitializeRenderer()
index f6186d3..717c00b 100644 (file)
@@ -83,7 +83,6 @@ enum TextureIndex
   GLOSS_INDEX = 2u
 };
 
-const char * const RENDERER_TYPE_VALUE( "mesh" ); //String label for which type of control renderer this is.
 const char * const LIGHT_POSITION( "uLightPosition" ); //Shader property
 const char * const OBJECT_MATRIX( "uObjectMatrix" ); //Shader property
 
@@ -369,7 +368,7 @@ void MeshRenderer::DoSetOnStage( Actor& actor )
 void MeshRenderer::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
-  map.Insert( RENDERER_TYPE, RENDERER_TYPE_VALUE );
+  map.Insert( RENDERER_TYPE, MESH_RENDERER );
   map.Insert( OBJECT_URL, mObjectUrl );
   map.Insert( MATERIAL_URL, mMaterialUrl );
   map.Insert( TEXTURES_PATH, mTexturesPath );
index 41fd6a7..6f55536 100644 (file)
@@ -28,15 +28,15 @@ namespace Internal
 {
 
 const char * const RENDERER_TYPE("rendererType");
-const char * const COLOR_RENDERER("color");
-const char * const BORDER_RENDERER("border");
-const char * const GRADIENT_RENDERER("gradient");
-const char * const IMAGE_RENDERER("image");
-const char * const MESH_RENDERER("mesh");
+const char * const COLOR_RENDERER("COLOR");
+const char * const BORDER_RENDERER("BORDER");
+const char * const GRADIENT_RENDERER("GRADIENT");
+const char * const IMAGE_RENDERER("IMAGE");
+const char * const MESH_RENDERER("MESH");
+const char * const DEBUG_RENDERER("DEBUG");
 
 const char * const IMAGE_URL_NAME("url");
 const char * const ATLAS_RECT_UNIFORM_NAME ( "uAtlasRect" );
-const char * const COLOR( "color" );
 
 //Mesh properties
 const char * const OBJECT_URL( "objectUrl" );
index 0bb7d45..5154691 100644 (file)
@@ -33,10 +33,10 @@ extern const char * const BORDER_RENDERER;
 extern const char * const GRADIENT_RENDERER;
 extern const char * const IMAGE_RENDERER;
 extern const char * const MESH_RENDERER;
+extern const char * const DEBUG_RENDERER;
 
 extern const char * const IMAGE_URL_NAME;
 extern const char * const ATLAS_RECT_UNIFORM_NAME;
-extern const char * const COLOR;
 
 //Mesh properties
 extern const char * const OBJECT_URL;
index aeedd0f..d980708 100644 (file)
@@ -123,7 +123,7 @@ void EmbossFilter::Enable()
 
   customShader[ "fragmentShader" ] = COMPOSITE_FRAGMENT_SOURCE;
   rendererMap[ "shader"] = customShader;
-  rendererMap[ "rendererType"] = "image";
+  rendererMap[ "rendererType"] = "IMAGE";
 
   mRootActor.Add( mActorForComposite );
 
index 725a71a..87c22af 100644 (file)
@@ -98,7 +98,7 @@
       "popupIconColor":[1.0,1.0,1.0,1.0],
       "popupPressedColor":[0.24,0.72,0.8,0.11],
       "background": {
-        "rendererType": "image",
+        "rendererType": "IMAGE",
         "url": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
         },
       "popupFadeInDuration":0.25,
index 3297e51..029dcbd 100644 (file)
@@ -98,7 +98,7 @@
       "popupIconColor":[1.0,1.0,1.0,1.0],
       "popupPressedColor":[0.24,0.72,0.8,0.11],
       "background": {
-        "rendererType": "image",
+        "rendererType": "IMAGE",
         "url": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
         },
       "popupFadeInDuration":0.25,
index 300d276..69248b9 100644 (file)
@@ -66,7 +66,7 @@ public:
 
     // Set another property to set the image-map
     Property::Map imageMap;
-    imageMap[ "rendererType" ] = "image";
+    imageMap[ "rendererType" ] = "IMAGE";
     imageMap[ "url" ]          = IMAGE_CARDS;
     imageMap[ "desiredWidth" ]        = 100;
     imageMap[ "desiredHeight" ]       = 100;
index c157a18..ef2d933 100644 (file)
@@ -62,7 +62,7 @@ then the above image will look like:
 The background can be set to use a specified renderer, e.g the border renderer
 @code
 Property::Map renderer;
-renderer.Insert("rendererType","border");
+renderer.Insert("rendererType","BORDER");
 renderer.Insert("borderColor",COLOR::RED);
 renderer.Insert("borderSize",20.f);
 
index 9b18dfc..27a8574 100644 (file)
@@ -47,7 +47,7 @@
  *
  * @code
  * Property::Map renderer;
- * renderer.Insert("rendererType","border");
+ * renderer.Insert("rendererType","BORDER");
  * renderer.Insert("borderColor",COLOR::RED);
  * renderer.Insert("borderSize",20.f);
  *
index 1033b5f..cc15da1 100644 (file)
@@ -231,7 +231,7 @@ imageView.parentOrigin = dali.CENTER;
 
 // Set an image view property
 imageView.image = {
-  "rendererType" : "image",
+  "rendererType" : "IMAGE",
   "url": "images/icon-0.png",
   "desiredWidth" : 100,
   "desiredHeight" : 100
@@ -260,7 +260,7 @@ This is a basic example of a button defined in JSON by setting the default prope
       "position": [0, 0, 0],
       "image":
       {
-        "rendererType" : "image",
+        "rendererType" : "IMAGE",
         "url" : "images/icon-0.png",
         "desiredWidth" : 100,
         "desiredHeight" : 100
index 91793bc..4581cb0 100644 (file)
@@ -31,7 +31,7 @@ Renders a solid color to the control's quad.
 
 ### Properties Supported
 
-**RendererType:** "color"
+**RendererType:** "COLOR"
 
 | Property Name | Type    | Required | Description               |
 |---------------|:-------:|:--------:|---------------------------|
@@ -44,7 +44,7 @@ Renders a solid color to the control's quad.
 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
-map[ "rendererType" ] = "color";
+map[ "rendererType" ] = "COLOR";
 map[ "mixColor" ] = Color::RED;
 
 control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
@@ -56,7 +56,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "color",
+  rendererType : "COLOR",
   mixColor : dali.COLOR_RED
 };
 ~~~
@@ -74,7 +74,7 @@ Both Linear and Radial gradients are supported.
 
 ### Properties Supported
 
-**RendererType:** "gradient"
+**RendererType:** "GRADIENT"
 
 | Property Name                                        | Type             | Required   | Description                                                              |
 |------------------------------------------------------|:----------------:|:----------:|--------------------------------------------------------------------------|
@@ -118,7 +118,7 @@ Indicates what happens if the gradient starts or ends inside the bounds of the t
 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
-map[ "rendererType" ] = "gradient";
+map[ "rendererType" ] = "GRADIENT";
 map[ "startPosition" ] = Vector2( 0.5f, 0.5f );
 map[ "endPosition" ] = Vector2( -0.5f, -0.5f );
 
@@ -147,7 +147,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "gradient",
+  rendererType : "GRADIENT",
   startPosition : [ 0.5, 0.5 ],
   endPosition : [ -0.5, -0.5 ],
   stopOffset : [ 0.0, 0.3, 0.6, 0.8, 1.0 ],
@@ -167,7 +167,7 @@ control.background =
 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
-map[ "rendererType" ] = "gradient";
+map[ "rendererType" ] = "GRADIENT";
 map[ "center" ] = Vector2( 0.5f, 0.5f );
 map[ "radius" ] = 1.414f;
 
@@ -196,7 +196,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "gradient",
+  rendererType : "GRADIENT",
   center : [ 0.5, 0.5 ],
   radius : 1.414,
   stopOffset : [ 0.0, 0.3, 0.6, 0.8, 1.0 ],
@@ -232,7 +232,7 @@ Renders a raster image ( jpg, png etc.) into the control's quad.
 
 #### Properties Supported
 
-**RendererType:** "image"
+**RendererType:** "IMAGE"
 
 | Property Name                                        | Type     | Required | Description                                                                                                    |
 |------------------------------------------------------|:--------:|:--------:|----------------------------------------------------------------------------------------------------------------|
@@ -249,7 +249,7 @@ Renders a raster image ( jpg, png etc.) into the control's quad.
 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
 map[ "url" ] = "path-to-image.jpg";
 
 control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
@@ -261,7 +261,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "image",
+  rendererType : "IMAGE",
   url : "path-to-image.jpg"
 };
 ~~~
@@ -276,7 +276,7 @@ Renders an n-patch or a 9-patch image into the control's quad.
 
 #### Properties Supported
 
-**RendererType:** "image"
+**RendererType:** "IMAGE"
 
 | Property Name | Type    | Required | Description                      |
 |---------------|:-------:|:--------:|----------------------------------|
@@ -291,7 +291,7 @@ Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
 
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
 map[ "url" ] = "path-to-image.9.png";
 
 control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
@@ -303,7 +303,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "image",
+  rendererType : "IMAGE",
   url : "path-to-image.9.png"
 };
 ~~~
@@ -347,7 +347,7 @@ Renders a svg image into the control's quad.
  
 #### Properties Supported
 
-**RendererType:** "image"
+**RendererType:** "IMAGE"
 
 | Property Name | Type    | Required | Description                      |
 |---------------|:-------:|:--------:|----------------------------------|
@@ -361,7 +361,7 @@ Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
 
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
 map[ "url" ] = "path-to-image.svg";
 
 control.SetSize( 200.f, 200.f );
@@ -374,7 +374,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "image",
+  rendererType : "IMAGE",
   url : "path-to-image.svg"
 };
 ~~~
@@ -389,7 +389,7 @@ Renders a solid color as an internal border to the control's quad.
 
 ### Properties Supported
 
-**RendererType:** "border"
+**RendererType:** "BORDER"
 
 | Property Name | Type    | Required | Description                                      |
 |---------------|:-------:|:--------:|--------------------------------------------------|
@@ -405,7 +405,7 @@ Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
 
-map[ "rendererType" ] = "border";
+map[ "rendererType" ] = "BORDER";
 map[ "borderColor"  ] = Color::BLUE;
 map[ "borderSize"   ] = 5.0f;
 
@@ -418,7 +418,7 @@ var control = new dali.Control( "Control" );
 
 control.background =
 {
-  rendererType : "border",
+  rendererType : "BORDER",
   borderColor : dali.COLOR_BLUE,
   borderSize = 5
 };
@@ -435,7 +435,7 @@ Renders a mesh using a .obj file, optionally with textures provided by a mtl fil
 
 ### Properties Supported
 
-**RendererType** "mesh"
+**RendererType** "MESH"
 
 | Property Name                                | Type    | Required           | Description                                                                    |
 |----------------------------------------------|:-------:|:------------------:|--------------------------------------------------------------------------------|
@@ -464,7 +464,7 @@ Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
 
 Dali::Property::Map map;
 
-map[ "rendererType" ] = "mesh";
+map[ "rendererType" ] = "MESH";
 map[ "objectUrl"    ] = "home/models/Dino.obj";
 map[ "materialUrl"  ] = "home/models/Dino.mtl";
 map[ "texturesPath" ] = "home/images/";
index 2016ea7..2871198 100644 (file)
@@ -15,7 +15,7 @@
           "type":"ImageView",
           "image":
           {
-            "rendererType" : "image",
+            "rendererType" : "IMAGE",
             "url": "{icon_path}"
           },
           "position":[20.0, 0.0, 0.0],
@@ -59,7 +59,7 @@
           "type":"ImageView",
           "image":
           {
-            "rendererType" : "image",
+            "rendererType" : "IMAGE",
             "url": "{icon_path}"
           },
           "position":[0.0, -10.0, 0.0],
index 2016ea7..2871198 100644 (file)
@@ -15,7 +15,7 @@
           "type":"ImageView",
           "image":
           {
-            "rendererType" : "image",
+            "rendererType" : "IMAGE",
             "url": "{icon_path}"
           },
           "position":[20.0, 0.0, 0.0],
@@ -59,7 +59,7 @@
           "type":"ImageView",
           "image":
           {
-            "rendererType" : "image",
+            "rendererType" : "IMAGE",
             "url": "{icon_path}"
           },
           "position":[0.0, -10.0, 0.0],
index fbff9bd..e5a3da4 100644 (file)
@@ -190,7 +190,7 @@ var imageView = createImageView();
 var shader = createColorShiftAndZoomEffect();
   
 var image = {
-    "rendererType" : "image",
+    "rendererType" : "IMAGE",
     "url" : getImageDirectory()+"gallery-medium-50.jpg",
     "shader" : shader
 };
index 3b61fc2..e0b0f48 100644 (file)
@@ -45,7 +45,7 @@ imageView.size = imageViewSize; // If not set, it will use either the natural im
 dali.stage.add( imageView );
   
 var image = {
-    "rendererType" : "image",
+    "rendererType" : "IMAGE",
     "url" : "myImage.jpg",
     "desiredWidth" : desiredWidth,   // The desired image width while loading (optional but preferable to set for efficiency)
     "desiredHeight" : desiredHeight,   // The desired image height while loading (optional but preferable to set for efficiency)
index 8f0c3ed..9643c3e 100644 (file)
@@ -30,7 +30,7 @@
             "type":"ImageView",
             "image":
             {
-              "rendererType" : "image",
+              "rendererType" : "IMAGE",
               "url": "{icon_path}"
             },
             "position":[20.0, 0.0, 0.0],