Add IsFocusNavigateEnabled
authorkeonpyo.kong <keonpyo.kong@samsung.com>
Tue, 25 Jun 2013 02:38:20 +0000 (11:38 +0900)
committerkeonpyo.kong <keonpyo.kong@samsung.com>
Tue, 25 Jun 2013 02:38:36 +0000 (11:38 +0900)
Change-Id: I820ad27721003236fbf32e8d0d8cba9ee4424457
Signed-off-by: keonpyo.kong <keonpyo.kong@samsung.com>
src/ui/FUi_Control.cpp
src/ui/FUi_FocusManagerImpl.cpp
src/ui/controls/FUiCtrl_Form.cpp
src/ui/inc/FUi_Control.h

index 2d8e050..0830a1f 100644 (file)
@@ -1869,6 +1869,18 @@ _Control::HasFocusRing(void)
 }
 
 void
+_Control::SetFocusNavigateEnabled(bool enable)
+{
+       __isNavigatable = enable;       
+}
+
+bool
+_Control::IsFocusNavigateEnabled(void) const
+{
+       return __isNavigatable;
+}
+
+void
 _Control::SetFocusModeStateEnabled(bool enable)
 {
        __isFocusMode = enable;
@@ -3909,6 +3921,7 @@ _Control::_Control(void)
        , __isSetClientBounds(false)
        , __isCalledGetCanvasN(false)
        , __isFocusMode(false)
+       , __isNavigatable(true)
        , __pVisualElementContentProvider(null)
        , __pVisualElement(null)
        , __pVisualElementEventListener(null)
index 29718a9..922ff9f 100644 (file)
@@ -175,7 +175,8 @@ _FocusManagerImpl::IsFocusable(_Control* pControl) const
        bool isFocusalbe = pControl->IsFocusable();
        bool enableState = pControl->IsEnabled();
        bool visibleState = pControl->IsVisible();
-       if (enableState  && visibleState  && isFocusalbe)
+       bool isNavigatable = pControl->IsFocusNavigateEnabled();
+       if (enableState  && visibleState  && isFocusalbe && isNavigatable)
        {
                return true;
        }
@@ -286,6 +287,7 @@ _FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusD
                                pTop->SetFocusTraversalControl(pControl);
                        }
                        pControl->DrawFocus();
+                       __isFocusMode = true;
                        return;
                }
        }
@@ -379,7 +381,6 @@ bool
 _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
        _KeyCode keyCode = keyInfo.GetKeyCode();
-
        if(keyCode == _KEY_TAB)
        {
                FocusDirection focusDirection = FOCUS_DIRECTION_DOWNWARD;
@@ -389,7 +390,6 @@ _FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                }
 
                _Control* pControl = const_cast<_Control*> (&source);
-               __isFocusMode = true;
                StartFocusTraversal(pControl, focusDirection);
        }
        return false;
index 0297740..4ecdfdf 100644 (file)
@@ -145,6 +145,7 @@ _Form::_Form(void)
 
        ClearLastResult();
        GetAccessibilityContainer()->Activate(true);
+       SetFocusNavigateEnabled(false);
        return;
 
 CATCH:
index 9336260..ee5467f 100644 (file)
@@ -432,6 +432,8 @@ public:
        bool HasFocusRing(void);
        void SetFocusModeStateEnabled(bool enable);
        bool IsFocusModeStateEnabled(void) const;
+       void SetFocusNavigateEnabled(bool enable);
+       bool IsFocusNavigateEnabled(void) const;
 
 // Clipping
        bool IsClipToParent(void) const;
@@ -665,6 +667,7 @@ private:
        bool __isSetClientBounds;
        bool __isCalledGetCanvasN;
        bool __isFocusMode;
+       bool __isNavigatable;
 
        class ControlVisualElementContentProvider;
        ControlVisualElementContentProvider* __pVisualElementContentProvider;