Merge "Guide to ResourceImage scaling and filtering" into tizen
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 29 May 2015 16:06:41 +0000 (09:06 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 29 May 2015 16:06:41 +0000 (09:06 -0700)
48 files changed:
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.h
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.h
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-view.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-view.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.cpp
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h
docs/content/main.md
docs/content/shared-javascript-and-cpp-documentation/text-field.md [new file with mode: 0644]
docs/content/shared-javascript-and-cpp-documentation/text-label.md
packaging/dali-toolkit.spec
plugins/dali-script-v8/src/events/event-object-generator.cpp
plugins/dali-script-v8/src/events/event-object-generator.h
plugins/dali-script-v8/src/image/resource-image-api.cpp
plugins/dali-script-v8/src/signals/dali-any-javascript-converter.cpp
plugins/dali-script-v8/src/signals/signal-manager.cpp
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-api.cpp
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-wrapper.cpp
plugins/dali-script-v8/src/toolkit/focus-manager/keyboard-focus-manager-wrapper.h

index e6f1b50..b6b80a2 100644 (file)
@@ -101,7 +101,7 @@ DummyControlImplOverride::DummyControlImplOverride()
   sizeAnimationCalled(false),
   touchEventCalled(false),
   hoverEventCalled(false),
-  mouseWheelEventCalled(false),
+  wheelEventCalled(false),
   keyEventCalled(false),
   keyInputFocusGained(false),
   keyInputFocusLost(false)
@@ -130,7 +130,7 @@ void DummyControlImplOverride::OnSizeSet(const Vector3& targetSize) { sizeSetCal
 void DummyControlImplOverride::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { sizeAnimationCalled = true; }
 bool DummyControlImplOverride::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
 bool DummyControlImplOverride::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
-bool DummyControlImplOverride::OnMouseWheelEvent(const MouseWheelEvent& event) { mouseWheelEventCalled = true; return false; }
+bool DummyControlImplOverride::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
 bool DummyControlImplOverride::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
 void DummyControlImplOverride::OnKeyInputFocusGained() { keyInputFocusGained = true; }
 void DummyControlImplOverride::OnKeyInputFocusLost() { keyInputFocusLost = true; }
index 7791006..bcef6d1 100644 (file)
@@ -119,7 +119,7 @@ private: // From CustomActorImpl
   virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
   virtual bool OnTouchEvent(const TouchEvent& event);
   virtual bool OnHoverEvent(const HoverEvent& event);
-  virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+  virtual bool OnWheelEvent(const WheelEvent& event);
   virtual bool OnKeyEvent(const KeyEvent& event);
   virtual void OnKeyInputFocusGained();
   virtual void OnKeyInputFocusLost();
@@ -142,7 +142,7 @@ public:
   bool sizeAnimationCalled;
   bool touchEventCalled;
   bool hoverEventCalled;
-  bool mouseWheelEventCalled;
+  bool wheelEventCalled;
   bool keyEventCalled;
   bool keyInputFocusGained;
   bool keyInputFocusLost;
index 2fce6a2..c083fef 100644 (file)
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <stdint.h>
 #include <cstring>
-#include <dali/devel-api/images/image-operations.h>
+#include <dali/public-api/images/image-operations.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/common/set-wrapper.h>
index 275432c..d1f6925 100644 (file)
@@ -26,7 +26,7 @@
 #include <dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/key-event-integ.h>
-#include <dali/integration-api/events/mouse-wheel-event-integ.h>
+#include <dali/integration-api/events/wheel-event-integ.h>
 #include <dali/integration-api/events/long-press-gesture-event.h>
 #include <dali/integration-api/events/pinch-gesture-event.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
@@ -780,13 +780,13 @@ int UtcDaliControlImplTypeRegistry(void)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 namespace
 {
-static bool MouseWheelEventCallback(Actor actor, const MouseWheelEvent& event)
+static bool WheelEventCallback(Actor actor, const WheelEvent& event)
 {
   return false;
 }
 }
 
-int UtcDaliControlImplMouseWheelEvent(void)
+int UtcDaliControlImplWheelEvent(void)
 {
   ToolkitTestApplication application;
 
@@ -798,20 +798,20 @@ int UtcDaliControlImplMouseWheelEvent(void)
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
-    dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+    dummy.WheelEventSignal().Connect(&WheelEventCallback);
 
     application.Render();
     application.SendNotification();
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, false, TEST_LOCATION );
+    DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, false, TEST_LOCATION );
 
-    // simulate a mouse wheel event
+    // simulate a wheel event
     Vector2 screenCoordinates( 10.0f, 10.0f );
-    Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
-    application.ProcessEvent(event);
-    DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, true, TEST_LOCATION );
+    Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
+    application.ProcessEvent( event );
+    DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, true, TEST_LOCATION );
 
     Stage::GetCurrent().Remove(dummy);
   }
@@ -824,17 +824,17 @@ int UtcDaliControlImplMouseWheelEvent(void)
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
-    dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+    dummy.WheelEventSignal().Connect(&WheelEventCallback);
 
     application.Render();
     application.SendNotification();
     application.Render();
     application.SendNotification();
 
-    // simulate a mouse wheel event
+    // simulate a wheel event
     Vector2 screenCoordinates( 20.0f, 20.0f );
-    Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
-    application.ProcessEvent(event);
+    Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
+    application.ProcessEvent( event );
 
     Stage::GetCurrent().Remove(dummy);
   }
@@ -906,6 +906,26 @@ int UtcDaliControlImplOnAccessibilityTouchP(void)
   END_TEST;
 }
 
+int UtcDaliControlImplOnAccessibilityActivatedP(void)
+{
+  ToolkitTestApplication application;
+
+  Control dummy = Control::New();
+  Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
+  DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityActivated(), TEST_LOCATION );
+
+  // Invoke the control's activate action
+  TypeInfo type = TypeRegistry::Get().GetTypeInfo( "Control" );
+  DALI_TEST_CHECK( type );
+
+  BaseHandle handle = type.CreateInstance();
+  DALI_TEST_CHECK( handle );
+
+  std::vector<Property::Value> attributes;
+  DALI_TEST_EQUALS( false, handle.DoAction("control-activated", attributes), TEST_LOCATION );
+
+  END_TEST;
+}
 
 int UtcDaliControlImplGetNextKeyboardFocusableActorP(void)
 {
@@ -914,7 +934,7 @@ int UtcDaliControlImplGetNextKeyboardFocusableActorP(void)
   Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
 
   Actor currentFocusedActor;
-  Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::Left, false );
+  Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::KeyboardFocus::LEFT, false );
 
   DALI_TEST_EQUALS( result, currentFocusedActor, TEST_LOCATION );
 
index 8dd9e24..67a2287 100644 (file)
@@ -295,7 +295,7 @@ int UtcDaliItemLayoutSetAndGetOrientation(void)
 
   DALI_TEST_EQUALS(position, 0.0f, TEST_LOCATION);
 
-  int focusItem = layout->GetNextFocusItemID(0, TOTAL_ITEM_NUMBER, Control::Left, true);
+  int focusItem = layout->GetNextFocusItemID(0, TOTAL_ITEM_NUMBER, Control::KeyboardFocus::LEFT, true);
 
   DALI_TEST_CHECK(focusItem != 0);
 
@@ -352,8 +352,8 @@ int UtcDaliItemLayoutGetNextFocusItemID(void)
 
   TestItemLayoutPtr layout = TestItemLayout::New();
   DALI_TEST_CHECK( layout );
-  DALI_TEST_EQUALS(layout->GetNextFocusItemID(0, 100, Control::Left, true), 99, TEST_LOCATION );
-  DALI_TEST_EQUALS(layout->GetNextFocusItemID(110, 100, Control::Right, true), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS(layout->GetNextFocusItemID(0, 100, Control::KeyboardFocus::LEFT, true), 99, TEST_LOCATION );
+  DALI_TEST_EQUALS(layout->GetNextFocusItemID(110, 100, Control::KeyboardFocus::RIGHT, true), 0, TEST_LOCATION );
 
   END_TEST;
 }
index 3dcc6e8..82527f4 100644 (file)
@@ -525,7 +525,7 @@ int UtcDaliItemViewScrollToItem(void)
   END_TEST;
 }
 
