add UpdateClientBounds() on Popup
authorDongJinJeon <dongjin2193.jeon@samsung.com>
Tue, 26 Mar 2013 04:34:00 +0000 (13:34 +0900)
committerDongJinJeon <dongjin2193.jeon@samsung.com>
Tue, 26 Mar 2013 04:40:04 +0000 (13:40 +0900)
Change-Id: I54fb39f910162183e8fcbc945cc44c0dcfe34a8a
Signed-off-by: DongJinJeon <dongjin2193.jeon@samsung.com>
src/ui/controls/FUiCtrl_Popup.cpp
src/ui/inc/FUiCtrl_Popup.h

index 3c01597..5720381 100644 (file)
@@ -640,5 +640,34 @@ _Popup::OnOwnerChanged(_Control* pOldOwner)
        }
 }
 
+void
+_Popup::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds)
+{
+       float y = 0.0f;
+
+       float titleHeight = 0.0f;
+       float titleLetfMargin = 0.0f;
+       float titleRightMargin = 0.0f;
+
+       _ControlOrientation orientation;
+
+       orientation = GetOrientation();
+
+       GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
+       GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLetfMargin);
+       GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin);
+
+       if (HasTitle())
+       {
+               y = titleHeight;
+       }
+
+       clientBounds.x = titleLetfMargin;
+       clientBounds.y = y;
+
+       clientBounds.width = size.width - (titleLetfMargin + titleRightMargin);
+       clientBounds.height = size.height - y;
+}
+
 }}} // Tizen::Ui::Controls
 
index 27d8c51..458219d 100644 (file)
@@ -108,6 +108,7 @@ public:
        virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
        virtual bool IsLayoutChangable(void) const;
        virtual void OnOwnerChanged(_Control* pOldOwner);
+       virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
 
 // Accessor
 public: