From 5616e27f1f48f2e349113236b4d8499b6b33cd3f Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Fri, 29 May 2015 11:39:36 +0100 Subject: [PATCH] Update keyboard focus direction enum for Control Change-Id: I8652c8be27a99b86d4af4ea6557a3d7f4d8d4aba --- demo/dali-table-view.cpp | 12 ++++++------ demo/dali-table-view.h | 2 +- examples/item-view/item-view-example.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index 7188db9..7e0f3cb 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -890,7 +890,7 @@ void DaliTableView::PlayAnimation() mAnimationTimer.SetInterval( BACKGROUND_ANIMATION_DURATION ); } -Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction ) +Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction ) { Actor nextFocusActor = proposed; @@ -905,11 +905,11 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: // in the given direction. We should work out which page to scroll to next. int currentPage = mScrollView.GetCurrentPage(); int newPage = currentPage; - if( direction == Dali::Toolkit::Control::Left ) + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) { newPage--; } - else if( direction == Dali::Toolkit::Control::Right ) + else if( direction == Dali::Toolkit::Control::KeyboardFocus::RIGHT ) { newPage++; } @@ -917,10 +917,10 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: newPage = std::max(0, std::min(static_cast(mScrollRulerX->GetTotalPages() - 1), newPage)); if( newPage == currentPage ) { - if( direction == Dali::Toolkit::Control::Left ) + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) { newPage = mScrollRulerX->GetTotalPages() - 1; - } else if( direction == Dali::Toolkit::Control::Right ) + } else if( direction == Dali::Toolkit::Control::KeyboardFocus::RIGHT ) { newPage = 0; } @@ -929,7 +929,7 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: // Scroll to the page in the given direction mScrollView.ScrollTo(newPage); - if( direction == Dali::Toolkit::Control::Left ) + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) { // Work out the cell position for the last tile int remainingExamples = mExampleList.size() - newPage * EXAMPLES_PER_PAGE; diff --git a/demo/dali-table-view.h b/demo/dali-table-view.h index 55b5d41..c8fcf58 100644 --- a/demo/dali-table-view.h +++ b/demo/dali-table-view.h @@ -345,7 +345,7 @@ private: // Application callbacks & implementation * @param[in] direction The direction to move the focus * @return The actor to move the keyboard focus to. */ - Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction ); + Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction ); /** * Callback when the keyboard focused actor is activated. diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index c3b858d..5bbaa1f 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -313,7 +313,7 @@ public: mWhiteImage = BufferImage::WHITE(); } - Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocusNavigationDirection direction ) + Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocus::Direction direction ) { if ( !current && !proposed ) { -- 2.7.4