Merge "Fixed Docomo Issue - to prevent to display '. ' character as first character...
authorYunji Park <yunji19.park@samsung.com>
Fri, 26 Apr 2013 05:56:10 +0000 (14:56 +0900)
committerGerrit Code Review <gerrit2@kim11>
Fri, 26 Apr 2013 05:56:10 +0000 (14:56 +0900)
13 files changed:
inc/FUiTouchPanningGestureDetector.h
src/app/FApp_AppResourceBitmap.cpp
src/ui/controls/FUiCtrl_ColorPicker.cpp
src/ui/controls/FUiCtrl_EditDate.cpp
src/ui/controls/FUiCtrl_EditTime.cpp
src/ui/controls/FUiCtrl_Form.cpp
src/ui/controls/FUiCtrl_FormImpl.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/controls/FUiCtrl_SplitPanel.cpp
src/ui/controls/FUiCtrl_ToolbarPresenter.cpp
src/ui/inc/FUiCtrl_Form.h
src/ui/inc/FUiCtrl_FormImpl.h
src/ui/inc/FUi_ControlImplManager.h

index fc51061..0549640 100644 (file)
@@ -81,7 +81,7 @@ public:
        * @param[in]    listener                                                The event listener to add
        * @exception    E_SUCCESS                                       The method is successful.
        * @exception    E_OBJ_ALREADY_EXIST     The listener is already added.
-       * @see                                  RemoveRotationGestureEventListener()
+       * @see                                  RemovePanningGestureEventListener()
        */
        result AddPanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener);
 
@@ -94,7 +94,7 @@ public:
        * @param[in]    listener                                                The listener to remove
        * @exception    E_SUCCESS                                       The method is successful.
        * @exception    E_OBJ_NOT_FOUND The specified @c listener is not found.
-       * @see                                  AddRotationGestureEventListener()
+       * @see                                  AddPanningGestureEventListener()
        */
        result RemovePanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener);
 
index 8011183..d25bb2a 100644 (file)
@@ -110,7 +110,7 @@ _AppResourceBitmap::GetBitmapN(const String& imageFileName, BitmapPixelFormat pi
                pBitmap = __pAppResourceBitmapUtil->GetBitmapN(resourcePath, resourceDensity, pixelFormat, imageScaling);
        }
 
-       SysLog(NID_APP, "The current value of bitmap path is %S(%S) and pixel format is %d", resourcePath.GetPointer(), imageScaling?L"scaled":L"not scaled", pixelFormat);
+       SysSecureLog(NID_APP, "The current value of bitmap path is %S(%S) and pixel format is %d", resourcePath.GetPointer(), imageScaling?L"scaled":L"not scaled", pixelFormat);
 
        r = GetLastResult();
        SysTryReturn(NID_APP, pBitmap != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
index 1a2f20d..6224c15 100644 (file)
@@ -369,6 +369,7 @@ _ColorPicker::InitializeAccessibilityElement(void)
 
                String hintText(L"Double tap and drag to adjust");
 
+               __pHueBarElement->SetName("ColorPickerColorSlider");
                __pHueBarElement->SetLabel("Hue Slider");
                __pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
                __pHueBarElement->SetHint(hintText);
@@ -383,6 +384,7 @@ _ColorPicker::InitializeAccessibilityElement(void)
                __pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true);
                SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+               __pSaturationBarElement->SetName("ColorPickerSaturationSlider");
                __pSaturationBarElement->SetLabel("Saturation Slider");
                __pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
                __pSaturationBarElement->SetHint(hintText);
@@ -397,6 +399,7 @@ _ColorPicker::InitializeAccessibilityElement(void)
                __pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true);
                SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+               __pLuminanceBarElement->SetName("ColorPickerBrightnessSlider");
                __pLuminanceBarElement->SetLabel("Luminance Slider");
                __pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
                __pLuminanceBarElement->SetHint(hintText);
