mFocusGroupLoopEnabled( false ),
mIsWaitingKeyboardFocusChangeCommit( false ),
mClearFocusOnTouch( true ),
+ mEnableFocusIndicator( true ),
mFocusHistory(),
mSlotDelegate( this ),
mCustomAlgorithmInterface(NULL)
// Check whether the actor is in the stage and is keyboard focusable.
if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
{
- if( mIsFocusIndicatorEnabled )
+ if( mIsFocusIndicatorEnabled && mEnableFocusIndicator )
{
actor.Add( GetFocusIndicatorActor() );
}
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards left
+ MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
+ }
- // Move the focus towards left
- MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
isFocusStartableKey = true;
}
else
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards right
- MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+ else
+ {
+ // Move the focus towards right
+ MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+ }
}
else
{
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards up
+ MoveFocus(Toolkit::Control::KeyboardFocus::UP);
+ }
- // Move the focus towards up
- MoveFocus(Toolkit::Control::KeyboardFocus::UP);
isFocusStartableKey = true;
}
else if (keyName == "Down" && !isAccessibilityEnabled)
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards down
+ MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
+ }
- // Move the focus towards down
- MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
isFocusStartableKey = true;
}
else if (keyName == "Prior" && !isAccessibilityEnabled)
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards the previous page
- MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+ else
+ {
+ // Move the focus towards the previous page
+ MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+ }
isFocusStartableKey = true;
}
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards the next page
- MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+ else
+ {
+ // Move the focus towards the next page
+ MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+ }
isFocusStartableKey = true;
}
Actor actor = GetCurrentFocusActor();
if( actor )
{
- // Make sure the focused actor is highlighted
- actor.Add( GetFocusIndicatorActor() );
+ if( mEnableFocusIndicator )
+ {
+ // Make sure the focused actor is highlighted
+ actor.Add( GetFocusIndicatorActor() );
+ }
}
else
{
mCustomAlgorithmInterface = &interface;
}
+void KeyboardFocusManager::EnableFocusIndicator(bool enable)
+{
+ if( !enable && mFocusIndicatorActor )
+ {
+ mFocusIndicatorActor.Unparent();
+ }
+
+ mEnableFocusIndicator = enable;
+}
+
+bool KeyboardFocusManager::IsFocusIndicatorEnabled() const
+{
+ return mEnableFocusIndicator;
+}
+
} // namespace Internal
} // namespace Toolkit