Merge "Add push-button sample for dashboard" into devel/master
authorMinho Sun <minho.sun@samsung.com>
Mon, 26 Dec 2016 05:28:13 +0000 (21:28 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 26 Dec 2016 05:28:13 +0000 (21:28 -0800)
88 files changed:
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp [new file with mode: 0644]
build/tizen/dali-toolkit/Makefile.am
dali-toolkit/devel-api/controls/control-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h [new file with mode: 0755]
dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h [new file with mode: 0644]
dali-toolkit/devel-api/file.list
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp [changed mode: 0644->0755]
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h [changed mode: 0644->0755]
dali-toolkit/internal/controls/tooltip/tooltip.cpp [new file with mode: 0644]
dali-toolkit/internal/controls/tooltip/tooltip.h [new file with mode: 0644]
dali-toolkit/internal/file.list
dali-toolkit/internal/image-loader/atlas-packer.cpp
dali-toolkit/internal/text/text-model.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/visual-string-constants.cpp
dali-toolkit/internal/visuals/visual-string-constants.h
dali-toolkit/po/as.po [new file with mode: 0644]
dali-toolkit/po/be_BY.po [new file with mode: 0644]
dali-toolkit/po/bn.po [new file with mode: 0644]
dali-toolkit/po/bn_BD.po [new file with mode: 0644]
dali-toolkit/po/fa.po [new file with mode: 0644]
dali-toolkit/po/gu.po [new file with mode: 0644]
dali-toolkit/po/id.po [new file with mode: 0644]
dali-toolkit/po/km.po [new file with mode: 0644]
dali-toolkit/po/kn.po [new file with mode: 0644]
dali-toolkit/po/ky_KG.po [new file with mode: 0644]
dali-toolkit/po/lo.po [new file with mode: 0644]
dali-toolkit/po/ml.po [new file with mode: 0644]
dali-toolkit/po/mn_MN.po [new file with mode: 0644]
dali-toolkit/po/mr.po [new file with mode: 0644]
dali-toolkit/po/ms.po [new file with mode: 0644]
dali-toolkit/po/my_ZG.po [new file with mode: 0644]
dali-toolkit/po/ne.po [new file with mode: 0644]
dali-toolkit/po/or.po [new file with mode: 0644]
dali-toolkit/po/pa.po [new file with mode: 0644]
dali-toolkit/po/si.po [new file with mode: 0644]
dali-toolkit/po/ta.po [new file with mode: 0644]
dali-toolkit/po/te.po [new file with mode: 0644]
dali-toolkit/po/tg_TJ.po [new file with mode: 0644]
dali-toolkit/po/th.po [new file with mode: 0644]
dali-toolkit/po/tk_TM.po [new file with mode: 0644]
dali-toolkit/po/tl.po [new file with mode: 0644]
dali-toolkit/po/ur.po [new file with mode: 0644]
dali-toolkit/po/vi.po [new file with mode: 0644]
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/scrollable/item-view/item-layout.cpp [changed mode: 0644->0755]
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h [changed mode: 0644->0755]
dali-toolkit/public-api/controls/scrollable/item-view/item-view.h [changed mode: 0644->0755]
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/images-common/tooltip-tail-above.png [new file with mode: 0644]
dali-toolkit/styles/images-common/tooltip-tail-below.png [new file with mode: 0644]
dali-toolkit/styles/images-common/tooltip.9.png [new file with mode: 0644]
packaging/dali-csharp-wrapper.spec [deleted file]
plugins/dali-swig/Makefile.am [changed mode: 0644->0755]
plugins/dali-swig/SWIG/alphafunction.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/dali-core.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/dali-toolkit.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/dali.i
plugins/dali-swig/SWIG/events/actor-event.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/events/animation-event.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/events/control-event.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/events/keyboardFocusManager-event.i [changed mode: 0644->0755]
plugins/dali-swig/SWIG/events/stage-event.i [changed mode: 0644->0755]
plugins/dali-swig/examples/control-dashboard.cs
plugins/dali-swig/examples/hello-world.cs
plugins/dali-swig/examples/scroll-view.cs [changed mode: 0644->0755]
plugins/dali-swig/examples/spin-control.cs [changed mode: 0644->0755]
plugins/dali-swig/examples/user-alphafunction.cs [new file with mode: 0755]
plugins/dali-swig/manual/csharp/DaliEnumConstants.cs [changed mode: 0644->0755]
plugins/dali-swig/manual/csharp/DaliEventHandler.cs [changed mode: 0644->0755]
plugins/dali-swig/manual/csharp/FocusManager.cs [moved from plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs with 96% similarity, mode: 0755]
plugins/dali-swig/manual/csharp/KeyboardPreFocusChangeSignal.cs [changed mode: 0644->0755]
plugins/dali-swig/manual/csharp/ManualPINVOKE.cs [changed mode: 0644->0755]

index 681d677..4e59f15 100644 (file)
@@ -33,6 +33,7 @@ SET(TC_SOURCES
    utc-Dali-TextLabel.cpp
    utc-Dali-TextSelectionPopup.cpp
    utc-Dali-ToolBar.cpp
+   utc-Dali-Tooltip.cpp
    utc-Dali-TransitionData.cpp
    utc-Dali-Button.cpp
    utc-Dali-Control.cpp
index 2f1ce14..f46dacd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@ class Timer;
 typedef IntrusivePtr<Timer> TimerPtr;
 
 Dali::Timer::TimerSignalType gTickSignal;
+int gTimerCount = 0;
 
 /**
  * Implementation of the timer
@@ -98,10 +99,12 @@ TimerPtr Timer::New( unsigned int milliSec )
 Timer::Timer( unsigned int milliSec )
 : mInterval( milliSec )
 {
+  ++gTimerCount;
 }
 
 Timer::~Timer()
 {
+  --gTimerCount;
 }
 
 void Timer::Start()
@@ -141,7 +144,11 @@ Dali::Timer::TimerSignalType& Timer::TickSignal()
 
 void Timer::MockEmitSignal()
 {
-  gTickSignal.Emit();
+  if( gTimerCount > 1 )
+  {
+    // Only emit the signal if we have more than just the timer created in the test function
+    gTickSignal.Emit();
+  }
 }
 
 
old mode 100644 (file)
new mode 100755 (executable)
index aa51150..da05a53
@@ -24,6 +24,8 @@
 
 #include <dali.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+
 
 using namespace Dali;
 using namespace Toolkit;
@@ -349,6 +351,268 @@ int UtcDaliItemLayoutGetNextFocusItemID(void)
   END_TEST;
 }
 
+int UtcDaliItemLayoutSetAndGetLayoutProperties(void)
+{
+  ToolkitTestApplication application;
+
+  // Create the ItemView actor
+  TestItemFactory factory;
+  ItemView view = ItemView::New(factory);
+
+  // Create a grid layout and add it to ItemView
+  ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
+
+  // Set the property of the grid layout
+  Property::Map gridLayoutProperty;
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::GRID) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::ITEM_SIZE, Dali::Property::Value(Vector3(200, 200,50)) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_ROW_SPACING, Dali::Property::Value(50.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_COLUMN_NUMBER, Dali::Property::Value(4) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_COLUMN_SPACING, Dali::Property::Value(50.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_TOP_MARGIN, Dali::Property::Value(95.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_BOTTOM_MARGIN, Dali::Property::Value(20.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_SIDE_MARGIN, Dali::Property::Value(20.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_SCROLL_SPEED_FACTOR, Dali::Property::Value(0.03f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_ITEM_FLICK_ANIMATION_DURATION, Dali::Property::Value(0.015f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_MAXIMUM_SWIPE_SPEED, Dali::Property::Value(100.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::ORIENTATION, Dali::Property::Value((int)ControlOrientation::Up) );
+  gridLayout->SetLayoutProperties(gridLayoutProperty);
+
+  view.AddLayout(*gridLayout);
+  ItemLayoutPtr layout = view.GetLayout(0);
+  DALI_TEST_CHECK(gridLayout == layout);
+  Property::Map firstLayout = gridLayout->GetLayoutProperties();
+
+  //Check all the properties of grid layout
+  DALI_TEST_EQUALS( gridLayoutProperty.Count(), firstLayout.Count(), TEST_LOCATION );
+
+  for( unsigned int mapIdx = 0, mapCount = firstLayout.Count(); mapIdx < mapCount; ++mapIdx )
+  {
+    KeyValuePair propertyPair( firstLayout.GetKeyValue( mapIdx ) );
+    if(propertyPair.first == DefaultItemLayoutProperty::TYPE)
+    {
+      int layoutType = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS( layoutType, (int)DefaultItemLayout::GRID, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::ITEM_SIZE)
+    {
+      Vector3 size = propertyPair.second.Get<Vector3>();
+      DALI_TEST_EQUALS( size, Vector3(200, 200,50), TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_ROW_SPACING)
+    {
+      float rowSpacing = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS( rowSpacing, 50.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_COLUMN_NUMBER)
+    {
+      int number = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS(number, 4, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_COLUMN_SPACING)
+    {
+      float columnSpacing = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(columnSpacing, 50.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_TOP_MARGIN)
+    {
+      float topMargin = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(topMargin, 95.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_BOTTOM_MARGIN)
+    {
+      float bottomMargin = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(bottomMargin, 20.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_SIDE_MARGIN)
+    {
+      float sideMargin = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(sideMargin, 20.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_SCROLL_SPEED_FACTOR)
+    {
+      float scrollSpeedFactor = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(scrollSpeedFactor, 0.03f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_ITEM_FLICK_ANIMATION_DURATION)
+    {
+      float animationDuration = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(animationDuration, 0.015f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_MAXIMUM_SWIPE_SPEED)
+    {
+      float swipSpeed = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(swipSpeed, 100.0f, TEST_LOCATION );
+    }
+  }
+  ItemLayoutPtr depthLayout = DefaultItemLayout::New( DefaultItemLayout::DEPTH );
+
+  // Set the property of the depth layout
+  Property::Map depthLayoutProperty;
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::DEPTH) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_COLUMN_NUMBER, Dali::Property::Value(3) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_ROW_NUMBER, Dali::Property::Value(26.0f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_ROW_SPACING, Dali::Property::Value(55.0f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_TILT_ANGLE, Dali::Property::Value(Math::PI*0.15f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_ITEM_TILT_ANGLE, Dali::Property::Value(-Math::PI*0.025f ) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_SCROLL_SPEED_FACTOR, Dali::Property::Value(0.02f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_ITEM_FLICK_ANIMATION_DURATION, Dali::Property::Value(0.03f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_MAXIMUM_SWIPE_SPEED, Dali::Property::Value(50.0f) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::ORIENTATION, Dali::Property::Value((int)ControlOrientation::Up) );
+  depthLayout->SetLayoutProperties(depthLayoutProperty);
+
+  view.AddLayout(*depthLayout);
+  layout = view.GetLayout(1);
+  DALI_TEST_CHECK(depthLayout == layout);
+
+  Property::Map secondLayout = depthLayout->GetLayoutProperties();
+
+  //Check all the properties of grid layout
+  DALI_TEST_EQUALS( depthLayoutProperty.Count(), secondLayout.Count(), TEST_LOCATION );
+  for( unsigned int mapIdx = 0, mapCount = secondLayout.Count(); mapIdx < mapCount; ++mapIdx )
+  {
+    KeyValuePair propertyPair( secondLayout.GetKeyValue( mapIdx ) );
+    if(propertyPair.first == DefaultItemLayoutProperty::TYPE)
+    {
+      int layoutType = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS( layoutType, (int)DefaultItemLayout::DEPTH, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::ORIENTATION)
+    {
+      int orientation = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS(orientation, (int)ControlOrientation::Up, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::ITEM_SIZE)
+    {
+      Vector3 size = propertyPair.second.Get<Vector3>();
+      DALI_TEST_EQUALS( size, Vector3(200, 200,50), TEST_LOCATION );
+    }
+
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_COLUMN_NUMBER)
+    {
+      int columnNumber = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS( columnNumber, 3, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_ROW_NUMBER)
+    {
+      float rowNumber = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(rowNumber, 26.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_ROW_SPACING)
+    {
+      float rowSpacing = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(rowSpacing, 55.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_TILT_ANGLE)
+    {
+      float tiltAngle = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(tiltAngle, Math::PI*0.15f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_ITEM_TILT_ANGLE)
+    {
+      float itemTiltAngle = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(itemTiltAngle, -Math::PI*0.025f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_SCROLL_SPEED_FACTOR)
+    {
+      float scrollSpeedFactor = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(scrollSpeedFactor, 0.02f, TEST_LOCATION );
+    }
+
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_ITEM_FLICK_ANIMATION_DURATION)
+    {
+      float animationDuration = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(animationDuration, 0.03f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::DEPTH_MAXIMUM_SWIPE_SPEED)
+    {
+      float swipSpeed = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(swipSpeed, 50.0f, TEST_LOCATION );
+    }
+  }
+  ItemLayoutPtr spiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
+
+  // Set the property of the spiral layout
+  Property::Map spiralLayoutPrperty;
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::SPIRAL) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_ITEM_SPACING, Dali::Property::Value((Math::PI*2.0f)/9.5f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_TOP_ITEM_ALIGNMENT, Dali::Property::Value(-0.125f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_REVOLUTION_DISTANCE, Dali::Property::Value(190.0f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_SCROLL_SPEED_FACTOR, Dali::Property::Value(0.01f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_ITEM_FLICK_ANIMATION_DURATION, Dali::Property::Value(0.1f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_MAXIMUM_SWIPE_SPEED, Dali::Property::Value(30.0f) );
+  spiralLayout->SetLayoutProperties(spiralLayoutPrperty);
+
+  view.AddLayout(*spiralLayout);
+  layout = view.GetLayout(2);
+  DALI_TEST_CHECK(spiralLayout == layout);
+
+  Property::Map thridLayout = spiralLayout->GetLayoutProperties();
+
+  //Check all the properties of grid layout
+  DALI_TEST_EQUALS( spiralLayoutPrperty.Count(), thridLayout.Count(), TEST_LOCATION );
+
+  for( unsigned int mapIdx = 0, mapCount = thridLayout.Count(); mapIdx < mapCount; ++mapIdx )
+  {
+    KeyValuePair propertyPair( thridLayout.GetKeyValue( mapIdx ) );
+    if(propertyPair.first == DefaultItemLayoutProperty::TYPE)
+    {
+      int layoutType = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS( layoutType, (int)DefaultItemLayout::SPIRAL, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_ITEM_SPACING)
+    {
+      float columnNumber = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS( columnNumber, (Math::PI*2.0f)/9.5f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_TOP_ITEM_ALIGNMENT)
+    {
+      float rowNumber = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(rowNumber, -0.125f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_REVOLUTION_DISTANCE)
+    {
+      float rowSpacing = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(rowSpacing, 190.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_SCROLL_SPEED_FACTOR)
+    {
+      float scrollSpeedFactor = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(scrollSpeedFactor, 0.01f, TEST_LOCATION );
+    }
+
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_ITEM_FLICK_ANIMATION_DURATION)
+    {
+      float animationDuration = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(animationDuration, 0.1f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::SPIRAL_MAXIMUM_SWIPE_SPEED)
+    {
+      float swipSpeed = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS(swipSpeed, 30.0f, TEST_LOCATION );
+    }
+  }
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Vector3 stageSize(stage.GetSize());
+  view.ActivateLayout(0, stageSize, 0.5f);
+  view.ActivateLayout(1, stageSize, 0.5f);
+  view.ActivateLayout(2, stageSize, 0.5f);
+  END_TEST;
+
+}
+
+int UtcDaliItemLayoutSetandGetLayoutChangedFlag(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemLayoutPtr layout = TestItemLayout::New();
+  DALI_TEST_CHECK( layout );
+  layout->ResetLayoutChangedFlag();
+  DALI_TEST_CHECK(layout->HasLayoutChanged() == false);
+
+  END_TEST;
+}
+
 int UtcDaliItemRangeIntersection(void)
 {
   ToolkitTestApplication application;
old mode 100644 (file)
new mode 100755 (executable)
index fdef315..3e3e303
@@ -25,6 +25,8 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
 
 
 using namespace Dali;
@@ -938,6 +940,71 @@ int UtcDaliItemViewSetGetProperty(void)
   view.SetProperty( ItemView::Property::REFRESH_INTERVAL, 11.0f );
   DALI_TEST_EQUALS( view.GetProperty(ItemView::Property::REFRESH_INTERVAL).Get<float>(), 11.0f, TEST_LOCATION );
 
+  // Test "layout" property
+  DALI_TEST_CHECK( view.GetPropertyIndex("layout") == DevelItemView::Property::LAYOUT  );
+  Property::Map gridLayoutProperty;
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::GRID) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::ITEM_SIZE, Dali::Property::Value(Vector3(200, 200,50)) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_ROW_SPACING, Dali::Property::Value(50.0f) );
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_COLUMN_NUMBER, Dali::Property::Value(4) );
+
+  Property::Map depthLayoutProperty;
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::DEPTH) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_COLUMN_NUMBER, Dali::Property::Value(3) );
+  depthLayoutProperty.Insert( DefaultItemLayoutProperty::DEPTH_ROW_NUMBER, Dali::Property::Value(26.0f) );
+
+  Property::Map spiralLayoutPrperty;
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::SPIRAL) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_ITEM_SPACING, Dali::Property::Value((Math::PI*2.0f)/9.5f) );
+  spiralLayoutPrperty.Insert( DefaultItemLayoutProperty::SPIRAL_TOP_ITEM_ALIGNMENT, Dali::Property::Value(-0.125f) );
+
+  Property::Map listLayoutPrperty;
+  listLayoutPrperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::LIST) );
+  listLayoutPrperty.Insert( DefaultItemLayoutProperty::ITEM_SIZE, Dali::Property::Value(Vector3(100, 100,50)) );
+
+
+  Property::Array layoutArray;
+  layoutArray.PushBack(gridLayoutProperty);
+  layoutArray.PushBack(depthLayoutProperty);
+  layoutArray.PushBack(spiralLayoutPrperty);
+  layoutArray.PushBack(listLayoutPrperty);
+
+  view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+
+  Property::Array getLayoutArray;
+  DALI_TEST_CHECK( view.GetProperty(DevelItemView::Property::LAYOUT ).Get( getLayoutArray ) );
+
+  //Check that the result is the same as
+  DALI_TEST_EQUALS( layoutArray.Count(), getLayoutArray.Count(), TEST_LOCATION );
+  Property::Map firstLayout = *((getLayoutArray.GetElementAt( 0 )).GetMap());
+
+  for( unsigned int mapIdx = 0, mapCount = firstLayout.Count(); mapIdx < mapCount; ++mapIdx )
+  {
+    KeyValuePair propertyPair( firstLayout.GetKeyValue( mapIdx ) );
+    if(propertyPair.first == DefaultItemLayoutProperty::TYPE)
+    {
+      int layoutType = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS( layoutType, (int)DefaultItemLayout::GRID, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::ITEM_SIZE)
+    {
+      Vector3 size = propertyPair.second.Get<Vector3>();
+      DALI_TEST_EQUALS( size, Vector3(200, 200,50), TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_ROW_SPACING)
+    {
+      float spacing = propertyPair.second.Get<float>();
+      DALI_TEST_EQUALS( spacing, 50.0f, TEST_LOCATION );
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::GRID_COLUMN_NUMBER)
+    {
+      int number = propertyPair.second.Get<int>();
+      DALI_TEST_EQUALS(number, 4, TEST_LOCATION );
+    }
+  }
+  view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+
+
   // Test "overshootEnabled" property
   DALI_TEST_CHECK( view.GetPropertyIndex("overshootEnabled") == Scrollable::Property::OVERSHOOT_ENABLED  );
   DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), view.IsOvershootEnabled(), TEST_LOCATION );
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp
new file mode 100644 (file)
index 0000000..42f5d1c
--- /dev/null
@@ -0,0 +1,1182 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <iostream>
+#include <stdlib.h>
+
+// Need to override adaptor classes for toolkit test harness, so include
+// test harness headers before dali headers.
+#include <dali-toolkit-test-suite-utils.h>
+#include <toolkit-timer.h>
+
+#include <dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/controls/popup/popup.h>
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali/integration-api/events/hover-event-integ.h>
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+void utc_dali_toolkit_tooltip_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_toolkit_tooltip_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace
+{
+
+Integration::HoverEvent GenerateSingleHover( TouchPoint::State state, const Vector2& screenPosition )
+{
+  Integration::HoverEvent hoverEvent;
+  Integration::Point point;
+  point.SetState( static_cast< PointState::Type >( state ) );
+  point.SetScreenPosition( screenPosition );
+  hoverEvent.points.push_back( point );
+  return hoverEvent;
+}
+
+} // unnamed namespace
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+int UtcDaliTooltipGetWithoutSetting(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map is empty" );
+  DALI_TEST_EQUALS( true, map->Empty(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithString(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Hello Test" );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map contains the content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+
+  tet_infoline( "Check content is a property map" );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+
+  tet_infoline( "Check that the map contains the text item" );
+  Property::Value* textStringValue = contentMap->Find( TextVisual::Property::TEXT );
+  DALI_TEST_CHECK( textStringValue );
+
+  tet_infoline( "Ensure it matches what we set" );
+  DALI_TEST_EQUALS( "Hello Test", textStringValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "We sent valid text, so ensure the hover signal has been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 1u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithTextVisualMap(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT,
+                                            Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                           .Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map contains the content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+
+  tet_infoline( "Check content is a property map" );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+
+  tet_infoline( "Check that the map contains the text item" );
+  Property::Value* textStringValue = contentMap->Find( TextVisual::Property::TEXT );
+  DALI_TEST_CHECK( textStringValue );
+
+  tet_infoline( "Ensure it matches what we set" );
+  DALI_TEST_EQUALS( "Hello TextVisual Test", textStringValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "We sent a text visual with TEXT property set, so ensure the hover signal has been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 1u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithTextVisualMapWithoutString(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT,
+                                            Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                           .Add( TextVisual::Property::POINT_SIZE, 20 ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map contains the content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+
+  tet_infoline( "Check content is a property map" );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+
+  tet_infoline( "Check that the map contains the point-size item" );
+  Property::Value* pointSizeValue = contentMap->Find( TextVisual::Property::POINT_SIZE );
+  DALI_TEST_CHECK( pointSizeValue );
+
+  tet_infoline( "Ensure it matches what we set" );
+  DALI_TEST_EQUALS( 20, pointSizeValue->Get< int >(), TEST_LOCATION );
+
+  tet_infoline( "We sent a text visual without a TEXT property set, so ensure the hover signal has NOT been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 0u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithImageVisualMap(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT,
+                                            Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+                                                           .Add( ImageVisual::Property::URL, "dummy-url.png" ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map contains the content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+
+  tet_infoline( "Check content is a property map" );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+
+  tet_infoline( "Check that the map contains the url item" );
+  Property::Value* urlValue = contentMap->Find( ImageVisual::Property::URL );
+  DALI_TEST_CHECK( urlValue );
+
+  tet_infoline( "Ensure it matches what we set" );
+  DALI_TEST_EQUALS( "dummy-url.png", urlValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "We sent an ImageVisual, so ensure the hover signal has been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 1u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithArray(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+                                                             .Add( ImageVisual::Property::URL, "dummy-url.png" ) )
+                                        .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                             .Add( TextVisual::Property::TEXT, "Hello Array Test" ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Ensure map contains the content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+
+  tet_infoline( "Check content is a property array" );
+  Property::Array* contentArray = contentValue->GetArray();
+  DALI_TEST_CHECK( contentArray );
+
+  tet_infoline( "Ensure the array contains two items" );
+  DALI_TEST_EQUALS( 2u, contentArray->Count(), TEST_LOCATION );
+
+  tet_infoline( "Ensure first value is a map and contains the right item" );
+  const Property::Value mapValue1 = contentArray->GetElementAt( 0 );
+  Property::Map* map1 = mapValue1.GetMap();
+  DALI_TEST_CHECK( map1 );
+  Property::Value* urlValue = map1->Find( ImageVisual::Property::URL );
+  DALI_TEST_CHECK( urlValue );
+  DALI_TEST_EQUALS( "dummy-url.png", urlValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "Ensure second value is a map and contains the right item" );
+  const Property::Value mapValue2 = contentArray->GetElementAt( 1 );
+  Property::Map* map2 = mapValue2.GetMap();
+  DALI_TEST_CHECK( map2 );
+  Property::Value* textValue = map2->Find( TextVisual::Property::TEXT );
+  DALI_TEST_CHECK( textValue );
+  DALI_TEST_EQUALS( "Hello Array Test", textValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "We sent an array, so ensure the hover signal has been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 1u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithFullMap(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT,
+                                            Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                           .Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) )
+                                      .Add( Tooltip::Property::LAYOUT, Vector2( 1.0f, 2.0f ) )
+                                      .Add( Tooltip::Property::WAIT_TIME, 2.5f )
+                                      .Add( Tooltip::Property::BACKGROUND, "tooltip-background.png" )
+                                      .Add( Tooltip::Property::TAIL, true )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
+                                      .Add( Tooltip::Property::HOVER_POINT_OFFSET, Vector2( 100.0f, 50.f ) )
+                                      .Add( Tooltip::Property::MOVEMENT_THRESHOLD, 50 )
+                                      .Add( Tooltip::Property::DISAPPEAR_ON_MOVEMENT, true )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Check content" );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+
+  tet_infoline( "Check layout" );
+  Property::Value* layoutValue = map->Find( Tooltip::Property::LAYOUT );
+  DALI_TEST_CHECK( layoutValue );
+  DALI_TEST_EQUALS( layoutValue->Get< Vector2 >(), Vector2( 1.0f, 2.0f ), TEST_LOCATION );
+
+  tet_infoline( "Check wait time" );
+  Property::Value* waitTimeValue = map->Find( Tooltip::Property::WAIT_TIME );
+  DALI_TEST_CHECK( waitTimeValue );
+  DALI_TEST_EQUALS( waitTimeValue->Get< float >(), 2.5f, TEST_LOCATION );
+
+  tet_infoline( "Check background" );
+  Property::Value* backgroundMapValue = map->Find( Tooltip::Property::BACKGROUND );
+  DALI_TEST_CHECK( backgroundMapValue );
+  Property::Map* backgroundMap = backgroundMapValue->GetMap();
+  DALI_TEST_CHECK( backgroundMap );
+  Property::Value* backgroundStringValue = backgroundMap->Find( Tooltip::Background::Property::VISUAL );
+  DALI_TEST_CHECK( backgroundStringValue );
+  DALI_TEST_EQUALS( backgroundStringValue->Get< std::string >(), "tooltip-background.png", TEST_LOCATION );
+
+  tet_infoline( "Check Tail" );
+  Property::Value* tailMapValue = map->Find( Tooltip::Property::TAIL );
+  DALI_TEST_CHECK( tailMapValue );
+  Property::Map* tailMap = tailMapValue->GetMap();
+  DALI_TEST_CHECK( tailMap );
+  Property::Value* tailVisibilityValue = tailMap->Find( Tooltip::Tail::Property::VISIBILITY );
+  DALI_TEST_CHECK( tailVisibilityValue );
+  DALI_TEST_EQUALS( tailVisibilityValue->Get< bool >(), true, TEST_LOCATION );
+
+  tet_infoline( "Check position" );
+  Property::Value* positionValue = map->Find( Tooltip::Property::POSITION );
+  DALI_TEST_CHECK( positionValue );
+  DALI_TEST_EQUALS( positionValue->Get< int >(), static_cast< int >( Tooltip::Position::HOVER_POINT ), TEST_LOCATION );
+
+  tet_infoline( "Check hover point offset" );
+  Property::Value* hoverPointOffsetValue = map->Find( Tooltip::Property::HOVER_POINT_OFFSET );
+  DALI_TEST_CHECK( hoverPointOffsetValue );
+  DALI_TEST_EQUALS( hoverPointOffsetValue->Get< Vector2 >(), Vector2( 100.0f, 50.f ), TEST_LOCATION );
+
+  tet_infoline( "Check movement threshold" );
+  Property::Value* movementThresholdValue = map->Find( Tooltip::Property::MOVEMENT_THRESHOLD );
+  DALI_TEST_CHECK( movementThresholdValue );
+  DALI_TEST_EQUALS( movementThresholdValue->Get< int >(), 50, TEST_LOCATION );
+
+  tet_infoline( "Check disappear on movement" );
+  Property::Value* disappearOnMovementValue = map->Find( Tooltip::Property::DISAPPEAR_ON_MOVEMENT );
+  DALI_TEST_CHECK( disappearOnMovementValue );
+  DALI_TEST_EQUALS( disappearOnMovementValue->Get< bool >(), true, TEST_LOCATION );
+
+  tet_infoline( "We sent a text visual with TEXT property set, so ensure the hover signal has been connected to" );
+  DALI_TEST_EQUALS( control.HoveredSignal().GetConnectionCount(), 1u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithBackgroundMap(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Hello TextVisual Test" )
+                                      .Add( Tooltip::Property::BACKGROUND,
+                                            Property::Map().Add( Tooltip::Background::Property::VISUAL, "tooltip-background.png" )
+                                                           .Add( Tooltip::Background::Property::BORDER, Rect< int >( 10, 20, 30, 40 ) ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Check background map" );
+  Property::Value* backgroundMapValue = map->Find( Tooltip::Property::BACKGROUND );
+  DALI_TEST_CHECK( backgroundMapValue );
+  Property::Map* backgroundMap = backgroundMapValue->GetMap();
+  DALI_TEST_CHECK( backgroundMap );
+
+  tet_infoline( "Check visual" );
+  Property::Value* backgroundStringValue = backgroundMap->Find( Tooltip::Background::Property::VISUAL );
+  DALI_TEST_CHECK( backgroundStringValue );
+  DALI_TEST_EQUALS( backgroundStringValue->Get< std::string >(), "tooltip-background.png", TEST_LOCATION );
+
+  tet_infoline( "Check border" );
+  Property::Value* borderValue = backgroundMap->Find( Tooltip::Background::Property::BORDER );
+  DALI_TEST_CHECK( borderValue );
+  DALI_TEST_EQUALS( borderValue->Get< Rect< int > >(), Rect< int >( 10, 20, 30, 40 ), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithBackgroundMapVector4(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Hello TextVisual Test" )
+                                      .Add( Tooltip::Property::BACKGROUND,
+                                            Property::Map().Add( Tooltip::Background::Property::VISUAL, "tooltip-background.png" )
+                                                           .Add( Tooltip::Background::Property::BORDER, Vector4( 40.0f, 30.0f, 20.0f, 10.0f ) ) )
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Check background map" );
+  Property::Value* backgroundMapValue = map->Find( Tooltip::Property::BACKGROUND );
+  DALI_TEST_CHECK( backgroundMapValue );
+  Property::Map* backgroundMap = backgroundMapValue->GetMap();
+  DALI_TEST_CHECK( backgroundMap );
+
+  tet_infoline( "Check visual" );
+  Property::Value* backgroundStringValue = backgroundMap->Find( Tooltip::Background::Property::VISUAL );
+  DALI_TEST_CHECK( backgroundStringValue );
+  DALI_TEST_EQUALS( backgroundStringValue->Get< std::string >(), "tooltip-background.png", TEST_LOCATION );
+
+  tet_infoline( "Check border" );
+  Property::Value* borderValue = backgroundMap->Find( Tooltip::Background::Property::BORDER );
+  DALI_TEST_CHECK( borderValue );
+  DALI_TEST_EQUALS( borderValue->Get< Rect< int > >(), Rect< int >( 40, 30, 20, 10 ), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipCreateWithTailMap(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Hello TextVisual Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
+                     );
+
+  tet_infoline( "Check if Property::MAP is returned" );
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+
+  tet_infoline( "Ensure map is valid" );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  tet_infoline( "Check Tail" );
+  Property::Value* tailMapValue = map->Find( Tooltip::Property::TAIL );
+  DALI_TEST_CHECK( tailMapValue );
+  Property::Map* tailMap = tailMapValue->GetMap();
+  DALI_TEST_CHECK( tailMap );
+
+  tet_infoline( "Check visibility" );
+  Property::Value* tailVisibilityValue = tailMap->Find( Tooltip::Tail::Property::VISIBILITY );
+  DALI_TEST_CHECK( tailVisibilityValue );
+  DALI_TEST_EQUALS( tailVisibilityValue->Get< bool >(), true, TEST_LOCATION );
+
+  tet_infoline( "Check above visual" );
+  Property::Value* aboveVisualValue = tailMap->Find( Tooltip::Tail::Property::ABOVE_VISUAL );
+  DALI_TEST_CHECK( aboveVisualValue );
+  DALI_TEST_EQUALS( aboveVisualValue->Get< std::string >(), "above-visual.png", TEST_LOCATION );
+
+  tet_infoline( "Check below visual" );
+  Property::Value* belowVisualValue = tailMap->Find( Tooltip::Tail::Property::BELOW_VISUAL );
+  DALI_TEST_CHECK( belowVisualValue );
+  DALI_TEST_EQUALS( belowVisualValue->Get< std::string >(), "below-visual.png", TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplay(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Stationary, centerPoint ) ); // Emit for code coverage, will have no effect
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplayWithTail(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplayWithContentArray(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT,
+                                            Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE )
+                                                                                  .Add( ImageVisual::Property::URL, "dummy-url.png" ) )
+                                                             .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT )
+                                                                                  .Add( TextVisual::Property::TEXT, "Hello Array Test" ) ))
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplayBelow(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+
+  tet_infoline( "Ensure tooltip is below control" );
+  DALI_TEST_CHECK( ( control.GetCurrentWorldPosition().y + 50.0f /* Half Size */) < tooltip.GetCurrentWorldPosition().y );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplayAbove(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+
+  tet_infoline( "Ensure tooltip is above control" );
+  DALI_TEST_CHECK( ( control.GetCurrentWorldPosition().y - 50.0f /* Half Size */) >= ( tooltip.GetCurrentWorldPosition().y + 0.5f * tooltip.GetCurrentSize().height ) );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipDisplayAtHoverPoint(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  const Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 hoverPoint = stageSize * 0.5f;
+  hoverPoint.x -= 10.0f;
+  hoverPoint.y -= 10.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+
+  tet_infoline( "Ensure tooltip is below and to the right of control" );
+  DALI_TEST_CHECK( ( hoverPoint.y - stageSize.height * 0.5f ) < tooltip.GetCurrentWorldPosition().y );
+  DALI_TEST_CHECK( ( hoverPoint.x - stageSize.width  * 0.5f ) < tooltip.GetCurrentWorldPosition().x );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipExceedThreshold(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  tet_infoline( "Start hover" );
+  Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Emit a value which exceeds threshold, timer should start again" );
+  hoverPoint.x += 10.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Emit Timer signal - timeout at new point which is still within bounds" );
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipGoOutOfBounds(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  tet_infoline( "Start hover" );
+  Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Emit a value which goes out of bounds" );
+  hoverPoint.x += 100.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Emit Timer signal - nothing should happen" );
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should be the same as before" );
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipHideTooltipWhenOutOfBounds(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  hoverPoint.x += 100.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should be back to what was there before the tooltip was shown" );
+  --rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipHideTooltipWhenSetToDisapperOnMovement(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::DISAPPEAR_ON_MOVEMENT, true )
+                                      .Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  hoverPoint.x += 10.0f; // Stay within bounds but exceed threshold
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, hoverPoint ) );
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should be back to what was there before the tooltip was shown" );
+  --rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipChangeContent(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Control control = Control::New();
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
+  control.SetAnchorPoint( AnchorPoint::CENTER );
+  control.SetParentOrigin( ParentOrigin::CENTER );
+  control.SetSize( 100.0f, 100.0f );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  int rootChildCount = rootActor.GetChildCount();
+
+  Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  tet_infoline( "Change content while timer is running and ensure it matches the new value" );
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Second Value" );
+
+  Property::Value value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+  Property::Value* contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+  Property::Map* contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+  Property::Value* textStringValue = contentMap->Find( TextVisual::Property::TEXT );
+  DALI_TEST_CHECK( textStringValue );
+  DALI_TEST_EQUALS( "Second Value", textStringValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "Emit signal, nothing should happen as everything has been reset" );
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, there should NOT be any new actors" );
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  tet_infoline( "More movement at same point, and emit signal, we should get the tooltip" );
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, centerPoint ) );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, they should have incremented by one" );
+  ++rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  tet_infoline( "Change content while tooltip is showing, current one should be removed from the stage and ensure it matches new value" );
+  control.SetProperty( DevelControl::Property::TOOLTIP, "Third Value" );
+
+  value = control.GetProperty( DevelControl::Property::TOOLTIP );
+  DALI_TEST_EQUALS( value.GetType(), Property::MAP, TEST_LOCATION );
+  map = value.GetMap();
+  DALI_TEST_CHECK( map );
+  contentValue = map->Find( Tooltip::Property::CONTENT );
+  DALI_TEST_CHECK( contentValue );
+  contentMap = contentValue->GetMap();
+  DALI_TEST_CHECK( contentMap );
+  textStringValue = contentMap->Find( TextVisual::Property::TEXT );
+  DALI_TEST_CHECK( textStringValue );
+  DALI_TEST_EQUALS( "Third Value", textStringValue->Get< std::string >(), TEST_LOCATION );
+
+  tet_infoline( "Emit signal, nothing should happen as everything has been reset" );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Get number of actors on the Stage, there should be one less actor on the stage" );
+  --rootChildCount;
+  DALI_TEST_EQUALS( rootActor.GetChildCount(), rootChildCount, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipEnsureRemainsOnStage1(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+
+  tet_infoline( "Create a control and place it at the bottom of the screen, setting the tooltip to appear below" );
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+  control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+  control.SetSize( stageSize );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 centerPoint = stageSize * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Ensure tooltip is still on the screen" );
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+  DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().y + tooltip.GetCurrentSize().height * 0.5f ) <= centerPoint.height );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipEnsureRemainsOnStage2(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+
+  tet_infoline( "Create a control and place it at the top of the screen, setting the tooltip to appear above" );
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+  control.SetParentOrigin( ParentOrigin::TOP_CENTER );
+  control.SetSize( stageSize );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
+                     );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 centerPoint = stageSize * 0.5f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Ensure tooltip is still on the screen" );
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+  DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().y - tooltip.GetCurrentSize().height * 0.5f ) >= -centerPoint.height );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipEnsureRemainsOnStage3(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 centerPoint = stageSize * 0.5f;
+
+  tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the left of the screen" );
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+  control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+  control.SetSize( stageSize );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
+                     );
+  control.SetX( -centerPoint.x );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 hoverPoint( centerPoint );
+  hoverPoint.x = 1.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Ensure tooltip is still on the screen" );
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+  DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().x - tooltip.GetCurrentSize().width * 0.5f ) >= -centerPoint.width );
+
+  END_TEST;
+}
+
+int UtcDaliTooltipEnsureRemainsOnStage4(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+
+  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 centerPoint = stageSize * 0.5f;
+
+  tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the right of the screen" );
+  Control control = Control::New();
+  control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+  control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+  control.SetSize( stageSize );
+  control.SetProperty( DevelControl::Property::TOOLTIP,
+                       Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
+                                      .Add( Tooltip::Property::TAIL,
+                                            Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true )
+                                                           .Add( Tooltip::Tail::Property::ABOVE_VISUAL, "above-visual.png" )
+                                                           .Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
+                                      .Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
+                     );
+  control.SetX( centerPoint.x );
+
+  Actor rootActor = Stage::GetCurrent().GetRootLayer();
+  rootActor.Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector2 hoverPoint( centerPoint );
+  hoverPoint.x = 1.0f;
+  application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
+
+  Dali::Timer timer = Timer::New( 1u );
+  timer.MockEmitSignal();
+
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Ensure tooltip is still on the screen" );
+  Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
+  DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().x + tooltip.GetCurrentSize().width * 0.5f ) <= centerPoint.width );
+
+  END_TEST;
+}
index 4ba3e04..67b723c 100644 (file)
@@ -105,6 +105,7 @@ develapibuttonsdir =            $(develapicontrolsdir)/buttons
 develapieffectsviewdir =        $(develapicontrolsdir)/effects-view
 develapigaussianblurviewdir =   $(develapicontrolsdir)/gaussian-blur-view
 develapimagnifierdir =          $(develapicontrolsdir)/magnifier