index 6f04183..3cc0630 100644 (file)
@@ -781,12 +781,12 @@ _EditDate::OnChangeLayout(_ControlOrientation orientation)
 {
        if (!__isCalledBoundsChanged && !__isXmlBoundsExist)
        {
-               FloatDimension dim;
+               FloatRectangle bounds = GetBoundsF();
 
-               GET_SHAPE_CONFIG(EDITDATE::WIDTH, GetOrientation(), dim.width);
-               GET_SHAPE_CONFIG(EDITDATE::HEIGHT, GetOrientation(), dim.height);
+               GET_SHAPE_CONFIG(EDITDATE::WIDTH, GetOrientation(), bounds.width);
+               GET_SHAPE_CONFIG(EDITDATE::HEIGHT, GetOrientation(), bounds.height);
 
-               SetSize(dim);
+               SetBounds(bounds, false);
        }
 
        __pEditDatePresenter->Initialize();
index 567bce0..f025121 100644 (file)
@@ -588,12 +588,12 @@ _EditTime::OnChangeLayout(_ControlOrientation orientation)
 {
        if (!__isCalledBoundsChanged && !__isXmlBoundsExist)
        {
-               FloatDimension dim;
+               FloatRectangle bounds = GetBoundsF();
 
-               GET_SHAPE_CONFIG(EDITTIME::WIDTH, GetOrientation(), dim.width);
-               GET_SHAPE_CONFIG(EDITTIME::HEIGHT, GetOrientation(), dim.height);
+               GET_SHAPE_CONFIG(EDITTIME::WIDTH, GetOrientation(), bounds.width);
+               GET_SHAPE_CONFIG(EDITTIME::HEIGHT, GetOrientation(), bounds.height);
 
-               SetSize(dim);
+               SetBounds(bounds, false);
        }
 
        __pEditTimePresenter->Initialize();
index 633af5e..760f8bc 100644 (file)
@@ -82,6 +82,7 @@ _Form::_Form(void)
        , __updatedSoftkeyCount(0)
        , __keypadShowstate(false)
        , __clipboardShowstate(false)
+       , __pFormOrientationstatusEventListener(null)
 {
        Color color;
        result r = GET_COLOR_CONFIG(FORM::BG_NORMAL,color);
@@ -3293,4 +3294,19 @@ _Form::OnVisibleStateChanged(void)
        }
 }
 
+void
+_Form::SetFormOrientationStatusEventListener(_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener)
+{
+       __pFormOrientationstatusEventListener = pFormOrientationstatusEventListener;
+}
+
+Tizen::Ui::OrientationStatus
+_Form::GetFormOrientationStatus(void) const
+{
+       if (__pFormOrientationstatusEventListener)
+       {
+               return __pFormOrientationstatusEventListener->OnFormOrientationStatusRequested();
+       }
+}
+
 }}} // Tizen::Ui::Controls
index 3041031..67f6cd3 100644 (file)
@@ -195,6 +195,8 @@ _FormImpl::CreateFormImplN(Form* pControl, Layout* pPublicPortraitLayout, Layout
        }
        SysAssert(r == E_SUCCESS);
 
+       pCore->SetFormOrientationStatusEventListener(pImpl);
+
        // Make surface opaque.
        pVisualElement = pCore->GetVisualElement();
        SysTryCatch(NID_UI_CTRL, pVisualElement, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
@@ -1608,6 +1610,17 @@ _FormImpl::OnFormBackRequested(Tizen::Ui::Controls::_Form& source)
        }
 }
 
+OrientationStatus
+_FormImpl::OnFormOrientationStatusRequested(void)
+{
+       _ControlImplManager* pImplManager = _ControlImplManager::GetInstance();
+       SysAssert(pImplManager);
+
+       OrientationStatus status = pImplManager->GetOrientationStatus(GetOrientation());
+       return status;
+}
+
+
 bool
 _FormImpl::IsOpaque(void) const
 {
index 87d7f04..4604e13 100644 (file)
@@ -279,21 +279,25 @@ _Indicator::AddIndicatorObject(_Form* pForm)
        ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle);
        ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle);
 
-       _ControlRotation controlRotation = _ControlManager::GetInstance()->GetOrientationStatus();
-       int rotation = 0;
+       OrientationStatus status = ORIENTATION_STATUS_PORTRAIT;
+       if (pForm)
+       {
+               status = pForm->GetFormOrientationStatus();
+       }
 