-int UtcDaliItemViewSetAndGetMouseWheelScrollDistanceStep(void)
+int UtcDaliItemViewSetAndGetWheelScrollDistanceStep(void)
 {
   ToolkitTestApplication application;
 
@@ -533,11 +533,11 @@ int UtcDaliItemViewSetAndGetMouseWheelScrollDistanceStep(void)
   TestItemFactory factory;
   ItemView view = ItemView::New(factory);
 
-  // Set the scroll distance step for the mouse wheel event to be 100.0f
-  view.SetMouseWheelScrollDistanceStep(100.0f);
+  // Set the scroll distance step for the wheel event to be 100.0f
+  view.SetWheelScrollDistanceStep(100.0f);
 
   // Check the scroll distance step is 100.0f
-  DALI_TEST_EQUALS(view.GetMouseWheelScrollDistanceStep(), 100.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(view.GetWheelScrollDistanceStep(), 100.0f, TEST_LOCATION );
   END_TEST;
 }
 
index 05f0e26..e902ec0 100644 (file)
@@ -51,11 +51,11 @@ public:
   : mSignalVerified(signalReceived),
     mCurrentFocusedActor(),
     mProposedActorToFocus(),
-    mDirection(Control::Left)
+    mDirection(Control::KeyboardFocus::LEFT)
   {
   }
 
-  Actor Callback(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocusNavigationDirection direction)
+  Actor Callback(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction)
   {
     tet_infoline("Verifying PreFocusChangeCallback()");
 
@@ -73,13 +73,13 @@ public:
     mSignalVerified = false;
     mCurrentFocusedActor = Actor();
     mProposedActorToFocus = Actor();
-    mDirection = Control::Left;
+    mDirection = Control::KeyboardFocus::LEFT;
   }
 
   bool& mSignalVerified;
   Actor mCurrentFocusedActor;
   Actor mProposedActorToFocus;
-  Control::KeyboardFocusNavigationDirection mDirection;
+  Control::KeyboardFocus::Direction mDirection;
 };
 
 // Functors to test whether focus changed signal is emitted when the keyboard focus is changed
@@ -295,13 +295,13 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   Stage::GetCurrent().Add(second);
 
   // Move the focus to the right
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == false);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
 
   // Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
   DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
   DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == Actor());
   DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
-  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Right);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
   preFocusChangeCallback.Reset();
 
   // Check that the focus is set on the first actor
@@ -313,13 +313,13 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards right
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == false);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
 
   // Because no layout control in the stage and the first actor is focused, it should emit the PreFocusChange signal
   DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
   DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
   DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
-  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Right);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
   preFocusChangeCallback.Reset();
 
   // Check that the focus is set on the second actor
@@ -331,13 +331,13 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards up
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Up) == false);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == false);
 
   // Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
   DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
   DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == second);
   DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
-  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Up);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::UP);
   preFocusChangeCallback.Reset();
   DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
 
@@ -368,7 +368,7 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards right
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == true);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == true);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
   DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
   DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
@@ -376,7 +376,7 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards down
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Down) == true);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::DOWN) == true);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
   DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
   DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == second);
@@ -384,7 +384,7 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards left
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == true);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
   DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
   DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == fourth);
@@ -392,7 +392,7 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards up
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Up) == true);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == true);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
   DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
   DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == third);
@@ -400,12 +400,12 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   focusChangedCallback.Reset();
 
   // Move the focus towards left. The focus move will fail as no way to move it upwards
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == false);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == false);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
   DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
   DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
   DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
-  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Left);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::LEFT);
   preFocusChangeCallback.Reset();
   DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
 
@@ -414,7 +414,7 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
   DALI_TEST_CHECK(manager.GetFocusGroupLoop() == true);
 
   // Move the focus towards left again. The focus should move to the fourth actor.
-  DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == true);
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
   DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
   DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
index 6d38d5e..f2f0461 100644 (file)
@@ -1511,17 +1511,17 @@ int UtcDaliToolkitScrollViewSetMinimumDistanceForFlickP(void)
   END_TEST;
 }
 
-int UtcDaliToolkitScrollViewSetMouseWheelScrollDistanceStepP(void)
+int UtcDaliToolkitScrollViewSetWheelScrollDistanceStepP(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitScrollViewSetMouseWheelScrollDistanceStepP");
+  tet_infoline(" UtcDaliToolkitScrollViewSetWheelScrollDistanceStepP");
 
   ScrollView scrollView = ScrollView::New();
   // Disable Refresh signal (TET environment cannot use adaptor's Timer)
-  scrollView.SetMouseWheelScrollDistanceStep(Vector2(30.0f, 15.0f));
-  DALI_TEST_EQUALS( scrollView.GetMouseWheelScrollDistanceStep(), Vector2(30.0f, 15.0f), TEST_LOCATION );
-  scrollView.SetMouseWheelScrollDistanceStep(Vector2(60.0f, 30.0f));
-  DALI_TEST_EQUALS( scrollView.GetMouseWheelScrollDistanceStep(), Vector2(60.0f, 30.0f), TEST_LOCATION);
+  scrollView.SetWheelScrollDistanceStep(Vector2(30.0f, 15.0f));
+  DALI_TEST_EQUALS( scrollView.GetWheelScrollDistanceStep(), Vector2(30.0f, 15.0f), TEST_LOCATION );
+  scrollView.SetWheelScrollDistanceStep(Vector2(60.0f, 30.0f));
+  DALI_TEST_EQUALS( scrollView.GetWheelScrollDistanceStep(), Vector2(60.0f, 30.0f), TEST_LOCATION);
   END_TEST;
 }
 
index 0a58b7c..719cfe9 100755 (executable)
@@ -423,7 +423,7 @@ void Popup::CreateBacking()
   mLayer.Add( mBacking );
   mBacking.SetOpacity(0.0f);
   mBacking.TouchedSignal().Connect( this, &Popup::OnBackingTouched );
-  mBacking.MouseWheelEventSignal().Connect(this, &Popup::OnBackingMouseWheelEvent);
+  mBacking.WheelEventSignal().Connect(this, &Popup::OnBackingWheelEvent);
 }
 
 void Popup::CreateDialog()
@@ -611,9 +611,9 @@ bool Popup::OnBackingTouched(Actor actor, const TouchEvent& event)
   return true;
 }
 
-bool Popup::OnBackingMouseWheelEvent(Actor actor, const MouseWheelEvent& event)
+bool Popup::OnBackingWheelEvent(Actor actor, const WheelEvent& event)
 {
-  // consume mouse wheel event in dimmed backing actor
+  // consume wheel event in dimmed backing actor
   return true;
 }
 
@@ -810,7 +810,7 @@ float Popup::GetWidthForHeight( float height )
   return GetNaturalSize().width;
 }
 
-Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   Actor nextFocusableActor( currentFocusedActor );
 
