mFocusedActorEnterKeySignal(),
mCurrentFocusActor(),
mFocusIndicatorActor(),
- mIsFocusIndicatorEnabled( -1 ),
+ mIsFocusIndicatorShown( -1 ),
mFocusGroupLoopEnabled( false ),
mIsWaitingKeyboardFocusChangeCommit( false ),
mClearFocusOnTouch( true ),
mEnableFocusIndicator( true ),
+ mAlwaysShowIndicator( true ),
mFocusHistory(),
mSlotDelegate( this ),
mCustomAlgorithmInterface(NULL)
{
- // TODO: Get FocusIndicatorEnable constant from stylesheet to set mIsFocusIndicatorEnabled.
+ // TODO: Get FocusIndicatorEnable constant from stylesheet to set mIsFocusIndicatorShown.
Stage::GetCurrent().KeyEventSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
Stage::GetCurrent().TouchSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch );
}
if( styleManager )
{
Property::Map config = Toolkit::DevelStyleManager::GetConfigurations( styleManager );
- mIsFocusIndicatorEnabled = static_cast<int>(config["alwaysShowFocus"].Get<bool>());
- mClearFocusOnTouch = mIsFocusIndicatorEnabled ? false : true;
+ mAlwaysShowIndicator = config["alwaysShowFocus"].Get<bool>();
+ mIsFocusIndicatorShown = static_cast<int>(mAlwaysShowIndicator);
+ mClearFocusOnTouch = mIsFocusIndicatorShown ? false : true;
}
}
{
DALI_ASSERT_DEBUG( !mIsWaitingKeyboardFocusChangeCommit && "Calling this function in the PreFocusChangeSignal callback?" );
- if( mIsFocusIndicatorEnabled == -1 )
+ if( mIsFocusIndicatorShown == -1 )
{
GetConfigurationFromStyleManger();
}
// Check whether the actor is in the stage and is keyboard focusable.
if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
{
- if( mIsFocusIndicatorEnabled && mEnableFocusIndicator )
+ if( mIsFocusIndicatorShown && mEnableFocusIndicator )
{
actor.Add( GetFocusIndicatorActor() );
}
}
mCurrentFocusActor.Reset();
- mIsFocusIndicatorEnabled = 0;
+ mIsFocusIndicatorShown = static_cast<int>(mAlwaysShowIndicator);
}
void KeyboardFocusManager::SetFocusGroupLoop(bool enabled)
std::string keyName = event.keyPressedName;
- if( mIsFocusIndicatorEnabled == -1 )
+ if( mIsFocusIndicatorShown == -1 )
{
GetConfigurationFromStyleManger();
}
{
if(!isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
{
if(!isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "Up" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "Down" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "Prior" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "Next" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "Tab" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
else if (keyName == "space" && !isAccessibilityEnabled)
{
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
isFocusStartableKey = true;
else if (keyName == "" && !isAccessibilityEnabled)
{
// Check the fake key event for evas-plugin case
- if(!mIsFocusIndicatorEnabled)
+ if(!mIsFocusIndicatorShown)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
isFocusStartableKey = true;
{
if (keyName == "Return")
{
- if(!mIsFocusIndicatorEnabled && !isAccessibilityEnabled)
+ if(!mIsFocusIndicatorShown && !isAccessibilityEnabled)
{
// Show focus indicator
- mIsFocusIndicatorEnabled = 1;
+ mIsFocusIndicatorShown = 1;
}
else
{
}
}
- if(isFocusStartableKey && mIsFocusIndicatorEnabled && !isAccessibilityEnabled)
+ if(isFocusStartableKey && mIsFocusIndicatorShown && !isAccessibilityEnabled)
{
Actor actor = GetCurrentFocusActor();
if( actor )
void KeyboardFocusManager::OnTouch(const TouchData& touch)
{
- // if mIsFocusIndicatorEnabled is -1, it means Configuration is not loaded.
+ // if mIsFocusIndicatorShown is -1, it means Configuration is not loaded.
// Try to load configuration.
- if( mIsFocusIndicatorEnabled == -1 )
+ if( mIsFocusIndicatorShown == -1 )
{
GetConfigurationFromStyleManger();
}