void
_MessageBox::OnChangeLayout(_ControlOrientation orientation)
{
- _Window::OnChangeLayout(orientation);
+ _Popup::OnChangeLayout(orientation);
result r = __pMsgboxPresenter->OnChangeLayout(orientation);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- float indicatorheight = 0.0f;
-
- const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
-
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- _Indicator* pIndicator = GetCore().GetIndicator();
- if (pIndicator)
- {
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- pIndicator->SetBounds(FloatRectangle(0.0f - GetBoundsF().x, 0.0f - GetBoundsF().y, portraitSize.width, indicatorheight));
- }
- else
- {
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- pIndicator->SetBounds(FloatRectangle(0.0f - GetBoundsF().x, 0.0f - GetBoundsF().y, landscapeSize.width, indicatorheight));
- }
- pIndicator->OnChangeLayout(orientation);
- }
return ;
}
bool showstate = false;
bool opacity = false;
- bool autohide = false;
+ unsigned long formstyle = 0x00000000;
_Control* pOwner = GetOwner();
if (pOwner == null)
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
- autohide = pForm->IsIndicatorAutoHide();
+ formstyle = pForm->GetFormStyle();
}
else
{
{
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
- autohide = pForm->IsIndicatorAutoHide();
+ formstyle = pForm->GetFormStyle();
}
pOwner->LockInputEvent();
{
__pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
}
- //__pIndicator->SetIndicatorAutoHide(autohide);
+
+ if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ __pIndicator->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ __pIndicator->SetIndicatorAutoHide(false, false);
+ }
+ }
+ else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ __pIndicator->SetIndicatorAutoHide(true, true);
+ }
+ else
+ {
+ __pIndicator->SetIndicatorAutoHide(true, false);
+ }
+ }
+ else
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ __pIndicator->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ __pIndicator->SetIndicatorAutoHide(false, false);
+ }
+ }
}
_Window::OnActivated();
return true;
}
+void
+_Popup::OnChangeLayout(_ControlOrientation orientation)
+{
+ _Window::OnChangeLayout(orientation);
+
+ float indicatorheight = 0.0f;
+
+ const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
+ const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
+
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
+
+ _Form* pForm = dynamic_cast<_Form*>(GetOwner());
+ if (pForm)
+ {
+ if (__pIndicator)
+ {
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight));
+ if ((FORM_STYLE_INDICATOR & pForm->GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle()))
+ {
+ __pIndicator->SetIndicatorShowState(true);
+ }
+ else
+ {
+ __pIndicator->SetIndicatorShowState(false);
+ }
+ }
+ else
+ {
+ if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & pForm->GetFormStyle())
+ {
+ __pIndicator->SetIndicatorShowState(true);
+ }
+ }
+ __pIndicator->OnChangeLayout(orientation);
+ }
+ }
+}
+
}}} // Tizen::Ui::Controls
}
}
- float indicatorheight = 0.0f;
-
- const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
-
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- _Indicator* pIndicator = GetCore().GetIndicator();
- if (pIndicator)
- {
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight));
- }
- else
- {
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorheight));
- }
- pIndicator->OnChangeLayout(orientation);
- }
-
return GetCore().OnChangeLayout(orientation);
}
bool showstate = false;
bool opacity = false;
+ unsigned long formstyle = 0x00000000;
_Control* pOwner = GetOwner();
if (pOwner == null)
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
+ formstyle = pForm->GetFormStyle();
}
else
{
{
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
+ formstyle = pForm->GetFormStyle();
}
pOwner->LockInputEvent();
{
pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
}
+
+ if (formstyle & FORM_STYLE_PORTRAIT_INDICATOR)
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ pIndicator->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ pIndicator->SetIndicatorAutoHide(false, false);
+ }
+ }
+ else if (formstyle & FORM_STYLE_INDICATOR_AUTO_HIDE)
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ pIndicator->SetIndicatorAutoHide(true, true);
+ }
+ else
+ {
+ pIndicator->SetIndicatorAutoHide(true, false);
+ }
+ }
+ else
+ {
+ if (formstyle & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE)
+ {
+ pIndicator->SetIndicatorAutoHide(false, true);
+ }
+ else
+ {
+ pIndicator->SetIndicatorAutoHide(false, false);
+ }
+ }
}
void
_ProgressPopup::OnChangeLayout(_ControlOrientation orientation)
{
- _Window::OnChangeLayout(orientation);
+ _Popup::OnChangeLayout(orientation);
result r = E_SUCCESS;
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- float indicatorheight = 0.0f;
-
- const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
- const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
-
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- _Indicator* pIndicator = GetCore().GetIndicator();
- if (pIndicator)
- {
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight));
- }
- else
- {
- GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetCore().GetOrientation(), indicatorheight);
- pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorheight));
- }
- pIndicator->OnChangeLayout(orientation);
- }
return ;
}
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual bool IsRotationSynchronized(void) const;
+ virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
+
// Accessor
public:
void SetColor(const Tizen::Graphics::Color& color);