@@ -853,7 +853,7 @@ Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::C
       {
         switch ( direction )
         {
-          case Toolkit::Control::Left:
+          case Toolkit::Control::KeyboardFocus::LEFT:
           {
             if ( iter == focusableActors.begin() )
             {
@@ -865,7 +865,7 @@ Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::C
             }
             break;
           }
-          case Toolkit::Control::Right:
+          case Toolkit::Control::KeyboardFocus::RIGHT:
           {
             if ( iter == focusableActors.end() - 1 )
             {
@@ -878,7 +878,7 @@ Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::C
             break;
           }
 
-          case Toolkit::Control::Up:
+          case Toolkit::Control::KeyboardFocus::UP:
           {
             if ( *iter == mContent )
             {
@@ -905,7 +905,7 @@ Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::C
             break;
           }
 
-          case Toolkit::Control::Down:
+          case Toolkit::Control::KeyboardFocus::DOWN:
           {
             if ( mContent && mContent.IsKeyboardFocusable() )
             {
index ccf7ebb..099e5e6 100755 (executable)
@@ -215,12 +215,12 @@ private:
   bool OnBackingTouched(Actor actor, const TouchEvent& event);
 
   /**
-   * Signal occurs when the mouse wheel event is occured on dimmed backing for the Popup.
-   * @param[in] actor The Actor got mouse wheel
-   * @param[in] event The Mouse Wheel Event.
+   * Signal occurs when the wheel event is occured on dimmed backing for the Popup.
+   * @param[in] actor The Actor got wheel
+   * @param[in] event The Wheel Event.
    * @return Whether to consume event or not.
    */
-  bool OnBackingMouseWheelEvent(Actor actor, const MouseWheelEvent& event);
+  bool OnBackingWheelEvent(Actor actor, const WheelEvent& event);
 
   /**
    * Signal occurs when the dialog has been touched.
@@ -279,7 +279,7 @@ private:
   /**
    * @copydoc Control::GetNextKeyboardFocusableActor()
    */
-  Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+  Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
   /**
    * Create the root actor for the footer
index 34838ad..2fa572d 100644 (file)
@@ -567,11 +567,11 @@ float DepthLayout::GetClosestOnScreenLayoutPosition(int itemID, float currentLay
   return scrollTo;
 }
 
-int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   switch( direction )
   {
-    case Toolkit::Control::Left:
+    case Toolkit::Control::KeyboardFocus::LEFT:
     {
       itemID--;
       if( itemID < 0 )
@@ -580,7 +580,7 @@ int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Con
       }
       break;
     }
-    case Toolkit::Control::Up:
+    case Toolkit::Control::KeyboardFocus::UP:
     {
       itemID += mImpl->mNumberOfColumns;
       if( itemID >= maxItems )
@@ -589,7 +589,7 @@ int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Con
       }
       break;
     }
-    case Toolkit::Control::Right:
+    case Toolkit::Control::KeyboardFocus::RIGHT:
     {
       itemID++;
       if( itemID >= maxItems )
@@ -598,7 +598,7 @@ int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Con
       }
       break;
     }
-    case Toolkit::Control::Down:
+    case Toolkit::Control::KeyboardFocus::DOWN:
     {
       itemID -= mImpl->mNumberOfColumns;
       if( itemID < 0 )
index 1d16a03..c1f18f9 100644 (file)
@@ -156,7 +156,7 @@ public:
   /**
    * @copydoc ItemLayout::GetNextFocusItemID()
    */
-  virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+  virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
 private:
 
index 020bbcf..9339f0a 100644 (file)
@@ -676,11 +676,11 @@ Vector3 GridLayout::GetItemPosition(int itemID, float currentLayoutPosition, con
   return itemPosition;
 }
 
-int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   switch( direction )
   {
-    case Toolkit::Control::Left:
+    case Toolkit::Control::KeyboardFocus::LEFT:
     {
       itemID--;
       if( itemID < 0 )
@@ -689,7 +689,7 @@ int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Cont
       }
       break;
     }
-    case Toolkit::Control::Up:
+    case Toolkit::Control::KeyboardFocus::UP:
     {
       itemID -= mImpl->mNumberOfColumns;
       if( itemID < 0 )
@@ -698,7 +698,7 @@ int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Cont
       }
       break;
     }
-    case Toolkit::Control::Right:
+    case Toolkit::Control::KeyboardFocus::RIGHT:
     {
       itemID++;
       if( itemID >= maxItems )
@@ -707,7 +707,7 @@ int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Cont
       }
       break;
     }
-    case Toolkit::Control::Down:
+    case Toolkit::Control::KeyboardFocus::DOWN:
     {
       itemID += mImpl->mNumberOfColumns;
       if( itemID >= maxItems )
index 0031559..b2b3bd9 100644 (file)
@@ -199,7 +199,7 @@ public:
   /**
    * @copydoc ItemLayout::GetNextFocusItemID()
    */
-  virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+  virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
 private:
 
index ddf9427..e56760f 100644 (file)
@@ -25,7 +25,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/devel-api/common/set-wrapper.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
@@ -57,13 +57,13 @@ DALI_TYPE_REGISTRATION_END()
 
 const float DEFAULT_MINIMUM_SWIPE_SPEED = 1.0f;
 const float DEFAULT_MINIMUM_SWIPE_DISTANCE = 3.0f;
-const float DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = 0.1f;
+const float DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = 0.1f;
 
 const float DEFAULT_MINIMUM_SWIPE_DURATION = 0.45f;
 const float DEFAULT_MAXIMUM_SWIPE_DURATION = 2.6f;
 
 const float DEFAULT_REFRESH_INTERVAL_LAYOUT_POSITIONS = 20.0f; // 1 updates per 20 items
-const int MOUSE_WHEEL_EVENT_FINISHED_TIME_OUT = 500;  // 0.5 second
+const int WHEEL_EVENT_FINISHED_TIME_OUT = 500;  // 0.5 second
 
 const float DEFAULT_ANCHORING_DURATION = 1.0f;  // 1 second
 
@@ -276,7 +276,7 @@ Dali::Toolkit::ItemView ItemView::New(ItemFactory& factory)
 }
 
 ItemView::ItemView(ItemFactory& factory)
-: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | REQUIRES_MOUSE_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ),
+: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | REQUIRES_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ),
   mItemFactory(factory),
   mActiveLayout(NULL),
   mAnimatingOvershootOn(false),
@@ -287,7 +287,7 @@ ItemView::ItemView(ItemFactory& factory)
   mRefreshOrderHint(true/*Refresh item 0 first*/),
   mMinimumSwipeSpeed(DEFAULT_MINIMUM_SWIPE_SPEED),
   mMinimumSwipeDistance(DEFAULT_MINIMUM_SWIPE_DISTANCE),
-  mMouseWheelScrollDistanceStep(0.0f),
+  mWheelScrollDistanceStep(0.0f),
   mScrollDistance(0.0f),
   mScrollSpeed(0.0f),
   mTotalPanDisplacement(Vector2::ZERO),
@@ -308,12 +308,12 @@ void ItemView::OnInitialize()
   SetOvershootEnabled(true);
 
   Vector2 stageSize = Stage::GetCurrent().GetSize();
-  mMouseWheelScrollDistanceStep = stageSize.y * DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
+  mWheelScrollDistanceStep = stageSize.y * DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
 
   EnableGestureDetection(Gesture::Type(Gesture::Pan));
 
-  mMouseWheelEventFinishedTimer = Timer::New( MOUSE_WHEEL_EVENT_FINISHED_TIME_OUT );
-  mMouseWheelEventFinishedTimer.TickSignal().Connect( this, &ItemView::OnMouseWheelEventFinished );
+  mWheelEventFinishedTimer = Timer::New( WHEEL_EVENT_FINISHED_TIME_OUT );
+  mWheelEventFinishedTimer.TickSignal().Connect( this, &ItemView::OnWheelEventFinished );
 
   SetRefreshInterval(DEFAULT_REFRESH_INTERVAL_LAYOUT_POSITIONS);
 }
@@ -500,14 +500,14 @@ float ItemView::GetMinimumSwipeDistance() const
   return mMinimumSwipeDistance;
 }
 
-void ItemView::SetMouseWheelScrollDistanceStep(float step)
+void ItemView::SetWheelScrollDistanceStep(float step)
 {
-  mMouseWheelScrollDistanceStep = step;
+  mWheelScrollDistanceStep = step;
 }
 
-float ItemView::GetMouseWheelScrollDistanceStep() const
+float ItemView::GetWheelScrollDistanceStep() const
 {
-  return mMouseWheelScrollDistanceStep;
+  return mWheelScrollDistanceStep;
 }
 
 void ItemView::SetAnchoring(bool enabled)
@@ -986,14 +986,14 @@ bool ItemView::OnTouchEvent(const TouchEvent& event)
   return true; // consume since we're potentially scrolling
 }
 
-bool ItemView::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool ItemView::OnWheelEvent(const WheelEvent& event)
 {
-  // Respond the mouse wheel event to scroll
+  // Respond the wheel event to scroll
   if (mActiveLayout)
   {
     Actor self = Self();
     const Vector3 layoutSize = Self().GetCurrentSize();
-    float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mMouseWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor());
+    float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor());
     float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout);
 
     self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
@@ -1002,23 +1002,23 @@ bool ItemView::OnMouseWheelEvent(const MouseWheelEvent& event)
     mRefreshEnabled = true;
   }
 
-  if (mMouseWheelEventFinishedTimer.IsRunning())
+  if (mWheelEventFinishedTimer.IsRunning())
   {
-    mMouseWheelEventFinishedTimer.Stop();
+    mWheelEventFinishedTimer.Stop();
   }
 
-  mMouseWheelEventFinishedTimer.Start();
+  mWheelEventFinishedTimer.Start();
 
   return true;
 }
 
