_LiveboxFrame::Initialize(const Dimension& size)
{
result r = E_SUCCESS;
- _VisualElement* pVisualElement = null;
const int DEFAULT_WIDTH = 172;
const int DEFAULT_HEIGHT = 172;
SetSystemWindow(true);
+ r = CreateRootVisualElement();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
Rectangle bounds(0, 0, liveboxSize.width, liveboxSize.height);
r = SetBounds(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
-
r = __pLiveboxFramePresenter->Initialize();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(*this));
- 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();
-
__pLiveboxLayer->SetLayerBounds(bounds);
__pLiveboxLayer->SetShowState(false);
+ FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
+
__pLiveboxFrameRootVisualElement->SetImplicitAnimationEnabled(false);
__pLiveboxFrameRootVisualElement->SetName(L"_LiveboxFrame");
__pLiveboxFrameRootVisualElement->SetBounds(fBounds);
__pLiveboxFrameRootVisualElement->SetShowState(false);
- pVisualElement = GetVisualElement();
+ _VisualElement* pVisualElement = GetVisualElement();
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
return r;
}
+result
+_LiveboxFrame::CreateLayer(void)
+{
+ unique_ptr<_LiveboxLayer> pLayer(new (std::nothrow) _LiveboxLayer(*this));
+ SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = pLayer->Construct();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pLiveboxLayer = move(pLayer);
+ __pLiveboxFrameRootVisualElement = __pLiveboxLayer->GetRootVisualElement();
+
+ SetLayer(*__pLiveboxLayer.get());
+ SetRootVisualElement(*__pLiveboxFrameRootVisualElement);
+
+ return r;
+}
+
void
_LiveboxFrame::OnActivated(void)
{
result SetLayerShowState(bool showState);
result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ virtual result CreateLayer(void);
virtual void OnActivated(void);
virtual void OnDeactivated(void);
virtual void OnBoundsChanged(void);
SetSystemWindow(true);
+ r = CreateRootVisualElement();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
Rectangle bounds(0, 0, size.width, size.height);
r = SetBounds(bounds);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
-
r = __pLiveboxPopupPresenter->Initialize();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(*this));
- 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();
-
__pLiveboxPopupLayer->SetLayerBounds(bounds);
__pLiveboxPopupLayer->SetShowState(false);
+ FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(bounds.width), static_cast<float>(bounds.height));
+
__pLiveboxPopupRootVisualElement->SetImplicitAnimationEnabled(false);
__pLiveboxPopupRootVisualElement->SetName(L"_LiveboxPopup");
__pLiveboxPopupRootVisualElement->SetBounds(fBounds);
return r;
}
+result
+_LiveboxPopup::CreateLayer(void)
+{
+ unique_ptr<_LiveboxPopupLayer> pLayer(new (std::nothrow) _LiveboxPopupLayer(*this));
+ SysTryReturn(NID_UI_CTRL, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+ result r = pLayer->Construct();
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pLiveboxPopupLayer = move(pLayer);
+ __pLiveboxPopupRootVisualElement = __pLiveboxPopupLayer->GetRootVisualElement();
+
+ SetLayer(*__pLiveboxPopupLayer.get());
+ SetRootVisualElement(*__pLiveboxPopupRootVisualElement);
+
+ return r;
+}
+
void
_LiveboxPopup::OnActivated(void)
{
result SetLayerShowState(bool showState);
result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ virtual result CreateLayer(void);
virtual void OnActivated(void);
virtual void OnDeactivated(void);
virtual void OnBoundsChanged(void);