+develapiitemviewdir =           $(develapicontrolsdir)/scrollable/item-view
 develapinavigationviewdir =     $(develapicontrolsdir)/navigation-view
 develapipageturnviewdir =       $(develapicontrolsdir)/page-turn-view
 develapipopupdir =              $(develapicontrolsdir)/popup
@@ -117,6 +118,7 @@ develapiscriptingdir =          $(develapidir)/scripting
 develapishadereffectsdir =      $(develapidir)/shader-effects
 develapitransitioneffectsdir =  $(develapidir)/transition-effects
 develapitoolbardir =            $(develapicontrolsdir)/tool-bar
+develapitooltipdir =            $(develapicontrolsdir)/tooltip
 develapitextselectionpopupdir = $(develapicontrolsdir)/text-controls
 develapivisualfactorydir =      $(develapidir)/visual-factory
 develapivisualsdir =            $(develapidir)/visuals
@@ -132,6 +134,7 @@ develapieffectsview_HEADERS =       $(devel_api_effects_view_header_files)
 develapifocusmanager_HEADERS =      $(devel_api_focus_manager_header_files)
 develapigaussianblurview_HEADERS =  $(devel_api_gaussian_blur_view_header_files)
 develapiimageloader_HEADERS =       $(devel_api_image_loader_header_files)
+develapiitemview_HEADERS =          $(devel_api_item_view_header_files)
 develapimagnifier_HEADERS =         $(devel_api_magnifier_header_files)
 develapinavigationview_HEADERS =    $(devel_api_navigation_view_header_files)
 develapipageturnview_HEADERS =      $(devel_api_page_turn_view_header_files)
@@ -144,6 +147,7 @@ develapishadowview_HEADERS =        $(devel_api_shadow_view_header_files)
 develapishadereffects_HEADERS =     $(devel_api_shader_effects_header_files)
 develapisuperblurview_HEADERS =     $(devel_api_super_blur_view_header_files)
 develapitoolbar_HEADERS =           $(devel_api_tool_bar_header_files)
+develapitooltip_HEADERS =           $(devel_api_tooltip_header_files)
 develapitransitioneffects_HEADERS = $(devel_api_transition_effects_header_files)
 develapitextselectionpopup_HEADERS = $(devel_api_text_controls_header_files)
 
