{
transparent = false;
}
+ else
+ {
+ transparent = true;
+ }
}
}
else
}
bool
+_Form::IsIndicatorAutoHide(void) const
+{
+ _Control* pParent = GetParent();
+ _Frame* pFrame = dynamic_cast<_Frame*>(pParent);
+
+ bool autohide = false;
+
+ if (pFrame && IsAttachedToMainTree())
+ {
+ autohide = __pIndicator->GetIndicatorAutoHide();
+ }
+
+ return autohide;
+}
+
+bool
_Form::IsHeaderTranslucent(void) const
{
return __transparentHeader;
}
result
-_Form::SetIndicatorShowState(bool state, bool hide)
+_Form::SetIndicatorShowState(bool state)
{
result r = E_SUCCESS;
{
if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN)
{
- r = __pIndicator->SetIndicatorShowState(state, hide);
+ r = __pIndicator->SetIndicatorShowState(state);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
}
else if (mode == FRAME_SHOW_MODE_FULL_SCREEN)
{
- r = __pIndicator->SetIndicatorShowState(state, hide);
+ r = __pIndicator->SetIndicatorShowState(state);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
else if (!pFrame && IsAttachedToMainTree())
{
- r = __pIndicator->SetIndicatorShowState(false, true);
+ r = __pIndicator->SetIndicatorShowState(false);
}
__indicatorShowState = state;
}
result
+_Form::SetIndicatorAutoHide(bool autohide)
+{
+ result r = E_SUCCESS;
+
+ _Control* pParent = GetParent();
+ _Frame* pFrame = dynamic_cast<_Frame*>(pParent);
+
+ if (pFrame && IsAttachedToMainTree())
+ {
+ FrameShowMode mode = pFrame->GetShowMode();
+ if (mode == FRAME_SHOW_MODE_FULL_SCREEN)
+ {
+ r = __pIndicator->SetIndicatorAutoHide(autohide);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+ }
+ return r;
+}
+
+result
_Form::SetIndicatorOpacity(_IndicatorOpacity opacity)
{
result r = E_SUCCESS;
SetIndicatorShowState(__indicatorShowState);
}
+ SetIndicatorAutoHide(false);
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
else if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
{
- SetIndicatorShowState(__indicatorShowState, true);
+ AddIndicatorObject();
+ SetIndicatorShowState(__indicatorShowState);
+ SetIndicatorAutoHide(true);
}
else
{
{
if (GetVisibleState())
{
- SetIndicatorShowState(__indicatorShowState);
+ if (FORM_STYLE_INDICATOR & GetFormStyle())
+ {
+ SetIndicatorShowState(__indicatorShowState);
+ SetIndicatorAutoHide(false);
+ }
+ else if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
+ {
+ SetIndicatorShowState(true);
+ SetIndicatorAutoHide(true);
+ }
+ else
+ {
+ SetIndicatorShowState(false);
+ SetIndicatorAutoHide(false);
+ }
}
}
{
GetCore().SetIndicatorShowState(true);
indicatorBounds = GetCore().GetIndicatorBoundsF();
+ GetCore().SetIndicatorAutoHide(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(false, true);
+ 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));
}
{
curPoint.y = portraitSize.width / portraitSize.height * prevPoint.y;
}
-
}
pFrameImpl->SetPosition(curPoint);
typedef enum
{
- INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
- INDICATOR_TYPE_1, /**< Type 0 the the indicator */
- INDICATOR_TYPE_2, /**< Type 1 the indicator */
-} IndicatorTypeMode;
+ _INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
+ _INDICATOR_TYPE_1, /**< Type 0 the the indicator */
+ _INDICATOR_TYPE_2, /**< Type 1 the indicator */
+} _IndicatorTypeMode;
_Indicator*
_Indicator::CreateIndicator(void)
, __pCurrentVisualElement(null)
, __pWindow(null)
, __showstate(false)
+ , __autohide(false)
, __opacity(_INDICATOR_OPACITY_OPAQUE)
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
{
}
result
-_Indicator::SetIndicatorShowState(bool state, bool hide)
+_Indicator::SetIndicatorShowState(bool state)
{
result r = E_SUCCESS;
if (__pWindow)
{
- if (hide)
- {
- r = pEcoreEvas->SetIndicatorShowState(*__pWindow, true);
- }
- else
- {
- r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
- }
+ r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
__showstate = state;
SetShowState(state);
}
result
+_Indicator::SetIndicatorAutoHide(bool autohide)
+{
+ Ecore_X_Window win;
+ if (__pWindow)
+ {
+ win = (Ecore_X_Window)__pWindow->GetNativeHandle();
+ }
+
+ Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
+ SysTryReturnResult(NID_UI_CTRL, pPortraitEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
+ Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
+ SysTryReturnResult(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
+
+ if (autohide)
+ {
+ Color bgColor(0x00000000);
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+ ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
+ }
+ else
+ {
+ SetIndicatorOpacity(__opacity);
+ ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+ }
+
+ __autohide = autohide;
+}
+
+result
_Indicator::SetIndicatorOpacity(_IndicatorOpacity opacity)
{
result r = E_SUCCESS;
_IndicatorOpacity
_Indicator::GetIndicatorOpacity(void) const
{
+ if (__autohide)
+ {
+ return _INDICATOR_OPACITY_TRANSPARENT;
+ }
+
return __opacity;
}
+bool
+_Indicator::GetIndicatorAutoHide(void) const
+{
+ return __autohide;
+}
+
Rectangle
_Indicator::GetIndicatorBounds(void) const
{
SetClipChildrenEnabled(false);
}
__orientation = orientation;
- SetIndicatorOpacity(__opacity);
+ if (!__autohide)
+ {
+ SetIndicatorOpacity(__opacity);
+ }
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
int rotation = 0;
}*/
if (msgId == MSG_ID_INDICATOR_TYPE)
{
- IndicatorTypeMode *pIndicatorTypeMode = (IndicatorTypeMode*)(data);
+ _IndicatorTypeMode *pIndicatorTypeMode = (_IndicatorTypeMode*)(data);
_Window* pWindow = _ControlManager::GetInstance()->_ControlManager::GetTopVisibleWindow();
SysTryReturnVoidResult(NID_UI_CTRL, pWindow, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle();
- if (*pIndicatorTypeMode == INDICATOR_TYPE_1)
+ if (*pIndicatorTypeMode == _INDICATOR_TYPE_1)
{
ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
- else if (*pIndicatorTypeMode == INDICATOR_TYPE_2)
+ else if (*pIndicatorTypeMode == _INDICATOR_TYPE_2)
{
ecore_x_e_illume_indicator_type_set (win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
bool showstate = false;
bool opacity = false;
+ bool autohide = false;
_Control* pOwner = GetOwner();
if (pOwner == null)
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
+ autohide = pForm->IsIndicatorAutoHide();
}
else
{
{
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
+ autohide = pForm->IsIndicatorAutoHide();
}
pOwner->LockInputEvent();
{
__pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
}
+ __pIndicator->SetIndicatorAutoHide(autohide);
}
_Window::OnActivated();
ReleaseTouchCapture();
- if (__pIndicator)
- {
- __pIndicator->DeleteIndicatorObject();
- }
-
_Window::OnDeactivated();
}
bool IsHeaderVisible(void) const;
bool IsFooterVisible(void) const;
bool IsIndicatorTranslucent(void) const;
+ bool IsIndicatorAutoHide(void) const;
bool IsHeaderTranslucent(void) const;
bool IsFooterTranslucent(void) const;
bool IsTabTranslucent(void) const;
void CreateSoftkey(unsigned long formStyle);
void SetTabStyle(int style);
- result SetIndicatorShowState(bool state, bool hide = false);
+ result SetIndicatorShowState(bool state);
+ result SetIndicatorAutoHide(bool autohide);
result SetIndicatorOpacity(_IndicatorOpacity opacity);
virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo);
static _Indicator* CreateIndicator(void);
- result SetIndicatorShowState(bool state, bool hide = false);
+ result SetIndicatorShowState(bool state);
+ result SetIndicatorAutoHide(bool autohide);
result SetIndicatorOpacity(_IndicatorOpacity opacity);
bool GetIndicatorShowState(void) const;
_IndicatorOpacity GetIndicatorOpacity(void) const;
+ bool GetIndicatorAutoHide(void) const;
result AddIndicatorObject(_Control* pControl, _Window* pWindow);
result DeleteIndicatorObject(void);
result ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement);
Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement;
_Window* __pWindow;
bool __showstate;
+ bool __autohide;
_IndicatorOpacity __opacity;
Tizen::Ui::_ControlOrientation __orientation;