{
GetCore().SetIndicatorShowState(true);
indicatorBounds = GetCore().GetIndicatorBoundsF();
- GetCore().SetIndicatorAutoHide(false);
+
+ if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle)
+ {
+ GetCore().SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ GetCore().SetIndicatorAutoHide(false, false);
+ }
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
- else if(FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle)
- {
- r = GetCore().SetIndicatorShowState(true);
- r = GetCore().SetIndicatorAutoHide(true);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- }
else
{
- r = GetCore().SetIndicatorShowState(false);
- r = GetCore().SetIndicatorAutoHide(false);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ if ((FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle))
+ {
+ r = GetCore().SetIndicatorShowState(true);
+ GetCore().SetIndicatorAutoHide(true, true);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ if (FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle)
+ {
+ r = GetCore().SetIndicatorShowState(true);
+ GetCore().SetIndicatorAutoHide(true, false);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle)
+ {
+ r = GetCore().SetIndicatorShowState(true);
+ GetCore().SetIndicatorAutoHide(false, true);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ else
+ {
+ r = GetCore().SetIndicatorShowState(false);
+ GetCore().SetIndicatorAutoHide(false, false);
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ }
}
if (formStyle & FORM_STYLE_HEADER)
r = GetCore().AttachSystemChild(pHeader->GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ GetCore().SetFormBackEventListener(this);
}
}
else if (formStyle & FORM_STYLE_TITLE)
r = GetCore().AttachSystemChild(pFooter->GetCore());
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ GetCore().SetFormBackEventListener(this);
+ GetCore().SetFormMenuEventListener(this);
}
}
else if (formStyle & FORM_STYLE_SOFTKEY_0 || formStyle & FORM_STYLE_SOFTKEY_1 || formStyle & FORM_STYLE_OPTIONKEY)
}
}
- GetCore().SetFormBackEventListener(this);
- GetCore().SetFormMenuEventListener(this);
-
GetCore().AdjustClientBounds();
SetLastResult(E_SUCCESS);
void
_FormImpl::SetFormBackEventListener(const IFormBackEventListener* pFormBackEventListener)
{
- bool isBackButton = false;
-
- Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/input.keys.back", isBackButton);
-
- if(!isBackButton)
- {
- SysTryReturnVoidResult(NID_UI_CTRL, GetFooter() || GetHeader(), E_INVALID_STATE, "[E_INVALID_STATE] Footer isn't constructed.");
- }
-
__pFormBackEventListener = const_cast <IFormBackEventListener*>(pFormBackEventListener);
GetCore().SetFormBackEventListener(this);
result r = GetLastResult();
void
_FormImpl::SetFormMenuEventListener(const IFormMenuEventListener* pFormMenuEventListener)
{
- bool isMenuButton = false;
-
- Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/input.keys.menu", isMenuButton);
-
- if(!isMenuButton)
- {
- SysTryReturnVoidResult(NID_UI_CTRL, GetFooter() || GetHeader(), E_INVALID_STATE, "[E_INVALID_STATE] Footer isn't constructed.");
- }
__pFormMenuEventListener = const_cast <IFormMenuEventListener*>(pFormMenuEventListener);
GetCore().SetFormMenuEventListener(this);
result r = GetLastResult();
FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
- // Adjust the position of the partial Frame.
_FrameImpl* pFrameImpl = dynamic_cast<_FrameImpl*>(GetParent());
if (pFrameImpl)
{
pFrameImpl->GetCore().SetMovable(true);
FloatPoint prevPoint = pFrameImpl->GetPositionF();
-
- FloatPoint curPoint(0.0f, 0.0f);
-
+ FloatPoint curPoint(prevPoint.x, prevPoint.y);
+ float ratio = portraitSize.width / portraitSize.height;
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- if (prevPoint.x < 0.0f)
+ if (prevPoint.x > 0.0f)
{
- curPoint.x = portraitSize.height / portraitSize.width * prevPoint.x;
- }
- else
- {
- curPoint.x = portraitSize.width / portraitSize.height * prevPoint.x;
+ curPoint.x = prevPoint.x * ratio;
}
- if (prevPoint.y < 0.0f)
- {
- curPoint.y = portraitSize.width / portraitSize.height * prevPoint.y;
- }
- else
+ if (prevPoint.y > 0.0f)
{
- curPoint.y = portraitSize.height / portraitSize.width * prevPoint.y;
+ curPoint.y = prevPoint.y / ratio;
}
}
else
{
- if (prevPoint.x < 0.0f)
- {
- curPoint.x = portraitSize.width / portraitSize.height * prevPoint.x;
- }
- else
+ if (prevPoint.x > 0.0f)
{
- curPoint.x = portraitSize.height / portraitSize.width * prevPoint.x;
+ curPoint.x = prevPoint.x / ratio;
}
- if (prevPoint.y < 0.0f)
+ if (prevPoint.y > 0.0f)
{
- curPoint.y = portraitSize.height / portraitSize.width * prevPoint.y;
- }
- else
- {
- curPoint.y = portraitSize.width / portraitSize.height * prevPoint.y;
+ curPoint.y = prevPoint.y * ratio;
}
}
pFrameImpl->SetPosition(curPoint);
-
portraitSize = pFrameImpl->GetSizeF();
landscapeSize = portraitSize;
-
pFrameImpl->GetCore().SetMovable(movable);
+ pFrameImpl->GetCore().SetFloatingOrientation(orientation);
}
}
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+ if ((FORM_STYLE_INDICATOR & GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()))
+ {
+ GetCore().SetIndicatorShowState(true);
+ }
+ else
+ {
+ GetCore().SetIndicatorShowState(false);
+ }
}
else
{
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
+ if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())
+ {
+ GetCore().SetIndicatorShowState(true);
+ }
}
}
GetCore().AdjustClientBounds();
}
+ else
+ {
+ GetCore().SetIndicatorShowState(false);
+ }
if (pIndicator)
{
pIndicator->OnChangeLayout(orientation);
{
indicatorBounds.height = 0.0f;
}
+ else
+ {
+ if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
+ {
+ adjHeight = 0.0f;
+ }
+ }
}
}
}
style |= FORM_STYLE_INDICATOR;
}
}
+ if (styleString.Contains(L"FORM_STYLE_PORTRAIT_INDICATOR"))
+ {
+ if (styleString.Contains(L"FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE"))
+ {
+ style |= FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE;
+ }
+ else
+ {
+ style |= FORM_STYLE_PORTRAIT_INDICATOR;
+ }
+ }
+ if (styleString.Contains(L"FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE"))
+ {
+ style |= FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE;
+ }
if (styleString.Contains(L"FORM_STYLE_TEXT_TAB"))
{
style |= FORM_STYLE_TEXT_TAB;