* Initializes this instance of %TouchPinchGestureDetector.
*
* @since 2.0
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- */
+ * @feature %http://tizen.org/feature/multi_point_touch.pinch_zoom
+ *
+ * @return An error code
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1
+ * For more information, see
+ * <a href=?../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm?>
+ * Application Filtering</a>.
+ * @remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue()
+ * methods.
+ */
result Construct(void);
+
/**
* Adds the ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n
* The added listener gets notified when a gesture is recognized.
#include "FUiCtrl_Form.h"\r
#include "FUiCtrl_Frame.h"\r
#include "FUi_ContainerImpl.h"\r
+#include "FUiCtrl_Popup.h"\r
\r
using namespace std;\r
using namespace Tizen::Base;\r
using namespace Tizen::Graphics;\r
using namespace Tizen::Ui;\r
using namespace Tizen::Ui::Animations;\r
+using namespace Tizen::Ui::Controls;\r
\r
namespace {\r
\r
{\r
Point winPoint = pWindow->GetPosition();\r
\r
- accumPoint.x += winPoint.x;\r
- accumPoint.y += winPoint.y;\r
+ Rectangle popupRect(0, 0, 0, 0);\r
+ _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);\r
+ if (pPopup)\r
+ {\r
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)\r
+ {\r
+ popupRect = pPopup->GetNativeBounds(true);\r
+ }\r
+ else\r
+ {\r
+ popupRect = pPopup->GetNativeBounds(false);\r
+ }\r
+ }\r
+\r
+ accumPoint.x = accumPoint.x + winPoint.x + popupRect.x;\r
+ accumPoint.y = accumPoint.y + winPoint.y + popupRect.y;\r
}\r
\r
absoluteBounds.x = accumPoint.x;\r
{\r
FloatPoint winPoint = pWindow->GetPositionF();\r
\r
- accumPoint.x += winPoint.x;\r
- accumPoint.y += winPoint.y;\r
+ Rectangle popupRect(0, 0, 0, 0);\r
+ _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);\r
+ if (pPopup)\r
+ {\r
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)\r
+ {\r
+ popupRect = pPopup->GetNativeBounds(true);\r
+ }\r
+ else\r
+ {\r
+ popupRect = pPopup->GetNativeBounds(false);\r
+ }\r
+ }\r
+\r
+ accumPoint.x = accumPoint.x + winPoint.x + _CoordinateSystemUtils::ConvertToFloat(popupRect).x;\r
+ accumPoint.y = accumPoint.y + winPoint.y + _CoordinateSystemUtils::ConvertToFloat(popupRect).y;\r
}\r
\r
absoluteBounds.x = accumPoint.x;\r
#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_EflLayer.h"
+#include "FUiCtrl_Popup.h"
using namespace std;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
using namespace Tizen::Graphics;
using namespace Tizen::Base::Collection;
using namespace Tizen::Base;
pWindow = pControlManager->GetTouchedWindow();
SysTryReturn(NID_UI, pWindow, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ Rectangle popupRect(0, 0, 0, 0);
+ _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+ if (pPopup)
+ {
+ if (pPopup->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ popupRect = pPopup->GetNativeBounds(true);
+ }
+ else
+ {
+ popupRect = pPopup->GetNativeBounds(false);
+ }
+ }
+
Rectangle winBounds = pWindow->GetBounds();
- ptf.x = static_cast<float>(x - winBounds.x);
- ptf.y = static_cast<float>(y - winBounds.y);
+ ptf.x = static_cast<float>(x - winBounds.x - popupRect.x);
+ ptf.y = static_cast<float>(y - winBounds.y - popupRect.y);
pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement());
}