diff --git a/dali-toolkit/devel-api/controls/control-devel.h b/dali-toolkit/devel-api/controls/control-devel.h
new file mode 100644 (file)
index 0000000..71071db
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef DALI_TOOLKIT_CONTROL_DEVEL_H
+#define DALI_TOOLKIT_CONTROL_DEVEL_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/control.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelControl
+{
+
+namespace Property
+{
+
+enum
+{
+  STYLE_NAME        = Control::Property::STYLE_NAME,
+  BACKGROUND_COLOR  = Control::Property::BACKGROUND_COLOR,
+  BACKGROUND_IMAGE  = Control::Property::BACKGROUND_IMAGE,
+  KEY_INPUT_FOCUS   = Control::Property::KEY_INPUT_FOCUS,
+  BACKGROUND        = Control::Property::BACKGROUND,
+
+  /**
+   * @brief Displays a tooltip when the control is hovered over.
+   * @details Name "tooltip", type Property::STRING, Property::ARRAY or Property::MAP.
+   *          If Property::STRING, then the style specified in the stylesheet is used.
+   *          If Property::ARRAY of Visuals then all are displayed in one row.
+   *          If Property::MAP, then it should be a map of Tooltip properties.
+   * @note The tooltip is only activated if display content is received, i.e. a string (text) or visual to show.
+   *       The rest is used to just build up the style of the tooltip (i.e. background, text color/point-size etc.)
+   * @note When retrieved, a Property::MAP is returned.
+   * @see Toolkit::Tooltip
+   */
+  TOOLTIP = BACKGROUND + 1,
+};
+
+} // namespace Property
+
+} // namespace DevelControl
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_CONTROL_DEVEL_H
diff --git a/dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h b/dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h
new file mode 100755 (executable)
index 0000000..65d94dd
--- /dev/null
@@ -0,0 +1,259 @@
+#ifndef DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H
+#define DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @brief Default item layout property.
+ */
+namespace DefaultItemLayoutProperty
+{
+
+/**
+ * @brief The properties of each type of item layout.
+ */
+enum Property
+{
+  /**
+  * @brief The type of the Layout.
+  * @details Name "type", type(Dali::Toolkit::DefaultItemLayout::Type),Property::INTEGER
+  * @note Mandatory.
+  */
+  TYPE = 0,
+
+  /**
+  * @brief The size of each item in the Layout.
+  * @details Name "itemSize",Property::VECTOR3
+  * @note Optional.
+  * @note If not supplied, see ItemLayout::GetDefaultItemSize().
+  */
+  ITEM_SIZE,
+
+  /**
+  * @brief The internal orientation of the Layout.
+  * @details Name "orientation",type(@ref Dali::Toolkit::ControlOrientation::Type),Property::INTEGER
+  * @note Optional.
+  * @note If not supplied, the default is ControlOrientation::Up, The contents of control are in a vertical layout, from top to bottom.
+  */
+  ORIENTATION,
+
+  /**
+  * @brief The number of columns in the GridLayout.
+  * @details Name "gridColumnNumber",Property::INTEGER.
+  * @note Optional.
+  * @note If not supplied, the default is 4.
+  */
+  GRID_COLUMN_NUMBER,
+
+  /**
+  * @brief The spacing between rows in the GridLayout.
+  * @details Name "gridRowSpacing",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 20.0f.
+  */
+  GRID_ROW_SPACING,
+
+  /**
+  * @brief The spacing between columns in the GridLayout.
+  * @details Name "gridColumnSpacing",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 20.0f.
+  */
+  GRID_COLUMN_SPACING,
+
+  /**
+  * @brief The margin in the top of the GridLayout.
+  * @details Name "gridTopMargin",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 95.0f.
+  */
+  GRID_TOP_MARGIN,
+
+  /**
+  * @brief The margin in the bottom of the GridLayout.
+  * @details Name "gridBottomMargin",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 20.0f.
+  */
+  GRID_BOTTOM_MARGIN,
+
+  /**
+  * @brief The margin in the left and right of the GridLayout.
+  * @details Name "gridSideMargin",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 20.0f.
+  */
+  GRID_SIDE_MARGIN,
+
+  /**
+  * @brief The factor used to customise the scroll speed while dragging and swiping the GridLayout.
+  * @details Name "gridScrollSpeedFactor",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 0.03f.
+  */
+  GRID_SCROLL_SPEED_FACTOR,
+
+  /**
+  * @brief The maximum swipe speed in pixels per second of GridLayout.
+  * @details Name "gridMaximumSwipSpeed",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 100.0f.
+  */
+  GRID_MAXIMUM_SWIPE_SPEED,
+
+  /**
+  * @brief The duration of the flick animation in seconds of GridLayout.
+  * @details Name "gridItemFlickAnimationDuration",Property::FLOAT
+  * @note Optional.
+  * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
+  * @note Must be greater than zero;If not supplied, the default is 0.015f.
+  */
+  GRID_ITEM_FLICK_ANIMATION_DURATION,
+
+  /**
+  * @brief The number of columns in the DepthLayout.
+  * @details Name "depthColumnNumber",Property::INTEGER
+  * @note Optional.
+  * @note If not supplied, the default is 3.
+  */
+  DEPTH_COLUMN_NUMBER,
+
+  /**
+  * @brief The number of rows in the DepthLayout.
+  * @details Name "depthRowNumber",Property::INTEGER
+  * @note Optional.
+  * @note If not supplied, the default is 26.
+  */
+  DEPTH_ROW_NUMBER,
+
+  /**
+  * @brief The spacing between rows in the DepthLayout.
+  * @details Name "depthRowSpacing",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 55.0f.
+  */
+  DEPTH_ROW_SPACING,
+
+  /**
+  * @brief The factor used to customise the scroll speed while dragging and swiping the  DepthLayout.
+  * @details Name "depthScrollSpeedFactor",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 0.02f.
+  */
+  DEPTH_SCROLL_SPEED_FACTOR,
+
+  /**
+  * @brief The maximumSwipSpeed of the DepthLayout.
+  * @details Name "depthMaximumSwipSpeed",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 50.0f.
+  */
+  DEPTH_MAXIMUM_SWIPE_SPEED,
+
+  /**
+  * @brief The duration of the flick animation in seconds of DepthLayout.
+  * @details Name "depthItemFlickAnimationDuration",Property::FLOAT
+  * @note Optional.
+  * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
+  * @note Must be greater than zero; If not supplied, the default is 0.03f.
+  */
+  DEPTH_ITEM_FLICK_ANIMATION_DURATION,
+
+  /**
+  * @brief The tilt angle of DepthLayout.
+  * @details Name "depthTiltAngle",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is (Math::PI)*0.15f.
+  * @note This is clamped between -45 & 45 degrees.
+  */
+  DEPTH_TILT_ANGLE,
+
+  /**
+  * @brief The tilt angle of the individual items in the DepthLayout.
+  * @details Name "depthItemTiltAngle",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is -(Math::PI)*0.025f.
+  */
+  DEPTH_ITEM_TILT_ANGLE,
+
+  /**
+  * @brief The spacing angle between items in the SpiralLayout.
+  * @details Name "spiralItemSpacing",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 9.5f.
+  */
+  SPIRAL_ITEM_SPACING,
+
+  /**
+  * @brief The factor used to customise the scroll speed while dragging and swiping the SpiralLayout.
+  * @details Name "spiralScrollSpeedFactor",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 0.01f.
+  */
+  SPIRAL_SCROLL_SPEED_FACTOR,
+
+  /**
+  * @brief The maximum swipe speed in pixels per second of the SpiralLayout.
+  * @details Name "spiralMaximumSwipSpeed",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 30.0f.
+  */
+  SPIRAL_MAXIMUM_SWIPE_SPEED,
+
+  /**
+  * @brief The duration of the flick animation in seconds of the SpiralLayout.
+  * @details Name "spiralItemFlickAnimationDuration",Property::FLOAT
+  * @note Optional.
+  * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
+  * @note Must be greater than zero; If not supplied, the default is 0.1f.
+  */
+  SPIRAL_ITEM_FLICK_ANIMATION_DURATION,
+
+  /**
+  * @brief The vertical distance for one revolution of the SpiralLayout.
+  * @details Name "spiralRevolutionDistance",Property::FLOAT
+  * @note Optional.
+  * @note If not supplied, the default is 190.0f.
+  */
+  SPIRAL_REVOLUTION_DISTANCE,
+
+  /**
+  * @brief The alignment of the top-item, when at the beginning of the SpiralLayout.
+  * @details Name "spiralTopItemAlignment",Property::FLOAT
+  * @note Optional.
+  * @note When at the beginning of the spiral (with a first-item layout-position of zero).A value of 0 indicates that the top-item is centered in the middle of the layout.
+  * A value of -0.5 or 0.5 indicates that the top-item is centred at the top or bottom of the layout respectively.
+  * @note If not supplied, the default is (-0.125f).
+  */
+  SPIRAL_TOP_ITEM_ALIGNMENT,
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+}
+
+#endif // DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H
+
diff --git a/dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h b/dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h
new file mode 100644 (file)
index 0000000..50168ea
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
+#define DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelItemView
+{
+
+namespace Property
+{
+
+enum
+{
+  // Event side properties
+  MINIMUM_SWIPE_SPEED          = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_SPEED,
+  MINIMUM_SWIPE_DISTANCE       = Dali::Toolkit::ItemView::Property::MINIMUM_SWIPE_DISTANCE,
+  WHEEL_SCROLL_DISTANCE_STEP   = Dali::Toolkit::ItemView::Property::WHEEL_SCROLL_DISTANCE_STEP,
+  SNAP_TO_ITEM_ENABLED         = Dali::Toolkit::ItemView::Property::SNAP_TO_ITEM_ENABLED,
+  REFRESH_INTERVAL             = Dali::Toolkit::ItemView::Property::REFRESH_INTERVAL,
+
+  /**
+   * @brief The layout used.
+   * @details Name "layout", type Property::ARRAY
+   * @see SetLayout()
+   */
+  LAYOUT                       = REFRESH_INTERVAL + 1,
+
+  // Animatable properties
+  LAYOUT_POSITION              = Dali::Toolkit::ItemView::Property::LAYOUT_POSITION,
+  SCROLL_SPEED                 = Dali::Toolkit::ItemView::Property::SCROLL_SPEED,
+  OVERSHOOT                    = Dali::Toolkit::ItemView::Property::OVERSHOOT,
+  SCROLL_DIRECTION             = Dali::Toolkit::ItemView::Property::SCROLL_DIRECTION,
+  LAYOUT_ORIENTATION           = Dali::Toolkit::ItemView::Property::LAYOUT_ORIENTATION,
+  SCROLL_CONTENT_SIZE          = Dali::Toolkit::ItemView::Property::SCROLL_CONTENT_SIZE
+};
+
+} // namespace Property
+
+} // namespace DevelItemView
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_ITEM_VIEW_DEVEL_H
diff --git a/dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h b/dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h
new file mode 100644 (file)
index 0000000..d473cec
--- /dev/null
@@ -0,0 +1,224 @@
+#ifndef DALI_TOOLKIT_TOOLTIP_PROPERTIES_H
+#define DALI_TOOLKIT_TOOLTIP_PROPERTIES_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/property-index-ranges.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Tooltip
+{
+
+/**
+ * @brief The properties used for a Tooltip.
+ */
+namespace Property
+{
+
+enum
+{
+  /**
+   * @brief The content to display.
+   * @details Name "content", type Property::STRING, Property::MAP or Property::ARRAY.
+   *          If Property::STRING is used, then the string is shown as a text and the default font style for a Tooltip will be used.
+   *          This can be overridden by passing in a Property::MAP of TextVisual properties. For text styling purposes, a Property::MAP excluding the TEXT property can be sent.
+   *          If a different Visual is required, then a Property::MAP defining that visual can be set.
+   *          If more than one visual is required, then a Property::ARRAY can be used. The contents are added to the layout as per their order in the array. Text has to be styled in the visual passed in (default toolkit style will not be used).
+   * @note Mandatory.
+   * @note If set using Property::STRING, then when retrieved, a Property::MAP is returned.
+   *       If set using a Property::MAP or Property::ARRAY, then the appropriate type is returned.
+   * @see Toolkit::TextVisual
+   */
+  CONTENT = CORE_PROPERTY_MAX_INDEX + 1,
+
+  /**
+   * @brief The layout of the content.
+   * @details Name "layout", type Property::VECTOR2.
+   *          The number of rows and columns expected.
+   *          ( 1, 2 ) means 1 row, 2 columns so the content will have two items placed on one row.
+   *          ( 2, 2 ) means 2 rows, 2 columns so the content will have 4 items with two items placed on each row.
+   * @note Optional.
+   * @note If not provided, the default is to put all items in the same row.
+   */
+  LAYOUT,
+
+  /**
+   * @brief Time to wait in seconds before a tooltip is shown while the is movement is within the allowed threshold.
+   * @details Name "waitTime", type Property::FLOAT.
+   * @note Optional.
+   * @note If not provided, the default is 0.5 seconds.
+   */
+  WAIT_TIME,
+
+  /**
+   * @brief The background of the tooltip.
+   * @details Name "background", type Property::STRING or Property::MAP.
+   *          If Property::STRING, then the path to the image is required and it's assumed that there are no borders.
+   * @note Optional.
+   * @note If not provided, the default is taken from the stylesheet.
+   * @note When retrieved, a Property::MAP is returned.
+   * @see Tooltip::Background
+   */
+  BACKGROUND,
+
+  /**
+   * @brief The tail used by the tooltip.
+   * @details Name "tail", type Property::BOOLEAN or Property::MAP.
+   *          If Property::BOOLEAN and true, then the default visuals are used for the tail.
+   *          A Property::MAP can be used to override the visuals for the tail.
+   * @note Optional.
+   * @note The default is false, i.e. to not show a tail.
+   * @note When retrieved, a Property::MAP is returned.
+   * @note If the popup has to be moved because it goes out of bounds, then the tail is not shown regardless of whether it is set or not.
+   * @see Tooltip::Tail
+   */
+  TAIL,
+
+  /**
+   * @brief The position of the tooltip in relation to the control.
+   * @details Name "position", type Tooltip::Position::Type (Property::INTEGER) or Property::STRING.
+   * @note Optional.
+   * @note If not provided, the default is Tooltip::Position::BELOW.
+   * @note When retrieved, a Tooltip::Position::Type (Property::INTEGER) is returned.
+   */
+  POSITION,
+
+  /**
+   * @brief If Tooltip::Position::HOVER_POINT is used for the POSITION, then this is the offset the tooltip is displayed at from the hover point.
+   * @details Name "hoverPointOffset", type Property::VECTOR2.
+   * @note Optional.
+   * @note If not provided, the default is Vector2( 10.0f, 10.0f ).
+   */
+  HOVER_POINT_OFFSET,
+
+  /**
+   * @brief The movement threshold allowed before showing (or hiding a popup).
+   * @details Name "movementThreshold", type Property::INTEGER.
+   *          This value is used as the threshold to hide the popup as well if DISAPPEAR_ON_MOVEMENT is set to true.
+   * @note Optional.
+   * @note If not provided, the default is 5.
+   */
+  MOVEMENT_THRESHOLD,
+
+  /**
+   * @brief If true, the tooltip will disappear after hover movement beyond a certain distance.
+   * @details Name "disappearOnMovement", type Property::BOOLEAN.
+   * @note Optional.
+   * @note If not provided, the default is to disappear only when moving out of bounds of the control.
+   */
+  DISAPPEAR_ON_MOVEMENT,
+};
+
+} // namespace Property
+
+namespace Background
+{
+
+namespace Property
+{
+
+enum
+{
+  /**
+   * @brief The image to use as the background.
+   * @details Name "visual", type Property::STRING.
+   */
+  VISUAL,
+
+  /**
+   * @brief The size of the borders in the order: left, right, bottom, top.
+   * @details Name "border", type Property::RECTANGLE.
+   *          This is different from the nPatch border as the it will place the content within the bounds specified.
+   *          For example, there could be some round corners in the image used and we may not want the content going over the rounded corners.
+   * @note Optional.
+   * @note If not provided, then then it is assumed that the image does not have a border.
+   */
+  BORDER
+};
+
+} // namespace Property
+
+} // namespace Background
+
+/**
+ * @brief The tail used by the tooltip.
+ */
+namespace Tail
+{
+
+/**
+ * @brief The properties of the tail used by the tooltip.
+ */
+namespace Property
+{
+
+enum
+{
+  /**
+   * @brief Whether to show the tail or not.
+   * @details Name "visibility", type Property::BOOLEAN.
+   * @note Optional.
+   * @note If the popup has to be moved because it goes out of bounds, then the tail is not shown regardless of whether it is set or not.
+   */
+  VISIBILITY,
+
+  /**
+   * @brief The image used for the tail if it is above the tooltip.
+   * @details Name "aboveVisual", type Property::STRING.
+   */
+  ABOVE_VISUAL,
+
+  /**
+   * @brief The image used for the tail if it is below the tooltip.
+   * @details Name "belowVisual", type Property::STRING.
+   */
+  BELOW_VISUAL
+};
+
+} // namespace Property
+
+} // namespace Tail
+
+namespace Position
+{
+
+/**
+ * @brief The position of the tooltip in relation to the control.
+ */
+enum Type
+{
+  ABOVE, ///< The tooltip will appear above the control.
+  BELOW, ///< The tooltip will appear below the control.
+  HOVER_POINT ///< The tooltip will appear near the hover point.
+};
+
+} // namespace Position
+
+} // namespace Tooltip
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TOOLTIP_PROPERTIES_H
index 566949b..a67e25b 100644 (file)
@@ -42,6 +42,7 @@ devel_api_header_files = \
 
 devel_api_controls_header_files = \
   $(devel_api_src_dir)/controls/control-depth-index-ranges.h \
+  $(devel_api_src_dir)/controls/control-devel.h \
   $(devel_api_src_dir)/controls/control-wrapper.h \
   $(devel_api_src_dir)/controls/control-wrapper-impl.h
 
@@ -62,6 +63,10 @@ devel_api_builder_header_files = \
 devel_api_effects_view_header_files = \
   $(devel_api_src_dir)/controls/effects-view/effects-view.h
 
+devel_api_item_view_header_files = \
+  $(devel_api_src_dir)/controls/scrollable/item-view/default-item-layout-property.h \
+  $(devel_api_src_dir)/controls/scrollable/item-view/item-view-devel.h
+
 devel_api_magnifier_header_files = \
   $(devel_api_src_dir)/controls/magnifier/magnifier.h
 
@@ -122,6 +127,9 @@ devel_api_text_controls_header_files = \
 devel_api_tool_bar_header_files = \
   $(devel_api_src_dir)/controls/tool-bar/tool-bar.h
 
+devel_api_tooltip_header_files = \
+  $(devel_api_src_dir)/controls/tooltip/tooltip-properties.h
+
 devel_api_transition_effects_header_files = \
   $(devel_api_src_dir)/transition-effects/cube-transition-effect.h \
   $(devel_api_src_dir)/transition-effects/cube-transition-cross-effect.h \
old mode 100644 (file)
new mode 100755 (executable)
index d765df1..3b53bac
@@ -25,6 +25,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -445,6 +446,11 @@ Degree DepthLayout::GetScrollDirection() const
 
 void DepthLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
+
+  if(HasLayoutChanged())
+  {
+    SetDepthLayoutProperties(GetLayoutProperties());
+  }
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
   if( itemView )
   {
@@ -499,6 +505,63 @@ void DepthLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector
   }
 }
 
