#include "FUi_UiKeyEvent.h"
#include "FUi_IUiEventManager.h"
#include "FUi_UiEventManager.h"
+#include "FUi_ResourceManager.h"
#include "FUiAnim_DisplayManager.h"
#include "FUiAnim_RootVisualElement.h"
#include "FShell_LiveboxLayer.h"
return __pLiveboxPopupPresenter->GetAnchorPosition();
}
+Rectangle
+_LiveboxPopup::GetLiveboxPopupClientBounds(void) const
+{
+ int leftMargin = 0;
+ int rightMargin = 0;
+ int topMargin = 0;
+ int bottomMargin = 0;
+ _ControlOrientation orientation = GetOrientation();
+
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_LEFT_MARGIN, orientation, leftMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_RIGHT_MARGIN, orientation, rightMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);
+
+ Rectangle bounds = GetBounds();
+
+ Rectangle clientBounds(bounds.x + leftMargin, bounds.y + topMargin, bounds.width - leftMargin - rightMargin, bounds.height - topMargin - bottomMargin);
+
+ SysLog(NID_UI_CTRL, "[%d %d %d %d]", clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height);
+
+ return clientBounds;
+}
+
result
_LiveboxPopup::SetLayerShowState(bool showState)
{
Rectangle bounds = GetBounds();
SetLayerBounds(bounds);
+
+ SetClientBounds(GetLiveboxPopupClientBounds());
}
void
Tizen::Base::String GetProviderId(void) const;
void SetAnchorPosition(const Tizen::Graphics::FloatPoint& position);
Tizen::Graphics::FloatPoint GetAnchorPosition(void) const;
+ Tizen::Graphics::Rectangle GetLiveboxPopupClientBounds(void) const;
protected:
_LiveboxPopup(void);
}
void
-_LiveboxPopupView::GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y)
+_LiveboxPopupView::GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y) const
{
Rectangle bounds = GetBounds();
_LiveboxPopupView::PlayAnimation(bool open)
{
const int ANIMATION1_DURATION = 100;
- const int ANIMATION2_DURATION = 300;
+// const int ANIMATION2_DURATION = 300;
_VisualElement* pVisualElement = GetVisualElement();
result r = GetLastResult();
void SetPopupBounds(const Tizen::Graphics::Dimension& size);
void GetRemainingSpace(int& lower, int& upper) const;
void FireLiveboxPopupEvent(bool open);
- void GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y);
+ void GetTouchPostion(const Tizen::Graphics::Point& point, double& x, double& y) const;
void PlayAnimation(bool open);
virtual result OnAttached(void);
#include "FShell_LiveboxViewPresenter.h"
#include "FShell_LiveboxPopupView.h"
#include "FShell_LiveboxViewManager.h"
+#include "FUi_ResourceManager.h"
#include "FUiAnim_EflNode.h"
#include "FUiAnim_VisualElementImpl.h"
#include "FUiAnim_VisualElementSurfaceImpl.h"
Rectangle bounds = GetBounds();
Rectangle absoluteBounds = GetAbsoluteBounds();
+ int leftMargin = 0;
+ int rightMargin = 0;
+ int topMargin = 0;
+ int bottomMargin = 0;
+ _ControlOrientation orientation = GetOrientation();
+
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_TOP_MARGIN, orientation, topMargin);
+ GET_SHAPE_CONFIG(LIVEBOX::POPUP_BOTTOM_MARGIN, orientation, bottomMargin);
+
Rectangle parentClientBounds = pParent->GetClientBounds();
int remainingSpace = parentClientBounds.height - bounds.y - bounds.height;
if (size.height > remainingSpace)
{
- popupBounds.y = absoluteBounds.y - size.height;
+ popupBounds.y = absoluteBounds.y - size.height + bottomMargin;
}
else
{
- popupBounds.y = absoluteBounds.y + absoluteBounds.height;
+ popupBounds.y = absoluteBounds.y + absoluteBounds.height - topMargin;
}
SysLog(NID_UI_CTRL, "[%d %d %d %d]", parentClientBounds.height, remainingSpace, popupBounds.y, size.height);