-bool ItemView::OnMouseWheelEventFinished()
+bool ItemView::OnWheelEventFinished()
 {
   if (mActiveLayout)
   {
     RemoveAnimation(mScrollAnimation);
 
-    // No more mouse wheel events coming. Do the anchoring if enabled.
+    // No more wheel events coming. Do the anchoring if enabled.
     mScrollAnimation = DoAnchoring();
     if (mScrollAnimation)
     {
@@ -1201,7 +1201,7 @@ bool ItemView::OnAccessibilityPan(PanGesture gesture)
   return true;
 }
 
-Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   Actor nextFocusActor;
   if(mActiveLayout)
index 5260c5c..16f0b0a 100644 (file)
@@ -121,14 +121,14 @@ public:
   float GetMinimumSwipeDistance() const;
 
   /**
-   * @copydoc Toolkit::ItemView::SetMouseWheelScrollDistanceStep
+   * @copydoc Toolkit::ItemView::SetWheelScrollDistanceStep
    */
-  void SetMouseWheelScrollDistanceStep(float step);
+  void SetWheelScrollDistanceStep(float step);
 
   /**
-   * @copydoc Toolkit::ItemView::GetMouseWheelScrollDistanceStep
+   * @copydoc Toolkit::ItemView::GetWheelScrollDistanceStep
    */
-  float GetMouseWheelScrollDistanceStep() const;
+  float GetWheelScrollDistanceStep() const;
 
   /**
    * @copydoc Toolkit::ItemView::SetAnchoring
@@ -343,11 +343,11 @@ private: // From CustomActorImpl
   virtual bool OnTouchEvent(const TouchEvent& event);
 
   /**
-   * From CustomActorImpl; called after a mouse-wheel-event is received by the owning actor.
-   * @param[in] event The mouse wheel event.
+   * From CustomActorImpl; called after a wheel-event is received by the owning actor.
+   * @param[in] event The wheel event.
    * @return True if the event should be consumed.
    */
-  virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+  virtual bool OnWheelEvent(const WheelEvent& event);
 
 private: // From Control
 
@@ -364,7 +364,7 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::GetNextKeyboardFocusableActor()
    */
-  virtual Actor GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+  virtual Actor GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
   /**
    * @copydoc Toolkit::Control::OnKeyboardFocusChangeCommitted()
@@ -477,10 +477,10 @@ private:
   void OnOvershootOnFinished(Animation& animation);
 
   /**
-   * This is called after a timeout when no new mouse wheel event is received for a certain period of time.
+   * This is called after a timeout when no new wheel event is received for a certain period of time.
    * @return will return false; one-shot timer.
    */
-  bool OnMouseWheelEventFinished();
+  bool OnWheelEventFinished();
 
   /**
    * Stops and removes animation if exists.
@@ -572,7 +572,7 @@ private:
 
   float mMinimumSwipeSpeed;
   float mMinimumSwipeDistance;
-  float mMouseWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates for each mouse wheel event received.
+  float mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates for each wheel event received.
 
   float mScrollDistance;
   float mScrollSpeed;
@@ -581,7 +581,7 @@ private:
   float mScrollOvershoot;
   bool mIsFlicking;
 
-  Timer mMouseWheelEventFinishedTimer; ///< The timer to determine whether there is no mouse wheel event received for a certain period of time.
+  Timer mWheelEventFinishedTimer; ///< The timer to determine whether there is no wheel event received for a certain period of time.
 
   Dali::Gesture::State mGestureState;
 
index 57e7e75..ba36907 100644 (file)
@@ -22,7 +22,7 @@
 #include <cstring> // for strcmp
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/object/type-registry-helper.h>
@@ -69,7 +69,7 @@ const float DEFAULT_MIN_FLICK_SPEED_THRESHOLD(500.0f);              ///< Minimum
 const float FREE_FLICK_SPEED_THRESHOLD = 200.0f;                    ///< Free-Flick threshold in pixels/ms
 const float AUTOLOCK_AXIS_MINIMUM_DISTANCE2 = 100.0f;               ///< Auto-lock axis after minimum distance squared.
 const float FLICK_ORTHO_ANGLE_RANGE = 75.0f;                        ///< degrees. (if >45, then supports diagonal flicking)
-const Vector2 DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = Vector2(0.17f, 0.1f); ///< The step of horizontal scroll distance in the proportion of stage size for each mouse wheel event received.
+const Vector2 DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = Vector2(0.17f, 0.1f); ///< The step of horizontal scroll distance in the proportion of stage size for each wheel event received.
 const unsigned long MINIMUM_TIME_BETWEEN_DOWN_AND_UP_FOR_RESET( 150u );
 const float TOUCH_DOWN_TIMER_INTERVAL = 100.0f;
 const float DEFAULT_SCROLL_UPDATE_DISTANCE( 30.0f );                ///< Default distance to travel in pixels for scroll update signal
@@ -578,7 +578,7 @@ Dali::Toolkit::ScrollView ScrollView::New()
 }
 
 ScrollView::ScrollView()
-: ScrollBase( ControlBehaviour( REQUIRES_MOUSE_WHEEL_EVENTS ) ),   // Enable size negotiation
+: ScrollBase( ControlBehaviour( REQUIRES_WHEEL_EVENTS ) ),   // Enable size negotiation
   mTouchDownTime(0u),
   mGestureStackDepth(0),
   mScrollStateFlags(0),
@@ -598,7 +598,7 @@ ScrollView::ScrollView()
   mFrictionCoefficient(DEFAULT_FRICTION_COEFFICIENT),
   mFlickSpeedCoefficient(DEFAULT_FLICK_SPEED_COEFFICIENT),
   mMaxFlickSpeed(DEFAULT_MAX_FLICK_SPEED),
-  mMouseWheelScrollDistanceStep(Vector2::ZERO),
+  mWheelScrollDistanceStep(Vector2::ZERO),
   mInAccessibilityPan(false),
   mInitialized(false),
   mScrolling(false),
@@ -635,7 +635,7 @@ void ScrollView::OnInitialize()
 
   mScrollPostPosition = mScrollPrePosition = Vector2::ZERO;
 
-  mMouseWheelScrollDistanceStep = Stage::GetCurrent().GetSize() * DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
+  mWheelScrollDistanceStep = Stage::GetCurrent().GetSize() * DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
 
   mInitialized = true;
 
@@ -1083,14 +1083,14 @@ void ScrollView::SetMaxFlickSpeed(float speed)
   mMaxFlickSpeed = speed;
 }
 
-void ScrollView::SetMouseWheelScrollDistanceStep(Vector2 step)
+void ScrollView::SetWheelScrollDistanceStep(Vector2 step)
 {
-  mMouseWheelScrollDistanceStep = step;
+  mWheelScrollDistanceStep = step;
 }
 
-Vector2 ScrollView::GetMouseWheelScrollDistanceStep() const
+Vector2 ScrollView::GetWheelScrollDistanceStep() const
 {
-  return mMouseWheelScrollDistanceStep;
+  return mWheelScrollDistanceStep;
 }
 
 unsigned int ScrollView::GetCurrentPage() const
@@ -2042,11 +2042,11 @@ bool ScrollView::OnTouchEvent(const TouchEvent& event)
   return true;
 }
 
-bool ScrollView::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool ScrollView::OnWheelEvent(const WheelEvent& event)
 {
   if(!mSensitive)
   {
-    // Ignore this mouse wheel event, if scrollview is insensitive.
+    // Ignore this wheel event, if scrollview is insensitive.
     return false;
   }
 
@@ -2058,7 +2058,7 @@ bool ScrollView::OnMouseWheelEvent(const MouseWheelEvent& event)
     if(mRulerX->GetType() == Ruler::Free)
     {
       // Free panning mode
-      targetScrollPosition.x += event.z * mMouseWheelScrollDistanceStep.x;
+      targetScrollPosition.x += event.z * mWheelScrollDistanceStep.x;
       ClampPosition(targetScrollPosition);
       ScrollTo(-targetScrollPosition);
     }
@@ -2074,7 +2074,7 @@ bool ScrollView::OnMouseWheelEvent(const MouseWheelEvent& event)
     if(mRulerY->GetType() == Ruler::Free)
     {
       // Free panning mode
-      targetScrollPosition.y += event.z * mMouseWheelScrollDistanceStep.y;
+      targetScrollPosition.y += event.z * mWheelScrollDistanceStep.y;
       ClampPosition(targetScrollPosition);
       ScrollTo(-targetScrollPosition);
     }
index be978a7..86577c7 100644 (file)
@@ -323,14 +323,14 @@ public:
   void SetMaxFlickSpeed(float speed);
 
   /**
-   * @copydoc Toolkit::ScrollView::GetMouseWheelScrollDistanceStep
+   * @copydoc Toolkit::ScrollView::GetWheelScrollDistanceStep
    */
-  Vector2 GetMouseWheelScrollDistanceStep() const;
+  Vector2 GetWheelScrollDistanceStep() const;
 
   /**
-   * @copydoc Toolkit::ScrollView::SetMouseWheelScrollDistanceStep
+   * @copydoc Toolkit::ScrollView::SetWheelScrollDistanceStep
    */
-  void SetMouseWheelScrollDistanceStep(Vector2 step);
+  void SetWheelScrollDistanceStep(Vector2 step);
 
   /**
    * @copydoc Toolkit::ScrollView::GetCurrentPage
@@ -535,11 +535,11 @@ private: // private overriden functions from CustomActorImpl and Controls
   virtual bool OnTouchEvent(const TouchEvent& event);
 
   /**
-   * From CustomActorImpl; called after a mouse-wheel-event is received by the owning actor.
-   * @param[in] event The mouse wheel event.
+   * From CustomActorImpl; called after a wheel-event is received by the owning actor.
+   * @param[in] event The wheel event.
    * @return True if the event should be consumed.
    */
-  virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+  virtual bool OnWheelEvent(const WheelEvent& event);
 
   /**
    * @copydoc Toolkit::Control::OnInitialize()
@@ -883,7 +883,7 @@ private:
   float mFlickSpeedCoefficient;                 ///< Flick velocity coefficient. Input touch velocity is multiplied by this.
   float mMaxFlickSpeed;                         ///< Maximum flick speed. Maximum speed of flick in stage.lengths/sec.
 
-  Vector2 mMouseWheelScrollDistanceStep;        ///< The step of scroll distance in actor coordinates in X and Y axes for each mouse wheel event received.
+  Vector2 mWheelScrollDistanceStep;        ///< The step of scroll distance in actor coordinates in X and Y axes for each wheel event received.
 
   //ScrollInternalConstraintsPtr mScrollInternalConstraints;
   Constraint mScrollMainInternalPrePositionConstraint;
index 5a49cf4..bd96f77 100644 (file)
@@ -1142,7 +1142,7 @@ TableView::~TableView()
   // nothing to do
 }
 
-Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   Actor nextFocusableActor;
 
@@ -1165,7 +1165,7 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
 
       switch ( direction )
       {
-        case Toolkit::Control::Left:
+        case Toolkit::Control::KeyboardFocus::LEFT:
         {
           if(--currentColumn < 0)
           {
@@ -1178,7 +1178,7 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
           }
           break;
         }
-        case Toolkit::Control::Right:
+        case Toolkit::Control::KeyboardFocus::RIGHT:
         {
           if(++currentColumn > numberOfColumns - 1)
           {
@@ -1191,7 +1191,7 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
           }
           break;
         }
-        case Toolkit::Control::Up:
+        case Toolkit::Control::KeyboardFocus::UP:
         {
           if(--currentRow < 0)
           {
@@ -1200,7 +1200,7 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
           }
           break;
         }
-        case Toolkit::Control::Down:
+        case Toolkit::Control::KeyboardFocus::DOWN:
 
         {
           if(++currentRow > numberOfRows - 1)
index be41e47..d1d8aef 100644 (file)
@@ -261,7 +261,7 @@ private: // From Control
   /**
    * @copydoc Control::GetNextKeyboardFocusableActor
    */
-  virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled );
+  virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
 
   /**
    * @copydoc Control::GetNaturalSize()
index da4a593..2d07c1e 100644 (file)
@@ -838,6 +838,8 @@ void TextField::OnInitialize()
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
   EnableGestureDetection(Gesture::Pan);
 
+  self.TouchedSignal().Connect( this, &TextField::OnTouched );
+
   // Set BoundingBox to stage size if not already set.
   if ( mDecorator->GetBoundingBox().IsEmpty() )
   {
@@ -1101,6 +1103,11 @@ void TextField::KeyboardStatusChanged(bool keyboardShown)
   }
 }
 
+bool TextField::OnTouched( Actor actor, const TouchEvent& event )
+{
+  return true;
+}
+
 TextField::TextField()
 : Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
   mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
index 6e9525d..32a0d67 100644 (file)
@@ -176,6 +176,14 @@ private: // Implementation
   void KeyboardStatusChanged( bool keyboardShown );
 
   /**
+   * @brief Callback when Textfield is touched
+   *
+   * @param[in] actor TextField touched
+   * @param[in] event TouchEvent information
+   */
+  bool OnTouched( Actor actor, const TouchEvent& event );
+
+  /**
    * Construct a new TextField.
    */
   TextField();
index 4f4bf57..fb20d56 100644 (file)
@@ -216,7 +216,7 @@ Toolkit::Control KeyboardFocusManager::GetParentLayoutControl(Actor actor) const
   return Toolkit::Control::DownCast(parent);
 }
 
-bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocus::Direction direction)
 {
   Actor currentFocusActor = GetCurrentFocusActor();
 
@@ -257,7 +257,7 @@ bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocusNavigationDi
   return succeed;
 }
 
-bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocus::Direction direction)
 {
   // Ask the control for the next actor to focus
   Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
@@ -329,7 +329,7 @@ bool KeyboardFocusManager::DoMoveFocusToNextFocusGroup(bool forward)
   {
     // If the current focus group has a parent layout control, we can probably automatically
     // move the focus to the next focus group in the forward or backward direction.
-    Toolkit::Control::KeyboardFocusNavigationDirection direction = forward ? Toolkit::Control::Right : Toolkit::Control::Left;
+    Toolkit::Control::KeyboardFocus::Direction direction = forward ? Toolkit::Control::KeyboardFocus::RIGHT : Toolkit::Control::KeyboardFocus::LEFT;
     succeed = DoMoveFocusWithinLayoutControl(parentLayoutControl, GetCurrentFocusActor(), direction);
     parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
   }
@@ -542,7 +542,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         else
         {
           // Move the focus towards left
-          MoveFocus(Toolkit::Control::Left);
+          MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
         }
 
         isFocusStartableKey = true;
@@ -565,7 +565,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         else
         {
           // Move the focus towards right
-          MoveFocus(Toolkit::Control::Right);
+          MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
         }
       }
       else
@@ -586,7 +586,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
       else
       {
         // Move the focus towards up
-        MoveFocus(Toolkit::Control::Up);
+        MoveFocus(Toolkit::Control::KeyboardFocus::UP);
       }
 
       isFocusStartableKey = true;
@@ -601,7 +601,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
       else
       {
         // Move the focus towards down
-        MoveFocus(Toolkit::Control::Down);
+        MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
       }
 
       isFocusStartableKey = true;
@@ -687,7 +687,7 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
     {
       // No actor is focused but keyboard focus is activated by the key press
       // Let's try to move the initial focus
-      MoveFocus(Toolkit::Control::Right);
+      MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
     }
     else if(mFocusIndicatorActor)
     {
index 1cd958a..bc456c2 100644 (file)
@@ -65,7 +65,7 @@ public:
   /**
    * @copydoc Toolkit::KeyboardFocusManager::MoveFocus
    */
-  bool MoveFocus(Toolkit::Control::KeyboardFocusNavigationDirection direction);
+  bool MoveFocus(Toolkit::Control::KeyboardFocus::Direction direction);
 
   /**
    * @copydoc Toolkit::KeyboardFocusManager::ClearFocus
@@ -171,7 +171,7 @@ private:
    * @param direction The direction of focus movement
    * @return Whether the focus is successful or not
    */
-  bool DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction);
+  bool DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocus::Direction direction);
 
   /**
    * Move the focus to the first focusable actor in the next focus group in the forward
index 7393a3a..bb2732c 100644 (file)
@@ -734,7 +734,7 @@ bool Control::OnAccessibilityValueChange(bool isIncrease)
   return false; // Accessibility value change action is not handled by default
 }
 
-Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   return Actor();
 }
@@ -947,7 +947,7 @@ bool Control::OnKeyEvent(const KeyEvent& event)
   return false; // Do not consume
 }
 
-bool Control::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool Control::OnWheelEvent(const WheelEvent& event)
 {
   return false; // Do not consume
 }
index 8ffcbda..9deae8f 100644 (file)
@@ -316,9 +316,9 @@ protected: // From CustomActorImpl, not to be used by application developers
   virtual bool OnKeyEvent( const KeyEvent& event );
 
   /**
-   * @copydoc CustomActorImpl::OnMouseWheelEvent()
+   * @copydoc CustomActorImpl::OnWheelEvent()
    */
-  virtual bool OnMouseWheelEvent( const MouseWheelEvent& event );
+  virtual bool OnWheelEvent( const WheelEvent& event );
 
   /**
    * @copydoc CustomActorImpl::OnRelayout()
@@ -493,7 +493,7 @@ public: // API for derived classes to override
    * @param[in] loopEnabled Whether the focus movement should be looped within the control.
    * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
    */
-  virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled );
+  virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
 
   /**
    * @brief Informs this control that its chosen focusable actor will be focused.
index 7742bb7..e7511a1 100644 (file)
@@ -94,12 +94,15 @@ public:
   /**
    * @brief Describes the direction to move the keyboard focus towards.
    */
-  enum KeyboardFocusNavigationDirection
+  struct KeyboardFocus
   {
-    Left,   ///< Move keyboard focus towards the left direction
-    Right,  ///< Move keyboard focus towards the right direction
-    Up,     ///< Move keyboard focus towards the up direction
-    Down    ///< Move keyboard focus towards the down direction
+    enum Direction
+    {
+      LEFT,   ///< Move keyboard focus towards the left direction
+      RIGHT,  ///< Move keyboard focus towards the right direction
+      UP,     ///< Move keyboard focus towards the up direction
+      DOWN    ///< Move keyboard focus towards the down direction
+    };
   };
 
   // Typedefs
index 39e09a3..0dc2bb4 100644 (file)
@@ -95,12 +95,12 @@ float ItemLayout::GetClosestOnScreenLayoutPosition(int itemID, float currentLayo
   return currentLayoutPosition;
 }
 
