: __pFramePresenter(null)
, __pFrameEvent(null)
, __floatingBounds(0.0f, 0.0f, 0.0f, 0.0f)
+ , __floatingOrientation(_CONTROL_ORIENTATION_PORTRAIT)
, __showMode(FRAME_SHOW_MODE_FULL_SCREEN)
, __restore(false)
, __minimized(false)
__floatingBounds = _CoordinateSystemUtils::ConvertToFloat(rect);
}
+void
+_Frame::SetFloatingOrientation(_ControlOrientation orientation)
+{
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ __floatingOrientation = orientation;
+ }
+}
+
result
_Frame::SetShowMode(FrameShowMode showMode)
{
int oldShowMode = __showMode;
__showMode = showMode;
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+ _Form* pCurForm = GetCurrentForm();
+ if (pCurForm)
+ {
+ orientation = pCurForm->GetOrientation();
+ }
+ else
+ {
+ orientation = GetOrientation();
+ }
+
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_LANDSCAPE)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x * ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y / ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ else
+ {
+ if (__floatingOrientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ FloatDimension screenSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ FloatPoint prevPoint(__floatingBounds.x, __floatingBounds.y);
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = screenSize.width / screenSize.height;
+
+ if (prevPoint.x > 0.0f)
+ {
+ curPoint.x = prevPoint.x / ratio;
+ }
+
+ if (prevPoint.y > 0.0f)
+ {
+ curPoint.y = prevPoint.y * ratio;
+ }
+
+ __floatingBounds.x = curPoint.x;
+ __floatingBounds.y = curPoint.y;
+ }
+ }
+ }
+
result r = E_SUCCESS;
switch (__showMode)
break;
}
+ if ((__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (__showMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
+ {
+ _Form* pCurForm = GetCurrentForm();
+ if (pCurForm)
+ {
+ __floatingOrientation = pCurForm->GetOrientation();
+ }
+ else
+ {
+ __floatingOrientation = GetOrientation();
+ }
+ }
+
return E_SUCCESS;
}
// Floating
void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect);
void SetFloatingBounds(const Tizen::Graphics::FloatRectangle& rect);
+ void SetFloatingOrientation(Tizen::Ui::_ControlOrientation orientation);
result SetShowMode(FrameShowMode showMode);
FrameShowMode GetShowMode(bool minimize = true) const;
bool IsActivated(void) const;
_FramePresenter* __pFramePresenter;
_FrameEvent* __pFrameEvent;
Tizen::Graphics::FloatRectangle __floatingBounds;
+ Tizen::Ui::_ControlOrientation __floatingOrientation;
FrameShowMode __showMode;
bool __restore;
bool __minimized;