*
* @since 2.0
*
+ * @privlevel public
* @privilege %http://tizen.org/privilege/notification
*
* @return An error code
*
* @since 2.0
*
+ * @privlevel public
* @privilege %http://tizen.org/privilege/notification
*
* @return An error code
*
* @since 2.0
*
+ * @privlevel public
* @privilege %http://tizen.org/privilege/notification
*
* @return An error code
*
* @since 2.0
*
+ * @privlevel public
* @privilege %http://tizen.org/privilege/notification
*
* @return An error code
result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, int height);
/**
+ * Initializes this instance of %QuickPanelFrame with the specified parameter.
+ *
+ * @since 2.1
+ *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ *
+ * @return An error code
+ * @param[in] height The height of %QuickPanelFrame
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The @c height is less than or equal to @c 0.0f.
+ */
+ result ConstructF(float height);
+
+ /**
+ * Initializes this instance of %QuickPanelFrame with the specified parameters.
+ *
+ * @since 2.1
+ *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ *
+ * @return An error code
+ * @param[in] layout The layout for both the portrait and landscape mode
+ * @param[in] height The height of %QuickPanelFrame
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The @c height is less than or equal to @c 0.0f.
+ */
+ result ConstructF(const Tizen::Ui::Layout& layout, float height);
+
+ /**
+ * Constructs and initializes an instance of %QuickPanelFrame with the specified parameters.
+ *
+ * @since 2.1
+ *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ *
+ * @return An error code
+ * @param[in] portraitLayout The layout for the portrait mode
+ * @param[in] landscapeLayout The layout for the landscape mode
+ * @param[in] height The height of %QuickPanelFrame
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_INVALID_ARG The @c height is less than or equal to @c 0.0f.
+ */
+ result ConstructF(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, float height);
+
+ /**
* Adds an IOrientationEventListener instance. @n
* The added listener can listen to the orientation changed events that are fired when the orientation mode of the screen is changed.
*
*/
result SetHeight(int height);
+ /**
+ * Sets the height of the %QuickPanelFrame.
+ *
+ * @since 2.1
+ * @return An error code
+ * @param[in] height The height of %QuickPanelFrame
+ * @exception E_SUCCESS The method was successful.
+ * @exception E_INVALID_ARG The @c height is less than or equal to @c 0.0f.
+ */
+ result SetHeightF(float height);
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
_pControlImpl = pImpl;
- r = pImpl->Initialize(height);
+ float heightF = static_cast<float>(height);
+ r = pImpl->Initialize(heightF);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
return r;
_pControlImpl = pImpl;
+ float heightF = static_cast<float>(height);
+ r = pImpl->Initialize(heightF);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+ delete pImpl;
+ _pControlImpl = null;
+
+ return r;
+}
+
+result
+QuickPanelFrame::ConstructF(float height)
+{
+ result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+ SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+ _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::CreateQuickPanelFrameImplN(*this, null, null);
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _pControlImpl = pImpl;
+
+ r = pImpl->Initialize(height);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+ delete pImpl;
+ _pControlImpl = null;
+
+ return r;
+}
+
+result
+QuickPanelFrame::ConstructF(const Layout& layout, float height)
+{
+ result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+ r = ConstructF(layout, layout, height);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+QuickPanelFrame::ConstructF(const Layout& portraitLayout, const Layout& landscapeLayout, float height)
+{
+ result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+ SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+ _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::CreateQuickPanelFrameImplN(*this, &portraitLayout, &landscapeLayout);
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _pControlImpl = pImpl;
+
r = pImpl->Initialize(height);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
_QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::GetInstance(*this);
SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+ float heightF = static_cast<float>(height);
+ result r = pImpl->SetHeight(heightF);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+QuickPanelFrame::SetHeightF(float height)
+{
+ _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::GetInstance(*this);
+ SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
result r = pImpl->SetHeight(height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
*/
#include <new>
-#include <Evas.h>
extern "C" {
#include <minicontrol-provider.h>
}
#include <FGrpDimension.h>
+#include <FGrpFloatDimension.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
#include "FUi_CoordinateSystemUtils.h"
char* pName = _StringConverter::CopyToCharArrayN(name);
SysTryReturnResult(NID_UI_CTRL, pName, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
- Evas_Object* pWindow = minicontrol_win_add((const char*)pName);
+ pWindow = minicontrol_win_add((const char*)pName);
SysTryCatch(NID_UI_CTRL, pWindow, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
r = Initialize(pWindow);
return r;
}
+ Evas_Object* GetWindow(void)
+ {
+ return pWindow;
+ }
+
+ Evas_Object* pWindow;
+
+
+
private:
_QuickPanelFrameLayer(const _QuickPanelFrameLayer& rhs);
_QuickPanelFrameLayer& operator =(const _QuickPanelFrameLayer& rhs);
}
result
-_QuickPanelFrame::Initialize(int height)
+_QuickPanelFrame::Initialize(float height)
{
SysTryReturn(NID_UI_CTRL, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The height %d is out of height range(0 ~ ).", height);
Dimension size = pControlManager->GetScreenSize();
- size.height = height;
+ FloatDimension sizeF(static_cast<float>(size.width), height);
#if !defined(MULTI_WINDOW)
- _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
+ __pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
#else
_RootVisualElement* pRootVE = GetRootVisualElement();
SysAssert(pRootVE);
- _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(pRootVE->GetNativeLayer());
+ __pLayer = dynamic_cast<_QuickPanelFrameLayer*>(pRootVE->GetNativeLayer());
#endif
r = GetLastResult();
- SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_UI_CTRL, __pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
- Dimension phySize = _CoordinateSystemUtils::Transform(size);
- FloatRectangle fPhyBounds(0.0f, 0.0f, static_cast<float>(phySize.width), static_cast<float>(phySize.height));
+ FloatDimension phySize = _CoordinateSystemUtils::Transform(sizeF);
+ FloatRectangle fPhyBounds(0.0f, 0.0f, phySize.width, phySize.height);
- pLayer->SetBounds(fPhyBounds);
- pLayer->SetShowState(false);
+ __pLayer->SetBounds(fPhyBounds);
+ __pLayer->SetShowState(false);
- FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(size.width), static_cast<float>(size.height));
+ FloatRectangle fBounds(0.0f, 0.0f, sizeF.width, sizeF.height);
#if !defined(MULTI_WINDOW)
__pQuickPanelFrameRootVisualElement->SetImplicitAnimationEnabled(false);
r = GetLastResult();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = SetBounds(Rectangle(0, 0, size.width, size.height));
+ r = SetBoundsF(FloatRectangle(0.0f, 0.0f, sizeF.width, sizeF.height));
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
SetMovable(false);
}
result
-_QuickPanelFrame::SetHeight(int height)
+_QuickPanelFrame::SetHeight(float height)
{
SysTryReturn(NID_UI_CTRL, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The height %d is out of height range(0 ~ ).", height);
SetMovable(true);
SetResizable(true);
- Rectangle rect = GetBounds();
+ FloatRectangle rect = GetBoundsF();
rect.height = height;
- SetBounds(rect);
+ SetBoundsF(rect);
SetMovable(movable);
SetResizable(resizable);
}
result
-_QuickPanelFrame::SetLayerBounds(const Rectangle& bounds)
+_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(static_cast<float>(bounds.x), static_cast<float>(bounds.y), static_cast<float>(bounds.width), static_cast<float>(bounds.height));
+ FloatRectangle fBounds(bounds.x, bounds.y, bounds.width, bounds.height);
pLayer->SetBounds(fBounds);
__pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
return r;
}
+
void
_QuickPanelFrame::OnActivated(void)
{
}
void
+_QuickPanelFrame::OnBoundsChangedF(void)
+{
+ FloatRectangle boundsF = GetBoundsF();
+ boundsF = _CoordinateSystemUtils::Transform(boundsF);
+
+ SetLayerBoundsF(boundsF);
+}
+
+void
_QuickPanelFrame::OnVisibleStateChanged(void)
{
result r = SetLayerShowState(GetVisibleState());
#include <new>
#include <FGrpDimension.h>
+#include <FGrpFloatDimension.h>
#include <FBaseSysLog.h>
#include <FBaseInteger.h>
#include <FBaseRtIEventArg.h>
}
result
-_QuickPanelFrameImpl::Initialize(int height)
+_QuickPanelFrameImpl::Initialize(float height)
{
result r = GetCore().Initialize(height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
result
-_QuickPanelFrameImpl::SetHeight(int height)
+_QuickPanelFrameImpl::SetHeight(float height)
{
result r = GetCore().SetHeight(height);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
GetCore().ChangeLayout(orientation);
-
GetCore().UpdateLayout();
FireEvent(rotation);
SysAssert(pControlManager);
const Dimension& screenSize = pControlManager->GetScreenSize();
- Dimension size = GetSize();
+ FloatDimension size = GetSizeF();
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- size.width = screenSize.width;
+ size.width = static_cast<float>(screenSize.width);
}
else
{
- size.width = screenSize.height;
+ size.width = static_cast<float>(screenSize.height);
}
- SetSize(size);
+ SetSizeF(size);
SetResizable(resizable);
SetMovable(movable);
}
#ifndef _FSHELL_INTERNAL_QUICKPANEL_FRAME_H_
#define _FSHELL_INTERNAL_QUICKPANEL_FRAME_H_
-#include "FUi_Window.h"
+#include <Evas.h>
+
+#include "FUi_Window.h"
+#include "FUi_UiEventTypes.h"
namespace Tizen { namespace Graphics {
class Dimension;
static _QuickPanelFrame* CreateQuickPanelFrameN(void);
virtual ~_QuickPanelFrame(void);
- result Initialize(int height);
- result SetHeight(int height);
+ result Initialize(float height);
+ result SetHeight(float height);
#if !defined(MULTI_WINDOW)
Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const;
#if !defined(MULTI_WINDOW)
result SetLayerShowState(bool showState);
- result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+ 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
#endif
Tizen::Ui::_IUiEventManager* __pEventManager;
+ _QuickPanelFrameLayer* __pLayer;
+ Evas_Object* pminicontrol;
}; // _QuickPanelFrame
}}// Tizen::Shell
virtual const _QuickPanelFrame& GetCore(void) const;
virtual _QuickPanelFrame& GetCore(void);
- result Initialize(int height);
+ result Initialize(float height);
+
result AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
result RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
- result SetHeight(int height);
+
+ result SetHeight(float height);
#if !defined(MULTI_WINDOW)
void Rotate(Tizen::Ui::_ControlRotation rotation);