#include <new>
extern "C" {
+#include <minicontrol-type.h>
#include <minicontrol-provider.h>
}
#include <FGrpDimension.h>
#include "FUiAnim_RootVisualElement.h"
#include "FUiAnim_DisplayManager.h"
+#include "FUiCtrl_Slider.h"
+#include "FUiCtrl_TabBar.h"
+#include "FUiCtrl_ScrollPanel.h"
+
+
using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Animations;
using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
namespace Tizen { namespace Shell{
{
_UiEventManager* pEventManager = null;
+ // initialize flag for Scroll Issue
+ __isFreeze = false;
+ __isBubbled = false;
+
__pQuickPanelFramePresenter = new (std::nothrow) _QuickPanelFramePresenter(*this);
SysTryReturnVoidResult(NID_UI_CTRL, __pQuickPanelFramePresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
return r;
}
+_UiTouchEventDelivery
+_QuickPanelFrame:: OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
+{
+ _Control* pTemp = dynamic_cast<_Control*>(const_cast<_Control*>(&source));
+ while(pTemp!=null)
+ {
+ _ScrollPanel* pScrollPanel = dynamic_cast<_ScrollPanel*>(pTemp);
+ // ScrollPanel exist
+ if(pScrollPanel != null)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_FREEZE_SCROLL_VIEWER));
+
+ __isFreeze = true;
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+ }
+ pTemp = pTemp->GetParent();
+ }
+
+ // Control is not on the ScrollPanel
+ _Slider* pSlider = dynamic_cast<_Slider*>(const_cast<_Control*>(&source));
+ _TabBar* pTabBar = dynamic_cast<_TabBar*>(const_cast<_Control*>(&source));
+
+ if(pSlider != null || pTabBar != null)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_FREEZE_SCROLL_VIEWER));
+
+ __isFreeze = true;
+ __isBubbled = true;
+ }
+
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+ _UiTouchEventDelivery
+ _QuickPanelFrame::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
+ {
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+
+ if(__isBubbled == true)
+ {
+ __isBubbled = false;
+ }
+
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+ _UiTouchEventDelivery
+_QuickPanelFrame::OnPreviewTouchMoved(const _Control & source, const _TouchInfo & touchinfo)
+{
+ return _UI_TOUCH_EVENT_DELIVERY_YES;
+}
+
+ bool
+_QuickPanelFrame::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
+ {
+
+ }
+
+ bool
+_QuickPanelFrame::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
+{
+}
+
+ bool
+_QuickPanelFrame::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if(__isBubbled == true)
+ {
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+ __isBubbled = false;
+ }
+ return true;
+}
+
+bool
+_QuickPanelFrame::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
+{
+ if(__isFreeze == true)
+ {
+ __pMinicontrol = __pLayer->GetWindow();
+ minicontrol_request(__pMinicontrol, static_cast<minicontrol_request_e>(MINICONTROL_REQ_UNFREEZE_SCROLL_VIEWER));
+
+ __isFreeze = false;
+ }
+ if(__isBubbled == true)
+ {
+ __isBubbled = false;
+ }
+}
+
void
_QuickPanelFrame::OnDraw(void)
{
_QuickPanelFrame(const _QuickPanelFrame& rhs);
_QuickPanelFrame& operator =(const _QuickPanelFrame& rhs);
+ virtual Tizen::Ui::_UiTouchEventDelivery OnPreviewTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual Tizen::Ui::_UiTouchEventDelivery OnPreviewTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual Tizen::Ui::_UiTouchEventDelivery OnPreviewTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+ virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
+
virtual void OnDraw(void);
private:
_QuickPanelFramePresenter* __pQuickPanelFramePresenter;
Tizen::Ui::_IUiEventManager* __pEventManager;
_QuickPanelFrameLayer* __pLayer;
- Evas_Object* pminicontrol;
+ Evas_Object* __pMinicontrol;
+ bool __isFreeze;
+ bool __isBubbled;
}; // _QuickPanelFrame
}}// Tizen::Shell