Fixed jira and plm issue.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 8 Jul 2013 09:28:49 +0000 (18:28 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Mon, 8 Jul 2013 09:28:49 +0000 (18:28 +0900)
Change-Id: Ie3cb2b6d76bcc5e6666ded2884caab7fceb97237

src/ui/controls/FUiCtrl_Form.cpp
src/ui/controls/FUiCtrl_FormImpl.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/inc/FUiCtrl_Indicator.h

index 085a9e9..7ec06f2 100644 (file)
@@ -3157,6 +3157,7 @@ _Form::AttachedToMainTree(void)
                        }
                        else
                        {
+                               __pIndicator->SetWindow(GetRootWindow());
                                r = SetIndicatorShowState(false);
                                SetIndicatorAutoHide(false, false);
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
index ae4e508..f7c238a 100644 (file)
@@ -1230,6 +1230,7 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
        {
                if (pIndicator)
                {
+                       pIndicator->SetIndicatorOrientation(orientation);
                        if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
                        {
                                pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
@@ -1286,7 +1287,7 @@ _FormImpl::OnChangeLayout(_ControlOrientation orientation)
                                        {
                                                if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
                                                {
-                                                       adjHeight = 0.0f;
+                                                       indicatorBounds.height = 0.0f;
                                                }
                                        }
                                }
index 29fe16e..2ed2ff6 100644 (file)
@@ -432,8 +432,6 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation)
                win = (Ecore_X_Window)__pWindow->GetNativeHandle();
        }
 
-       __orientation = orientation;
-
        if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
        {
                ChangeCurrentVisualElement(__pPortraitVisualElement);
@@ -683,13 +681,51 @@ _Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point)
        }
 
        _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
-       _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pImpl->GetNativeNode()->GetSurface()));
-       Evas_Object* pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+       Evas_Object* pImageObject = null;
+       if (pImpl)
+       {
+               _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
+               if (pNativeNode)
+               {
+                       VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
+                       if (pPortraitSurface)
+                       {
+                               _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
+                               if (pSurface)
+                               {
+                                       pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+                               }
+                       }
+               }
+       }
 
-       if (!evas_object_repeat_events_get(pImageObject))
-               return HIT_TEST_MATCH;
+       if (pImageObject)
+       {
+               if (!evas_object_repeat_events_get(pImageObject))
+               {
+                       return HIT_TEST_MATCH;
+               }
+               else
+               {
+                       return HIT_TEST_NOWHERE;
+               }
+       }
        else
+       {
                return HIT_TEST_NOWHERE;
+       }
+}
+
+void
+_Indicator::SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation)
+{
+       __orientation = orientation;
+}
+
+void
+_Indicator::SetWindow(_Window* pWindow)
+{
+       __pWindow = pWindow;
 }
 
 }}} // Tizen::Ui::Controls
index 1c9e3d7..4890b65 100644 (file)
@@ -67,6 +67,9 @@ public:
                Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
                Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const;
 
+               void SetIndicatorOrientation(Tizen::Ui::_ControlOrientation orientation);
+               void SetWindow(Tizen::Ui::_Window* pWindow);
+
                void OnChangeLayout(_ControlOrientation orientation);
                result OnAttachedToMainTree(void);
                virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);