+void DepthLayout::SetDepthLayoutProperties(const Property::Map& properties)
+{
+  // Set any properties specified for DepthLayout.
+  for( unsigned int idx = 0, mapCount = properties.Count(); idx < mapCount; ++idx )
+  {
+    KeyValuePair propertyPair = properties.GetKeyValue( idx );
+    switch(DefaultItemLayoutProperty::Property(propertyPair.first.indexKey))
+    {
+      case DefaultItemLayoutProperty::DEPTH_COLUMN_NUMBER:
+      {
+        SetNumberOfColumns(propertyPair.second.Get<int>());
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_ROW_NUMBER:
+      {
+        SetNumberOfRows(propertyPair.second.Get<int>());
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_ROW_SPACING:
+      {
+        SetRowSpacing(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_MAXIMUM_SWIPE_SPEED:
+      {
+        SetMaximumSwipeSpeed(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_SCROLL_SPEED_FACTOR:
+      {
+        SetScrollSpeedFactor(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_TILT_ANGLE:
+      {
+        SetTiltAngle(Degree(Radian(propertyPair.second.Get<float>())));
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_ITEM_TILT_ANGLE:
+      {
+        SetItemTiltAngle(Degree(Radian(propertyPair.second.Get<float>())));
+        break;
+      }
+      case DefaultItemLayoutProperty::DEPTH_ITEM_FLICK_ANIMATION_DURATION:
+      {
+        SetItemFlickAnimationDuration(propertyPair.second.Get<float>());
+        break;
+      }
+      default:
+      {
+        break;
+      }
+    }
+  }
+  ResetLayoutChangedFlag();
+}
+
 Vector3 DepthLayout::GetItemPosition( int itemID, float currentLayoutPosition, const Vector3& layoutSize ) const
 {
   Vector3 itemPosition = Vector3::ZERO;
old mode 100644 (file)
new mode 100755 (executable)
index 6ce8c73..a59b7fe
@@ -21,6 +21,8 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 
+
+
 namespace Dali
 {
 
@@ -52,6 +54,12 @@ public:
   virtual ~DepthLayout();
 
   /**
+   * Apply depth layout Properties.
+   * @param[in] properties The properties of the layout.
+   */
+  void SetDepthLayoutProperties(const Property::Map& properties);
+
+  /**
    * Set the number of columns in the layout.
    * @param[in] columns The number of columns.
    */
old mode 100644 (file)
new mode 100755 (executable)
index e6cdf3f..e002245
@@ -25,6 +25,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -533,6 +534,10 @@ Degree GridLayout::GetScrollDirection() const
 
 void GridLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
+  if(HasLayoutChanged())
+  {
+    SetGridLayoutProperties(GetLayoutProperties());
+  }
   // This just implements the default behaviour of constraint application.
   // Custom layouts can override this function to apply their custom constraints.
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
@@ -621,6 +626,68 @@ void GridLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3
   }
 }
 
+void GridLayout::SetGridLayoutProperties(const Property::Map& properties)
+{
+  // Set any properties specified for gridLayout.
+  for( unsigned int idx = 0, mapCount = properties.Count(); idx < mapCount; ++idx )
+  {
+    KeyValuePair propertyPair = properties.GetKeyValue( idx );
+    switch(DefaultItemLayoutProperty::Property(propertyPair.first.indexKey))
+    {
+      case DefaultItemLayoutProperty::GRID_COLUMN_NUMBER:
+      {
+        SetNumberOfColumns(propertyPair.second.Get<int>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_ROW_SPACING:
+      {
+        SetRowSpacing(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_COLUMN_SPACING:
+      {
+        SetColumnSpacing(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_TOP_MARGIN:
+      {
+        SetTopMargin(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_BOTTOM_MARGIN:
+      {
+        SetBottomMargin(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_SIDE_MARGIN:
+      {
+        SetSideMargin(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_SCROLL_SPEED_FACTOR:
+      {
+        SetScrollSpeedFactor(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_MAXIMUM_SWIPE_SPEED:
+      {
+        SetMaximumSwipeSpeed(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::GRID_ITEM_FLICK_ANIMATION_DURATION:
+      {
+        SetItemFlickAnimationDuration(propertyPair.second.Get<float>());
+        break;
+      }
+      default:
+      {
+        break;
+      }
+    }
+  }
+  ResetLayoutChangedFlag();
+}
+
 Vector3 GridLayout::GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const
 {
   Vector3 itemPosition = Vector3::ZERO;
old mode 100644 (file)
new mode 100755 (executable)
index 7476822..13e68bc
@@ -22,6 +22,9 @@
 
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 
+#include <dali/public-api/common/dali-common.h>
+
+
 namespace Dali
 {
 
@@ -53,6 +56,12 @@ public:
   virtual ~GridLayout();
 
   /**
+   * Apply grid layout Properties.
+   * @param[in] properties The properties of the layout.
+   */
+  void SetGridLayoutProperties(const Property::Map& properties);
+
+  /**
    * @brief Set the number of columns in the layout.
    *
    * @param[in] columns The number of columns.
old mode 100644 (file)
new mode 100755 (executable)
index ca658b9..7770147
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +21,8 @@
 // EXTERNAL INCLUDES
 #include <cstring> // for strcmp
 #include <algorithm>
+#include <dali/public-api/actors/layer.h>
+
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/devel-api/common/set-wrapper.h>
 #include <dali/public-api/events/touch-data.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
+#include <dali/devel-api/object/property-helper-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
+#include <dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h>
+#include <dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h>
+#include <dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h>
 #include <dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h>
 
 using std::string;
@@ -250,6 +259,8 @@ DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "minimumSwipeDistance",       FLO
 DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "wheelScrollDistanceStep",    FLOAT,     WHEEL_SCROLL_DISTANCE_STEP   )
 DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "snapToItemEnabled",          BOOLEAN,   SNAP_TO_ITEM_ENABLED         )
 DALI_PROPERTY_REGISTRATION( Toolkit, ItemView, "refreshInterval",            FLOAT,     REFRESH_INTERVAL             )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, ItemView, "layout",               ARRAY,     LAYOUT                       )
+
 
 DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ItemView, "layoutPosition",      FLOAT,    LAYOUT_POSITION)
 DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ItemView, "scrollSpeed",         FLOAT,    SCROLL_SPEED)
@@ -407,11 +418,11 @@ void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSiz
     // Remove constraints from previous layout
     actor.RemoveConstraints();
 
+    mActiveLayout->ApplyConstraints(actor, itemId, targetSize, Self() );
+
     Vector3 size;
     mActiveLayout->GetItemSize( itemId, targetSize, size );
     actor.SetSize( size.GetVectorXY() );
-
-    mActiveLayout->ApplyConstraints(actor, itemId, targetSize, Self() );
   }
 
   // Refresh the new layout
@@ -1732,6 +1743,90 @@ void ItemView::SetProperty( BaseObject* object, Property::Index index, const Pro
         itemViewImpl.SetRefreshInterval( value.Get<float>() );
         break;
       }
+      case Toolkit::DevelItemView::Property::LAYOUT:
+      {
+        // Get a Property::Array from the property if possible.
+        Property::Array layoutArray;
+        if( value.Get( layoutArray ) )
+        {
+          itemViewImpl.SetLayoutArray( layoutArray );
+        }
+        break;
+      }
+    }
+  }
+}
+
+Property::Array ItemView::GetLayoutArray()
+{
+  return mlayoutArray;
+}
+
+void ItemView::SetLayoutArray( const Property::Array& layouts )
+{
+  mlayoutArray = layouts;
+  const int layoutCount = GetLayoutCount();
+  if( layoutCount > 0 )
+  {
+    for(int index = layoutCount - 1; index >= 0; --index)
+    {
+      RemoveLayout(index);
+      if(index == 0) break;
+    }
+  }
+
+  for( unsigned int arrayIdx = 0, arrayCount = layouts.Count(); arrayIdx < arrayCount; ++arrayIdx )
+  {
+    const Property::Value& element = layouts.GetElementAt( arrayIdx );
+
+    Property::Map* layout = element.GetMap();
+    if( layout != NULL )
+    {
+      for( unsigned int mapIdx = 0, mapCount = (*layout).Count(); mapIdx < mapCount; ++mapIdx )
+      {
+        KeyValuePair propertyPair( (*layout).GetKeyValue( mapIdx ) );
+
+        if(propertyPair.first == DefaultItemLayoutProperty::TYPE)
+        {
+          int layoutType = propertyPair.second.Get<int>();
+          if(layoutType <= DefaultItemLayout::SPIRAL && layoutType >= DefaultItemLayout::DEPTH)
+          {
+            //DEPTH, GRID, LIST, SPIRAL
+            switch(DefaultItemLayout::Type(layoutType))
+            {
+              case DefaultItemLayout::DEPTH:
+              {
+                Internal::DepthLayoutPtr depthLayout = Internal::DepthLayout::New();
+                (*depthLayout).SetLayoutProperties(*layout);
+                AddLayout(*depthLayout);
+                break;
+              }
+              case DefaultItemLayout::GRID:
+              {
+                Internal::GridLayoutPtr gridLayout = Internal::GridLayout::New();
+                (*gridLayout).SetLayoutProperties(*layout);
+                AddLayout(*gridLayout);
+                break;
+              }
+              case DefaultItemLayout::LIST:
+              {
+                Internal::GridLayoutPtr listLayout = Internal::GridLayout::New();
+                listLayout->SetNumberOfColumns( 1 );
+                (*listLayout).SetLayoutProperties(*layout);
+                AddLayout(*listLayout);
+                break;
+              }
+              case DefaultItemLayout::SPIRAL:
+              {
+                Internal::SpiralLayoutPtr spiralLayout = Internal::SpiralLayout::New();
+                (*spiralLayout).SetLayoutProperties(*layout);
+                AddLayout(*spiralLayout);
+                break;
+              }
+            }
+          }
+        }
+      }
     }
   }
 }
@@ -1772,6 +1867,13 @@ Property::Value ItemView::GetProperty( BaseObject* object, Property::Index index
         value = itemViewImpl.GetRefreshInterval();
         break;
       }
+      case Toolkit::DevelItemView::Property::LAYOUT:
+      {
+        Property::Array layouts= itemViewImpl.GetLayoutArray();
+        value = layouts;
+        break;
+      }
+
     }
   }
 
old mode 100644 (file)
new mode 100755 (executable)
index 6ed616d..f49ee81
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/property-notification.h>
 #include <dali/devel-api/common/map-wrapper.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/object/property-array.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
 
@@ -344,6 +347,18 @@ public:
 private:
 
   /**
+   * Get all the layouts used in the ItemView.
+   * @return The layout array
+   */
+  Property::Array GetLayoutArray();
+
+  /**
+   * Set all the layouts. that will be used in the ItemView.
+   * @param[in] layouts The layouts used in the itemView.
+   */
+  void SetLayoutArray( const Property::Array& layouts );
+
+  /**
    * Remove an Actor if found in the ItemPool.
    * @param[in] itemId The item to remove.
    * @return True if the remaining actors were reordered.
@@ -592,6 +607,8 @@ private:
   typedef ItemPool::iterator            ItemPoolIter;
   typedef ItemPool::const_iterator      ConstItemPoolIter;
 
+  Property::Array mlayoutArray;
+
   ItemPool mItemPool;
   ItemFactory& mItemFactory;
   std::vector< ItemLayoutPtr > mLayouts;            ///< Container of Dali::Toolkit::ItemLayout objects
old mode 100644 (file)
new mode 100755 (executable)
index 83d2a1f..9e8db62
@@ -25,6 +25,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -424,6 +425,11 @@ Degree SpiralLayout::GetScrollDirection() const
 
 void SpiralLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
+
+  if(HasLayoutChanged())
+  {
+    SetSpiralLayoutProperties(GetLayoutProperties());
+  }
   // This just implements the default behaviour of constraint application.
   // Custom layouts can override this function to apply their custom constraints.
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
@@ -498,6 +504,53 @@ void SpiralLayout::ApplyConstraints( Actor& actor, const int itemId, const Vecto
   }
 }
 
+void SpiralLayout::SetSpiralLayoutProperties(const Property::Map& properties)
+{
+  // Set any properties specified for SpiralLayout.
+  for( unsigned int idx = 0, mapCount = properties.Count(); idx < mapCount; ++idx )
+  {
+    KeyValuePair propertyPair = properties.GetKeyValue( idx );
+    switch(DefaultItemLayoutProperty::Property(propertyPair.first.indexKey))
+    {
+      case DefaultItemLayoutProperty::SPIRAL_ITEM_SPACING:
+      {
+        SetItemSpacing(Radian(propertyPair.second.Get<float>()));
+        break;
+      }
+      case DefaultItemLayoutProperty::SPIRAL_MAXIMUM_SWIPE_SPEED:
+      {
+        SetMaximumSwipeSpeed(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::SPIRAL_TOP_ITEM_ALIGNMENT:
+      {
+        SetTopItemAlignment(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::SPIRAL_SCROLL_SPEED_FACTOR:
+      {
+        SetScrollSpeedFactor(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::SPIRAL_REVOLUTION_DISTANCE:
+      {
+        SetRevolutionDistance(propertyPair.second.Get<float>());
+        break;
+      }
+      case DefaultItemLayoutProperty::SPIRAL_ITEM_FLICK_ANIMATION_DURATION:
+      {
+        SetItemFlickAnimationDuration(propertyPair.second.Get<float>());
+        break;
+      }
+      default:
+      {
+        break;
+      }
+    }
+  }
+  ResetLayoutChangedFlag();
+}
+
 Vector3 SpiralLayout::GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const
 {
   Vector3 itemPosition = Vector3::ZERO;
@@ -517,7 +570,7 @@ Vector3 SpiralLayout::GetItemPosition(int itemID, float currentLayoutPosition, c
   {
     positionConstraint.OrientationDown( itemPosition, currentLayoutPosition + itemID, layoutSize );
   }
-  else // orientation == ControlOrientation::Right
+  else //orientation == ControlOrientation::Right
   {
     positionConstraint.OrientationRight( itemPosition, currentLayoutPosition + itemID, layoutSize );
   }
old mode 100644 (file)
new mode 100755 (executable)
index 1a3e30c..29c46d5
@@ -22,6 +22,7 @@
 
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 
+
 namespace Dali
 {
 
@@ -53,6 +54,12 @@ public:
   virtual ~SpiralLayout();
 
   /**
+   * Apply spiral layout Properties.
+   * @param[in] properties The properties of the layout.
+   */
+  void SetSpiralLayoutProperties(const Property::Map& properties);
+
+  /**
    * Set spacing angle between items.
    * @param[in] itemSpacing The angle in radians.
    */
diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.cpp b/dali-toolkit/internal/controls/tooltip/tooltip.cpp
new file mode 100644 (file)
index 0000000..be1017f
--- /dev/null
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/controls/tooltip/tooltip.h>
+
+// EXTERNAL INCLUDES
+#include <cmath>
+
+#include <dali/public-api/events/hover-event.h>
+#include <dali/public-api/adaptor-framework/timer.h>
+#include <dali/public-api/common/stage.h>
+#include <dali/devel-api/scripting/enum-helper.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/table-view/table-view.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/internal/controls/popup/popup-impl.h>
+#include <dali-toolkit/internal/visuals/visual-string-constants.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+namespace
+{
+
+DALI_ENUM_TO_STRING_TABLE_BEGIN( TOOLTIP_POSITION )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Tooltip::Position, ABOVE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Tooltip::Position, BELOW )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Tooltip::Position, HOVER_POINT )
+DALI_ENUM_TO_STRING_TABLE_END( TOOLTIP_POSITION )
+
+const float MILLISECONDS_PER_SECOND = 1000.0f;
+
+const char * const PROPERTY_CONTENT_NAME              = "content";
+const char * const PROPERTY_LAYOUT_NAME               = "layout";
+const char * const PROPERTY_WAIT_TIME_NAME            = "waitTime";
+const char * const PROPERTY_BACKGROUND_NAME           = "background";
+const char * const PROPERTY_TAIL_NAME                 = "tail";
+const char * const PROPERTY_POSITION_NAME             = "position";
+const char * const PROPERTY_HOVER_POINT_OFFSET_NAME   = "hoverPointOffset";
+const char * const PROPERTY_MOVEMENT_THRESHOLD        = "movementThreshold";
+const char * const PROPERTY_DISAPPEAR_ON_MOVEMENT     = "disappearOnMovement";
+
+const char * const PROPERTY_BACKGROUND_VISUAL         = "visual";
+const char * const PROPERTY_BACKGROUND_BORDER         = "border";
+
+const char * const PROPERTY_TAIL_VISIBILITY           = "visibility";
+const char * const PROPERTY_TAIL_ABOVE_VISUAL         = "aboveVisual";
+const char * const PROPERTY_TAIL_BELOW_VISUAL         = "belowVisual";
+
+} // unnamed namespace
+
+TooltipPtr Tooltip::New( Toolkit::Control control )
+{
+  return new Tooltip( control );
+}
+
+void Tooltip::SetProperties( const Property::Value& value )
+{
+  Toolkit::Control control = mControl.GetHandle();
+  if( control )
+  {
+    Property::Map* properties = value.GetMap();
+    if( properties )
+    {
+      const Property::Map::SizeType count = properties->Count();
+      for( Property::Map::SizeType position = 0; position < count; ++position )
+      {
+        KeyValuePair keyValue = properties->GetKeyValue( position );
+        Property::Key& key = keyValue.first;
+        Property::Value& value = keyValue.second;
+
+        if( key == Toolkit::Tooltip::Property::CONTENT || key == PROPERTY_CONTENT_NAME )
+        {
+          SetContent( control, value );
+        }
+        else if( key == Toolkit::Tooltip::Property::LAYOUT || key == PROPERTY_LAYOUT_NAME )
+        {
+          value.Get( mLayout );
+        }
+        else if( key == Toolkit::Tooltip::Property::WAIT_TIME || key == PROPERTY_WAIT_TIME_NAME )
+        {
+          float waitTime = 0.0f;
+          if( value.Get( waitTime ) )
+          {
+            mWaitTime = waitTime * MILLISECONDS_PER_SECOND;
+          }
+        }
+        else if( key == Toolkit::Tooltip::Property::BACKGROUND || key == PROPERTY_BACKGROUND_NAME )
+        {
+          SetBackground( value );
+        }
+        else if( key == Toolkit::Tooltip::Property::TAIL || key == PROPERTY_TAIL_NAME )
+        {
+          SetTail( value );
+        }
+        else if( key == Toolkit::Tooltip::Property::POSITION || key == PROPERTY_POSITION_NAME )
+        {
+          Scripting::GetEnumerationProperty< Toolkit::Tooltip::Position::Type >( value, TOOLTIP_POSITION_TABLE, TOOLTIP_POSITION_TABLE_COUNT, mPositionType );
+        }
+        else if( key == Toolkit::Tooltip::Property::HOVER_POINT_OFFSET || key == PROPERTY_HOVER_POINT_OFFSET_NAME )
+        {
+          value.Get( mHoverPointOffset );
+        }
+        else if( key == Toolkit::Tooltip::Property::MOVEMENT_THRESHOLD || key == PROPERTY_MOVEMENT_THRESHOLD )
+        {
+          value.Get( mMovementThreshold );
+        }
+        else if( key == Toolkit::Tooltip::Property::DISAPPEAR_ON_MOVEMENT || key == PROPERTY_DISAPPEAR_ON_MOVEMENT )
+        {
+          value.Get( mDisappearOnMovement );
+        }
+      }
+    }
+    else
+    {
+      Property::Type type = value.GetType();
+      if( ( value.GetType() == Property::STRING ) || ( type == Property::ARRAY ) )
+      {
+        SetContent( control, value );
+      }
+    }
+  }
+}
+
+void Tooltip::CreatePropertyMap( Property::Map& map ) const
+{
+  if( ! mContentTextVisual.Empty() )
+  {
+    Property::Map content = mContentTextVisual; // Need this copy as there's no Value constructor which takes in a 'const Property::Map&'.
+    map.Insert( Toolkit::Tooltip::Property::CONTENT, content );
+  }
+  else if( ! mContentArray.Empty() )
+  {
+    Property::Array content = mContentArray; // Need this copy as there's no Value constructor which takes in a 'const Property::Array&'.
+    map.Insert( Toolkit::Tooltip::Property::CONTENT, content );
+  }
+
+  map.Insert( Toolkit::Tooltip::Property::LAYOUT, mLayout );
+  map.Insert( Toolkit::Tooltip::Property::WAIT_TIME, static_cast<float>( mWaitTime ) / MILLISECONDS_PER_SECOND );
+  map.Insert( Toolkit::Tooltip::Property::BACKGROUND,
+              Property::Map().Add( Toolkit::Tooltip::Background::Property::VISUAL, mBackgroundImage )
+                             .Add( Toolkit::Tooltip::Background::Property::BORDER, mBackgroundBorder ) );
+  map.Insert( Toolkit::Tooltip::Property::TAIL,
+              Property::Map().Add( Toolkit::Tooltip::Tail::Property::VISIBILITY, mTailVisibility )
+                             .Add( Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL, mTailImages[ Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL ])
+                             .Add( Toolkit::Tooltip::Tail::Property::BELOW_VISUAL, mTailImages[ Toolkit::Tooltip::Tail::Property::BELOW_VISUAL ]) );
+  map.Insert( Toolkit::Tooltip::Property::POSITION, mPositionType );
+  map.Insert( Toolkit::Tooltip::Property::HOVER_POINT_OFFSET, mHoverPointOffset );
+  map.Insert( Toolkit::Tooltip::Property::MOVEMENT_THRESHOLD, mMovementThreshold );
+  map.Insert( Toolkit::Tooltip::Property::DISAPPEAR_ON_MOVEMENT, mDisappearOnMovement );
+}
+
+Tooltip::Tooltip( Toolkit::Control control )
+: mPopup(),
+  mTooltipTimer(),
+  mControl( control ),
+  mContentTextVisual(),
+  mTailImages(),
+  mContentArray(),
+  mBackgroundBorder( 0, 0, 0, 0 ),
+  mLayout( 1, 1 ),
+  mHoverPoint(),
+  mHoverPointOffset( 10.0f, 10.0f ),
+  mBackgroundImage(),
+  mMovementThreshold( 5.0f ),
+  mWaitTime( 500 ),
+  mPositionType( Toolkit::Tooltip::Position::ABOVE ),
+  mTailVisibility( false ),
+  mDisappearOnMovement( false ),
+  mSignalsConnected( false )
+{
+  mTailImages[ Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL ] = "";
+  mTailImages[ Toolkit::Tooltip::Tail::Property::BELOW_VISUAL ] = "";
+}
+
+Tooltip::~Tooltip()
+{
+  if( mPopup )
+  {
+    mPopup.Unparent();
+    mPopup.Reset();
+  }
+}
+
+void Tooltip::SetContent( Toolkit::Control& control, const Property::Value& value )
+{
+  // Delete popup & timer
+
+  if( mTooltipTimer )
+  {
+    mTooltipTimer.Stop();
+    mTooltipTimer.Reset();
+  }
+
+  if( mPopup )
+  {
+    mPopup.Unparent();
+    mPopup.Reset();
+  }
+
+  bool connectSignals = false;
+
+  Property::Type type = value.GetType();
+  if( type == Property::MAP )
+  {
+    Property::Map* map = value.GetMap();
+    if( map )
+    {
+      mContentTextVisual.Merge( *map );
+
+      Property::Value* typeValue = map->Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE );
+      if( typeValue )
+      {
+        // Set to an invalid value so it definitely changes if set in Scripting::GetEnumerationProperty
+        Toolkit::DevelVisual::Type visualType = static_cast< Toolkit::DevelVisual::Type >( -1 );
+
+        if( Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, visualType ) )
+        {
+          if( visualType == Toolkit::DevelVisual::TEXT )
+          {
+            // Visual Type is text, ensure we have a the TEXT property set before we connect to the signals.
+
+            if( map->Find( Toolkit::TextVisual::Property::TEXT, TEXT_PROPERTY ) )
+            {
+              mContentArray.Clear();
+              connectSignals = true;
+            }
+          }
+          else
+          {
+            // Visual Type is not text, so connect to the signals as we're displaying a non text visual.
+
+            mContentArray.Clear();
+            connectSignals = true;
+          }
+        }
+      }
+    }
+  }
+  else if( type == Property::ARRAY )
+  {
+    if( value.Get( mContentArray ) )
+    {
+      mContentTextVisual.Clear();
+      connectSignals = true;
+    }
+  }
+  else if( type == Property::STRING )
+  {
+    std::string text;
+    if( value.Get( text ) )
+    {
+      mContentTextVisual[ Toolkit::TextVisual::Property::TEXT ] = text;
+      mContentTextVisual[ Toolkit::Visual::Property::TYPE ] = DevelVisual::TEXT;
+      mContentArray.Clear();
+      connectSignals = true;
+    }
+  }
+
+  if( connectSignals && ! mSignalsConnected )
+  {
+    control.HoveredSignal().Connect( this, &Tooltip::OnHovered );
+    control.SetLeaveRequired( true );
+    mSignalsConnected = true;
+  }
+}
+
+void Tooltip::SetBackground( const Property::Value& value )
+{
+  Property::Type type = value.GetType();
+
+  if( type == Property::STRING )
+  {
+    value.Get( mBackgroundImage );
+    mBackgroundBorder.Set( 0, 0, 0, 0 );
+  }
+  else if( type == Property::MAP )
+  {
+    Property::Map* map = value.GetMap();
+    if( map )
+    {
+      const Property::Map::SizeType count = map->Count();
+      for( Property::Map::SizeType position = 0; position < count; ++position )
+      {
+        KeyValuePair keyValue = map->GetKeyValue( position );
+        Property::Key& key = keyValue.first;
+        Property::Value& value = keyValue.second;
+
+        if( key == Toolkit::Tooltip::Background::Property::VISUAL || key == PROPERTY_BACKGROUND_VISUAL )
+        {
+          value.Get( mBackgroundImage );
+        }
+        else if( key == Toolkit::Tooltip::Background::Property::BORDER || key == PROPERTY_BACKGROUND_BORDER )
+        {
+          if( ! value.Get( mBackgroundBorder ) )
+          {
+            // If not a Property::RECTANGLE, then check if it's a Vector4 and set it accordingly
+            Vector4 valueVector4;
+            if( value.Get( valueVector4 ) )
+            {
+              mBackgroundBorder.left   = valueVector4.x;
+              mBackgroundBorder.right  = valueVector4.y;
+              mBackgroundBorder.bottom = valueVector4.z;
+              mBackgroundBorder.top    = valueVector4.w;
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+void Tooltip::SetTail( const Property::Value& value )
+{
+  Property::Type type = value.GetType();
+
+  if( type == Property::BOOLEAN )
+  {
+    value.Get( mTailVisibility );
+  }
+  else if( type == Property::MAP )
+  {
+    Property::Map map;
+    if( value.Get( map ) )
+    {
+      const Property::Map::SizeType count = map.Count();
+      for( Property::Map::SizeType position = 0; position < count; ++position )
+      {
+        KeyValuePair keyValue = map.GetKeyValue( position );
+        Property::Key& key = keyValue.first;
+        Property::Value& value = keyValue.second;
+
+        // Set the values manually rather than merging so that we only have to deal with Property indices when creating the actual tooltip.
+
+        if( key == Toolkit::Tooltip::Tail::Property::VISIBILITY || key == PROPERTY_TAIL_VISIBILITY )
+        {
+          value.Get( mTailVisibility );
+        }
+        else if( key == Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL || key == PROPERTY_TAIL_ABOVE_VISUAL )
+        {
+          std::string path;
+          if( value.Get( path ) )
+          {
+            mTailImages[ Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL ] = path;
+          }
+        }
+        else if( key == Toolkit::Tooltip::Tail::Property::BELOW_VISUAL || key == PROPERTY_TAIL_BELOW_VISUAL )
+        {
+          std::string path;
+          if( value.Get( path ) )
+          {
+            mTailImages[ Toolkit::Tooltip::Tail::Property::BELOW_VISUAL ] = path;
+          }
+        }
+      }
+    }
+  }
+}
+
+bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover )
+{
+  const TouchPoint::State state = hover.points[0].state;
+  switch( state )
+  {
+    case TouchPoint::Started:
+    case TouchPoint::Motion:
+    {
+      if( ! mPopup )
+      {
+        if( ! mTooltipTimer )
+        {
+          mHoverPoint = hover.points[ 0 ].screen;
+          mTooltipTimer = Timer::New( mWaitTime );
+          mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout );
+          mTooltipTimer.Start();
+        }
+        else
+        {
+          Vector2 movement = mHoverPoint - hover.points[ 0 ].screen;
+          if( std::abs( movement.Length() ) > mMovementThreshold )
+          {
+            mTooltipTimer.Stop();
+            mTooltipTimer.Reset();
+
+            mHoverPoint = hover.points[ 0 ].screen;
+            mTooltipTimer = Timer::New( mWaitTime );
+            mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout );
+            mTooltipTimer.Start();
+          }
+        }
+      }
+      else if( mDisappearOnMovement )
+      {
+        // Popup is showing, and we're set to disappear on excessive movement so make sure we're still within the threshold.
+
+        Vector2 movement = mHoverPoint - hover.points[ 0 ].screen;
+        if( std::abs( movement.Length() ) > mMovementThreshold )
+        {
+          // Exceeding the threshold, hide the popup.
+
+          if( mTooltipTimer )
+          {
+            mTooltipTimer.Stop();
+            mTooltipTimer.Reset();
+          }
+          if( mPopup )
+          {
+            mPopup.Unparent();
+            mPopup.Reset();
+          }
+        }
+      }
+      break;
+    }
+    case TouchPoint::Finished:
+    case TouchPoint::Leave:
+    case TouchPoint::Interrupted:
+    {
+      if( mTooltipTimer )
+      {
+        mTooltipTimer.Stop();
+        mTooltipTimer.Reset();
+      }
+      if( mPopup )
+      {
+        mPopup.Unparent();
+        mPopup.Reset();
+      }
+      break;
+    }
+
+    case TouchPoint::Stationary:
+    case TouchPoint::Last:
+    {
+      break;
+    }
+  }
+
+  return true;
+}
+
+bool Tooltip::OnTimeout()
+{
+  Toolkit::Control control = mControl.GetHandle();
+  if( ! mPopup && control )
+  {
+    mPopup = Toolkit::Popup::New();
+
+    // General set up of popup
+    mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
+    mPopup.SetProperty( Toolkit::Popup::Property::CONTEXTUAL_MODE, "NON_CONTEXTUAL" );
+    mPopup.SetProperty( Toolkit::Popup::Property::ANIMATION_MODE, "NONE" );
+    mPopup.SetProperty( Toolkit::Popup::Property::BACKING_ENABLED, false ); // Disable the dimmed backing.
+    mPopup.SetProperty( Toolkit::Popup::Property::TOUCH_TRANSPARENT, true ); // Let events pass through the popup
+    mPopup.SetParentOrigin( ParentOrigin::TOP_LEFT );
+    mPopup.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+
+    // Background
+    mPopup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_IMAGE, mBackgroundImage );
+    mPopup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_BORDER, mBackgroundBorder );
+
+    // Tail
+    mPopup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, mTailVisibility );
+    mPopup.SetProperty( Toolkit::Popup::Property::TAIL_UP_IMAGE,   mTailImages[ Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL ] );
+    mPopup.SetProperty( Toolkit::Popup::Property::TAIL_DOWN_IMAGE, mTailImages[ Toolkit::Tooltip::Tail::Property::BELOW_VISUAL ] );
+
+    Vector3 tailPosition;
+    switch( mPositionType )
+    {
+      case Toolkit::Tooltip::Position::HOVER_POINT:
+      case Toolkit::Tooltip::Position::BELOW:
+      {
+        tailPosition = Vector3( 0.5f, 0.0f, 0.0 );
+        break;
+      }
+
+      case Toolkit::Tooltip::Position::ABOVE:
+      {
+        tailPosition = Vector3( 0.5f, 1.0f, 0.0 );
+        break;
+      }
+    }
+    mPopup.SetProperty( Toolkit::Popup::Property::TAIL_POSITION, tailPosition );
+
+    // Content
+    Actor content;
+    if( ! mContentTextVisual.Empty() )
+    {
+      content = Toolkit::Control::New();
+      content.SetProperty( Toolkit::Control::Property::BACKGROUND, mContentTextVisual );
+    }
+    else if( ! mContentArray.Empty() )
+    {
+      const unsigned int visuals = mContentArray.Size();
+      unsigned int rows = mLayout.x;
+      unsigned int columns = mLayout.y;
+      if( Equals( mLayout.x, 1.0f, Math::MACHINE_EPSILON_1 ) &&
+          Equals( mLayout.y, 1.0f, Math::MACHINE_EPSILON_1 ) &&
+          visuals > 1 )
+      {
+        rows = mLayout.x;
+        columns = visuals;
+      }
+
+      Toolkit::TableView tableView = Toolkit::TableView::New( rows, columns );
+      tableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+
+      for( unsigned int currentContent = 0, currentRow = 0; currentRow < rows && currentContent < visuals; ++currentRow )
+      {
+        tableView.SetFitHeight( currentRow );
+        for( unsigned int currentColumn = 0; currentColumn < columns && currentContent < visuals; ++currentColumn )
+        {
+          Actor child = Toolkit::Control::New();
+          child.SetProperty( Toolkit::Control::Property::BACKGROUND, mContentArray[ currentContent ] );
+
+          Toolkit::TableView::CellPosition cellPosition( currentRow, currentColumn );
+          tableView.AddChild( child, cellPosition );
+          tableView.SetCellAlignment( cellPosition, HorizontalAlignment::CENTER, VerticalAlignment::CENTER );
+          tableView.SetFitWidth( currentColumn );
+
+          ++currentContent;
+        }
+      }
+      content = tableView;
+    }
+    mPopup.SetContent( content );
+
+    // Connect to the relayout signal of the background of the popup as at that point we have the full size
+    Actor popupBackground = GetImpl( mPopup ).GetPopupBackgroundImage();
+    if( popupBackground )
+    {
+      popupBackground.OnRelayoutSignal().Connect( this, &Tooltip::OnRelayout );
+    }
+
+    mPopup.SetDisplayState( Toolkit::Popup::SHOWN );
+
+    Stage::GetCurrent().Add( mPopup );
+  }
+
+  return false;
+}
+
+void Tooltip::OnRelayout( Actor actor )
+{
+  if( mPopup && actor )
+  {
+    float popupWidth = actor.GetRelayoutSize( Dimension::WIDTH );
+    float popupHeight = actor.GetRelayoutSize( Dimension::HEIGHT );
+    float tailHeight = 0.0f;
+    Actor tail;
+
+    if( mTailVisibility )
+    {
+      // Popup's background has the tail, we want to know the tail size as well.
+      if( actor.GetChildCount() )
+      {
+        tail = actor.GetChildAt( 0 );
+        if( tail )
+        {
+          tailHeight = tail.GetRelayoutSize( Dimension::HEIGHT );
+        }
+      }
+    }
+
+    Vector2 stageSize = Stage::GetCurrent().GetSize();
+    Vector3 position;
+
+    switch( mPositionType )
+    {
+      case Toolkit::Tooltip::Position::HOVER_POINT:
+      {
+        position = mHoverPoint + mHoverPointOffset;
+        position.y += tailHeight;
+        break;
+      }
+
+      case Toolkit::Tooltip::Position::ABOVE:
+      {
+        Toolkit::Control control = mControl.GetHandle();
+        if( control )
+        {
+          Vector3 worldPos = control.GetCurrentWorldPosition();
+          float height = control.GetRelayoutSize( Dimension::HEIGHT );
+
+          position.x = stageSize.width * 0.5f + worldPos.x - popupWidth * 0.5f;
+          position.y = stageSize.height * 0.5f + worldPos.y - height * 0.5f - popupHeight * 1.0f - tailHeight;
+        }
+        break;
+      }
+
+      case Toolkit::Tooltip::Position::BELOW:
+      {
+        Toolkit::Control control = mControl.GetHandle();
+        if( control )
+        {
+          Vector3 worldPos = control.GetCurrentWorldPosition();
+          float height = control.GetRelayoutSize( Dimension::HEIGHT );
+
+          position.x = stageSize.width * 0.5f + worldPos.x - popupWidth * 0.5f;
+          position.y = stageSize.height * 0.5f + worldPos.y + height * 0.5f + tailHeight;
+        }
+        break;
+      }
+    }
+
+    // Ensure the Popup is still on the screen
+
+    if( position.x < 0.0f )
+    {
+      position.x = 0.0f;
+    }
+    else if( ( position.x + popupWidth ) > stageSize.width )
+    {
+      position.x -= position.x + popupWidth - stageSize.width;
+    }
+
+    bool yPosChanged = false;
+    if( position.y < 0.0f )
+    {
+      yPosChanged = true;
+      position.y = 0.0f;
+    }
+    else if( ( position.y + popupHeight ) > stageSize.height )
+    {
+      yPosChanged = true;
+      position.y -= position.y + popupHeight - stageSize.height;
+    }
+
+    if( yPosChanged && tail )
+    {
+      // If we change the y position, then the tail may be shown pointing to the wrong control so just hide it.
+      tail.SetVisible( false );
+    }
+
+    mPopup.SetPosition( position );
+  }
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.h b/dali-toolkit/internal/controls/tooltip/tooltip.h
new file mode 100644 (file)
index 0000000..7dae92a
--- /dev/null
@@ -0,0 +1,170 @@
+#ifndef DALI_INTERNAL_TOOLTIP_H
+#define DALI_INTERNAL_TOOLTIP_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+#include <dali/public-api/adaptor-framework/timer.h>
+#include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/object/property-array.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/object/ref-object.h>
+#include <dali/public-api/signals/connection-tracker.h>
+#include <dali/devel-api/object/weak-handle.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/control.h>
+#include <dali-toolkit/devel-api/controls/popup/popup.h>
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+class Tooltip;
+typedef IntrusivePtr< Tooltip > TooltipPtr;
+
+/**
+ * @brief Handles all the required tooltip related functionality for a control.
+ *
+ * Connects to the Hovered signal of the control.
+ * Styling is achieved by merging the properties set so that new properties override previous but existing properties are still kept.
+ */
+class Tooltip : public RefObject, public ConnectionTracker
+{
+public:
+
+  /**
+   * @brief Creates an instance of the Tooltip class.
+   * @param[in]  control  The control the tooltip should be shown on.
+   */
+  static TooltipPtr New( Toolkit::Control control );
+
+  /**
+   * @brief Sets the properties of the Tooltip.
+   * @details The properties are merged over the currently stored properties.
+   *          If a Property::STRING is passed, then the style set previously by the stylesheet is used.
+   *          If a Property::MAP then the map is merged.
+   *          If a Property::ARRAY of Visuals then all are displayed in one row.
+   * @param[in]  value  This can either be a Property::STRING, Property::MAP or Property::ARRAY.
+   */
+  void SetProperties( const Property::Value& value );
+
+  /**
+   * @brief Creates a property map of the tooltip properties.
+   * @param[out]  map  Filled with all the properties of the tooltip.
+   * @note map should be empty.
+   */
+  void CreatePropertyMap( Property::Map& map ) const;
+
+private:
+
+  /**
+   * @brief Private constructor.
+   */
+  Tooltip( Toolkit::Control control );
+
+  /**
+   * @brief Private destructor.
+   */
+  ~Tooltip();
+
+  Tooltip( const Tooltip& ); ///< Undefined
+  Tooltip& operator=( const Tooltip& ); ///< ///< Undefined
+
+  /**
+   * @brief Sets the content of the tooltip.
+   * @details Connects to the signals if there is real content to display.
+   * @param[in]  control  Is used to connect to this control's signals.
+   * @param[in]  value    The content property value.
+   */
+  void SetContent( Toolkit::Control& control, const Property::Value& value );
+
+  /**
+   * @brief Sets the background properties of the tooltip.
+   * @param[in]  value  The background property value.
+   */
+  void SetBackground( const Property::Value& value );
+
+  /**
+   * @brief Sets the tail properties of the tooltip.
+   * @param[in]  value  The tail property value.
+   */
+  void SetTail( const Property::Value& value );
+
+  /**
+   * @brief Method used to connect to the control's Hovered signal.
+   * @param[in]  hover  The hover event.
+   */
+  bool OnHovered( Actor /* actor */, const HoverEvent& hover );
+
+  /**
+   * @brief Method used to connect to the internal timer used by Tooltip.
+   * @return Always return false as we're only interested in one timeout.
+   */
+  bool OnTimeout();
+
+  /**
+   * @brief Used to know when the we're laying out the actor used to display the tooltip.
+   * @details This is required so we can appropriately position it.
+   * @param[in]  actor  The actor being laid out.
+   */
+  void OnRelayout( Actor actor );
+
+  // Data
+
+  Toolkit::Popup mPopup; ///< The Popup class is used to display the actual tooltip.
+  Timer mTooltipTimer; ///< Timer used to wait a certain length of time before we display the tooltip.
+
+  WeakHandle< Toolkit::Control > mControl; ///< A weak handle to the control we are setting the tooltip on.
+
+  Property::Map mContentTextVisual; ///< If using just one visual, then this is set.
+  Property::Map mTailImages; ///< The different images used by the tail.
+  Property::Array mContentArray; ///< If using an array of visuals, then this is used.
+
+  Rect< int > mBackgroundBorder; ///< The size of the background border in the order: left, right, bottom, top. @see Toolkit::Tooltip::Border::Property::BORDER
+
+  Vector2 mLayout; ///< The layout of the content if using an array.
+  Vector2 mHoverPoint; ///< The first point where hover starts.
+  Vector2 mHoverPointOffset; ///< The tooltip is displayed with this offset from hover point if using Toolkit::Tooltip::Position::HOVER_POINT.
+
+  std::string mBackgroundImage; ///< The path to the background image used for the tooltip.
+
+  float mMovementThreshold; ///< This is the allowable movement of the hover before the tooltip processing is cancelled.
+
+  int mWaitTime; ///< Time in milliseconds to wait before we display the tooltip.
+
+  Toolkit::Tooltip::Position::Type mPositionType; ///< The position of the tooltip.
+  bool mTailVisibility; ///< Whether we are showing a tail or not.
+  bool mDisappearOnMovement; ///< Whether the tooltip is set to disappear on movement or when we go out of the bounds of mControl.
+  bool mSignalsConnected; ///< Whether any signals required for Tooltip functionality have been connected.
+};
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_TOOLTIP_H
index a4f49d9..f003ce2 100644 (file)
@@ -79,6 +79,7 @@ toolkit_src_files = \
    $(toolkit_src_dir)/controls/text-controls/text-selection-popup-impl.cpp \
    $(toolkit_src_dir)/controls/text-controls/text-selection-toolbar-impl.cpp \
    $(toolkit_src_dir)/controls/tool-bar/tool-bar-impl.cpp \
+   $(toolkit_src_dir)/controls/tooltip/tooltip.cpp \
    $(toolkit_src_dir)/controls/video-view/video-view-impl.cpp \
    $(toolkit_src_dir)/accessibility-manager/accessibility-manager-impl.cpp \
    \
index 4212188..e02eba6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -275,7 +275,7 @@ void AtlasPacker::GrowNode( SizeType blockWidth, SizeType blockHeight )
   bool shouldGrowRight = canGrowRight && mRoot->rectArea.height >= mRoot->rectArea.width+blockWidth;
   bool shouldGrowDown = canGrowDown && mRoot->rectArea.width >= mRoot->rectArea.height+blockHeight;
 
-  if( canGrowRight && canGrowRight )
+  if( canGrowRight && canGrowDown )
   {
     shouldGrowRight = mRoot->rectArea.width+blockWidth <= mRoot->rectArea.height+blockHeight;
     shouldGrowDown = !shouldGrowRight;
index eca74df..5de3e43 100644 (file)
@@ -108,6 +108,7 @@ Model::Model()
   mScrollPosition(),
   mHorizontalAlignment( Layout::HORIZONTAL_ALIGN_BEGIN ),
   mVerticalAlignment( Layout::VERTICAL_ALIGN_TOP ),
+  mAlignmentOffset( 0.0f ),
   mElideEnabled( false )
 {
   mLogicalModel = LogicalModel::New();
index 4145bf7..2b40d32 100644 (file)
@@ -40,8 +40,7 @@ namespace Internal
 namespace
 {
 
-// Property names.
-const char * const TEXT_PROPERTY( "text" );
+// Property names - common properties defined in visual-string-constants.h/cpp
 const char * const FONT_FAMILY_PROPERTY( "fontFamily" );
 const char * const FONT_STYLE_PROPERTY( "fontStyle" );
 const char * const POINT_SIZE_PROPERTY( "pointSize" );
index 239f5c4..e829889 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
-#include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
 
 // INTERNAL INCLUDES
@@ -58,18 +57,6 @@ namespace Internal
 namespace
 {
 
-DALI_ENUM_TO_STRING_TABLE_BEGIN( VISUAL_TYPE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, BORDER )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, COLOR )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, GRADIENT )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, IMAGE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, MESH )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, PRIMITIVE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, TEXT )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, WIREFRAME )
-DALI_ENUM_TO_STRING_TABLE_END( VISUAL_TYPE )
-
-const char * const VISUAL_TYPE( "visualType" );
 const char * const BATCHING_ENABLED( "batchingEnabled" );
 BaseHandle Create()
 {
index a854aba..9126fce 100644 (file)
 // CLASS HEADER
 #include "visual-string-constants.h"
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+
 namespace Dali
 {
 
@@ -27,6 +31,20 @@ namespace Toolkit
 namespace Internal
 {
 
+DALI_ENUM_TO_STRING_TABLE_BEGIN( VISUAL_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, BORDER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, COLOR )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, GRADIENT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, IMAGE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, MESH )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, PRIMITIVE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, TEXT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, WIREFRAME )
+DALI_ENUM_TO_STRING_TABLE_END( VISUAL_TYPE )
+
+// Visual Type
+const char * const VISUAL_TYPE( "visualType" );
+
 // Custom shader
 const char * const CUSTOM_SHADER( "shader" );
 const char * const CUSTOM_VERTEX_SHADER( "vertexShader" );
@@ -50,6 +68,9 @@ extern const char * const PREMULTIPLIED_ALPHA( "premultipliedAlpha" );
 const char * const IMAGE_URL_NAME( "url" );
 const char * const ATLAS_RECT_UNIFORM_NAME ( "uAtlasRect" );
 
+// Text visual
+const char * const TEXT_PROPERTY( "text" );
+
 } // namespace Internal
 
 } // namespace Toolkit
index 655a9a2..c6692c0 100644 (file)
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/scripting/enum-helper.h>
+
 namespace Dali
 {
 
@@ -27,6 +30,11 @@ namespace Toolkit
 namespace Internal
 {
 
+// Visual type
+extern const char * const VISUAL_TYPE;
+extern const Dali::Scripting::StringEnum VISUAL_TYPE_TABLE[];
+extern const unsigned int VISUAL_TYPE_TABLE_COUNT;
+
 // Custom shader
 extern const char * const CUSTOM_SHADER;
 extern const char * const CUSTOM_VERTEX_SHADER;
@@ -50,6 +58,9 @@ extern const char * const PREMULTIPLIED_ALPHA;
 extern const char * const IMAGE_URL_NAME;
 extern const char * const ATLAS_RECT_UNIFORM_NAME;
 
+// Text visual
+extern const char * const TEXT_PROPERTY;
+
 } // namespace Internal
 
 } // namespace Toolkit
diff --git a/dali-toolkit/po/as.po b/dali-toolkit/po/as.po
new file mode 100644 (file)
index 0000000..2e29597
--- /dev/null
@@ -0,0 +1,17 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "সকলো চয়ন কৰক"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "প্ৰতিলিপি"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "চয়ন কৰক"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "কাটক"
+msgid "IDS_COM_BODY_PASTE"
+msgstr "লেপন কৰক"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ক্লিপব'ৰ্ড"
+
diff --git a/dali-toolkit/po/be_BY.po b/dali-toolkit/po/be_BY.po
new file mode 100644 (file)
index 0000000..744e328
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Вылучыць усё"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Скапіраваць"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Выразаць"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Буфер абмену"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Выбраць"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Уставіць"
+
diff --git a/dali-toolkit/po/bn.po b/dali-toolkit/po/bn.po
new file mode 100644 (file)
index 0000000..5a69435
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "সমস্ত নির্বাচন করুন"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "অনুলিপি করুন"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "নির্বাচন"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "কাট"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "প্রতিলেপন"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ক্লিপবোর্ড"
+
diff --git a/dali-toolkit/po/bn_BD.po b/dali-toolkit/po/bn_BD.po
new file mode 100644 (file)
index 0000000..c29c744
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "সমস্ত নির্বাচন করুন"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "কপি করুন"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "নির্বাচন"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "কাট"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "পেস্ট করুন"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ক্লিপবোর্ড"
+
diff --git a/dali-toolkit/po/fa.po b/dali-toolkit/po/fa.po
new file mode 100644 (file)
index 0000000..4996205
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "انتخاب همه"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "کپی"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "انتخاب"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "برش"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "الحاق"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "کلیپ بورد"
+
diff --git a/dali-toolkit/po/gu.po b/dali-toolkit/po/gu.po
new file mode 100644 (file)
index 0000000..598fda3
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "બધું પસંદ કરો"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "કૉપિ કરો"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "પસંદ કરો"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "કટ કરો"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ચોંટાડો"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ક્લિપબોર્ડ"
+
diff --git a/dali-toolkit/po/id.po b/dali-toolkit/po/id.po
new file mode 100644 (file)
index 0000000..4e1aada
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Pilih semua"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Salin"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Pilih"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Memotong"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Kutip"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Papan klip"
+
diff --git a/dali-toolkit/po/km.po b/dali-toolkit/po/km.po
new file mode 100644 (file)
index 0000000..c78133b
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "ជ្រើស​ទាំង​អស់"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "ចម្លង"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ជ្រើស"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "កាត់"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "បិទ​ភ្ជាប់"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ក្ដារ​តម្បៀតខ្ទាស់"
+
diff --git a/dali-toolkit/po/kn.po b/dali-toolkit/po/kn.po
new file mode 100644 (file)
index 0000000..b169d33
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "ಎಲ್ಲಾ ಆಯ್ಕೆಮಾಡಿ"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "ನಕಲಿಸಿ"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ಆಯ್ಕೆ"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "ಕತ್ತರಿಸು"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ಅಂಟಿಸಿರಿ"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ಕ್ಲಿಪ್‌ಬೋರ್ಡ್"
+
diff --git a/dali-toolkit/po/ky_KG.po b/dali-toolkit/po/ky_KG.po
new file mode 100644 (file)
index 0000000..9917b9a
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Баарын тандоо"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Көчүрүү"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Тандоо"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Кесүү"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Коюу"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Буфер"
+
diff --git a/dali-toolkit/po/lo.po b/dali-toolkit/po/lo.po
new file mode 100644 (file)
index 0000000..f09612b
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "ເລືອກທັງໝົດ"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "ອັດສຳເນົາ"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ເລືອກ"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "ຕັດ"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ວາງໃສ່"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ກະດານເກັບຄວາມຈໍາ"
+
diff --git a/dali-toolkit/po/ml.po b/dali-toolkit/po/ml.po
new file mode 100644 (file)
index 0000000..39c700b
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "എല്ലാം തിരഞ്ഞെടുക്കുക"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "പകര്‍ത്തുക"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "തിരഞ്ഞെ."
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "മുറിക്കുക"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ഒട്ടിക്കുക"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ക്ലിപ്ബോര്‍ഡ്"
+
diff --git a/dali-toolkit/po/mn_MN.po b/dali-toolkit/po/mn_MN.po
new file mode 100644 (file)
index 0000000..cc2b51b
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Бүгдийг сонгох"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Хуулах"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Сонгох"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Хайчлах"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Буулгах"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Түр санах ой"
+
diff --git a/dali-toolkit/po/mr.po b/dali-toolkit/po/mr.po
new file mode 100644 (file)
index 0000000..6e8dc2e
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "सर्व निवडा"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "कॉपी"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "निवडा"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "कट"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "पेस्ट"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "क्लिपबोर्ड"
+
diff --git a/dali-toolkit/po/ms.po b/dali-toolkit/po/ms.po
new file mode 100644 (file)
index 0000000..25aa6f7
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Pilih semua"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Salin"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Pilih"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Potong"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Tampal"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Papan klip"
+
diff --git a/dali-toolkit/po/my_ZG.po b/dali-toolkit/po/my_ZG.po
new file mode 100644 (file)
index 0000000..604bc54
--- /dev/null
@@ -0,0 +1,19 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "အားလုံးကုိ ေရြးပါ"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "ကူးပါ"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ေရြးခ်ယ္"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "ျဖတ္ေတာက္ပါ"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ကူးထည့္ပါ"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ကလစ္ဘုတ္"
+
+
diff --git a/dali-toolkit/po/ne.po b/dali-toolkit/po/ne.po
new file mode 100644 (file)
index 0000000..c984cf2
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "सबै छान्नुहोस्"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "कपी गर्नुहोस्"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "चयन गर"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "काट्नुहोस्"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "पेस्ट गर्नुहोस्"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "क्लिपबोर्ड"
+
diff --git a/dali-toolkit/po/or.po b/dali-toolkit/po/or.po
new file mode 100644 (file)
index 0000000..8ba6b5c
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "ସମସ୍ତ ଚୟନ"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "କପି"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ଚୟନ"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "କଟ୍"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ଲେପନ"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "କ୍ଲିପବୋର୍ଡ"
+
diff --git a/dali-toolkit/po/pa.po b/dali-toolkit/po/pa.po
new file mode 100644 (file)
index 0000000..f301088
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "ਸਭ ਚੁਣੋ"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "ਕਾਪੀ ਕਰੋ"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ਚੁਣੋ"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "ਕੱਟੋ"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ਪੇਸਟ ਕਰੋ"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ਕਲਿਪਬੋਰਡ"
+
diff --git a/dali-toolkit/po/si.po b/dali-toolkit/po/si.po
new file mode 100644 (file)
index 0000000..ffc7eb9
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "සියල්ල තෝරන්න"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "පිටපත් කරන්න"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "තෝරන්න"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "කපන්න"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "අලවන්න"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "ක්ලිප් පුවරුව"
+
diff --git a/dali-toolkit/po/ta.po b/dali-toolkit/po/ta.po
new file mode 100644 (file)
index 0000000..1bb609d
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "எல்லாம் தேர்வு"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "நகல்"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "தேர்வு"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "வெட்டு"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "ஒட்டு"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "கிளிப்போர்டு"
+
diff --git a/dali-toolkit/po/te.po b/dali-toolkit/po/te.po
new file mode 100644 (file)
index 0000000..3bb6e90
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "అన్నీ ఎంచుకోండి"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "కాపీ"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "ఎంచు."
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "కట్"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "అతికించు"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "క్లిప్‌బోర్డ్"
+
diff --git a/dali-toolkit/po/tg_TJ.po b/dali-toolkit/po/tg_TJ.po
new file mode 100644 (file)
index 0000000..63ab566
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Ҳамаро интихоб кардан"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Нусха"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Интихоб кардан"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Бурида гирифтан"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Гузоштан"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Планшет"
+
diff --git a/dali-toolkit/po/th.po b/dali-toolkit/po/th.po
new file mode 100644 (file)
index 0000000..a750a7e
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "เลือก​ทั้ง​หมด"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "คัด​ลอก"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "เลือก"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "ตัด"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "วาง"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "คลิ​ป​บอร์ด"
+
diff --git a/dali-toolkit/po/tk_TM.po b/dali-toolkit/po/tk_TM.po
new file mode 100644 (file)
index 0000000..efbb7aa
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Ählisini saýla"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Nusga"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Saýla"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Kes"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Goýmak"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Alyş-çalyş buferi"
+
diff --git a/dali-toolkit/po/tl.po b/dali-toolkit/po/tl.po
new file mode 100644 (file)
index 0000000..bf63c56
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Piliin lahat"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Kopyahin"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Piliin"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "I-cut"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "I-paste"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Clipboard"
+
diff --git a/dali-toolkit/po/ur.po b/dali-toolkit/po/ur.po
new file mode 100644 (file)
index 0000000..7872070
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "تمام منتخب کریں"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "کاپی"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "انتخاب"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "کٹ"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "جوڑ دیں"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "کلپ بورڈ"
+
diff --git a/dali-toolkit/po/vi.po b/dali-toolkit/po/vi.po
new file mode 100644 (file)
index 0000000..e22211f
--- /dev/null
@@ -0,0 +1,18 @@
+msgid "IDS_COM_BODY_SELECT_ALL"
+msgstr "Chọn tất cả"
+
+msgid "IDS_COM_BODY_COPY"
+msgstr "Chép"
+
+msgid "IDS_COM_SK_SELECT"
+msgstr "Chọn"
+
+msgid "IDS_COM_BODY_CUT"
+msgstr "Cắt"
+
+msgid "IDS_COM_BODY_PASTE"
+msgstr "Dán"
+
+msgid "IDS_COM_BODY_CLIPBOARD"
+msgstr "Bộ nhớ tạm"
+
index 9fa9291..5103060 100644 (file)
@@ -40,6 +40,7 @@
 #include <dali-toolkit/public-api/styling/style-manager.h>
 #include <dali-toolkit/public-api/visuals/color-visual-properties.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
@@ -47,6 +48,7 @@
 #include <dali-toolkit/internal/visuals/color/color-visual.h>
 #include <dali-toolkit/internal/visuals/transition-data-impl.h>
 #include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/internal/controls/tooltip/tooltip.h>
 
 namespace Dali
 {
@@ -412,6 +414,16 @@ public:
           }
           break;
         }
+
+        case Toolkit::DevelControl::Property::TOOLTIP:
+        {
+          TooltipPtr& tooltipPtr = controlImpl.mImpl->mTooltip;
+          if( ! tooltipPtr )
+          {
+            tooltipPtr = Tooltip::New( control );
+          }
+          tooltipPtr->SetProperties( value );
+        }
       }
     }
   }
@@ -479,6 +491,17 @@ public:
           break;
         }
 
+        case Toolkit::DevelControl::Property::TOOLTIP:
+        {
+          Property::Map map;
+          if( controlImpl.mImpl->mTooltip )
+          {
+            controlImpl.mImpl->mTooltip->CreatePropertyMap( map );
+          }
+          value = map;
+          break;
+        }
+
       }
     }
 
@@ -502,16 +525,20 @@ public:
   TapGestureDetector mTapGestureDetector;
   LongPressGestureDetector mLongPressGestureDetector;
 
+  // Tooltip
+  TooltipPtr mTooltip;
+
   ControlBehaviour mFlags : CONTROL_BEHAVIOUR_FLAG_COUNT;    ///< Flags passed in from constructor.
   bool mIsKeyboardNavigationSupported :1;  ///< Stores whether keyboard navigation is supported by the control.
   bool mIsKeyboardFocusGroup :1;           ///< Stores whether the control is a focus group.
 
-  // Properties - these need to be members of Internal::Control::Impl as they need to function within this class.
+  // Properties - these need to be members of Internal::Control::Impl as they access private methods/data of Internal::Control and Internal::Control::Impl.
   static const PropertyRegistration PROPERTY_1;
   static const PropertyRegistration PROPERTY_2;
   static const PropertyRegistration PROPERTY_3;
   static const PropertyRegistration PROPERTY_4;
   static const PropertyRegistration PROPERTY_5;
+  static const PropertyRegistration PROPERTY_6;
 };
 
 // Properties registered without macro to use specific member variables.
@@ -520,6 +547,7 @@ const PropertyRegistration Control::Impl::PROPERTY_2( typeRegistration, "backgro
 const PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "backgroundImage", Toolkit::Control::Property::BACKGROUND_IMAGE, Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_4( typeRegistration, "keyInputFocus",   Toolkit::Control::Property::KEY_INPUT_FOCUS,  Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_5( typeRegistration, "background",      Toolkit::Control::Property::BACKGROUND,       Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+const PropertyRegistration Control::Impl::PROPERTY_6( typeRegistration, "tooltip",         Toolkit::DevelControl::Property::TOOLTIP,     Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 
 Toolkit::Control Control::New()
 {
@@ -1051,12 +1079,10 @@ void Control::OnInitialize()
 
 void Control::OnControlChildAdd( Actor& child )
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: OnControlChildAdd() is deprecated and will be removed from next release. Override OnChildAdd instead.\n" );
 }
 
 void Control::OnControlChildRemove( Actor& child )
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: OnControlChildRemove() is deprecated and will be removed from next release. Override OnChildRemove instead.\n" );
 }
 
 void Control::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
index be76939..541d489 100644 (file)
@@ -61,13 +61,6 @@ namespace Internal
  */
 class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
 {
-protected:
-  /**
-   * @brief Virtual destructor.
-   * @SINCE_1_0.0
-   */
-  virtual ~Control();
-
 public:
 
   class Extension; ///< Forward declare future extension interface
@@ -83,6 +76,14 @@ public:
    */
   static Toolkit::Control New();
 
+protected:
+  /**
+   * @brief Virtual destructor.
+   * @SINCE_1_0.0
+   */
+  virtual ~Control();
+
+public:
   // Styling
 
   /**
index 9ede92d..c6e3b1d 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_CONTROL_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
old mode 100644 (file)
new mode 100755 (executable)
index 2e7ddee..a9f2769
@@ -25,6 +25,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
 
 namespace Dali
 {
@@ -36,6 +37,8 @@ struct ItemLayout::Impl
 {
   Vector3 mItemSize;                              ///< The size of an item in the layout
   ControlOrientation::Type mOrientation;          ///< the orientation of the layout.
+  Property::Map mProperties;
+  bool mHasLayoutChanged;
 };
 
 ItemLayout::ItemLayout()
@@ -133,6 +136,45 @@ float ItemLayout::GetFlickSpeedFactor() const
   return GetScrollSpeedFactor();
 }
 
+void ItemLayout::SetLayoutProperties(const Property::Map& properties)
+{
+  for( unsigned int idx = 0, mapCount = properties.Count(); idx < mapCount; ++idx )
+  {
+    KeyValuePair propertyPair( properties.GetKeyValue( idx ) );
+
+    if(propertyPair.first == DefaultItemLayoutProperty::ITEM_SIZE)
+    {
+      SetItemSize(propertyPair.second.Get<Vector3>());
+    }
+    else if(propertyPair.first == DefaultItemLayoutProperty::ORIENTATION)
+    {
+      //Up, Left, Down, Right
+      int orientationType = propertyPair.second.Get<int>();
+      if(orientationType <= ControlOrientation::Right && orientationType >= ControlOrientation::Up)
+      {
+        SetOrientation(ControlOrientation::Type(orientationType));
+      }
+    }
+  }
+  mImpl->mHasLayoutChanged = true;
+  mImpl->mProperties = properties;
+}
+
+Property::Map ItemLayout::GetLayoutProperties()
+{
+  return mImpl->mProperties;
+}
+
+bool ItemLayout::HasLayoutChanged()
+{
+  return mImpl->mHasLayoutChanged;
+}
+
+void ItemLayout::ResetLayoutChangedFlag()
+{
+  mImpl->mHasLayoutChanged = false;
+}
+
 } // namespace Toolkit
 
 } // namespace Dali
old mode 100644 (file)
new mode 100755 (executable)
index e9c5068..97af2df
@@ -20,6 +20,8 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/alpha-function.h>
+#include <dali/public-api/object/property-key.h>
+#include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/enums.h>
@@ -165,6 +167,33 @@ public:
   DALI_IMPORT_API ControlOrientation::Type GetOrientation() const;
 
   /**
+   * @brief Apply the layout Properties.
+   * @SINCE_1_2.20
+   * @param[in] properties The properties the layout.
+   */
+  void SetLayoutProperties(const Property::Map& properties);
+
+  /**
+   * @brief Get the layout Properties.
+   * @SINCE_1_2.20
+   * @return the property of the layout.
+   */
+  Property::Map GetLayoutProperties();
+
+  /**
+   * @brief Check if the Property has been changed.
+   * @SINCE_1_2.20
+   * @return whether the layout has been changed or not.if changed, return true.
+   */
+  bool HasLayoutChanged();
+
+  /**
+   * @brief Set the layout changed flag to false.
+   * @SINCE_1_2.20
+   */
+  void ResetLayoutChangedFlag();
+
+  /**
    * @brief Retrieve the target size of an item in the layout.
    *
    * This will return the default size for the layout unless overridden by calling SetItemSize().
index ea73d40..8c5661b 100644 (file)
 {
   "styles":
   {
+    "Tooltip":
+    {
+      "tooltip":
+      {
+        "content":
+        {
+          "pointSize":84
+        },
+        "waitTime":0.5,
+        "background":
+        {
+          "visual":"{DALI_IMAGE_DIR}tooltip.9.png",
+          "border":[1,5,5,1]
+        },
+        "tail":
+        {
+          "visibility":false,
+          "aboveVisual":"{DALI_IMAGE_DIR}tooltip-tail-above.png",
+          "belowVisual":"{DALI_IMAGE_DIR}tooltip-tail-below.png"
+        },
+        "position":"BELOW",
+        "hoverPointOffset":[10,10],
+        "movementThreshold":5,
+        "disappearOnMovement":false
+      }
+    },
     "TextLabel":
     {
       "pointSize":108,
     },
     "Button":
     {
+      "styles":["Tooltip"],
       "initialAutoRepeatingDelay":2.0,
       "nextAutoRepeatingDelay":0.9
       // Note: Visuals added to Button will be used in all derived buttons unless overridden.
index 431f73c..b188dab 100644 (file)
 {
   "styles":
   {
+    "Tooltip":
+    {
+      "tooltip":
+      {
+        "content":
+        {
+          "pointSize":12
+        },
+        "waitTime":0.5,
+        "background":
+        {
+          "visual":"{DALI_IMAGE_DIR}tooltip.9.png",
+          "border":[1,5,5,1]
+        },
+        "tail":
+        {
+          "visibility":false,
+          "aboveVisual":"{DALI_IMAGE_DIR}tooltip-tail-above.png",
+          "belowVisual":"{DALI_IMAGE_DIR}tooltip-tail-below.png"
+        },
+        "position":"BELOW",
+        "hoverPointOffset":[10,10],
+        "movementThreshold":5,
+        "disappearOnMovement":false
+      }
+    },
     "TextLabel":
     {
       "pointSize":18,
     },
     "Button":
     {
+      "styles":["Tooltip"],
       "initialAutoRepeatingDelay":2.0,
       "nextAutoRepeatingDelay":0.9
       // Note: Visuals added to Button will be used in all derived buttons unless overridden.
diff --git a/dali-toolkit/styles/images-common/tooltip-tail-above.png b/dali-toolkit/styles/images-common/tooltip-tail-above.png
new file mode 100644 (file)
index 0000000..9695929
Binary files /dev/null and b/dali-toolkit/styles/images-common/tooltip-tail-above.png differ
diff --git a/dali-toolkit/styles/images-common/tooltip-tail-below.png b/dali-toolkit/styles/images-common/tooltip-tail-below.png
new file mode 100644 (file)
index 0000000..3b4a0f9
Binary files /dev/null and b/dali-toolkit/styles/images-common/tooltip-tail-below.png differ
diff --git a/dali-toolkit/styles/images-common/tooltip.9.png b/dali-toolkit/styles/images-common/tooltip.9.png
new file mode 100644 (file)
index 0000000..bd4b6e8
Binary files /dev/null and b/dali-toolkit/styles/images-common/tooltip.9.png differ
diff --git a/packaging/dali-csharp-wrapper.spec b/packaging/dali-csharp-wrapper.spec
deleted file mode 100755 (executable)
index 2583885..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-Name:       NDalic
-Summary:    dali wrapper
-Version:    1.2.19
-Release:    1
-Group:      uifw/graphic
-License:    TO_BE_FILLED_IN
-Source0:    %{name}-%{version}.tar.gz
-BuildRequires: cmake
-BuildRequires: swig
-#BuildRequires: ruby
-#BuildRequires: ruby-devel
-
-#BuildRequires: mono-core
-#BuildRequires: mono-compat
-#BuildRequires: mono-data
-#BuildRequires: mono-compiler
-#BuildRequires: mono-wcf
-#BuildRequires: mono-web
-
-BuildRequires:  pkgconfig
-
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(dali-core)
-BuildRequires: pkgconfig(dali-adaptor)
-BuildRequires: pkgconfig(dali-toolkit)
-
-BuildRequires: dali-devel
-BuildRequires: dali-integration-devel
-BuildRequires: dali-adaptor-devel
-BuildRequires: dali-adaptor-integration-devel
-BuildRequires: dali-toolkit-devel
-
-
-%description
-dali wrapper
-
-%package dali-wrapper
-
-Summary: Development dali-wrapper
-Group: Development/Libraries/Other
-Requires: %{name} = %{version}
-
-%description dali-wrapper
-Development .so for dali wrapper
-%define daliSwigDir %{_builddir}/%{name}-%{version}/build/tizen
-%define daliToolkitDir %{_builddir}/dali-toolkit-%{version}/build/tizen
-%define daliPluginsDir %{_builddir}/%{name}-%{version}/build/tizen/plugins/csharp
-
-#############################
-# profile setup
-#############################
-
-
-%define dali_toolkit_profile MOBILE
-
-%define dali_style_folder 720x1280
-# dali_style to be provided by build system as with dali_toolkit_profile or by passing --define 'dali_style 470x800' to the rpm build command
-
-%if "%{?dali_style}"
-  %define dali_style_folder %{dali_style}
-%endif
-
-# Further resource locations profiles can be provided here otherwise MOBILE will be used
-%if "%{tizen_profile_name}" == "mobile"
-  %define dali_toolkit_profile MOBILE
-%endif
-
-%description
-The OpenGLES Canvas Core Library Toolkit - a set of controls that provide
-user interface functionality.
-
-##############################
-# Preparation
-##############################
-%prep
-%setup -q
-
-#Use TZ_PATH when tizen version is 3.x
-
-%if "%{tizen_version_major}" == "2"
-%define ndali_data_rw_dir            /opt/usr/share/dali/
-%define ndali_data_ro_dir            /usr/share/dali/
-%else
-%define ndali_data_rw_dir            %TZ_SYS_SHARE/dali/
-%define ndali_data_ro_dir            %TZ_SYS_RO_SHARE/dali/
-%endif
-##############################
-# Build
-##############################
-%build
-echo "----------------" %{_builddir}
-echo "----------------" %{daliSwigDir}
-echo "----------------" %{_libdir}
-echo "----------------" %{daliPluginsDir}
-
-PREFIX="/usr"
-CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
-LDFLAGS+=" -Wl,--rpath=$PREFIX/lib -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
-
-%if 0%{?enable_coverage}
-CXXFLAGS+=" --coverage "
-LDFLAGS+=" --coverage "
-%endif
-
-
-##############################
-# Build dali-wrap
-##############################
-
-libtoolize --force
-cd %{daliSwigDir}
-autoreconf --install
-NDALI_DATA_RW_DIR="%{ndali_data_rw_dir}" ; export NDALI_DATA_RW_DIR
-NDALI_DATA_RO_DIR="%{ndali_data_ro_dir}" ; export NDALI_DATA_RO_DIR
-%configure --enable-profile=%{dali_toolkit_profile} \
-           --with-style=%{dali_style_folder} \
-           --enable-csharp=yes \
-%if 0%{?enable_debug}
-           --enable-debug \
-%endif
-           --enable-i18n=yes
-cd %{daliPluginsDir}
-make gbs-local
-
-##############################
-# Installation
-##############################
-echo "----------------" %{_buildrootdir}
-%install
-cd "%{daliPluginsDir}"
-make DESTDIR=%{_buildrootdir}/%{name}-%{version}-%{release}.arm/usr/lib/ gbs-install
-
-#mv %{_builddir}/%{name}-%{version}/plugins/dali-swig/NDali.dll %{_buildrootdir}/%{name}-%{version}-%{release}.arm/usr/lib/
-
-##############################
-# Post Install
-##############################
-%post
-
-
-##############################
-# Files in Binary Packages
-##############################
-%files
-%manifest dali-csharp-wrapper.manifest
-%defattr(-,root,root,-)
-%{_libdir}/lib*
-%{_libdir}/NDali.dll
-
old mode 100644 (file)
new mode 100755 (executable)
index af4f807..1e437ce
@@ -47,6 +47,7 @@ check-local: examples/dali-test.exe \
              examples/custom-control.exe \
              examples/spin-control.exe \
              examples/control-dashboard.exe \
+             examples/user-alphafunction.exe \
              examples/libNDalic.so examples/NDali.dll
 
 examples/%.exe: examples/%.cs
old mode 100644 (file)
new mode 100755 (executable)
index 26003be..154641c
  */
 
 %typemap(cscode) Dali::AlphaFunction %{
-  public AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction function) : this(NDalicPINVOKE.new_AlphaFunction__SWIG_1((int)function), true){
+  public AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction function) : this(NDalicPINVOKE.new_AlphaFunction__SWIG_1((int)function), true)
+  {
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+  }
+
+  public AlphaFunction(System.Delegate func) : this(NDalicPINVOKE.new_AlphaFunction__SWIG_2(SWIGTYPE_p_f_float__float.getCPtr(new SWIGTYPE_p_f_float__float(System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func), true))), true)
+  {
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
   }
 %}
old mode 100644 (file)
new mode 100755 (executable)
index 29edf14..04a1732
 %rename(BlendingEquationType) Dali::BlendingEquation::Type;
 %rename(CameraType) Dali::Camera::Type;
 %rename(LayerBehavior) Dali::Layer::Behavior;
+%rename(DaliEndAction) Dali::Animation::EndAction;
 
 typedef std::pair<std::string, Dali::Property::Value> StringValuePair;
 typedef std::vector<Dali::TouchPoint> TouchPointContainer;
@@ -282,13 +283,13 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %template(ImageSignal) Dali::Signal<void(Dali::Image)>;
 %template(RenderTaskSignal) Dali::Signal<void(Dali::RenderTask&)>;
 %template(LongPressGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::LongPressGesture&)>;
-%template(ActorTouchEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchEvent&)>;
+//%template(ActorTouchEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchEvent&)>;
 %template(ActorTouchDataSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchData&)>;
 %template(ActorHoverEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::HoverEvent&)>;
 %template(ActorWheelEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::WheelEvent&)>;
 %template(ActorSignal) Dali::Signal<void (Dali::Actor)>;
 %template(KeyEventSignal) Dali::Signal<void (const Dali::KeyEvent&)>;
-%template(TouchEventSignal) Dali::Signal<void (const Dali::TouchEvent&)>;
+//%template(TouchEventSignal) Dali::Signal<void (const Dali::TouchEvent&)>;
 %template(TouchSignal) Dali::Signal<void (const Dali::TouchData&)>;
 %template(StageWheelEventSignal) Dali::Signal<void (const Dali::WheelEvent&)>;
 %template(AngleThresholdPair) std::pair<Dali::Radian, Dali::Radian>;
old mode 100644 (file)
new mode 100755 (executable)
index 56693b8..61376cc
 %rename(LoadImageSynchronously) Dali::Toolkit::SyncImageLoader::Load;
 %rename(ControlOrientationType) Dali::Toolkit::ControlOrientation::Type;
 %rename(DefaultItemLayoutType) Dali::Toolkit::DefaultItemLayout::Type;
+%rename(DefaultItemLayoutProperty) Dali::Toolkit::DefaultItemLayoutProperty::Property;
 %rename(NewItemLayout) Dali::Toolkit::DefaultItemLayout::New;
 %rename(ContentDirectionType) Dali::Toolkit::FlexContainer::ContentDirection;
 %rename(FlexDirectionType) Dali::Toolkit::FlexContainer::FlexDirection;
@@ -210,6 +211,7 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %include <dali-toolkit/public-api/enums.h>
 %include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 %include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
+%include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
 %include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
 %include <dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h>
 %include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
index 4a612e9..ee70716 100755 (executable)
@@ -196,7 +196,6 @@ using namespace Dali::Toolkit;
 %include events/gaussian-blur-view-event.i
 %include events/image-event.i
 %include events/itemview-event.i
-%include events/keyboardFocusManager-event.i
 %include events/objectregistry-event.i
 %include events/popup-event.i
 %include events/pinchgesture-event.i
old mode 100644 (file)
new mode 100755 (executable)
index 1deccbc..f65e658
@@ -41,8 +41,7 @@
     {
       get
       {
-        Actor parent = GetParent();
-        return parent;
+        return GetParent();
       }
     }
 
@@ -50,8 +49,7 @@
    {
       get
       {
-        bool visibility = IsVisible();
-        return visibility;
+        return IsVisible();
       }
     }
 
@@ -63,8 +61,7 @@
       }
       get
       {
-        float ret = GetCurrentOpacity();
-        return ret;
+        return GetCurrentOpacity();
       }
    }
 
       }
       get
       {
-        bool focusable = IsKeyboardFocusable();
-        return focusable;
+        return IsKeyboardFocusable();
+      }
+    }
+
+    public bool IsOnStage
+    {
+      get
+      {
+        return OnStage();
       }
     }
 
old mode 100644 (file)
new mode 100755 (executable)
index bb21466..2bbc118
@@ -26,113 +26,25 @@ using System.Runtime.InteropServices;
 %define Animation_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
   %typemap(cscode) NameSpace::ClassName %{
 
-    public static readonly int ParentOrigin = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
-    public static readonly int ParentOriginX = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
-    public static readonly int ParentOriginY = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
-    public static readonly int ParentOriginZ = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
-    public static readonly int AnchorPoint = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
-    public static readonly int AnchorPointX = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
-    public static readonly int AnchorPointY = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
-    public static readonly int AnchorPointZ = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
-    public static readonly int Size = NDalicPINVOKE.Actor_Property_SIZE_get();
-    public static readonly int SizeWidth = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
-    public static readonly int SizeHeight = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
-    public static readonly int SizeDepth = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
-    public static readonly int Position = NDalicPINVOKE.Actor_Property_POSITION_get();
-    public static readonly int PositionX = NDalicPINVOKE.Actor_Property_POSITION_X_get();
-    public static readonly int PositionY = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
-    public static readonly int PositionZ = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
-    public static readonly int WorldPosition = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
-    public static readonly int WorldPositionX = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
-    public static readonly int WorldPositionY = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
-    public static readonly int WorldPositionZ = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
-    public static readonly int Orientation = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
-    public static readonly int WorldOrientation = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
-    public static readonly int Scale = NDalicPINVOKE.Actor_Property_SCALE_get();
-    public static readonly int ScaleX = NDalicPINVOKE.Actor_Property_SCALE_X_get();
-    public static readonly int ScaleY = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
-    public static readonly int ScaleZ = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
-    public static readonly int WorldScale = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
-    public static readonly int Visibile = NDalicPINVOKE.Actor_Property_VISIBLE_get();
-    public static readonly int Color = NDalicPINVOKE.Actor_Property_COLOR_get();
-    public static readonly int ColorRed = NDalicPINVOKE.Actor_Property_COLOR_RED_get();
-    public static readonly int ColorGreeb = NDalicPINVOKE.Actor_Property_COLOR_GREEN_get();
-    public static readonly int ColorBlue = NDalicPINVOKE.Actor_Property_COLOR_BLUE_get();
-    public static readonly int ColorAlpha = NDalicPINVOKE.Actor_Property_COLOR_ALPHA_get();
-    public static readonly int WorldColor = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
-    public static readonly int WorldMatrix = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
-    public static readonly int Name = NDalicPINVOKE.Actor_Property_NAME_get();
-    public static readonly int Sensitive = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
-    public static readonly int LeaveRequired = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
-    public static readonly int InheritOrientation = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
-    public static readonly int InheritScale = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
-    public static readonly int ColorMode = NDalicPINVOKE.Actor_Property_COLOR_MODE_get();
-    public static readonly int PositionInheritance = NDalicPINVOKE.Actor_Property_POSITION_INHERITANCE_get();
-    public static readonly int DrawMode = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
-    public static readonly int SizeModeFactor = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
-    public static readonly int WidthResizePolicy = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
-    public static readonly int HeightResizePolicy = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
-    public static readonly int SizeScalePolicy = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
-    public static readonly int WidthForHeight = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
-    public static readonly int HeightForWidth = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
-    public static readonly int Padding = NDalicPINVOKE.Actor_Property_PADDING_get();
-    public static readonly int MinimumSize = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
-    public static readonly int MaximumSize = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
-    public static readonly int InheritPosition = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
-    public static readonly int ClippingMode = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
 
-    /**
-      * @brief Event arguments that passed via Finished signal
-      *
-      */
-    public class FinishedEventArgs : EventArgs
-    {
-      private Animation _animation;
-
-      /**
-        * @brief Animation - is the Animation which has finished with the animation.
-        *
-        */
-      public Animation Animation
-      {
-        get
-        {
-          return _animation;
-        }
-        set
-        {
-          _animation = value;
-        }
-      }
-    }
-
-    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate void FinishedEventCallbackDelegate(IntPtr Animation);
-    private DaliEventHandler<object,FinishedEventArgs> _animationFinishedEventHandler;
-    private FinishedEventCallbackDelegate _animationFinishedEventCallbackDelegate;
+    private EventCallbackDelegateType1<IntPtr> _animationFinishedEventCallbackDelegate;
+    private event EventHandler _animationFinishedEventHandler;
 
     /**
       * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of FinishedEventHandler - DaliEventHandler<object,FinishedEventArgs>) provided by the user.
       * Finished signal is emitted when an Animation's animations have finished.
       */
-    public event DaliEventHandler<object,FinishedEventArgs> Finished
+    public event EventHandler Finished
     {
       add
       {
         lock(this)
         {
-          // Restricted to only one listener
-          if (_animationFinishedEventHandler == null)
-          {
-            _animationFinishedEventHandler += value;
-
-            _animationFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
-            this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
-          }
+          _animationFinishedEventHandler += value;
+          _animationFinishedEventCallbackDelegate = OnFinished;
+          this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
         }
       }
-
       remove
       {
         lock(this)
@@ -141,7 +53,6 @@ using System.Runtime.InteropServices;
           {
             this.FinishedSignal().Disconnect(_animationFinishedEventCallbackDelegate);
           }
-
           _animationFinishedEventHandler -= value;
         }
       }
@@ -150,49 +61,38 @@ using System.Runtime.InteropServices;
     // Callback for Animation FinishedSignal
     private void OnFinished(IntPtr data)
     {
-      FinishedEventArgs e = new FinishedEventArgs();
-
-      // Populate all members of "e" (FinishedEventArgs) with real data
-      e.Animation = Animation.GetAnimationFromPtr(data);
-
       if (_animationFinishedEventHandler != null)
       {
         //here we send all data to user event handlers
-        _animationFinishedEventHandler(this, e);
+        _animationFinishedEventHandler(this, null);
       }
     }
 
-
   public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
     ClassName ret = new ClassName(cPtr, false);
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     return ret;
   }
 
+  private float MilliSecondsToSeconds( int millisec )
+  {
+    return (float)millisec / 1000.0f;
+  }
 
-  public float Duration
+  private int SecondsToMilliSeconds( float sec )
   {
-    set
-    {
-       SetDuration(value);
-    }
-    get
-    {
-       float ret = GetDuration();
-       return ret;
-    }
+    return (int)( sec * 1000 );
   }
 
-  public int DurationMilliSecs
+  public int Duration
   {
     set
     {
-      SetDuration(value/1000);
+      SetDuration( MilliSecondsToSeconds( value ) );
     }
     get
     {
-      int ret = (int) GetDuration() * 1000;
-      return ret;
+      return SecondsToMilliSeconds( GetDuration() );
     }
   }
 
@@ -209,12 +109,11 @@ using System.Runtime.InteropServices;
     }
   }
 
-  public Animation.State Status
+  public Dali.Constants.Animation.State Status
   {
     get
     {
-       Animation.State ret = GetState();
-       return ret;
+       return (Dali.Constants.Animation.State)GetState();
     }
   }
 
@@ -244,114 +143,272 @@ using System.Runtime.InteropServices;
     }
   }
 
-  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue)
+  public Dali.Constants.Animation.EndAction EndAction
   {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(relativeValue);
-       AnimateBy(new Property(target, var), new Property.Value(obj));
+    set
+    {
+        switch(value)
+        {
+          case Dali.Constants.Animation.EndAction.Cancel :
+            SetEndAction(Dali.Animation.DaliEndAction.Bake);
+            break;
+          case Dali.Constants.Animation.EndAction.Discard :
+            SetEndAction(Dali.Animation.DaliEndAction.Discard);
+            break;
+          case Dali.Constants.Animation.EndAction.Stop :
+            SetEndAction(Dali.Animation.DaliEndAction.BakeFinal);
+            break;
+          default :
+            SetEndAction(Dali.Animation.DaliEndAction.Bake);
+            break;
+        }
+    }
+    get
+    {
+        Dali.Animation.DaliEndAction temp = GetEndAction();
+        switch(temp)
+        {
+          case Dali.Animation.DaliEndAction.Bake :
+            return Dali.Constants.Animation.EndAction.Cancel;
+          case Dali.Animation.DaliEndAction.Discard :
+            return Dali.Constants.Animation.EndAction.Discard;
+          case Dali.Animation.DaliEndAction.BakeFinal :
+            return Dali.Constants.Animation.EndAction.Stop;
+          default :
+            return Dali.Constants.Animation.EndAction.Cancel;
+        }
+    }
   }
 
-  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha)
-  {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(relativeValue);
-       AnimateBy(new Property(target, var), new Property.Value(obj),  alpha);
+  public void Stop(Dali.Constants.Animation.EndAction action) {
+    switch( action )
+    {
+      case Dali.Constants.Animation.EndAction.Cancel :
+        SetEndAction(Dali.Animation.DaliEndAction.Bake);
+        break;
+      case Dali.Constants.Animation.EndAction.Discard :
+        SetEndAction(Dali.Animation.DaliEndAction.Discard);
+        break;
+      case Dali.Constants.Animation.EndAction.Stop :
+        SetEndAction(Dali.Animation.DaliEndAction.BakeFinal);
+        break;
+      default :
+        SetEndAction(Dali.Animation.DaliEndAction.Bake);
+        break;
+    }
+    NDalicPINVOKE.Animation_Stop(swigCPtr);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
   }
 
-  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, TimePeriod period)
-  {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(relativeValue);
-       AnimateBy(new Property(target, var), new Property.Value(obj), period);
-  }
+  public int StartTime { set; get; }
+  public int EndTime { set; get; }
+  public string TargetPoperty { set; get; }
+  public object Destination { set; get; }
+  public Dali.AlphaFunction AlphaFunction { set; get; }
 
-  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha, TimePeriod period)
-  {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(relativeValue);
-       AnimateBy(new Property(target, var), new Property.Value(obj), alpha, period);
-  }
 
-  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue)
+  public void AnimateBy(Actor target)
   {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(destinationValue);
-       AnimateTo(new Property(target, var), new Property.Value(obj));
-  }
+    string _str1 = TargetPoperty.Substring(0, 1);
+    string _str2 = TargetPoperty.Substring(1);
+    string _str = _str1.ToLower() + _str2;
 
-  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha)
-  {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(destinationValue);
-       AnimateTo(new Property(target, var), new Property.Value(obj), alpha);
-  }
+    dynamic obj = (object)Destination;
 
-  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, TimePeriod period)
-  {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(destinationValue);
-       AnimateTo(new Property(target, var), new Property.Value(obj), period);
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
-  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha, TimePeriod period)
+  public void AnimateBy(Actor target, string propertyIndex)
   {
-       dynamic var = (object)(propertyIndex);
-       dynamic obj = (object)(destinationValue);
-       AnimateTo(new Property(target, var), new Property.Value(obj), alpha, period);
-  }
+    string _str1 = propertyIndex.Substring(0, 1);
+    string _str2 = propertyIndex.Substring(1);
+    string _str = _str1.ToLower() + _str2;
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames)
-  {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames);
-  }
+    dynamic obj = (object)Destination;
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, Animation.Interpolation interpolation)
-  {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, interpolation);
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha)
+  public void AnimateBy(Actor target, string propertyIndex, object relativeValue)
   {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, alpha);
-  }
+    string _str1 = propertyIndex.Substring(0, 1);
+    string _str2 = propertyIndex.Substring(1);
+    string _str = _str1.ToLower() + _str2;
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
-  {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, alpha, interpolation);
-  }
+    dynamic obj = (object)relativeValue;
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, TimePeriod period)
-  {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, period);
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateBy(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
+  public void AnimateTo(Actor target)
   {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames,  period, interpolation);
+    string _str1 = TargetPoperty.Substring(0, 1);
+    string _str2 = TargetPoperty.Substring(1);
+    string _str = _str1.ToLower() + _str2;
+
+    dynamic obj = (object)Destination;
+
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
+  public void AnimateTo(Actor target, string propertyIndex)
   {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, alpha, period);
+    string _str1 = propertyIndex.Substring(0, 1);
+    string _str2 = propertyIndex.Substring(1);
+    string _str = _str1.ToLower() + _str2;
+
+    dynamic obj = (object)Destination;
+
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
-  public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
+  public void AnimateTo(Actor target, string propertyIndex, object destinationValue)
   {
-       dynamic var = (object)(propertyIndex);
-       AnimateBetween(new Property(target, var), keyFrames, alpha, period, interpolation);
-  }
+    string _str1 = propertyIndex.Substring(0, 1);
+    string _str2 = propertyIndex.Substring(1);
+    string _str = _str1.ToLower() + _str2;
 
-  public void Stop(Animation.EndAction action) {
-    SetEndAction(action);
-    NDalicPINVOKE.Animation_Stop(swigCPtr);
-    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    dynamic obj = (object)destinationValue;
+
+    if( this.AlphaFunction != null )
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+      }
+    }
+    else
+    {
+      if( this.StartTime == 0 && this.EndTime == 0 )
+      {
+        AnimateTo(new Property(target, _str), new Property.Value(obj) );
+      }
+      else
+      {
+        Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime ) );
+        AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+      }
+    }
   }
 
   /**
@@ -368,6 +425,11 @@ using System.Runtime.InteropServices;
   public Animation (int durationmSeconds) : this (NDalicPINVOKE.Animation_New((float)durationmSeconds/1000.0f), true) {
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
   }
+
+  public Animation () : this (NDalicPINVOKE.Animation_New( 0.0f ), true ) {
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+  }
+  
 %}
 
 %enddef
old mode 100644 (file)
new mode 100755 (executable)
index 489af5a..9d32da5
       // Populate all members of "e" (OnStageEventArgs) with real data
       e.View = View.GetViewFromPtr(data);
 
+      //Console.WriteLine("############# OnStage()! e.View.Name=" + e.View.Name);
+
       if (_viewOnStageEventHandler != null)
       {
         //here we send all data to user event handlers
old mode 100644 (file)
new mode 100755 (executable)
index 74693cd..ed2dabc
@@ -26,174 +26,52 @@ using System.Runtime.InteropServices;
 %define STAGE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
 %typemap(cscode) NameSpace::ClassName %{
 
-/**
-  * @brief Event arguments that passed via Touch signal
-  *
-  */
-public class TouchEventArgs : EventArgs
-{
-   private TouchData _touchData;
-
-   /**
-     * @brief TouchData - contains the information of touch points
-     *
-     */
-   public TouchData TouchData
-   {
-      get
-      {
-         return _touchData;
-      }
-      set
-      {
-         _touchData = value;
-      }
-   }
-}
-
-
-/**
-  * @brief Event arguments that passed via Wheel signal
-  *
-  */
-public class WheelEventArgs : EventArgs
-{
-   private WheelEvent _wheelEvent;
-
-   /**
-     * @brief WheelEvent - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
-     *
-     */
-   public WheelEvent WheelEvent
-   {
-      get
-      {
-         return _wheelEvent;
-      }
-      set
-      {
-         _wheelEvent = value;
-      }
-   }
-}
-
-/**
-  * @brief Event arguments that passed via KeyEvent signal
-  *
-  */
-public class KeyEventArgs : EventArgs
-{
-   private KeyEvent _keyEvent;
-
-   /**
-     * @brief KeyEvent - is the keyevent sent to Stage.
-     *
-     */
-   public KeyEvent KeyEvent
-   {
-      get
-      {
-         return _keyEvent;
-      }
-      set
-      {
-         _keyEvent = value;
-      }
-   }
-}
-
-/**
-  * @brief Event arguments that passed via EventProcessingFinished signal
-  *
-  */
-public class EventProcessingFinishedEventArgs : EventArgs
-{
-}
-
-/**
-  * @brief Event arguments that passed via ContextLost signal
-  *
-  */
-public class ContextLostEventArgs : EventArgs
-{
-}
-
-/**
-  * @brief Event arguments that passed via ContextRegained signal
-  *
-  */
-public class ContextRegainedEventArgs : EventArgs
-{
-}
-
-/**
-  * @brief Event arguments that passed via SceneCreated signal
-  *
-  */
-public class SceneCreatedEventArgs : EventArgs
-{
-}
-
-
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void StageTouchCallbackDelegate(IntPtr data);
-  private DaliEventHandler<object,TouchEventArgs> _stageTouchEventHandler;
-  private StageTouchCallbackDelegate _stageTouchCallbackDelegate;
-
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void WheelCallbackDelegate(IntPtr data);
-  private DaliEventHandler<object,WheelEventArgs> _stageWheelEventHandler;
-  private WheelCallbackDelegate _stageWheelCallbackDelegate;
-
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void KeyCallbackDelegate(IntPtr data);
-  private DaliEventHandler<object,KeyEventArgs> _stageKeyEventHandler;
-  private KeyCallbackDelegate _stageKeyCallbackDelegate;
 
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void EventProcessingFinishedEventCallbackDelegate();
-  private DaliEventHandler<object,EventProcessingFinishedEventArgs> _stageEventProcessingFinishedEventHandler;
-  private EventProcessingFinishedEventCallbackDelegate _stageEventProcessingFinishedEventCallbackDelegate;
-
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void ContextLostEventCallbackDelegate();
-  private DaliEventHandler<object,ContextLostEventArgs> _stageContextLostEventHandler;
-  private ContextLostEventCallbackDelegate _stageContextLostEventCallbackDelegate;
+  /**
+    * @brief Event arguments that passed via Touch signal
+    *
+    */
+  public class TouchEventArgs : EventArgs
+  {
+     private TouchData _touchData;
 
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void ContextRegainedEventCallbackDelegate();
-  private DaliEventHandler<object,ContextRegainedEventArgs> _stageContextRegainedEventHandler;
-  private ContextRegainedEventCallbackDelegate _stageContextRegainedEventCallbackDelegate;
+     /**
+       * @brief TouchData - contains the information of touch points
+       *
+       */
+     public TouchData TouchData
+     {
+        get
+        {
+           return _touchData;
+        }
+        set
+        {
+           _touchData = value;
+        }
+     }
+  }
 
-  [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-  private delegate void SceneCreatedEventCallbackDelegate();
-  private DaliEventHandler<object,SceneCreatedEventArgs> _stageSceneCreatedEventHandler;
-  private SceneCreatedEventCallbackDelegate _stageSceneCreatedEventCallbackDelegate;
+  private event EventHandler<TouchEventArgs> _stageTouchEventHandler;
+  private EventCallbackDelegateType1<IntPtr> _stageTouchCallbackDelegate;
 
   /**
-    * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of TouchEventHandler-DaliEventHandler<object,TouchEventArgs>) provided by the user.
-    * Touched signal is emitted when the screen is touched and when the touch ends
+    * @brief Event for TouchEvent signal which can be used to subscribe/unsubscribe the event handler
+    * TouchEvent signal is emitted when the screen is touched and when the touch ends
     * (i.e. the down & up touch events only).
     *
     */
-  public event DaliEventHandler<object,TouchEventArgs> Touched
+  public event EventHandler<TouchEventArgs> TouchEvent
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageTouchEventHandler == null)
-           {
-              _stageTouchEventHandler += value;
-
-              _stageTouchCallbackDelegate = new StageTouchCallbackDelegate(OnStageTouch);
-              this.TouchSignal().Connect(_stageTouchCallbackDelegate);
-           }
+          _stageTouchEventHandler += value;
+          _stageTouchCallbackDelegate = OnStageTouch;
+          this.TouchSignal().Connect(_stageTouchCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -202,50 +80,71 @@ public class SceneCreatedEventArgs : EventArgs
            {
               this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
            }
-
            _stageTouchEventHandler -= value;
         }
      }
   }
 
-  // Callback for Stage Touch signal
   private void OnStageTouch(IntPtr data)
   {
-     TouchEventArgs e = new TouchEventArgs();
+    TouchEventArgs e = new TouchEventArgs();
+
+    if( data != null )
+    {
+      e.TouchData = TouchData.GetTouchDataFromPtr( data );
+    }
+
+    if (_stageTouchEventHandler != null)
+    {
+      _stageTouchEventHandler(this, e);
+    }
+  }
+
 
-     // Populate all members of "e" (TouchEventArgs) with real data
-     e.TouchData = TouchData.GetTouchDataFromPtr( data );
+  /**
+    * @brief WheelEvent arguments that passed via Wheel signal
+    *
+    */
+  public class WheelEventArgs : EventArgs
+  {
+     private WheelEvent _wheelEvent;
 
-     if (_stageTouchEventHandler != null)
+     /**
+       * @brief WheelEvent - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
+       *
+       */
+     public WheelEvent WheelEvent
      {
-        //here we send all data to user event handlers
-        _stageTouchEventHandler(this, e);
+        get
+        {
+           return _wheelEvent;
+        }
+        set
+        {
+           _wheelEvent = value;
+        }
      }
   }
 
+  private event EventHandler<WheelEventArgs> _stageWheelEventHandler;
+  private EventCallbackDelegateType1<IntPtr> _stageWheelCallbackDelegate;
+
   /**
-    * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of WheelEventHandler-DaliEventHandler<object,WheelEventArgs>) provided by the user.
-    * WheelMoved signal is emitted is emitted when wheel event is received.
+    * @brief Event for WheelEvent signal which can be used to subscribe/unsubscribe the event handler
+    * WheelEvent signal is emitted is emitted when wheel event is received.
     *
     */
-  public event DaliEventHandler<object,WheelEventArgs> WheelMoved
+  public event EventHandler<WheelEventArgs> WheelEvent
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageWheelEventHandler == null)
-           {
-              _stageWheelEventHandler += value;
-
-              _stageWheelCallbackDelegate = new WheelCallbackDelegate(OnStageWheel);
-              this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
-           }
+          _stageWheelEventHandler += value;
+          _stageWheelCallbackDelegate = OnStageWheel;
+          this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -254,50 +153,70 @@ public class SceneCreatedEventArgs : EventArgs
            {
               this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
            }
-
            _stageWheelEventHandler -= value;
         }
      }
   }
 
-  // Callback for Stage WheelEventsignal
   private void OnStageWheel(IntPtr data)
   {
-     WheelEventArgs e = new WheelEventArgs();
+    WheelEventArgs e = new WheelEventArgs();
 
-     // Populate all members of "e" (WheelEventArgs) with real data
-     e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr( data );
+    if( data != null )
+    {
+      e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr( data );
+    }
+
+    if (_stageWheelEventHandler != null)
+    {
+      _stageWheelEventHandler(this, e);
+    }
+  }
+
+  /**
+    * @brief Event arguments that passed via KeyEvent signal
+    *
+    */
+  public class KeyEventArgs : EventArgs
+  {
+     private KeyEvent _keyEvent;
 
-     if (_stageWheelEventHandler != null)
+     /**
+       * @brief KeyEvent - is the keyevent sent to Stage.
+       *
+       */
+     public KeyEvent KeyEvent
      {
-        //here we send all data to user event handlers
-        _stageWheelEventHandler(this, e);
+        get
+        {
+           return _keyEvent;
+        }
+        set
+        {
+           _keyEvent = value;
+        }
      }
   }
 
+  private event EventHandler<KeyEventArgs> _stageKeyEventHandler;
+  private EventCallbackDelegateType1<IntPtr> _stageKeyCallbackDelegate;
+
   /**
-    * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of KeyEventHandler-DaliEventHandler<object,KeyEventArgs>) provided by the user.
-    * KeyPressed signal is emitted is emitted when key event is received.
+    * @brief Event for KeyEvent signal which can be used to subscribe/unsubscribe the event handler
+    * KeyEvent signal is emitted is emitted when key event is received.
     *
     */
-  public event DaliEventHandler<object,KeyEventArgs> KeyPressed
+  public event EventHandler<KeyEventArgs> KeyEvent
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageKeyEventHandler == null)
-           {
-              _stageKeyEventHandler += value;
-
-              _stageKeyCallbackDelegate = new KeyCallbackDelegate(OnStageKey);
-              this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
-           }
+            _stageKeyEventHandler += value;
+            _stageKeyCallbackDelegate = OnStageKey;
+            this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -306,50 +225,48 @@ public class SceneCreatedEventArgs : EventArgs
            {
               this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
            }
-
            _stageKeyEventHandler -= value;
         }
      }
   }
 
   // Callback for Stage KeyEventsignal
-  private void OnStageKey(IntPtr keyEvent)
+  private void OnStageKey(IntPtr data)
   {
-     KeyEventArgs e = new KeyEventArgs();
+    KeyEventArgs e = new KeyEventArgs();
+
+    if( data != null )
+    {
+      e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr( data );
+    }
+
+    if (_stageKeyEventHandler != null)
+    {
+      //here we send all data to user event handlers
+      _stageKeyEventHandler(this, e);
+    }
+  }
 
-     // Populate all members of "e" (KeyEventArgs) with real data
-     e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr( keyEvent );
 
-     if (_stageKeyEventHandler != null)
-     {
-        //here we send all data to user event handlers
-        _stageKeyEventHandler(this, e);
-     }
-  }
+  private event EventHandler _stageEventProcessingFinishedEventHandler;
+  private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
 
   /**
     * @brief Event for EventProcessingFinished signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of EventProcessingFinishedEventHandler-DaliEventHandler<object,EventProcessingFinishedEventArgs>) 
     * provided by the user. EventProcessingFinished signal is emitted just after the event processing is finished.
     *
     */
-  public event DaliEventHandler<object,EventProcessingFinishedEventArgs> EventProcessingFinished
+  public event EventHandler EventProcessingFinished
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageEventProcessingFinishedEventHandler == null)
-           {
-              _stageEventProcessingFinishedEventHandler += value;
-
-              _stageEventProcessingFinishedEventCallbackDelegate = new EventProcessingFinishedEventCallbackDelegate(OnEventProcessingFinished);
-              this.EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
-           }
+          _stageEventProcessingFinishedEventHandler += value;
+          _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
+          this.EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -358,7 +275,6 @@ public class SceneCreatedEventArgs : EventArgs
            {
               this.EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
            }
-
            _stageEventProcessingFinishedEventHandler -= value;
         }
      }
@@ -367,38 +283,32 @@ public class SceneCreatedEventArgs : EventArgs
   // Callback for Stage EventProcessingFinishedSignal
   private void OnEventProcessingFinished()
   {
-     EventProcessingFinishedEventArgs e = new EventProcessingFinishedEventArgs();
-
      if (_stageEventProcessingFinishedEventHandler != null)
      {
-        //here we send all data to user event handlers
-        _stageEventProcessingFinishedEventHandler(this, e);
+        _stageEventProcessingFinishedEventHandler(this, null);
      }
   }
 
+
+  private EventHandler _stageContextLostEventHandler;
+  private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
+
   /**
     * @brief Event for ContextLost signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of ContextLostEventHandler-DaliEventHandler<object,ContextLostEventArgs>) provided by the user.
     * ContextLost signal is emitted when the GL context is lost (Platform specific behaviour).
     *
     */
-  public event DaliEventHandler<object,ContextLostEventArgs> ContextLost
+  public event EventHandler ContextLost
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageContextLostEventHandler == null)
-           {
-              _stageContextLostEventHandler += value;
-
-              _stageContextLostEventCallbackDelegate = new ContextLostEventCallbackDelegate(OnContextLost);
-              this.ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
-           }
+            _stageContextLostEventHandler += value;
+            _stageContextLostEventCallbackDelegate = OnContextLost;
+            this.ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -416,39 +326,33 @@ public class SceneCreatedEventArgs : EventArgs
   // Callback for Stage ContextLostSignal
   private void OnContextLost()
   {
-     ContextLostEventArgs e = new ContextLostEventArgs();
-
      if (_stageContextLostEventHandler != null)
      {
-        //here we send all data to user event handlers
-        _stageContextLostEventHandler(this, e);
+        _stageContextLostEventHandler(this, null);
      }
   }
 
+
+  private EventHandler _stageContextRegainedEventHandler;
+  private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
+
   /**
     * @brief Event for ContextRegained signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of ContextRegainedEventHandler-DaliEventHandler<object,ContextRegainedEventArgs>) 
     * provided by the user. ContextRegained signal is emitted when the GL context is regained (Platform specific
     * behaviour).
     *
     */
-  public event DaliEventHandler<object,ContextRegainedEventArgs> ContextRegained
+  public event EventHandler ContextRegained
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageContextRegainedEventHandler == null)
-           {
-              _stageContextRegainedEventHandler += value;
-
-              _stageContextRegainedEventCallbackDelegate = new ContextRegainedEventCallbackDelegate(OnContextRegained);
-              this.ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
-           }
+            _stageContextRegainedEventHandler += value;
+            _stageContextRegainedEventCallbackDelegate = OnContextRegained;
+            this.ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -466,38 +370,32 @@ public class SceneCreatedEventArgs : EventArgs
   // Callback for Stage ContextRegainedSignal
   private void OnContextRegained()
   {
-     ContextRegainedEventArgs e = new ContextRegainedEventArgs();
-
      if (_stageContextRegainedEventHandler != null)
      {
-        //here we send all data to user event handlers
-        _stageContextRegainedEventHandler(this, e);
+        _stageContextRegainedEventHandler(this, null);
      }
   }
 
+
+  private EventHandler _stageSceneCreatedEventHandler;
+  private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
+
   /**
     * @brief Event for SceneCreated signal which can be used to subscribe/unsubscribe the event handler
-    * (in the type of SceneCreatedEventHandler-DaliEventHandler<object,SceneCreatedEventArgs>) provided by the user.
     * SceneCreated signal is emitted after the initial scene is created.
     *
     */
-  public event DaliEventHandler<object,SceneCreatedEventArgs> SceneCreated
+  public event EventHandler SceneCreated
   {
      add
      {
         lock(this)
         {
-           // Restricted to only one listener
-           if (_stageSceneCreatedEventHandler == null)
-           {
-              _stageSceneCreatedEventHandler += value;
-
-              _stageSceneCreatedEventCallbackDelegate = new SceneCreatedEventCallbackDelegate(OnSceneCreated);
-              this.SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
-           }
+            _stageSceneCreatedEventHandler += value;
+            _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
+            this.SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
         }
      }
-
      remove
      {
         lock(this)
@@ -515,30 +413,23 @@ public class SceneCreatedEventArgs : EventArgs
   // Callback for Stage SceneCreatedSignal
   private void OnSceneCreated()
   {
-     SceneCreatedEventArgs e = new SceneCreatedEventArgs();
-
      if (_stageSceneCreatedEventHandler != null)
      {
-        //here we send all data to user event handlers
-        _stageSceneCreatedEventHandler(this, e);
+        _stageSceneCreatedEventHandler(this, null);
      }
   }
 
-  ///< name "Size", type Dali.Size (Stage Size value)
-  //@since 1.0.0
-  public Dali.Size Size
+
+  public Vector2 Size
   {
      get
      {
-        Vector2 ret1 = GetSize();
-        Dali.Size ret= new Size(ret1);
+        Vector2 ret = GetSize();
         return ret;
      }
   }
 
-  ///< name "BackgroundColor", type Dali.Color (Stage background color value)
-  //@since 1.0.0
-  public Dali.Color BackgroundColor
+  public Vector4 BackgroundColor
   {
      set
      {
@@ -546,8 +437,7 @@ public class SceneCreatedEventArgs : EventArgs
      }
      get
      {
-        Vector4 ret1 = GetBackgroundColor();
-        Dali.Color ret = new Color(ret1);
+        Vector4 ret = GetBackgroundColor();
         return ret;
      }
    }
index ef41bbc..a7431ce 100755 (executable)
@@ -96,11 +96,11 @@ namespace MyCSharpExample
 
             CreateContent();
 
-            KeyboardFocusManager.Get().PreFocusChange += OnPreFocusChange;
+            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
         }
 
         // Callback for KeyboardFocusManager
-        private Actor OnPreFocusChange(object source, KeyboardFocusManager.PreFocusChangeEventArgs e)
+        private Actor OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
         {
             if (!e.Proposed && !e.Current)
             {
index be7a11b..8437e3a 100755 (executable)
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+* Copyright (c) 2016 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
 
 using System;
 using System.Runtime.InteropServices;
 using Dali;
+using Dali.Constants;
 
 namespace MyCSharpExample
 {
-    class Example
-    {
-        private Dali.Application _application;
+  class Example
+  {
+    private Dali.Application _application;
+    private Animation _animation;
+    private TextLabel _text;
 
-        private Animation _animation;
-        private TextLabel _text;
+    public Example(Dali.Application application)
+    {
+      _application = application;
+      _application.Initialized += Initialize;
+    }
 
-        public Example(Dali.Application application)
-        {
-            _application = application;
-            _application.Initialized += Initialize;
-        }
+    public void Initialize(object source, AUIApplicationInitEventArgs e)
+    {
+      Console.WriteLine("Customized Application Initialize event handler");
+      Stage stage = Stage.GetCurrent();
+      stage.BackgroundColor = Color.Cyan;
+      stage.TouchEvent += OnStageTouched;
+      stage.WheelEvent += OnStageWheelMoved;
+      stage.KeyEvent += OnStageKeyPressed;
+      stage.EventProcessingFinished += OnStageEventProcessingFinished;
+
+      // Add a _text label to the stage
+      _text = new TextLabel("Hello Mono World");
+      _text.ParentOrigin = ParentOrigin.Center;
+      _text.AnchorPoint = AnchorPoint.Center;
+      _text.HorizontalAlignment = "CENTER";
+      _text.PointSize = 32.0f;
+      _text.TextColor = Color.Magenta;
+      stage.Add(_text);
+    }
 
-        public void Initialize(object source, AUIApplicationInitEventArgs e)
-        {
-            Console.WriteLine("Customized Application Initialize event handler");
-            Stage stage = Stage.GetCurrent();
-            stage.BackgroundColor = Color.Green;
+    // Callback for _animation finished signal handling
+    public void AnimationFinished(object sender, EventArgs e)
+    {
+        Console.WriteLine("AnimationFinished()!");
+    }
 
-           stage.Touched += OnStageTouched;
+    // Callback for _animation finished signal handling
+    public void AnimationFinished2(object sender, EventArgs e)
+    {
+      Console.WriteLine("AnimationFinished2()!");
+      if(_animation)
+      {
+        Console.WriteLine("Duration= " + _animation.Duration);
+        Console.WriteLine("EndAction= " + _animation.EndAction);
+      }
+    }
 
-            // Add a _text label to the stage
-            _text = new TextLabel("Hello Mono World");
-            _text.ParentOrigin = NDalic.ParentOriginCenter;
-            _text.AnchorPoint = NDalic.AnchorPointCenter;
-            _text.HorizontalAlignment = "CENTER";
-            _text.PointSize = 32.0f;
+    public void OnStageEventProcessingFinished(object sender, EventArgs e)
+    {
+      Console.WriteLine("OnStageEventProcessingFinished()!");
+      if( e != null)
+      {
+        Console.WriteLine("e != null !");
+      }
+    }
 
-            stage.Add(_text);
-        }
+    public void OnStageKeyPressed(object sender, Stage.KeyEventArgs e)
+    {
+      Console.WriteLine("OnStageKeyEventOccured()!");
+      Console.WriteLine("keyPressedName=" + e.KeyEvent.keyPressedName);
+      Console.WriteLine("state=" + e.KeyEvent.state);
+    }
 
-        // Callback for _animation finished signal handling
-        public void AnimationFinished(object source, Animation.FinishedEventArgs e)
-        {
-            Console.WriteLine("Customized Animation Finished Event handler");
-            Console.WriteLine("Animation finished: duration = " + e.Animation.Duration);
-            Console.WriteLine("End Action = " + e.Animation.GetEndAction());
-        }
+    public void OnStageWheelMoved(object sender, Stage.WheelEventArgs e)
+    {
+      Console.WriteLine("OnStageWheelEventOccured()!");
+      Console.WriteLine("direction=" + e.WheelEvent.direction);
+      Console.WriteLine("type=" + e.WheelEvent.type);
+    }
 
-        // Callback for stage touched signal handling
-        public void OnStageTouched(object source, Stage.TouchEventArgs e)
+    // Callback for stage touched signal handling
+    public void OnStageTouched(object sender, Stage.TouchEventArgs e)
+    {
+      // Only animate the _text label when touch down happens
+      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      {
+        Console.WriteLine("Customized Stage Touch event handler");
+        // Create a new _animation
+        if( _animation )
         {
-            //TouchData touchData = TouchData.GetTouchDataFromPtr( data );
-
-            // Only animate the _text label when touch down happens
-            if( e.TouchData.GetState(0) == PointStateType.DOWN )
-            {
-                Console.WriteLine("Customized Stage Touch event handler");
-                // Create a new _animation
-                if( _animation )
-                {
-                    _animation.Reset();
-                }
-
-                _animation = new Animation(1.0f); // 1 second of duration
-
-               _animation.AnimateTo(_text, Animation.Orientation, new Quaternion( new Radian( new Degree( 180.0f ) ), Vector3.XAXIS ), new AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.0f, 0.5f));
-
-               _animation.AnimateTo(_text, Animation.Orientation, new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS ), new AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.5f, 0.5f));
-
-                // Connect the signal callback for animaiton finished signal
-                _animation.Finished += AnimationFinished;
-
-                // Play the _animation
-                _animation.Play();
-
-                Console.WriteLine("Looping:" + _animation.Looping);
-            }
+          //_animation.Stop(Dali.Constants.Animation.EndAction.Stop);
+          _animation.Reset();
         }
 
-        public void MainLoop()
-        {
-            _application.MainLoop ();
-        }
+        _animation = new Animation {
+          Duration = 2000,
+          StartTime = 0,
+          EndTime = 500,
+          TargetPoperty = "Orientation",
+          Destination = new Quaternion( new Radian( new Degree( 180.0f ) ), Vect3.Xaxis)
+        };
+        _animation.AnimateTo(_text);
+
+        _animation.StartTime = 500;
+        _animation.EndTime = 1000;
+        _animation.TargetPoperty = "Orientation";
+        _animation.Destination = new Quaternion( new Radian( new Degree( 0.0f ) ), Vect3.Xaxis );
+        _animation.AnimateTo(_text);
+
+        _animation.StartTime = 1000;
+        _animation.EndTime = 1500;
+        _animation.TargetPoperty = "ScaleX";
+        _animation.Destination = 3.0f;
+        _animation.AnimateBy(_text);
+
+        _animation.StartTime = 1500;
+        _animation.EndTime = 2000;
+        _animation.TargetPoperty = "ScaleY";
+        _animation.Destination = 4.0f;
+        _animation.AnimateBy(_text);
+
+        _animation.EndAction = Dali.Constants.Animation.EndAction.Discard;
+
+        // Connect the signal callback for animaiton finished signal
+        _animation.Finished += AnimationFinished;
+        _animation.Finished += AnimationFinished2;
+
+        // Play the _animation
+        _animation.Play();
+
+      }
+    }
 
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
+    public void MainLoop()
+    {
+      _application.MainLoop ();
+    }
 
-        [STAThread]
-        static void Main(string[] args)
-        {
-            Console.WriteLine ("Hello Mono World");
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    [STAThread]
+    static void Main(string[] args)
+    {
+      Console.WriteLine ("Main() called!");
 
-            Example example = new Example(Application.NewApplication());
-            example.MainLoop ();
-        }
+      Example example = new Example(Application.NewApplication());
+      example.MainLoop ();
     }
+  }
 }
old mode 100644 (file)
new mode 100755 (executable)
index 4e7c3ac..e922f1f
@@ -134,10 +134,9 @@ namespace MyCSharpExample
     }
 
     // Callback for _animation finished signal handling
