Commit 5616e27f1f48f2e349113236b4d8499b6b33cd3f
1 parent
6e6a798b
Update keyboard focus direction enum for Control
Change-Id: I8652c8be27a99b86d4af4ea6557a3d7f4d8d4aba
Showing
3 changed files
with
8 additions
and
8 deletions
demo/dali-table-view.cpp
| ... | ... | @@ -890,7 +890,7 @@ void DaliTableView::PlayAnimation() |
| 890 | 890 | mAnimationTimer.SetInterval( BACKGROUND_ANIMATION_DURATION ); |
| 891 | 891 | } |
| 892 | 892 | |
| 893 | -Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction ) | |
| 893 | +Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction ) | |
| 894 | 894 | { |
| 895 | 895 | Actor nextFocusActor = proposed; |
| 896 | 896 | |
| ... | ... | @@ -905,11 +905,11 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: |
| 905 | 905 | // in the given direction. We should work out which page to scroll to next. |
| 906 | 906 | int currentPage = mScrollView.GetCurrentPage(); |
| 907 | 907 | int newPage = currentPage; |
| 908 | - if( direction == Dali::Toolkit::Control::Left ) | |
| 908 | + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) | |
| 909 | 909 | { |
| 910 | 910 | newPage--; |
| 911 | 911 | } |
| 912 | - else if( direction == Dali::Toolkit::Control::Right ) | |
| 912 | + else if( direction == Dali::Toolkit::Control::KeyboardFocus::RIGHT ) | |
| 913 | 913 | { |
| 914 | 914 | newPage++; |
| 915 | 915 | } |
| ... | ... | @@ -917,10 +917,10 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: |
| 917 | 917 | newPage = std::max(0, std::min(static_cast<int>(mScrollRulerX->GetTotalPages() - 1), newPage)); |
| 918 | 918 | if( newPage == currentPage ) |
| 919 | 919 | { |
| 920 | - if( direction == Dali::Toolkit::Control::Left ) | |
| 920 | + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) | |
| 921 | 921 | { |
| 922 | 922 | newPage = mScrollRulerX->GetTotalPages() - 1; |
| 923 | - } else if( direction == Dali::Toolkit::Control::Right ) | |
| 923 | + } else if( direction == Dali::Toolkit::Control::KeyboardFocus::RIGHT ) | |
| 924 | 924 | { |
| 925 | 925 | newPage = 0; |
| 926 | 926 | } |
| ... | ... | @@ -929,7 +929,7 @@ Dali::Actor DaliTableView::OnKeyboardPreFocusChange( Dali::Actor current, Dali:: |
| 929 | 929 | // Scroll to the page in the given direction |
| 930 | 930 | mScrollView.ScrollTo(newPage); |
| 931 | 931 | |
| 932 | - if( direction == Dali::Toolkit::Control::Left ) | |
| 932 | + if( direction == Dali::Toolkit::Control::KeyboardFocus::LEFT ) | |
| 933 | 933 | { |
| 934 | 934 | // Work out the cell position for the last tile |
| 935 | 935 | int remainingExamples = mExampleList.size() - newPage * EXAMPLES_PER_PAGE; | ... | ... |
demo/dali-table-view.h
| ... | ... | @@ -345,7 +345,7 @@ private: // Application callbacks & implementation |
| 345 | 345 | * @param[in] direction The direction to move the focus |
| 346 | 346 | * @return The actor to move the keyboard focus to. |
| 347 | 347 | */ |
| 348 | - Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction ); | |
| 348 | + Dali::Actor OnKeyboardPreFocusChange( Dali::Actor current, Dali::Actor proposed, Dali::Toolkit::Control::KeyboardFocus::Direction direction ); | |
| 349 | 349 | |
| 350 | 350 | /** |
| 351 | 351 | * Callback when the keyboard focused actor is activated. | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -313,7 +313,7 @@ public: |
| 313 | 313 | mWhiteImage = BufferImage::WHITE(); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | - Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocusNavigationDirection direction ) | |
| 316 | + Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocus::Direction direction ) | |
| 317 | 317 | { |
| 318 | 318 | if ( !current && !proposed ) |
| 319 | 319 | { | ... | ... |