* @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);
* @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);
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));
String hintText(L"Double tap and drag to adjust");
+ __pHueBarElement->SetName("ColorPickerColorSlider");
__pHueBarElement->SetLabel("Hue Slider");
__pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
__pHueBarElement->SetHint(hintText);
__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);
__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);
{
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();
{
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();
, __updatedSoftkeyCount(0)
, __keypadShowstate(false)
, __clipboardShowstate(false)
+ , __pFormOrientationstatusEventListener(null)
{
Color color;
result r = GET_COLOR_CONFIG(FORM::BG_NORMAL,color);
}
}
+void
+_Form::SetFormOrientationStatusEventListener(_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener)
+{
+ __pFormOrientationstatusEventListener = pFormOrientationstatusEventListener;
+}
+
+Tizen::Ui::OrientationStatus
+_Form::GetFormOrientationStatus(void) const
+{
+ if (__pFormOrientationstatusEventListener)
+ {
+ return __pFormOrientationstatusEventListener->OnFormOrientationStatusRequested();
+ }
+}
+
}}} // Tizen::Ui::Controls
}
SysAssert(r == E_SUCCESS);
+ pCore->SetFormOrientationStatusEventListener(pImpl);
+
// Make surface opaque.
pVisualElement = pCore->GetVisualElement();
SysTryCatch(NID_UI_CTRL, pVisualElement, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
}
+OrientationStatus
+_FormImpl::OnFormOrientationStatusRequested(void)
+{
+ _ControlImplManager* pImplManager = _ControlImplManager::GetInstance();
+ SysAssert(pImplManager);
+
+ OrientationStatus status = pImplManager->GetOrientationStatus(GetOrientation());
+ return status;
+}
+
+
bool
_FormImpl::IsOpaque(void) const
{
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 :
{
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");
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
{
__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;
}
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;
}
#define _FUI_CTRL_INTERNAL_FORM_H_
#include <unique_ptr.h>
+#include <FUiIOrientationEventListener.h>
#include <FUiCtrlControlsTypes.h>
#include <FUiCtrlOverlayRegion.h>
#include "FUi_Control.h"
_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
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);
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;
, public Tizen::Ui::Controls::_IActionEventListener
, public Tizen::Ui::Controls::_IFormBackEventListener
, virtual public Tizen::Base::Runtime::IEventListener
+ , public _IFormOrientationStatusEventListener
{
public:
class FormSizeInfo : public _ControlImpl::SizeInfo
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);
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);