X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffocus-manager%2Fkeyboard-focus-manager-impl.h;h=967e9e1eb31c2a5260581f29078e1a753837799a;hp=7283b1ef0b76f2d19c13a02f0227c80b66cf8221;hb=8ae521ab64a3922f3419fbbfb83dde57e6135cf5;hpb=1e6044c72b27cd4ecfda3c929263d5aefa1efad0 diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h index 7283b1e..967e9e1 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H__ -#define __DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H__ +#ifndef DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H +#define DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,8 @@ // EXTERNAL INCLUDES #include -#include +#include +#include // INTERNAL INCLUDES #include @@ -29,6 +30,8 @@ namespace Dali { +class Window; + namespace Toolkit { @@ -38,7 +41,7 @@ namespace Internal /** * @copydoc Toolkit::KeyboardFocusManager */ -class KeyboardFocusManager : public Dali::BaseObject +class KeyboardFocusManager : public Dali::BaseObject, public ConnectionTracker { public: @@ -119,6 +122,16 @@ public: */ void SetCustomAlgorithm(CustomAlgorithmInterface& interface); + /** + * @copydoc Toolkit::DevelKeyboardFocusManager::UseFocusIndicator + */ + void EnableFocusIndicator(bool enable); + + /** + * @copydoc Toolkit::DevelKeyboardFocusManager::UseFocusIndicator + */ + bool IsFocusIndicatorEnabled() const; + public: /** @@ -161,8 +174,19 @@ protected: private: - typedef Dali::Vector< Dali::BaseObject* > FocusStack; ///< Define Dali::Vector< Dali::BaseObject* > as FocusStack to contain focus history - typedef FocusStack::Iterator FocusStackIterator; ///< Define FocusStack::Iterator as FocusStackIterator to navigate FocusStack + typedef std::vector< WeakHandle< Actor > > FocusStack; ///< Define Dali::Vector< Dali::BaseObject* > as FocusStack to contain focus history + typedef FocusStack::iterator FocusStackIterator; ///< Define FocusStack::Iterator as FocusStackIterator to navigate FocusStack + + /** + * This will be called when the adaptor is initialized + */ + void OnAdaptorInit(); + + /** + * This will be called when a new wndow is created + * @param window The new window + */ + void OnWindowCreated( Dali::Window& window ); /** * Get configuration from StyleManager. @@ -258,12 +282,18 @@ private: Actor mFocusIndicatorActor; ///< The focus indicator actor shared by all the keyboard focusable actors for highlight - int mIsFocusIndicatorEnabled; ///< Whether indicator should be shown / hidden when getting focus. It could be enabled when keyboard focus feature is enabled and navigation keys or 'Tab' key are pressed. + int mIsFocusIndicatorShown; ///< Whether indicator should be shown / hidden when getting focus. It could be enabled when keyboard focus feature is enabled and navigation keys or 'Tab' key are pressed. bool mFocusGroupLoopEnabled:1; ///< Whether the focus movement is looped within the same focus group bool mIsWaitingKeyboardFocusChangeCommit:1; /// A flag to indicate PreFocusChangeSignal emitted but the proposed focus actor is not commited by the application yet. + bool mClearFocusOnTouch:1; ///< Whether clear focus on touch. + + bool mEnableFocusIndicator; ///< Whether use focus indicator + + bool mAlwaysShowIndicator; ///< Whether always show indicator. If true, the indicator would be directly shown when focused. + FocusStack mFocusHistory; ///< Stack to contain pre-focused actor's BaseObject* SlotDelegate< KeyboardFocusManager > mSlotDelegate; @@ -296,4 +326,4 @@ inline const Internal::KeyboardFocusManager& GetImpl(const Dali::Toolkit::Keyboa } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H__ +#endif // DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H