-       switch(controlRotation)
+       int rotation = 0;
+       switch(status)
        {
-       case _CONTROL_ROTATION_0 :
+       case ORIENTATION_STATUS_PORTRAIT :
                rotation = 0;
                break;
-       case _CONTROL_ROTATION_90 :
+       case ORIENTATION_STATUS_LANDSCAPE :
                rotation = 90;
                break;
-       case _CONTROL_ROTATION_180 :
+       case ORIENTATION_STATUS_PORTRAIT_REVERSE :
                rotation = 180;
                break;
-       case _CONTROL_ROTATION_270 :
+       case ORIENTATION_STATUS_LANDSCAPE_REVERSE :
                rotation = 270;
                break;
        default :
index c3bc550..787fdef 100644 (file)
@@ -818,22 +818,23 @@ _SplitPanel::OnAttachedToMainTree(void)
        {
                if (__pDividerVisualElement)
                {
+                       __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+                       SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
                        dividerRect = __pSplitPanelPresenter->GetDividerRectangle();
 
                        if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED)
                        {
-                               hintText = String(L"Drag scroll Fixed");
+                               hintText = String(L"double tap to open/close the split area");
+                               __pAccessibilityElement->SetTrait(L"Split view button");
                        }
                        else
                        {
-                               hintText = String(L"Drag scroll, double tap and move to adjust split area");
+                               hintText = String(L"double tap and move to adjust split area");
+                               __pAccessibilityElement->SetTrait(L"Drag scroll");
                        }
 
-                       __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
-                       SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-
-                       __pAccessibilityElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(dividerRect));
-                       __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
+                       __pAccessibilityElement->SetBounds(dividerRect);
                        __pAccessibilityElement->SetHint(hintText);
                        __pAccessibilityElement->SetLabel(L"");
                        __pAccessibilityElement->SetName(L"SplitPanelDivider");
index 08692b2..380b50d 100644 (file)
@@ -1100,7 +1100,27 @@ _ToolbarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touc
 
        if (__pressedItemIndex == -1)
        {
-               return true;
+               _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source));
+
+               if (__pToolbar->GetButton(LEFT_BUTTON) != null)
+               {
+                       _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0));
+
+                       if (pLabel == pTempBadgeIcon)
+                       {
+                               __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED, false);
+                       }
+               }
+
+               if (__pToolbar->GetButton(RIGHT_BUTTON) != null)
+               {
+                       _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0));
+
+                       if (pLabel == pTempBadgeIcon)
+                       {
+                               __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED, false);
+                       }
+               }
        }
        else
        {
@@ -1241,6 +1261,44 @@ _ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& tou
                                                __pToolbar->GetItem(releasedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false);
                                        }
                                }
+                               else
+                               {
+                                       _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source));
+
+                                       if (__pToolbar->GetButton(LEFT_BUTTON) != null)
+                                       {
+                                               _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0));
+
+                                               if (pLabel == pTempBadgeIcon)
+                                               {
+                                                       FloatRectangle buttonItemBounds = __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF();
+
+                                                       if (buttonItemBounds.Contains(touchPoint))
+                                                       {
+                                                               __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_SELECTED, true);
+                                                       }
+
+                                                       __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false);
+                                               }
+                                       }
+
+                                       if (__pToolbar->GetButton(RIGHT_BUTTON) != null)
+                                       {
+                                               _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0));
+
+                                               if (pLabel == pTempBadgeIcon)
+                                               {
+                                                       FloatRectangle buttonItemBounds = __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF();
+
+                                                       if (buttonItemBounds.Contains(touchPoint))
+                                                       {
+                                                               __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_SELECTED, true);
+                                                       }
+
+                                                       __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false);
+                                               }
+                                       }
+                               }
 
                                return true;
                        }