-int ItemLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int ItemLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
 {
   switch( direction )
   {
-    case Control::Left:
-    case Control::Up:
+    case Control::KeyboardFocus::LEFT:
+    case Control::KeyboardFocus::UP:
     {
       itemID--;
       if( itemID < 0 )
@@ -109,8 +109,8 @@ int ItemLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Cont
       }
       break;
     }
-    case Control::Right:
-    case Control::Down:
+    case Control::KeyboardFocus::RIGHT:
+    case Control::KeyboardFocus::DOWN:
     {
       itemID++;
       if( itemID >= maxItems )
index 5eda5d4..2ed5f1e 100644 (file)
@@ -304,7 +304,7 @@ public:
    * @param[in] loopEnabled Whether the KeyboardFocusManager is set to wrap around between first and last item
    * @return The next item ID.
    */
-  DALI_IMPORT_API virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+  DALI_IMPORT_API virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
   /**
    * @brief Query the flick speed factor of the layout while swipping.
index 1ee9b3d..6daa933 100644 (file)
@@ -128,14 +128,14 @@ float ItemView::GetMinimumSwipeDistance() const
   return GetImpl(*this).GetMinimumSwipeDistance();
 }
 
-void ItemView::SetMouseWheelScrollDistanceStep(float step)
+void ItemView::SetWheelScrollDistanceStep(float step)
 {
-  GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
+  GetImpl(*this).SetWheelScrollDistanceStep(step);
 }
 
-float ItemView::GetMouseWheelScrollDistanceStep() const
+float ItemView::GetWheelScrollDistanceStep() const
 {
-  return GetImpl(*this).GetMouseWheelScrollDistanceStep();
+  return GetImpl(*this).GetWheelScrollDistanceStep();
 }
 
 void ItemView::SetAnchoring(bool enabled)
index 60a2312..ca51a44 100644 (file)
@@ -217,18 +217,18 @@ public:
   float GetMinimumSwipeDistance() const;
 
   /**
-   * @brief Set the step of scroll distance in actor coordinates for each mouse wheel event received.
+   * @brief Set the step of scroll distance in actor coordinates for each wheel event received.
    *
    * @param[in] step The step of scroll distance(pixel).
    */
-  void SetMouseWheelScrollDistanceStep(float step);
+  void SetWheelScrollDistanceStep(float step);
 
   /**
-   * @brief Get the step of scroll distance in actor coordinates for each mouse wheel event received.
+   * @brief Get the step of scroll distance in actor coordinates for each wheel event received.
    *
    * @return The step of scroll distance(pixel)
    */
-  float GetMouseWheelScrollDistanceStep() const;
+  float GetWheelScrollDistanceStep() const;
 
   /**
    * @brief Set whether to enable the animation for the layout to
index 08bd1ff..398939e 100644 (file)
@@ -486,14 +486,14 @@ void ScrollView::SetMaxFlickSpeed(float speed)
   GetImpl(*this).SetMaxFlickSpeed(speed);
 }
 
-Vector2 ScrollView::GetMouseWheelScrollDistanceStep() const
+Vector2 ScrollView::GetWheelScrollDistanceStep() const
 {
-  return GetImpl(*this).GetMouseWheelScrollDistanceStep();
+  return GetImpl(*this).GetWheelScrollDistanceStep();
 }
 
-void ScrollView::SetMouseWheelScrollDistanceStep(Vector2 step)
+void ScrollView::SetWheelScrollDistanceStep(Vector2 step)
 {
-  GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
+  GetImpl(*this).SetWheelScrollDistanceStep(step);
 }
 
 Vector2 ScrollView::GetCurrentScrollPosition() const
index 11f166a..fb9d5cb 100644 (file)
@@ -840,24 +840,24 @@ public:
 
   /**
    * @brief Gets the step of scroll distance in actor coordinates for
-   * each mouse wheel event received in free panning mode.
+   * each wheel event received in free panning mode.
    *
    * @return The step of scroll distance(pixel) in X and Y axes.
    */
-  Vector2 GetMouseWheelScrollDistanceStep() const;
+  Vector2 GetWheelScrollDistanceStep() const;
 
   /**
    * @brief Sets the step of scroll distance in actor coordinates for
-   * each mouse wheel event received in free panning mode.
+   * each wheel event received in free panning mode.
    *
    * @param[in] step The step of scroll distance(pixel) in X and Y axes.
    *
    * @note: If snap points are defined in the rulers, it will always
    * scroll to the next snap point towards the scroll direction while
-   * receiving the mouse wheel events.
+   * receiving the wheel events.
    *
    */
-  void SetMouseWheelScrollDistanceStep(Vector2 step);
+  void SetWheelScrollDistanceStep(Vector2 step);
 
   /**
    * @brief Retrieves current scroll position.
index d1c1763..9df4e58 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 41;
+const unsigned int TOOLKIT_MICRO_VERSION = 42;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 316af96..2e0ffbe 100644 (file)
@@ -60,7 +60,7 @@ Actor KeyboardFocusManager::GetCurrentFocusActor()
   return GetImpl(*this).GetCurrentFocusActor();
 }
 
-bool KeyboardFocusManager::MoveFocus(Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::MoveFocus(Control::KeyboardFocus::Direction direction)
 {
   return GetImpl(*this).MoveFocus(direction);
 }
index 68638a3..6afcd6b 100644 (file)
@@ -55,7 +55,7 @@ class DALI_IMPORT_API KeyboardFocusManager : public BaseHandle
 public:
 
   /// @brief Pre focus change signal
-  typedef Signal< Actor ( Actor, Actor, Control::KeyboardFocusNavigationDirection ) > PreFocusChangeSignalType;
+  typedef Signal< Actor ( Actor, Actor, Control::KeyboardFocus::Direction ) > PreFocusChangeSignalType;
 
   /// @brief Focus changed signal
   typedef Signal< void ( Actor, Actor ) > FocusChangedSignalType;
@@ -117,7 +117,7 @@ public:
    * @param direction The direction of focus movement
    * @return true if the movement was successful
    */
-  bool MoveFocus(Control::KeyboardFocusNavigationDirection direction);
+  bool MoveFocus(Control::KeyboardFocus::Direction direction);
 
   /**
    * @brief Clear the focus from the current focused actor if any, so
@@ -214,7 +214,7 @@ public: // Signals
    *
    * A callback of the following type may be connected:
    * @code
-   *   Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocusNavigationDirection direction);
+   *   Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction);
    * @endcode
    * @pre The Object has been initialized.
    * @return The signal to connect to.
index 0521e17..38cd6c4 100644 (file)
@@ -58,7 +58,7 @@
 
 ### UI Controls
  + [Text Label](@ref text-label)
- + TextEntry
+ + [Text Field](@ref text-field)
  + Buttons
  + TableView
  + [Scroll View](@ref scroll-view)
diff --git a/docs/content/shared-javascript-and-cpp-documentation/text-field.md b/docs/content/shared-javascript-and-cpp-documentation/text-field.md
new file mode 100644 (file)
index 0000000..3706bfc
--- /dev/null
@@ -0,0 +1,146 @@
+/**
+ *
+
+# Text Field {#text-field}
+
+## Overview
+
+The Dali::Toolkit::TextField is a control which provides a single-line editable text field.
+
+### Basic usage
+
+Before any text has been entered, the TextField can display some placeholder text.
+An alternative placeholder can be displayed when the TextField has keyboard focus.
+For example a TextField used to enter a username could initially show "Unknown Name", and then show "Enter Name." when the cursor is shown. 
+
+~~~{.cpp}
+// C++
+
+TextField field = TextField::New();
+field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Unnamed Name" );
+field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Enter Name." );
+
+Stage::GetCurrent().Add( field );
+~~~
+
+~~~{.js}
+// JavaScript
+
+var field = new dali.TextField();
+field.placeholderText = "Unnamed Name";
+field.placeholderTextFocused = "Enter Name.";
+
+dali.stage.add( field );
+~~~
+
+When the TextField is tapped, it will automatically gain the keyboard focus. Key events will then result in text being inserted, and the placeholder text will be removed.
+After text has been entered, it can be retrieved from the TEXT property.
+
+~~~{.cpp}
+// C++
+
+Property::Value fieldText = field.GetProperty( TextField::Property::TEXT );
+std::cout << "Received text: " << fieldText.Get< std::string >() << std::endl;
+~~~
+
+~~~{.js}
+// JavaScript
+
+console.log( field.text );
+~~~
+
+### Font Selection
+
+TextField will automatically select a suitable fonts, in the same was as TextLabel.
+The preferred font can also be selected from a JSON stylesheet:
+
+~~~{.json}
+{
+  "styles":
+  {
+    "textfield":
+    {
+      "font-family":"Arial",
+      "font-style":"Regular",
+      "point-size":8
+    }
+  }
+}
+~~~
+
+### Text Alignment
+
+TextField displays a single-line of text, which will scroll if there is not enough room for the text displayed.
+If there is enough room, then the text can be aligned horizontally to the beginning, end, or center of the available area:
+
+~~~{.cpp}
+// C++
+
+field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN" ); // "CENTER" or "END"
+~~~
+
+~~~{.js}
+// JavaScript
+
+field.HorizontalAlignment = "BEGIN"; // "CENTER" or "END"
+~~~
+
+### TextField Decorations
+
+#### Color
+
+To change the color of the text, the recommended way is to use the TEXT_COLOR property.
+An alternative color can be used for placeholder text by setting PLACEHOLDER_TEXT_COLOR.
+Note that unlike the Actor::COLOR property, these properties will not affect child Actors added to the TextField.
+
+~~~{.cpp}
+// C++
+field.SetProperty( TextField::Property::TEXT_COLOR, Color::CYAN );
+field.SetProperty( TextField::Property::PLACEHOLDER_TEXT_COLOR, Color::BLACK );
+~~~
+
+~~~{.js}
+// JavaScript
+
+field.textColor = dali.COLOR_CYAN;
+field.placeholderTextColor = dali.COLOR_BLACK;
+~~~
+
+### Text Field Properties
+
+ Name (JavaScript)                 |  Name (C++)                          |  Type        | Writable     | Animatable
+-----------------------------------|--------------------------------------|--------------|--------------|-----------
+ renderingBackend                  | RENDERING_BACKEND                    |  INTEGER     | O            | X
+ text                              | TEXT                                 |  STRING      | O            | X
+ placeholderText                   | PLACEHOLDER_TEXT                     |  STRING      | O            | X
+ placeholderTextFocused            | PLACEHOLDER_TEXT_FOCUSED             |  STRING      | O            | X
+ fontFamily                        | FONT_FAMILY                          |  STRING      | O            | X
+ fontStyle                         | FONT_STYLE                           |  STRING      | O            | X
+ pointSize                         | POINT_SIZE                           |  FLOAT       | O            | X
+ maxLength                         | MAX_LENGTH                           |  INTEGER     | O            | X
+ exceedPolicy                      | EXCEED_POLICY                        |  INTEGER     | O            | X
+ horizontalAlignment               | HORIZONTAL_ALIGNMENT                 |  STRING      | O            | X
+ verticalAlignment                 | VERTICAL_ALIGNMENT                   |  STRING      | O            | X
+ textColor                         | TEXT_COLOR                           |  VECTOR4     | O            | X
+ shadowOffset                      | SHADOW_OFFSET                        |  VECTOR2     | O            | X
+ shadowColor                       | SHADOW_COLOR                         |  VECTOR4     | O            | X
+ primaryCursorColor                | PRIMARY_CURSOR_COLOR                 |  VECTOR4     | O            | X
+ secondaryCursorColor              | SECONDARY_CURSOR_COLOR               |  VECTOR4     | O            | X
+ enableCursorBlink                 | ENABLE_CURSOR_BLINK                  |  BOOLEAN     | O            | X
+ cursorBlinkInterval               | CURSOR_BLINK_INTERVAL                |  FLOAT       | O            | X
+ cursorBlinkDuration               | CURSOR_BLINK_DURATION                |  FLOAT       | O            | X
+ grabHandleImage                   | GRAB_HANDLE_IMAGE                    |  STRING      | O            | X
+ grabHandlePressedImage            | GRAB_HANDLE_PRESSED_IMAGE            |  STRING      | O            | X
+ scrollThreshold                   | SCROLL_THRESHOLD                     |  FLOAT       | O            | X
+ scrollSpreed                      | SCROLL_SPEED                         |  FLOAT       | O            | X
+ selectionHandleImageLeft          | SELECTION_HANDLE_IMAGE_LEFT          |  STRING      | O            | X
+ selectionHandleImageRight         | SELECTION_HANDLE_IMAGE_RIGHT         |  STRING      | O            | X
+ selectionHandlePressedImageLeft   | SELECTION_HANDLE_PRESSED_IMAGE_LEFT  |  STRING      | O            | X
+ selectionHandlePressedImageRight  | SELECTION_HANDLE_PRESSED_IMAGE_RIGHT |  STRING      | O            | X
+ selectionHighlightColor           | SELECTION_HIGHLIGHT_COLOR            |  VECTOR4     | O            | X
+ decorationBoundingBox             | DECORATION_BOUNDING_BOX              |  RECTANGLE   | O            | X
+ inputMethodSettings               | INPUT_METHOD_SETTINGS                |  MAP         | O            | X
+
+@class TextField
+
+*/
index 908fedd..b6719ed 100644 (file)
@@ -398,20 +398,20 @@ label1.underlineHeight = 1;
 
  Name (JavaScript)   |  Name (C++)         |  Type        | Writable     | Animatable
 ---------------------|---------------------|--------------|--------------|-----------
- renderingBackend    | RENDERING_BACKEND   |  INTEGER     | &#10004;     | &#10008;
- text                | TEXT                |  STRING      | &#10004;     | &#10008;
- fontFamily          | FONT_FAMILY         |  STRING      | &#10004;     | &#10008;
- fontStyle           | FONT_STYLE          |  STRING      | &#10004;     | &#10008;
- pointSize           | POINT_SIZE          |  FLOAT       | &#10004;     | &#10008;
- multiLine           | MULTI_LINE          |  BOOLEAN     | &#10004;     | &#10008;
- horizontalAlignment | HORIZONTAL_ALIGNMENT|  STRING      | &#10004;     | &#10008;
- verticalAlignment   | VERTICAL_ALIGNMENT  |  STRING      | &#10004;     | &#10008;
- textColor           | TEXT_COLOR          |  VECTOR4     | &#10004;     | &#10008;
- shadowOffset        | SHADOW_OFFSET       |  VECTOR2     | &#10004;     | &#10008;
- shadowColor         | SHADOW_COLOR        |  VECTOR4     | &#10004;     | &#10008;
- underlineEnabled    | UNDERLINE_ENABLED   |  BOOLEAN     | &#10004;     | &#10008;
- underlineColor      | UNDERLINE_COLOR     |  VECTOR4     | &#10004;     | &#10008;
- underlineHeight     | UNDERLINE_HEIGHT    |  FLOAT       | &#10004;     | &#10008;
+ renderingBackend    | RENDERING_BACKEND   |  INTEGER     | O            | X
+ text                | TEXT                |  STRING      | O            | X
+ fontFamily          | FONT_FAMILY         |  STRING      | O            | X
+ fontStyle           | FONT_STYLE          |  STRING      | O            | X
+ pointSize           | POINT_SIZE          |  FLOAT       | O            | X
+ multiLine           | MULTI_LINE          |  BOOLEAN     | O            | X
+ horizontalAlignment | HORIZONTAL_ALIGNMENT|  STRING      | O            | X
+ verticalAlignment   | VERTICAL_ALIGNMENT  |  STRING      | O            | X
+ textColor           | TEXT_COLOR          |  VECTOR4     | O            | X
+ shadowOffset        | SHADOW_OFFSET       |  VECTOR2     | O            | X
+ shadowColor         | SHADOW_COLOR        |  VECTOR4     | O            | X
+ underlineEnabled    | UNDERLINE_ENABLED   |  BOOLEAN     | O            | X
+ underlineColor      | UNDERLINE_COLOR     |  VECTOR4     | O            | X
+ underlineHeight     | UNDERLINE_HEIGHT    |  FLOAT       | O            | X
 
 
 
index addf616..9614bfb 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.0.41
+Version:    1.0.42
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
index f41f5ac..28837ab 100644 (file)
@@ -231,23 +231,28 @@ v8::Handle<v8::Object> EventObjectGenerator::CreateHoverEvent( v8::Isolate* isol
   return handleScope.Escape( hoverObject );
 }
 
-v8::Handle<v8::Object> EventObjectGenerator::CreateMouseWheelEvent( v8::Isolate* isolate, const MouseWheelEvent& wheelEvent)
+v8::Handle<v8::Object> EventObjectGenerator::CreateWheelEvent( v8::Isolate* isolate, const WheelEvent& wheelEvent)
 {
-  //  we are creating a mouse wheel event object that looks like this
+  //  we are creating a wheel event object that looks like this
   //
+  //  event.type = "mouseWheel" or "customWheel" type of the wheel event
   //  event.direction = "vertical" or "horizontal" direction the wheel is being rolled
   //  event.shiftPressed       = boolean, shift key is held
   //  event.ctrlPressed        = boolean, ctrl key is held
   //  event.altPressed     = boolean, alt key is held
   //  event.keyModifiers = bitmask of keys pressed
   //  event.point {x,y}    = The co-ordinates of the mouse cursor relative to the top-left of the screen when the wheel is being rolled.
-  //  event.rolled          = offset of mouse wheel rolling, positive = rolling down, negative = rolling up
+  //  event.rolled          = offset of wheel rolling, positive = rolling down or clockwise, negative = rolling up or counter-clockwise
   //  event.timestamp    = The time (in ms) that the touch event occurred
 
   v8::EscapableHandleScope handleScope( isolate );
 
   v8::Local<v8::Object> wheelObject = v8::Object::New( isolate );
 
+  // Set the type
+  std::string type = wheelEvent.type ? "mouseWheel" : "customWheel";
+  wheelObject->Set( v8::String::NewFromUtf8( isolate, "type" ), v8::String::NewFromUtf8( isolate, type.c_str() ) );
+
   // Set the direction
   std::string direction = wheelEvent.direction ? "vertical" : "horizontal";
   wheelObject->Set( v8::String::NewFromUtf8( isolate, "direction" ), v8::String::NewFromUtf8( isolate, direction.c_str() ) );
index 8083255..d1d6296 100644 (file)
@@ -23,7 +23,7 @@
 #include <v8.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/events/hover-event.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/events/pan-gesture.h>
 
@@ -44,7 +44,7 @@ namespace EventObjectGenerator
 
   v8::Handle<v8::Object> CreateTouchEvent( v8::Isolate* isolate, const TouchEvent& touchEvent);
   v8::Handle<v8::Object> CreateHoverEvent( v8::Isolate* isolate, const HoverEvent& hoverEvent);
-  v8::Handle<v8::Object> CreateMouseWheelEvent( v8::Isolate* isolate, const MouseWheelEvent& wheelEvent);
+  v8::Handle<v8::Object> CreateWheelEvent( v8::Isolate* isolate, const WheelEvent& wheelEvent);
   v8::Handle<v8::Object> CreateKeyEvent( v8::Isolate* isolate, const KeyEvent& keyEvent);
   v8::Handle<v8::Object> CreatePanGesture( v8::Isolate* isolate, const PanGesture& panGesture);
 
index b30b948..8e7df33 100644 (file)
@@ -19,7 +19,7 @@
 #include "resource-image-api.h"
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/images/image-operations.h>
+#include <dali/public-api/images/image-operations.h>
 
 // INTERNAL INCLUDES
 #include <v8-utils.h>
index 883fcbe..faeaf25 100644 (file)
@@ -74,9 +74,9 @@ v8::Local<v8::Value> DaliAnyConverter::ConvertToJavaScriptObject(v8::Isolate* is
   {
     returnValue = EventObjectGenerator::CreateHoverEvent( isolate, value.Get<HoverEvent>() );
   }
-  else if(  typeInfo == typeid( Dali::MouseWheelEvent ) )
+  else if(  typeInfo == typeid( Dali::WheelEvent ) )
   {
-    returnValue = EventObjectGenerator::CreateMouseWheelEvent( isolate, value.Get<MouseWheelEvent>() );
+    returnValue = EventObjectGenerator::CreateWheelEvent( isolate, value.Get<WheelEvent>() );
   }
   else if(  typeInfo == typeid( Dali::KeyEvent ) )
   {
index d8359e2..e5cfb67 100644 (file)
@@ -27,7 +27,7 @@
 #include <dali/public-api/images/image.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/events/hover-event.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/events/pan-gesture.h>
 
@@ -55,7 +55,7 @@ namespace // un-named namespace
 {
 const char* const SIGNAL_TOUCHED = "touched";
 const char* const SIGNAL_HOVERED = "hovered";
-const char* const SIGNAL_MOUSE_WHEEL_EVENT = "mouse-wheel-event";
+const char* const SIGNAL_WHEEL_EVENT = "wheel-event";
 const char* const SIGNAL_ON_STAGE = "on-stage";
 const char* const SIGNAL_OFF_STAGE = "off-stage";
 const char* const ANIMATION_SIGNAL_FINISHED = "finished";
@@ -205,7 +205,7 @@ public:
     returnValue.Get(ret);
     return ret;
   }
-  bool OnMouseWheel( Actor actor, const MouseWheelEvent& event)
+  bool OnWheel( Actor actor, const WheelEvent& event)
   {
     std::vector< Dali::Any > arguments;
     Dali::Any returnValue(false);
@@ -312,7 +312,7 @@ public:
 
   Actor PreFocusChangeSignal(Actor currentFocusedActor,
                              Actor proposedActorToFocus,
-                             Toolkit::Control::KeyboardFocusNavigationDirection direction  )
+                             Toolkit::Control::KeyboardFocus::Direction direction  )
   {
     std::vector< Dali::Any > arguments;
     Dali::Any returnValue = Actor();  // we want an actor as a return value
@@ -390,9 +390,9 @@ void ActorConnection( v8::Isolate* isolate,
   {
     actor.HoveredSignal().Connect( callback, &ActorCallback::OnHover );
   }
-  else if ( strcmp( signalName.c_str(), SIGNAL_MOUSE_WHEEL_EVENT ) == 0 )
+  else if ( strcmp( signalName.c_str(), SIGNAL_WHEEL_EVENT ) == 0 )
   {
-    actor.MouseWheelEventSignal().Connect( callback, &ActorCallback::OnMouseWheel );
+    actor.WheelEventSignal().Connect( callback, &ActorCallback::OnWheel );
   }
   else if ( strcmp( signalName.c_str(), SIGNAL_ON_STAGE ) == 0 )
   {
index d39276c..b43e703 100644 (file)
@@ -34,29 +34,29 @@ namespace // un named namespace
 {
 
 
-Toolkit::Control::KeyboardFocusNavigationDirection  GetDirection( std::string name,  v8::Isolate* isolate )
+Toolkit::Control::KeyboardFocus::Direction  GetDirection( std::string name,  v8::Isolate* isolate )
 {
   if( name == "left")
   {
-    return Dali::Toolkit::Control::Left;
+    return Dali::Toolkit::Control::KeyboardFocus::LEFT;
   }
   if( name == "right")
   {
-    return  Dali::Toolkit::Control::Right;
+    return  Dali::Toolkit::Control::KeyboardFocus::RIGHT;
   }
   if( name == "up")
   {
-    return  Dali::Toolkit::Control::Up;
+    return  Dali::Toolkit::Control::KeyboardFocus::UP;
   }
   if( name == "down")
   {
-    return  Dali::Toolkit::Control::Down;
+    return  Dali::Toolkit::Control::KeyboardFocus::DOWN;
   }
 
   DALI_SCRIPT_EXCEPTION( isolate,  "direction not found ( wanted left,right,up,down)" );
 
 
-  return Dali::Toolkit::Control::Up;
+  return Dali::Toolkit::Control::KeyboardFocus::UP;
 
 }
 }; //un-named namespace
@@ -124,7 +124,7 @@ void KeyboardFocusManagerApi::MoveFocus( const v8::FunctionCallbackInfo< v8::Val
     return;
   }
 
-  Toolkit::Control::KeyboardFocusNavigationDirection dir = GetDirection( direction, isolate );
+  Toolkit::Control::KeyboardFocus::Direction dir = GetDirection( direction, isolate );
 
   Toolkit::KeyboardFocusManager::Get().MoveFocus( dir );
 }
index 0ab6ea9..5bab6a1 100644 (file)
@@ -109,26 +109,26 @@ v8::Local<v8::ObjectTemplate> KeyboardFocusManagerWrapper::GetKeyboardFocusManag
 }
 
 
-std::string KeyboardFocusManagerWrapper::GetDirectionName(  Toolkit::Control::KeyboardFocusNavigationDirection dir )
+std::string KeyboardFocusManagerWrapper::GetDirectionName(  Toolkit::Control::KeyboardFocus::Direction dir )
 {
   switch( dir )
   {
-    case Dali::Toolkit::Control::Left:
+    case Dali::Toolkit::Control::KeyboardFocus::LEFT:
     {
       return "left";
       break;
     }
-    case Dali::Toolkit::Control::Right:
+    case Dali::Toolkit::Control::KeyboardFocus::RIGHT:
     {
       return "right";
       break;
     }
-    case Dali::Toolkit::Control::Up:
+    case Dali::Toolkit::Control::KeyboardFocus::UP:
     {
       return "up";
       break;
     }
-    case Dali::Toolkit::Control::Down:
+    case Dali::Toolkit::Control::KeyboardFocus::DOWN:
     {
       return "down";
       break;
index 3889021..ae1dff3 100644 (file)
@@ -66,7 +66,7 @@ public:
 
   virtual SignalManager* GetSignalManager() { return &mSignalManager;}
 
-  static std::string GetDirectionName(  Toolkit::Control::KeyboardFocusNavigationDirection dir );
+  static std::string GetDirectionName(  Toolkit::Control::KeyboardFocus::Direction dir );
 
 private: