_LiveboxFrame::_LiveboxFrame(void)
: __pLiveboxFramePresenter(new (std::nothrow) _LiveboxFramePresenter(*this))
-#if defined(MULTI_WINDOW)
, __pLiveboxLayer(null)
-#endif // MULTI_WINDOW
, __pLiveboxFrameRootVisualElement(null)
, __pEventManager(null)
{
__pEventManager->UnregisterTouchEventHandler(*this);
}
-#if defined(MULTI_WINDOW)
__pLiveboxLayer = null;
__pLiveboxFrameRootVisualElement = null;
-#else // MULTI_WINDOW
- if (__pLiveboxFrameRootVisualElement)
- {
- _VisualElement* pVisualElement = GetVisualElement();
- if (pVisualElement)
- {
- __pLiveboxFrameRootVisualElement->DetachChild(*pVisualElement);
- }
- }
-#endif // !MULTI_WINDOW
}
_LiveboxFrame*
__liveboxSize = size;
-#if defined(MULTI_WINDOW)
r = CreateRootVisualElement();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#else // MULTI_WINDOW
- unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(__liveboxSize));
- SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- pLayer->Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pLiveboxLayer = move(pLayer);
- __pLiveboxFrameRootVisualElement = __pLiveboxLayer->GetRootVisualElement();
-
- _VisualElement* pVisualElement = GetVisualElement();
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- pVisualElement->SetClipChildrenEnabled(false);
- pVisualElement->SetShowState(true);
-
- __pLiveboxFrameRootVisualElement->AttachChild(*pVisualElement);
-#endif // MULTI_WINDOW
FloatRectangle bounds(0.0f, 0.0f, liveboxSize.width, liveboxSize.height);
r = SetBoundsF(bounds);
return r;
}
-#if defined(MULTI_WINDOW)
result
_LiveboxFrame::CreateLayer(void)
{
return r;
}
-#endif // MULTI_WINDOW
void
_LiveboxFrame::OnActivated(void)
result SetLayerShowState(bool showState);
result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
-#if defined(MULTI_WINDOW)
virtual result CreateLayer(void);
-#endif // MULTI_WINDOW
+
virtual void OnActivated(void);
virtual void OnDeactivated(void);
virtual void OnBoundsChanged(void);
private:
std::unique_ptr<_LiveboxFramePresenter> __pLiveboxFramePresenter;
-#if defined(MULTI_WINDOW)
_LiveboxLayer* __pLiveboxLayer;
-#else // MULTI_WINDOW
- std::unique_ptr<_LiveboxLayer> __pLiveboxLayer;
-#endif // !MULTI_WINDOW
Tizen::Ui::Animations::_RootVisualElement* __pLiveboxFrameRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
Tizen::Graphics::FloatDimension __liveboxSize;
_LiveboxPopup::_LiveboxPopup(void)
: __pLiveboxPopupPresenter(new (std::nothrow) _LiveboxPopupPresenter(*this))
-#if defined(MULTI_WINDOW)
, __pLiveboxPopupLayer(null)
-#endif // MULTI_WINDOW
, __pLiveboxPopupRootVisualElement(null)
, __pEventManager(null)
{
__pEventManager->UnregisterTouchEventHandler(*this);
}
-#if defined(MULTI_WINDOW)
__pLiveboxPopupLayer = null;
__pLiveboxPopupRootVisualElement = null;
-#else // MULTI_WINDOW
- if (__pLiveboxPopupRootVisualElement)
- {
- _VisualElement* pVisualElement = GetVisualElement();
- if (pVisualElement)
- {
- __pLiveboxPopupRootVisualElement->DetachChild(*pVisualElement);
- }
- }
-#endif // !MULTI_WINDOW
}
_LiveboxPopup*
SetSystemWindow(true);
-#if defined(MULTI_WINDOW)
r = CreateRootVisualElement();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#else // MULTI_WINDOW
- unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(__liveboxSize));
- SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
-
- r = pLayer->Construct();
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pLiveboxPopupLayer = move(pLayer);
- __pLiveboxPopupRootVisualElement = __pLiveboxPopupLayer->GetRootVisualElement();
-
- _VisualElement* pVisualElement = GetVisualElement();
- r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- pVisualElement->SetClipChildrenEnabled(false);
- pVisualElement->SetShowState(true);
- pVisualElement->SetRenderOperation(_VisualElement::RENDER_OPERATION_COPY);
-
- __pLiveboxPopupRootVisualElement->AttachChild(*pVisualElement);
-#endif // MULTI_WINDOW
FloatRectangle bounds(0.0f, 0.0f, size.width, size.height);
r = SetBoundsF(bounds);
return clientBounds;
}
-#if defined(MULTI_WINDOW)
result
_LiveboxPopup::CreateLayer(void)
{
return r;
}
-#endif // MULTI_WINDOW
void
_LiveboxPopup::OnActivated(void)
result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
Tizen::Graphics::FloatRectangle GetLiveboxPopupClientBounds(void) const;
-#if defined(MULTI_WINDOW)
virtual result CreateLayer(void);
-#endif // MULTI_WINDOW
+
virtual void OnActivated(void);
virtual void OnBoundsChanged(void);
virtual void OnDraw(void);
private:
std::unique_ptr<_LiveboxPopupPresenter> __pLiveboxPopupPresenter;
-#if defined(MULTI_WINDOW)
_LiveboxPopupLayer* __pLiveboxPopupLayer;
-#else // MULTI_WINDOW
- std::unique_ptr<_LiveboxPopupLayer> __pLiveboxPopupLayer;
-#endif // !MULTI_WINDOW
Tizen::Ui::Animations::_RootVisualElement* __pLiveboxPopupRootVisualElement;
Tizen::Ui::_IUiEventManager* __pEventManager;
Tizen::Graphics::FloatDimension __liveboxSize;
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-#if defined(MULTI_WINDOW)
r = pLiveboxPopup->CreateRootVisualElement();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
-#endif // MULTI_WINDOW
pLiveboxPopup->AcquireHandle();
_QuickPanelFrame::_QuickPanelFrame(void)
: __pQuickPanelFramePresenter(null)
-#if !defined(MULTI_WINDOW)
- , __pQuickPanelFrameLayer(null)
- , __pQuickPanelFrameRootVisualElement(null)
-#endif
, __pEventManager(null)
{
_UiEventManager* pEventManager = null;
result r = E_SUCCESS;
-#if !defined(MULTI_WINDOW)
- __pQuickPanelFrameLayer = new (std::nothrow) _QuickPanelFrameLayer;
- r = __pQuickPanelFrameLayer->Construct();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
-
- __pQuickPanelFrameRootVisualElement = __pQuickPanelFrameLayer->GetRootVisualElement();
-#endif
-
pEventManager = _UiEventManager::GetInstance();
SysTryCatch(NID_UI_CTRL, pEventManager, , r, "[%s] Propagating.", GetErrorMessage(r));
delete __pQuickPanelFramePresenter;
__pQuickPanelFramePresenter = null;
}
-
-#if !defined(MULTI_WINDOW)
- if( __pQuickPanelFrameLayer )
- {
- delete __pQuickPanelFrameLayer;
- }
- __pQuickPanelFrameRootVisualElement = NULL;
-#endif
}
_QuickPanelFrame::~_QuickPanelFrame(void)
delete __pQuickPanelFramePresenter;
__pQuickPanelFramePresenter = null;
}
-
-#if !defined(MULTI_WINDOW)
- if (__pQuickPanelFrameRootVisualElement)
- {
- _VisualElement* pVisualElement = GetVisualElement();
- if (pVisualElement)
- {
- __pQuickPanelFrameRootVisualElement->DetachChild(*pVisualElement);
- }
-
- }
-
- if( __pQuickPanelFrameLayer )
- {
- delete __pQuickPanelFrameLayer;
- __pQuickPanelFrameLayer = NULL;
- }
- __pQuickPanelFrameRootVisualElement = NULL;
-#endif
}
_QuickPanelFrame*
result r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-#if defined(MULTI_WINDOW)
r = pQuickPanelFrame->CreateRootVisualElement();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-#endif
-
pQuickPanelFrame->AcquireHandle();
SetLastResult(E_SUCCESS);
FloatDimension sizeF(static_cast<float>(size.width), height);
-#if !defined(MULTI_WINDOW)
- __pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
-#else
_RootVisualElement* pRootVE = GetRootVisualElement();
SysAssert(pRootVE);
__pLayer = dynamic_cast<_QuickPanelFrameLayer*>(pRootVE->GetNativeLayer());
-#endif
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, __pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
FloatRectangle fBounds(0.0f, 0.0f, sizeF.width, sizeF.height);
-#if !defined(MULTI_WINDOW)
- __pQuickPanelFrameRootVisualElement->SetImplicitAnimationEnabled(false);
- __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
- __pQuickPanelFrameRootVisualElement->SetShowState(true);
-
-#else
pRootVE->SetImplicitAnimationEnabled(false);
pRootVE->SetBounds(fBounds);
pRootVE->SetShowState(true);
-#endif
_VisualElement* pVisualElement = GetVisualElement();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#if !defined(MULTI_WINDOW)
- __pQuickPanelFrameRootVisualElement->AttachChild(*pVisualElement);
- pVisualElement->SetClipChildrenEnabled(false);
-
-#endif
pVisualElement->SetShowState(true);
SetBackgroundColor(Color(0x00000000));
return r;
}
-#if !defined(MULTI_WINDOW)
-_RootVisualElement*
-_QuickPanelFrame::GetRootVisualElement(void) const
-{
- return __pQuickPanelFrameRootVisualElement;
-}
-#endif
-
-#if defined(MULTI_WINDOW)
result
_QuickPanelFrame::CreateLayer(void)
{
return r;
}
-#endif
-
-#if !defined(MULTI_WINDOW)
-result
-_QuickPanelFrame::SetLayerShowState(bool showState)
-{
- result r = E_SUCCESS;
-
- _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
- SysTryReturn(NID_UI_CTRL, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
- r = pLayer->SetShowState(showState);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pQuickPanelFrameRootVisualElement->SetShowState(showState);
-
- return r;
-}
-
-result
-_QuickPanelFrame::SetLayerBounds(const FloatRectangle& bounds)
-{
- _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
- result r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- FloatRectangle fBounds(bounds.x, bounds.y, bounds.width, bounds.height);
-
- pLayer->SetBounds(fBounds);
- __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
-
- return r;
-}
-
-
-void
-_QuickPanelFrame::OnActivated(void)
-{
- result r = SetLayerShowState(true);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-
-void
-_QuickPanelFrame::OnDeactivated(void)
-{
- result r = SetLayerShowState(false);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-
-void
-_QuickPanelFrame::OnBoundsChanged(void)
-{
- Rectangle bounds = GetBounds();
- bounds = _CoordinateSystemUtils::Transform(bounds);
-
- SetLayerBounds(bounds);
-}
-
-void
-_QuickPanelFrame::OnBoundsChangedF(void)
-{
- FloatRectangle boundsF = GetBoundsF();
- boundsF = _CoordinateSystemUtils::Transform(boundsF);
-
- SetLayerBoundsF(boundsF);
-}
-
-void
-_QuickPanelFrame::OnVisibleStateChanged(void)
-{
- result r = SetLayerShowState(GetVisibleState());
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-}
-#endif
void
_QuickPanelFrame::OnDraw(void)
return r;
}
-#if !defined(MULTI_WINDOW)
-void
-_QuickPanelFrameImpl::Rotate(_ControlRotation rotation)
-{
- if (__rotation == rotation)
- {
- return;
- }
-
- __rotation = rotation;
- _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
- switch (__rotation)
- {
- case _CONTROL_ROTATION_0:
- case _CONTROL_ROTATION_180:
- orientation = _CONTROL_ORIENTATION_PORTRAIT;
- break;
- case _CONTROL_ROTATION_270:
- case _CONTROL_ROTATION_90:
- orientation = _CONTROL_ORIENTATION_LANDSCAPE;
- break;
-
- default:
- return;
- break;
- }
-
- GetCore().ChangeLayout(orientation);
- GetCore().UpdateLayout();
-
- FireEvent(rotation);
-
- RotateScreen(__rotation);
-}
-#else
void
_QuickPanelFrameImpl::OnRotated(_ControlRotation rotation)
{
RotateScreen(__rotation);
}
-#endif
void
_QuickPanelFrameImpl::OnChangeLayout(_ControlOrientation orientation)
result Initialize(float height);
result SetHeight(float height);
-#if !defined(MULTI_WINDOW)
- Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const;
-#endif
-
-#if defined(MULTI_WINDOW)
virtual result CreateLayer(void);
-#endif
protected:
_QuickPanelFrame(void);
_QuickPanelFrame(const _QuickPanelFrame& rhs);
_QuickPanelFrame& operator =(const _QuickPanelFrame& rhs);
-#if !defined(MULTI_WINDOW)
- result SetLayerShowState(bool showState);
- result SetLayerBounds(const Tizen::Graphics::FloatRectangle& bounds);
-
- virtual void OnActivated(void);
- virtual void OnDeactivated(void);
-
- // Callback
- virtual void OnBoundsChanged(void);
- virtual void OnBoundsChangedF(void);
-
- virtual void OnVisibleStateChanged(void);
-
-#endif
virtual void OnDraw(void);
private:
_QuickPanelFramePresenter* __pQuickPanelFramePresenter;
-#if !defined(MULTI_WINDOW)
- _QuickPanelFrameLayer* __pQuickPanelFrameLayer;
- Tizen::Ui::Animations::_RootVisualElement* __pQuickPanelFrameRootVisualElement;
-
-#endif
Tizen::Ui::_IUiEventManager* __pEventManager;
_QuickPanelFrameLayer* __pLayer;
Evas_Object* pminicontrol;
result SetHeight(float height);
-#if !defined(MULTI_WINDOW)
- void Rotate(Tizen::Ui::_ControlRotation rotation);
-#else
virtual void OnRotated(Tizen::Ui::_ControlRotation rotation);
-#endif
protected:
_QuickPanelFrameImpl(QuickPanelFrame* pPublic, _QuickPanelFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);