Hover event support in DaliDemo 20/27820/4
authorRichard Huang <r.huang@samsung.com>
Fri, 19 Sep 2014 10:55:59 +0000 (11:55 +0100)
committerRichard Huang <r.huang@samsung.com>
Fri, 3 Oct 2014 12:16:38 +0000 (05:16 -0700)
Change-Id: I4d72ceba0abaed1cb1da7069de547cf899f63c74

demo/dali-table-view.cpp
demo/dali-table-view.h

index 4014b55..f61d458 100644 (file)
@@ -550,6 +550,7 @@ Actor DaliTableView::CreateTile( const string& name, const string& title, const
 
   // connect to the touch events
   tile.TouchedSignal().Connect( this, &DaliTableView::OnTilePressed );
+  tile.HoveredSignal().Connect( this, &DaliTableView::OnTileHovered );
 
   return tile;
 }
@@ -1041,3 +1042,11 @@ void DaliTableView::OnFocusedActorActivated( Dali::Actor activatedActor )
     OnTilePressed(mPressedActor, touchEventUp);
   }
 }
+
+bool DaliTableView::OnTileHovered( Actor actor, const HoverEvent& event )
+{
+  KeyboardFocusManager::Get().SetCurrentFocusActor( actor );
+  return true;
+}
+
+
index 08746ea..5a0d37f 100644 (file)
@@ -185,6 +185,16 @@ private: // Application callbacks & implementation
   bool OnTilePressed( Dali::Actor actor, const Dali::TouchEvent& event );
 
   /**
+   * Signal emitted when any tile has been hovered
+   *
+   * @param[in] actor The Actor representing this tile.
+   * @param[in] event The HoverEvent
+   *
+   * @return Consume flag
+   */
+  bool OnTileHovered( Dali::Actor actor, const Dali::HoverEvent& event );
+
+  /**
    * Signal emitted when the pressed animation has completed.
    *
    * @param[in] source The animation source.