X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Ffocus-manager%2Fkeyinput-focus-manager-impl.h;h=8b0397004c3e99630b819ceb841f72c80edd5587;hp=35cc6ebc99d7156f079824d749c932f74bb913d7;hb=7e315a440bad7033d19fefa8f9952d625ee6f076;hpb=998d982768c7f211d948cfd7921ec27ff739ce49 diff --git a/base/dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.h b/base/dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.h index 35cc6eb..8b03970 100644 --- a/base/dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.h +++ b/base/dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.h @@ -20,10 +20,10 @@ // EXTERNAL INCLUDES #include -#include +#include +#include // INTERNAL INCLUDES -#include #include #include @@ -41,13 +41,11 @@ class KeyInputFocusManager; /** * @copydoc Toolkit::KeyInputFocusManager */ -class KeyInputFocusManager : public Dali::BaseObject +class KeyInputFocusManager : public Dali::BaseObject, public Dali::ConnectionTracker { public: - - typedef std::deque< unsigned int > ActorQueue; - typedef std::deque< unsigned int >::iterator ActorQueueIterator; - typedef std::deque< unsigned int >::const_iterator ActorQueueConstIterator; + typedef Dali::Vector< Dali::BaseObject* > FocusStack; + typedef FocusStack::Iterator FocusStackIterator; /** * Construct a new KeyInputFocusManager. @@ -60,14 +58,14 @@ public: void SetFocus(Toolkit::Control control); /** - * @copydoc Toolkit::GetCurrentFocusControl + * @copydoc Toolkit::RemoveFocus */ - Toolkit::Control GetCurrentFocusControl() const; + void RemoveFocus(Toolkit::Control control); /** - * @copydoc Toolkit::RemoveFocus + * @copydoc Toolkit::GetCurrentFocusControl */ - void RemoveFocus(Toolkit::Control control); + Toolkit::Control GetCurrentFocusControl() const; /** * @copydoc Toolkit::IsKeyboardListener @@ -79,12 +77,12 @@ public: /** * @copydoc Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignal() */ - Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalV2& KeyInputFocusChangedSignal(); + Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType& KeyInputFocusChangedSignal(); /** * @copydoc Toolkit::KeyInputFocusManager::UnhandledKeyEventSignal() */ - Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalV2& UnhandledKeyEventSignal(); + Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalType& UnhandledKeyEventSignal(); /** * Connects a callback function with the object's signals. @@ -107,16 +105,29 @@ protected: private: /** + * Search for a control in the focus stack. + * @param[in] control The control for which to search + * @return An iterator to the control. If not found, this will equate to the + * mFocusStack.End() iterator. + */ + FocusStackIterator FindFocusControlInStack( Toolkit::Control control ) const; + + /** * Callback for the key event when no actor in the stage has gained the key input focus * @param[in] event The KeyEvent event. */ void OnKeyEvent(const KeyEvent& event); /** - * Signal handler called when a focused Actor is removed from Stage. - * @param[in] actor The actor removed from stage. + * Signal handler called when a focused Control is removed from Stage. + * @param[in] control The control removed from stage. */ - void OnFocusActorStageDisconnection( Dali::Actor actor ); + void OnFocusControlStageDisconnection( Dali::Actor control ); + + /** + * Signal handler called when an actor is destroyed. + */ + void OnObjectDestroyed(const Dali::RefObject* object); private: @@ -128,15 +139,15 @@ private: private: // The key input focus change signal - Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalV2 mKeyInputFocusChangedSignalV2; + Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType mKeyInputFocusChangedSignal; // The un-handled key event signal - Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalV2 mUnhandledKeyEventSignalV2; + Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalType mUnhandledKeyEventSignal; // Keyboard events are sent to the current focus actor, which will be the actor on the top of the focus actors stack. - ActorQueue mFocusActorsQueue; - + FocusStack mFocusStack; SlotDelegate< KeyInputFocusManager > mSlotDelegate; + ObjectRegistry mObjectRegistry; }; } // namespace Internal