@@ -1282,6 +1340,48 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi
 
        if (__pressedItemIndex == -1)
        {
+               _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source));
+
+               if (__pToolbar->GetButton(LEFT_BUTTON) != null)
+               {
+                       _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0));
+
+                       if (pLabel == pTempBadgeIcon)
+                       {
+                               FloatRectangle buttonItemBounds = __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF();
+
+                               if (buttonItemBounds.Contains(touchPoint))
+                               {
+                                       __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                               }
+                               else
+                               {
+                                       __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                               }
+                       }
+               }
+
+               if (__pToolbar->GetButton(RIGHT_BUTTON) != null)
+               {
+                       _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0));
+
+                       if (pLabel == pTempBadgeIcon)
+                       {
+                               FloatRectangle buttonItemBounds = __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF();
+
+                               if (buttonItemBounds.Contains(touchPoint))
+                               {
+                                       __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+                               }
+                               else
+                               {
+                                       __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                               }
+                       }
+               }
+
+               __pToolbar->Invalidate(true);
+
                return true;
        }
 
index 7951c7d..b7dc35a 100644 (file)
@@ -24,6 +24,7 @@
 #define _FUI_CTRL_INTERNAL_FORM_H_
 
 #include <unique_ptr.h>
+#include <FUiIOrientationEventListener.h>
 #include <FUiCtrlControlsTypes.h>
 #include <FUiCtrlOverlayRegion.h>
 #include "FUi_Control.h"
@@ -64,6 +65,18 @@ enum _Softkey
        _SOFTKEY_COUNT   /**< This is internal. If used in an application, the application can get rejected during the certification process. Define the softkey count */
 };
 
+class _IFormOrientationStatusEventListener
+       : virtual public Tizen::Base::Runtime::IEventListener
+{
+       // Lifecycle
+       public:
+               virtual ~_IFormOrientationStatusEventListener(void) {}
+
+       // Operation
+       public:
+               virtual Tizen::Ui::OrientationStatus OnFormOrientationStatusRequested(void) = 0;
+};
+
 /**
  * @class _Form
  * @brief
@@ -194,6 +207,9 @@ public:
        result SetNotificationTrayOpenEnabled(bool enable);
        bool IsNotificationTrayOpenEnabled(void) const;
 
+       void SetFormOrientationStatusEventListener(Tizen::Ui::Controls::_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener);
+       Tizen::Ui::OrientationStatus GetFormOrientationStatus(void) const;
+
 //callback
        virtual void OnDraw(void);
        virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
@@ -276,6 +292,8 @@ private:
        Tizen::Graphics::Bitmap* __pSoftkeyPressedIcon[_SOFTKEY_COUNT+1];
        Tizen::Graphics::Bitmap* __pSoftkeyHighlightedIcon[_SOFTKEY_COUNT+1];
 
+       Tizen::Ui::Controls::_IFormOrientationStatusEventListener* __pFormOrientationstatusEventListener;
+
        //Back button action ID
        static const int ID_BACK_BUTTON = -10;
 
index 4ec0497..1e4e52f 100644 (file)
@@ -40,6 +40,7 @@ class _OSP_EXPORT_ _FormImpl
        , public Tizen::Ui::Controls::_IActionEventListener
        , public Tizen::Ui::Controls::_IFormBackEventListener
        , virtual public Tizen::Base::Runtime::IEventListener
+       , public _IFormOrientationStatusEventListener
 {
 public:
        class FormSizeInfo : public _ControlImpl::SizeInfo
@@ -147,6 +148,8 @@ public:
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::_Form& source);
 
+       virtual Tizen::Ui::OrientationStatus OnFormOrientationStatusRequested(void);
+
        static const _FormImpl* GetInstance(const Form& form);
 
        static _FormImpl* GetInstance(Form& form);
index 7bdbb72..a590b38 100644 (file)
@@ -50,11 +50,11 @@ public:
 
        void OnScreenRotated(int rotation);
        OrientationStatus GetFormOrientationStatus(_ControlImpl *pControlImpl);
+       OrientationStatus GetOrientationStatus(Orientation mode) const;
 
 private:
        void SetOrientationStatus(OrientationStatus orientationStatus);
        static void RotateScreen(_ControlImpl* pControlImpl, OrientationStatus orientationStatus);
-       OrientationStatus GetOrientationStatus(Orientation mode) const;
 
 private:
        _ControlImplManager(void);