-    public void AnimationFinished(object source, Animation.FinishedEventArgs e)
+    public void AnimationFinished(object sender, EventArgs e)
     {
       Console.WriteLine("Customized Animation Finished Event handler");
-      Console.WriteLine("Animation finished: duration = " + e.Animation.Duration);
     }
     private void OnKey(object source, View.KeyInputFocusGainedEventArgs e)
     {
old mode 100644 (file)
new mode 100755 (executable)
index af74f1e..8e5826b
@@ -89,7 +89,7 @@ namespace MyCSharpExample
         {
             // Make sure when the current spin that takes input focus also takes the keyboard focus
             // For example, when you tap the spin directly
-            KeyboardFocusManager.Get().SetCurrentFocusActor(_textField);
+            FocusManager.Instance.SetCurrentFocusActor(_textField);
         }
 
         public void TextFieldKeyInputFocusLost(object source, KeyInputFocusLostEventArgs e)
@@ -371,13 +371,13 @@ namespace MyCSharpExample
             _spinDay.SetKeyboardFocusable(true);
             _spinDay.Name = "_spinDay";
 
-            KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.Get();
+            FocusManager keyboardFocusManager = FocusManager.Instance;
             keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
             keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed;
 
         }
 
-        private Actor OnKeyboardPreFocusChange(object source, KeyboardFocusManager.PreFocusChangeEventArgs e)
+        private Actor OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
         {
             Actor nextFocusActor = e.Proposed;
 
@@ -414,7 +414,7 @@ namespace MyCSharpExample
             return nextFocusActor;
         }
 
-        private void OnFocusedActorEnterKeyPressed(object source, KeyboardFocusManager.FocusedActorEnterKeyEventArgs e)
+        private void OnFocusedActorEnterKeyPressed(object source, FocusManager.FocusedActorEnterKeyEventArgs e)
         {
             // Make the text field in the current focused spin to take the key input
             KeyInputFocusManager manager = KeyInputFocusManager.Get();
diff --git a/plugins/dali-swig/examples/user-alphafunction.cs b/plugins/dali-swig/examples/user-alphafunction.cs
new file mode 100755 (executable)
index 0000000..0605706
--- /dev/null
@@ -0,0 +1,197 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Dali;
+using Dali.Constants;
+
+namespace MyCSharpExample
+{
+  class Example
+  {
+    private Dali.Application _application;
+    private Animation _animation;
+    private TextLabel _text;
+    private View _view1, _view2, _view3;
+    private UserAlphaFunctionDelegate _user_alpha_func;
+    private int myCount;
+
+    public static void Log(string str)
+    {
+      Console.WriteLine("[DALI C# SAMPLE] " + str);
+    }
+
+    public Example(Dali.Application application)
+    {
+      _application = application;
+      _application.Initialized += Initialize;
+    }
+
+    // Declare user alpha function delegate
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    delegate float UserAlphaFunctionDelegate(float progress);
+
+    public void Initialize(object source, AUIApplicationInitEventArgs e)
+    {
+      Log("Initialize() is called!");
+      Stage stage = Stage.GetCurrent();
+      stage.BackgroundColor = Color.White;
+      stage.TouchEvent += OnStageTouched;
+      stage.TouchEvent += OnStageTouched2;
+      //stage.EventProcessingFinished += OnEventProcessingFinished;
+      stage.WheelEvent += OnStageWheelEvent;
+
+      // Add a _text label to the stage
+      _text = new TextLabel("Hello Mono World");
+      _text.ParentOrigin = ParentOrigin.BottomCenter;
+      _text.AnchorPoint = AnchorPoint.BottomCenter;
+      _text.HorizontalAlignment = "CENTER";
+      _text.PointSize = 32.0f;
+      stage.Add(_text);
+
+      _view1 = new View();
+      _view1.Size = new Vector3(200.0f, 200.0f, 0.0f);
+      _view1.BackgroundColor = Color.Green;
+      _view1.ParentOrigin = ParentOrigin.Center;
+      _view1.AnchorPoint = AnchorPoint.Center;
+      _view1.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.ALL_DIMENSIONS);
+      _view1.OnStageEvent += OnStage;
+      stage.Add(_view1);
+
+      _view2 = new View();
+      _view2.BackgroundColor = Color.Red;
+      _view2.Size = new Vector3(50.0f, 50.0f, 0.0f);
+      _view2.ParentOrigin = ParentOrigin.TopLeft;
+      _view2.AnchorPoint = AnchorPoint.TopLeft;
+      _view2.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.ALL_DIMENSIONS);
+      _view1.Add(_view2);
+
+      _view3 = new View();
+      _view3.BackgroundColor = Color.Blue;
+      _view3.Size = new Vector3(50.0f, 50.0f, 0.0f);
+      _view3.ParentOrigin = ParentOrigin.TopLeft;
+      _view3.AnchorPoint = AnchorPoint.TopLeft;
+      _view3.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.ALL_DIMENSIONS);
+      _view1.Add(_view3);
+
+      _user_alpha_func = new UserAlphaFunctionDelegate(body);
+
+      MyAnimating();
+    }
+
+    // User defines alpha function as custom alpha function
+    // Important Notification : when this custom alpha-function is implemented,
+    // the other function call nor other data excess is prevented.
+    // this method must be implemented to calculate the values of input and output purely.
+    // unless, this will cause application crash.
+    float body(float progress)
+    {
+      if (progress > 0.2f && progress< 0.7f)
+      {
+        return progress + 0.8f;
+      }
+      return progress;
+    }
+
+    // Callback for _animation finished signal handling
+    public void AnimationFinished(object sender, EventArgs e)
+    {
+        Log("AnimationFinished() is called!");
+        myCount = 0;
+    }
+
+    public void MyAnimating()
+    {
+      // Create a new _animation
+      if( _animation )
+      {
+        _animation.Clear();
+        _animation.Reset();
+      }
+
+      _animation = new Animation(10000); // 10000 milli-second of duration
+      _animation.StartTime = 5000;
+      _animation.EndTime = 10000;
+      _animation.TargetPoperty = "Position";
+      _animation.AlphaFunction = new AlphaFunction(_user_alpha_func);
+      _animation.Destination = new Vector3(150.0f, 150.0f, 0.0f);
+      _animation.AnimateTo(_view2);
+      // Connect the signal callback for animaiton finished signal
+      _animation.Finished += AnimationFinished;
+      _animation.EndAction = Dali.Constants.Animation.EndAction.Discard;
+      // Play the _animation
+      _animation.Play();
+    }
+
+    // Callback for stage touched signal handling
+    public void OnStageTouched(object source, Stage.TouchEventArgs e)
+    {
+      // Only animate the _text label when touch down happens
+      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      {
+        Log("OnStageTouched() is called! PointStateType.DOWN came!");
+        myCount++;
+        if( myCount > 1 )
+        {
+          _animation.Stop();
+          Log("_animation.Stop() is called!");
+        }
+      }
+    }
+
+    // Callback for stage touched signal handling
+    public void OnStageTouched2(object source, Stage.TouchEventArgs e)
+    {
+      Log("OnStageTouched2() is called!state="+ e.TouchData.GetState(0) );
+    }
+
+    public void OnEventProcessingFinished(object source)
+       {
+      Log("OnEventProcessingFinished() is called!");
+    }
+
+    public void OnStageWheelEvent(object source, Stage.WheelEventArgs e)
+    {
+      Log("OnStageWheelEvent() is called!");
+      //Log("OnStageWheelEvent() is called!direction="+ e.WheelEvent.direction + " timeStamp=" + e.WheelEvent.timeStamp );
+    }
+
+
+    public void OnStage(object source , View.OnStageEventArgs e)
+       {
+      Log("OnStage() is called!");
+       }
+
+    public void MainLoop()
+    {
+      _application.MainLoop ();
+    }
+
+    [STAThread]
+    static void Main(string[] args)
+    {
+      Log("Main() is called!");
+
+      Example example = new Example(Application.NewApplication());
+      example.MainLoop ();
+
+      Log("After MainLoop()");
+    }
+  }
+}
+
old mode 100644 (file)
new mode 100755 (executable)
index e159317..71b0ddb
  */
 using System;
 
-namespace Dali {
-  namespace Constants{
-    namespace AlphaFunction {
-      public enum BuiltinFunction {
+namespace Dali 
+{
+  namespace Constants
+  {
+    namespace AlphaFunction
+    {
+      public enum BuiltinFunction
+      {
         Default       = Dali.AlphaFunction.BuiltinFunction.DEFAULT,
         Linear        = Dali.AlphaFunction.BuiltinFunction.LINEAR,
         Reverse       = Dali.AlphaFunction.BuiltinFunction.REVERSE,
@@ -35,60 +39,123 @@ namespace Dali {
         EaseOutBack   = Dali.AlphaFunction.BuiltinFunction.EASE_OUT_BACK,
         Count         = Dali.AlphaFunction.BuiltinFunction.COUNT
       }
-
-
-      public enum Mode {
+      public enum Mode
+      {
         BuiltinFunction  = Dali.AlphaFunction.Mode.BUILTIN_FUNCTION,
         CustomFunction   = Dali.AlphaFunction.Mode.CUSTOM_FUNCTION,
         Bezier           = Dali.AlphaFunction.Mode.BEZIER
       }
-
     } // namespace AlphaFunction
 
-    namespace FrameBuffer {
-      namespace Attachment {
-        public enum Mask {
+    namespace FrameBuffer
+    {
+      namespace Attachment
+      {
+        public enum Mask 
+        {
           None          = Dali.FrameBuffer.Attachment.Mask.NONE,          ///< No attachments are created initially                            @SINCE_1_1.45
           Depth         = Dali.FrameBuffer.Attachment.Mask.DEPTH,         ///< Depth buffer bit-mask value                                     @SINCE_1_1.45
           Stencil       = Dali.FrameBuffer.Attachment.Mask.STENCIL ,      ///< Stencil buffer bit-mask value                                   @SINCE_1_1.45
-          // Preset bit-mask combinations:
           DepthStencil  = Dali.FrameBuffer.Attachment.Mask.DEPTH_STENCIL  ///< The Framebuffer will be created with depth and stencil buffer   @SINCE_1_1.45
         }
-      } //namespace FrameBuffer
-    } // namespace Attachment
-
+      } //namespace Attachment
+    } // namespace FrameBuffer
 
-    public enum TextureType {
+    public enum TextureType 
+    {
       Texture2D     = Dali.TextureType.TEXTURE_2D,   ///< One 2D image                            @SINCE_1_1.43
       TextureCube   = Dali.TextureType.TEXTURE_CUBE  ///< Six 2D images arranged in a cube-shape  @SINCE_1_1.43
     }
 
-    /**
-     * @brief Stereoscopic view modes
-     * @SINCE_1_0.0
-     */
-    public enum ViewMode {
+    public enum ViewMode 
+    {
       Mono              = Dali.ViewMode.MONO,                          ///< Monoscopic (single camera). This is the default @SINCE_1_0.0
       StereoHorizontal  = Dali.ViewMode.STEREO_HORIZONTAL, ///< Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. @SINCE_1_0.0
       StereoVertical    = Dali.ViewMode.STEREO_VERTICAL,     ///< Stereoscopic. Frame buffer is split vertically with the left camera view at the top and the right camera view at the bottom. @SINCE_1_0.0
       StereoInterlaced  = Dali.ViewMode.STEREO_INTERLACED  ///< @DEPRECATED_1_1.19 @brief Stereoscopic. Left/Right camera views are rendered into the framebuffer on alternate frames. @SINCE_1_0.0
     }
 
-    public enum MeshVisualShadingModeValue {
+    public enum MeshVisualShadingModeValue
+    {
       TexturelessWithDiffuseLighting = Dali.MeshVisualShadingModeValue.TEXTURELESS_WITH_DIFFUSE_LIGHTING,       ///< *Simplest*. One color that is lit by ambient and diffuse lighting. @SINCE_1_1.45
       TexturedWithSpecularLigting = Dali.MeshVisualShadingModeValue.TEXTURED_WITH_SPECULAR_LIGHTING,         ///< Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. @SINCE_1_1.45
       TexturedWithDetailedSpecularLighting = Dali.MeshVisualShadingModeValue.TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING ///< Uses all textures provided including a gloss, normal and texture map along with specular, ambient and diffuse lighting. @SINCE_1_1.45
     }
 
-    /**
-     * @brief Projection modes.
-     * @SINCE_1_0.0
-     */
-    public enum ProjectionMode {
+    public enum ProjectionMode
+    {
       PerspectiveProjection  = Dali.ProjectionMode.PERSPECTIVE_PROJECTION,      ///< Distance causes foreshortening; objects further from the camera appear smaller @SINCE_1_0.0
       OrthographicProjection = Dali.ProjectionMode.ORTHOGRAPHIC_PROJECTION      ///< Relative distance from the camera does not affect the size of objects @SINCE_1_0.0
     }
 
+    namespace Animation
+    {
+      public enum EndAction
+      {
+        Cancel = Dali.Animation.DaliEndAction.Bake,
+        Discard = Dali.Animation.DaliEndAction.Discard,
+        Stop = Dali.Animation.DaliEndAction.BakeFinal
+      }
+      public enum Interpolation
+      {
+        Linear = Dali.Animation.Interpolation.Linear,
+        Cubic = Dali.Animation.Interpolation.Cubic
+      }
+      public enum State
+      {
+        Stopped = Dali.Animation.State.STOPPED,
+        Playing = Dali.Animation.State.PLAYING,
+        Paused = Dali.Animation.State.PAUSED
+      }
+    } //namespace Animation
+
+    public struct ParentOrigin
+    {
+      public static readonly float Top = NDalic.ParentOriginTop;
+      public static readonly float Bottom = NDalic.ParentOriginBottom;
+      public static readonly float Left = NDalic.ParentOriginLeft;
+      public static readonly float Right = NDalic.ParentOriginRight;
+      public static readonly float Middle = NDalic.ParentOriginMiddle;
+      public static readonly Dali.Vector3 TopLeft = NDalic.ParentOriginTopLeft;
+      public static readonly Dali.Vector3 TopCenter = NDalic.ParentOriginTopCenter;
+      public static readonly Dali.Vector3 TopRight = NDalic.ParentOriginTopRight;
+      public static readonly Dali.Vector3 CenterLeft = NDalic.ParentOriginCenterLeft;
+      public static readonly Dali.Vector3 Center = NDalic.ParentOriginCenter;
+      public static readonly Dali.Vector3 CenterRight = NDalic.ParentOriginCenterRight;
+      public static readonly Dali.Vector3 BottomLeft = NDalic.ParentOriginBottomLeft;
+      public static readonly Dali.Vector3 BottomCenter = NDalic.ParentOriginBottomCenter;
+      public static readonly Dali.Vector3 BottomRight = NDalic.ParentOriginBottomRight;
+    }
+
+    public struct AnchorPoint
+    {
+      public static readonly float Top = NDalic.AnchorPointTop;
+      public static readonly float Bottom = NDalic.AnchorPointBottom;
+      public static readonly float Left = NDalic.AnchorPointLeft;
+      public static readonly float Right = NDalic.AnchorPointRight;
+      public static readonly float Middle = NDalic.AnchorPointMiddle;
+      public static readonly Dali.Vector3 TopLeft = NDalic.AnchorPointTopLeft;
+      public static readonly Dali.Vector3 TopCenter = NDalic.AnchorPointTopCenter;
+      public static readonly Dali.Vector3 TopRight = NDalic.AnchorPointTopRight;
+      public static readonly Dali.Vector3 CenterLeft = NDalic.AnchorPointCenterLeft;
+      public static readonly Dali.Vector3 Center = NDalic.AnchorPointCenter;
+      public static readonly Dali.Vector3 CenterRight = NDalic.AnchorPointCenterRight;
+      public static readonly Dali.Vector3 BottomLeft = NDalic.AnchorPointBottomLeft;
+      public static readonly Dali.Vector3 BottomCenter = NDalic.AnchorPointBottomCenter;
+      public static readonly Dali.Vector3 BottomRight = NDalic.AnchorPointBottomRight;
+    }
+
+    public struct Vect3
+    {
+      public static readonly Dali.Vector3 One = Dali.Vector3.ONE;
+      public static readonly Dali.Vector3 Xaxis = Dali.Vector3.XAXIS;
+      public static readonly Dali.Vector3 Yaxis = Dali.Vector3.YAXIS;
+      public static readonly Dali.Vector3 Zaxis = Dali.Vector3.ZAXIS;
+      public static readonly Dali.Vector3 NegativeXaxis = Dali.Vector3.NEGATIVE_XAXIS;
+      public static readonly Dali.Vector3 NegativeYaxis = Dali.Vector3.NEGATIVE_YAXIS;
+      public static readonly Dali.Vector3 NegativeZaxis = Dali.Vector3.NEGATIVE_ZAXIS;
+      public static readonly Dali.Vector3 Zero = Dali.Vector3.ZERO;
+    }
 
   } // namespace Constants
 } // namesapce Dali
old mode 100644 (file)
new mode 100755 (executable)
index 80becbf..53e8321
@@ -20,9 +20,21 @@ namespace Dali {
     using System.Runtime.InteropServices;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    public delegate void DaliEventHandler<T,U>(T source, U e);
+    public delegate R DaliEventHandlerWithReturnType<T,U,R>(T source, U e);
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    public delegate R DaliEventHandlerWithReturnType<T,U,R>(T source, U e);
+    public delegate void EventCallbackDelegateType0();
+
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    public delegate void EventCallbackDelegateType1<T>(T arg1);
+
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    public delegate void EventCallbackDelegateType2<T,U>(T arg1, U arg2);
+
+
+    //this should be removed with EventHandler from .NET
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    public delegate void DaliEventHandler<T,U>(T source, U e);
+
 
 }
old mode 100644 (file)
new mode 100755 (executable)
similarity index 96%
rename from plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs
rename to plugins/dali-swig/manual/csharp/FocusManager.cs
index 4051b36..17e7685
@@ -20,18 +20,18 @@ namespace Dali {
 using System;
 using System.Runtime.InteropServices;
 
-public class KeyboardFocusManager : BaseHandle {
+public class FocusManager : BaseHandle {
   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
-  internal KeyboardFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.KeyboardFocusManager_SWIGUpcast(cPtr), cMemoryOwn) {
+  internal FocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.KeyboardFocusManager_SWIGUpcast(cPtr), cMemoryOwn) {
     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
   }
 
-  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardFocusManager obj) {
+  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FocusManager obj) {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
   }
 
-  ~KeyboardFocusManager() {
+  ~FocusManager() {
     DisposeQueue.Instance.Add(this);
   }
 
@@ -461,12 +461,12 @@ public class PreFocusChangeEventArgs : EventArgs
      }
   }
 
-  public KeyboardFocusManager() : this(NDalicManualPINVOKE.new_KeyboardFocusManager(), true) {
+  public FocusManager() : this(NDalicManualPINVOKE.new_KeyboardFocusManager(), true) {
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
   }
 
-  public static KeyboardFocusManager Get() {
-    KeyboardFocusManager ret = new KeyboardFocusManager(NDalicManualPINVOKE.KeyboardFocusManager_Get(), true);
+  public static FocusManager Get() {
+    FocusManager ret = new FocusManager(NDalicManualPINVOKE.KeyboardFocusManager_Get(), true);
     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     return ret;
   }
@@ -557,6 +557,17 @@ public class PreFocusChangeEventArgs : EventArgs
     return ret;
   }
 
+  private static readonly FocusManager instance = FocusManager.Get();
+
+  public static FocusManager Instance
+  {
+      get
+      {
+          return instance;
+      }
+  }
+
+
 }
 
 }
old mode 100644 (file)
new mode 100755 (executable)
index 949dfb8..bd49666
@@ -68,7 +68,7 @@ public class KeyboardPreFocusChangeSignal : global::System.IDisposable {
     return ret;
   }
 
-  public void Connect(KeyboardFocusManager.PreFocusChangeEventCallbackDelegate func) {
+  public void Connect(FocusManager.PreFocusChangeEventCallbackDelegate func) {
      NDalicManualPINVOKE.KeyboardPreFocusChangeSignal_Connect(swigCPtr, func);
      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
  }
old mode 100644 (file)
new mode 100755 (executable)
index d39ebcb..77937dc
@@ -80,7 +80,7 @@ namespace Dali
         public static extern uint KeyboardPreFocusChangeSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_KeyboardPreFocusChangeSignal_Connect")]
-        public static extern void KeyboardPreFocusChangeSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, KeyboardFocusManager.PreFocusChangeEventCallbackDelegate delegate1);
+        public static extern void KeyboardPreFocusChangeSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, FocusManager.PreFocusChangeEventCallbackDelegate delegate1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_KeyboardPreFocusChangeSignal_Disconnect")]
         public static extern void KeyboardPreFocusChangeSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);