resource/FUi_ResourceCheckButtonConfig.cpp
resource/FUi_ResourceContextMenuConfig.cpp
resource/FUi_ResourceDateTimePickerConfig.cpp
+ resource/FUi_ResourceDimmingLayerConfig.cpp
resource/FUi_ResourceFooterConfig.cpp
resource/FUi_ResourceFormConfig.cpp
resource/FUi_ResourceGroupContainerConfig.cpp
*/
#include <FGrpFloatRectangle.h>
+#include <FGrp_BitmapImpl.h>
#include "FUi_Control.h"
#include "FUi_ControlManager.h"
#include "FUi_Window.h"
#include "FUi_DimmingLayer.h"
+#include "FUi_ResourceManager.h"
#include "FUiAnim_ControlVisualElement.h"
#include "FUiAnim_RootVisualElement.h"
+#include "FUiAnim_VisualElementImpl.h"
+#include "FUiCtrl_Indicator.h"
+#include "FUiCtrl_Popup.h"
using namespace Tizen::Graphics;
using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Animations;
namespace Tizen { namespace Ui
SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
__pDimmingElement->SetShowState(true);
- __pDimmingElement->SetOpacity(0.65f);
+ //__pDimmingElement->SetOpacity(0.65f);
r = __pDimmingElement->SetBackgroundColor(_Colorf());
SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
result r = E_SUCCESS;
+ FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
+
+ _Popup* pPopup = dynamic_cast<_Popup*>(__pControl);
+ _Indicator* pIndicator = null;
+ if (pPopup)
+ {
+ pIndicator = pPopup->GetIndicator();
+ }
+
_VisualElement* pControlVisualElement = __pControl->GetVisualElement();
SysTryReturnResult(NID_UI, pControlVisualElement, E_SYSTEM, "A system error has been occurred.");
{
pParent->InsertChild(*__pDimmingElement, pControlVisualElement, false);
}
+ r = __pDimmingElement->AttachChild(*pIndicator);
+ _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pIndicator);
+
+ r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
+
+ Canvas* pCanvas = __pDimmingElement->GetCanvasN();
+
+ Bitmap* pPortraitBitmap = null;
+ Bitmap* pLandscapeBitmap = null;
+ r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
+ r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
+
+ if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ if (pCanvas)
+ {
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
+ }
+ }
+ else
+ {
+ if (pCanvas)
+ {
+ r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pLandscapeBitmap);
+ }
+ }
+
+ delete pCanvas;
+
}
else
{
+ r = __pDimmingElement->DetachChild(*pIndicator);
_Window* pWindow = __pControl->GetRootWindow();
_RootVisualElement* pParent = pWindow->GetRootVisualElement();
if (pParent)
GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
__pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
- r = AttachSystemChild(*__pIndicator);
+ r = GetVisualElement()->AttachChild(*__pIndicator);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pIndicator->GetVisualElement());
+ _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pIndicator);
result r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
_Indicator*
_Form::CreateIndicatorN(void)
{
- _Indicator* pIndicator = new (std::nothrow) _Indicator;
+ _Indicator* pIndicator = _Indicator::CreateIndicator();
SysTryReturn(NID_UI_CTRL, pIndicator, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return pIndicator;
result r = E_SUCCESS;
if (__pIndicator)
{
- r = DetachSystemChild(*__pIndicator);
+ r = GetVisualElement()->DetachChild(*__pIndicator);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
__pIndicator = null;
}
if (__pIndicator)
{
- r = __pIndicator->AddIndicatorObject(this);
+ r = __pIndicator->AddIndicatorObject(this, GetRootWindow());
}
return r;
if (FORM_STYLE_INDICATOR & GetFormStyle())
{
+ __pIndicator->OnAttachedToMainTree();
AddIndicatorObject();
if (__transparentIndicator != IsIndicatorTranslucent())
pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight));
}
}
+ pIndicator->OnChangeLayout(orientation);
GetCore().AdjustClientBounds();
}
return;
}
+ pCurrentForm->AddIndicatorObject();
+
_Control* pFocusedControl = pCurrentForm->GetFocused();
if (pFocusedControl)
{
_Indicator*
_Indicator::CreateIndicator(void)
{
+ result r = E_SUCCESS;
+ Color bgColor(0xff343432);
+
_Indicator* pIndicator = new (std::nothrow) _Indicator;
SysTryReturn(NID_UI_CTRL, pIndicator, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ r = pIndicator->ConstructControlVisualElement();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pIndicator->SetSurfaceOpaque(false);
+ pIndicator->SetOpacity(1.0f);
+
+ pIndicator->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
+
+ return pIndicator;
+
CATCH:
delete pIndicator;
return null;
, __pPortraitVisualElement(null)
, __pLandscapeVisualElement(null)
, __pCurrentVisualElement(null)
+ , __pWindow(null)
, __showstate(false)
, __opacity(_INDICATOR_OPACITY_OPAQUE)
{
- SetBackgroundColor(0xff343432);
-
- AcquireHandle();
}
_Indicator::~_Indicator(void)
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
SysTryReturnResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas");
- _Window* pWindow = GetRootWindow();
-
- if (pWindow)
+ if (__pWindow)
{
if (hide)
{
- r = pEcoreEvas->SetIndicatorShowState(*pWindow, true);
+ r = pEcoreEvas->SetIndicatorShowState(*__pWindow, true);
}
else
{
- r = pEcoreEvas->SetIndicatorShowState(*pWindow, state);
+ r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
}
}
__showstate = state;
- SetVisibleState(state);
+ SetShowState(state);
if (state)
{
if (opacity == _INDICATOR_OPACITY_OPAQUE)
{
- SetBackgroundColor(0xff343432);
+ Color bgColor(0xff343432);
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
}
else if (opacity == _INDICATOR_OPACITY_TRANSLUCENT)
{
- _ControlOrientation orientation = GetOrientation();
+ _ControlOrientation orientation = __pWindow->GetOrientation();
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
- SetBackgroundColor(0x7f000000);
+ Color bgColor(0x7f000000);
+ SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
}
else
{
- SetBackgroundColor(0x00000000);
+ 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));
}
}
const Dimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSize();
const Dimension landscapeSize = Dimension(portraitSize.height, portraitSize.width);
- _ControlOrientation orientation = GetOrientation();
+ _ControlOrientation orientation = __pWindow->GetOrientation();
Rectangle indicatorbounds(0, 0, 0, 0);
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
indicatorbounds.width = portraitSize.width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
else
{
indicatorbounds.width = landscapeSize.width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorbounds.height);
_CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
SysTryReturn(NID_UI_CTRL, pCoordSystem, Rectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed.");
const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width);
- _ControlOrientation orientation = GetOrientation();
+ _ControlOrientation orientation = __pWindow->GetOrientation();
FloatRectangle indicatorbounds(0.0f, 0.0f, 0.0f, 0.0f);
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
indicatorbounds.width = portraitSize.width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
else
{
indicatorbounds.width = landscapeSize.width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, __pWindow->GetOrientation(), indicatorbounds.height);
}
- GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorbounds.height);
_CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
SysTryReturn(NID_UI_CTRL, pCoordSystem, FloatRectangle(-1.0, -1.0, -1.0, -1.0), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed.");
}
result
-_Indicator::AddIndicatorObject(_Form* pForm)
+_Indicator::AddIndicatorObject(_Control* pControl, _Window* pWindow)
{
result r = E_SUCCESS;
- _Window* pWindow = GetRootWindow();
- SysTryReturn(NID_UI_CTRL, pWindow, null, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
+ __pWindow = pWindow;
- __pPortraitVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_PORTRAIT, pForm);
+ __pPortraitVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_PORTRAIT, pControl);
SysTryReturn(NID_UI_CTRL, __pPortraitVisualElement, null, E_SYSTEM, "[E_SYSTEM] Indicator can not create the surface.");
- __pLandscapeVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, pForm);
+ __pLandscapeVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, pControl);
SysTryReturn(NID_UI_CTRL, __pLandscapeVisualElement, null, E_SYSTEM, "[E_SYSTEM] Indicator can not create the surface.");
- __pPortraitIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pForm, _INDICATOR_ORIENTATION_PORTRAIT);
+ __pPortraitIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pControl, _INDICATOR_ORIENTATION_PORTRAIT);
SysTryReturn(NID_UI_CTRL, __pPortraitIndicatorEvasObject, null, E_SYSTEM, "[E_SYSTEM] Indicator can not get the Evas_Object.");
- __pLandscapeIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pForm, _INDICATOR_ORIENTATION_LANDSCAPE);
+ __pLandscapeIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pControl, _INDICATOR_ORIENTATION_LANDSCAPE);
SysTryReturn(NID_UI_CTRL, __pLandscapeIndicatorEvasObject, null, E_SYSTEM, "[E_SYSTEM] Indicator can not get the Evas_Object.");
- _ControlOrientation orientation = GetOrientation();
+ _ControlOrientation orientation = pControl->GetOrientation();
if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
{
r = ChangeCurrentVisualElement(__pPortraitVisualElement);
ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle);
ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle);
- OrientationStatus status = ORIENTATION_STATUS_PORTRAIT;
- if (pForm)
- {
- status = pForm->GetFormOrientationStatus();
- }
-
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
int rotation = 0;
- switch(status)
+ if (pEcoreEvas && __pWindow)
{
- case ORIENTATION_STATUS_PORTRAIT :
- rotation = 0;
- break;
- case ORIENTATION_STATUS_LANDSCAPE :
- rotation = 270;
- break;
- case ORIENTATION_STATUS_PORTRAIT_REVERSE :
- rotation = 180;
- break;
- case ORIENTATION_STATUS_LANDSCAPE_REVERSE :
- rotation = 90;
- break;
- default :
- break;
+ rotation = pEcoreEvas->GetWindowRotation(*__pWindow);
}
+
if(rotation == 0 || rotation == 180)
{
ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int));
{
result r = E_SUCCESS;
- _Window* pWindow = GetRootWindow();
- SysTryReturn(NID_UI_CTRL, pWindow, null, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
-
- r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_PORTRAIT, __pPortraitVisualElement);
- r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, __pLandscapeVisualElement);
+ r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(__pWindow, _INDICATOR_ORIENTATION_PORTRAIT, __pPortraitVisualElement);
+ r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(__pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, __pLandscapeVisualElement);
- _VisualElement* pIndicatorVisualElement = GetVisualElement();
- if (__pPortraitVisualElement)
+ if (__pPortraitVisualElement)
{
- r = pIndicatorVisualElement->DetachChild(*__pPortraitVisualElement);
+ r = DetachChild(*__pPortraitVisualElement);
}
if (__pLandscapeVisualElement)
{
- r = pIndicatorVisualElement->DetachChild(*__pLandscapeVisualElement);
+ r = DetachChild(*__pLandscapeVisualElement);
}
__pPortraitIndicatorEvasObject = null;
if (!(__pCurrentVisualElement == pVisualElement))
{
- _VisualElement* pIndicatorVisualElement = GetVisualElement();
- r = pIndicatorVisualElement->AttachChild(*pVisualElement);
+ r = AttachChild(*pVisualElement);
if (__pCurrentVisualElement)
{
- r = pIndicatorVisualElement->DetachChild(*__pCurrentVisualElement);
+ r = DetachChild(*__pCurrentVisualElement);
}
__pCurrentVisualElement = pVisualElement;
}
}
SetIndicatorOpacity(__opacity);
- _ControlRotation controlRotation = _ControlManager::GetInstance()->GetOrientationStatus();
+ _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
int rotation = 0;
Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
SysTryReturnVoidResult(NID_UI_CTRL, pPortraitEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
SysTryReturnVoidResult(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
- switch(controlRotation)
+ if (pEcoreEvas && __pWindow)
{
- case _CONTROL_ROTATION_0 :
- rotation = 0;
- break;
- case _CONTROL_ROTATION_90 :
- rotation = 90;
- break;
- case _CONTROL_ROTATION_180 :
- rotation = 180;
- break;
- case _CONTROL_ROTATION_270 :
- rotation = 270;
- break;
- default :
- break;
+ rotation = pEcoreEvas->GetWindowRotation(*__pWindow);
}
+
if(rotation == 0 || rotation == 180)
{
ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int));
result
_Indicator::SetNotificationTrayOpenEnabled(bool enable)
{
- _Window* pWindow = GetRootWindow();
- SysTryReturn(NID_UI_CTRL, pWindow, null, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
-
- Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle();
+ Ecore_X_Window win = (Ecore_X_Window)__pWindow->GetNativeHandle();
Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE");
bool
_Indicator::IsNotificationTrayOpenEnabled(void) const
{
- _Window* pWindow = GetRootWindow();
- SysTryReturn(NID_UI_CTRL, pWindow, false, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
-
- Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle();
+ Ecore_X_Window win = (Ecore_X_Window)__pWindow->GetNativeHandle();
Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE");
}
_VisualElement*
-_IndicatorManager::GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Form* pForm) const
+_IndicatorManager::GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Control* pControl) const
{
result r = E_SUCCESS;
for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++)
{
- if (pForm == pIndicatorComponentArray[i].pForm)
+ if (pControl == pIndicatorComponentArray[i].pControl)
{
if ((orientation == _INDICATOR_ORIENTATION_PORTRAIT) && (pIndicatorComponentArray[i].portraitVisualElementUsed))
{
if (pFrame)
{
_Form* pCurrentForm = pFrame->GetCurrentForm();
- if (pCurrentForm == pForm)
+ if (pCurrentForm == pControl)
{
int count = pFrame->GetChildCount();
pCurrentForm = dynamic_cast<_Form*>(pFrame->GetChild(count-2));
{
for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++)
{
- if (pIndicatorComponentArray[i].pForm != pCurrentForm)
+ if (pIndicatorComponentArray[i].pControl != pCurrentForm)
{
- pIndicatorComponentArray[i].pForm->DeleteIndicatorObject();
+ _Form* pForm = dynamic_cast<_Form*>(pIndicatorComponentArray[i].pControl);
+ if (pForm)
+ {
+ pForm->DeleteIndicatorObject();
+ }
break;
}
}
{
pVisalElement = pIndicatorComponentArray[i].pPortraitVisualElement;
pIndicatorComponentArray[i].portraitVisualElementUsed = true;
- pIndicatorComponentArray[i].pForm = pForm;
+ pIndicatorComponentArray[i].pControl = pControl;
break;
}
}
{
pVisalElement = pIndicatorComponentArray[i].pLandscapeVisualElement;
pIndicatorComponentArray[i].landscapeVisualElementUsed = true;
- pIndicatorComponentArray[i].pForm = pForm;
+ pIndicatorComponentArray[i].pControl = pControl;
break;
}
}
if (pVisualElement == pIndicatorComponentArray[i].pPortraitVisualElement)
{
pIndicatorComponentArray[i].portraitVisualElementUsed = false;
- pIndicatorComponentArray[i].pForm = null;
+ pIndicatorComponentArray[i].pControl = null;
break;
}
}
if (pVisualElement == pIndicatorComponentArray[i].pLandscapeVisualElement)
{
pIndicatorComponentArray[i].landscapeVisualElementUsed = false;
- pIndicatorComponentArray[i].pForm = null;
+ pIndicatorComponentArray[i].pControl = null;
break;
}
}
{
result r = E_SUCCESS;
- _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- if (!pFrame)
- {
- return r;
- }
IndicatorComponent* pIndicatorComponentArray = MakeIndicatorComponentArrayN(pWindow);
result r = E_SUCCESS;
IndicatorComponent* pIndicatorComponentArray = null;
- _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
- if (!pFrame)
- {
- return r;
- }
r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS && pIndicatorComponentArray, r, r, "[%s] Propagating.", GetErrorMessage(r));
pIndicatorComponentArray[i].pLandscapeVisualElement = pLandscapeVisualElement;
pIndicatorComponentArray[i].portraitVisualElementUsed = false;
pIndicatorComponentArray[i].landscapeVisualElementUsed = false;
- pIndicatorComponentArray[i].pForm = null;
+ pIndicatorComponentArray[i].pControl = null;
}
return pIndicatorComponentArray;
}
Evas_Object*
-_IndicatorManager::GetEvasObject(_Window* pWindow, _Form* pForm, _IndicatorOrientation orientation) const
+_IndicatorManager::GetEvasObject(_Window* pWindow, _Control* pControl, _IndicatorOrientation orientation) const
{
Evas_Object* pEvasObject = null;
for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++)
{
- if (pForm == pIndicatorComponentArray[i].pForm)
+ if (pControl == pIndicatorComponentArray[i].pControl)
{
if (orientation == _INDICATOR_ORIENTATION_PORTRAIT)
{
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_MessageBoxImpl.h"
#include "FUiCtrl_Form.h"
+#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
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 ;
}
#include <FBaseSysLog.h>
#include <FBaseErrorDefine.h>
#include <FGrp_BitmapImpl.h>
+#include <FUiCtrlForm.h>
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUi_ControlManager.h"
#include "FUiCtrl_PopupPresenter.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
+#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
, __pPopupPresenter(null)
, __bounds(0.0f, 0.0f, 0.0f, 0.0f)
, __popupResult(POPUP_RESULT_NONE)
+ , __pIndicator(null)
{
+ __pIndicator = _Indicator::CreateIndicator();
+ SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
_Popup::~_Popup(void)
return _pTitleTextAccessibilityElement;
}
+_Indicator*
+_Popup::GetIndicator(void) const
+{
+ return __pIndicator;
+}
+
void
_Popup::OnDraw(void)
{
SetTouchCapture(false, false);
}
+ bool showstate = false;
+ bool opacity = false;
+
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
+
+ showstate = pForm->IsIndicatorVisible();
+ opacity = pForm->IsIndicatorTranslucent();
}
else
{
}
else
{
+ _Form* pForm = dynamic_cast<_Form*>(pOwner);
+ if (pForm != null)
+ {
+ showstate = pForm->IsIndicatorVisible();
+ opacity = pForm->IsIndicatorTranslucent();
+ }
+
pOwner->LockInputEvent();
}
+ if (__pIndicator)
+ {
+ __pIndicator->AddIndicatorObject(this, GetRootWindow());
+
+
+ float indicatorwidth = 0.0f;
+ float indicatorheight = 0.0f;
+
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
+ }
+ else
+ {
+ indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
+ }
+ __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
+ __pIndicator->SetIndicatorShowState(showstate);
+ if (opacity)
+ {
+ __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
+ }
+ else
+ {
+ __pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
+ }
+ }
+
_Window::OnActivated();
}
ReleaseTouchCapture();
+ if (__pIndicator)
+ {
+ __pIndicator->DeleteIndicatorObject();
+ }
+
_Window::OnDeactivated();
}
GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *pOwner);
}
+ if (__pIndicator)
+ {
+ __pIndicator->OnAttachedToMainTree();
+ }
+
InitializeAccessibilityElement();
return E_SUCCESS;
#include "FUiCtrl_PopupImpl.h"
#include "FUiCtrl_Popup.h"
#include "FUiCtrl_Form.h"
+#include "FUiCtrl_Indicator.h"
using namespace Tizen::Ui::Animations;
}
+ 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);
}
#include <FBaseSysLog.h>
#include <FBaseErrorDefine.h>
-#include <FUiCtrlButton.h>
#include <FGrp_BitmapImpl.h>
#include <FSys_SettingInfoImpl.h>
+#include <FUiCtrlButton.h>
+#include <FUiCtrlForm.h>
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUi_CoordinateSystemUtils.h"
#include "FUiCtrl_Frame.h"
#include "FUiCtrl_ProgressPopup.h"
#include "FUiCtrl_ProgressPopupPresenter.h"
+#include "FUiCtrl_Indicator.h"
using namespace Tizen::Graphics;
SetTouchCapture(false, false);
}
+ bool showstate = false;
+ bool opacity = false;
+
_Control* pOwner = GetOwner();
if (pOwner == null)
{
if (pForm != null)
{
SetOwner(pForm);
+
+ showstate = pForm->IsIndicatorVisible();
+ opacity = pForm->IsIndicatorTranslucent();
}
else
{
}
else
{
+ _Form* pForm = dynamic_cast<_Form*>(pOwner);
+ if (pForm != null)
+ {
+ showstate = pForm->IsIndicatorVisible();
+ opacity = pForm->IsIndicatorTranslucent();
+ }
+
pOwner->LockInputEvent();
}
+ _Indicator* pIndicator = GetIndicator();
+ if (pIndicator)
+ {
+ pIndicator->AddIndicatorObject(this, GetRootWindow());
+
+ float indicatorwidth = 0.0f;
+ float indicatorheight = 0.0f;
+
+ if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().width;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight);
+ }
+ else
+ {
+ indicatorwidth = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF().height;
+ GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, GetOrientation(), indicatorheight);
+ }
+
+ pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight));
+ pIndicator->SetIndicatorShowState(showstate);
+ if (opacity)
+ {
+ pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT);
+ }
+ else
+ {
+ pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
+ }
+ }
+
if (__isTransparent)
{
#include "FUiCtrl_FrameImpl.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_ProgressPopupImpl.h"
+#include "FUiCtrl_Indicator.h"
using namespace Tizen::Ui::Animations;
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 ;
}
#include <FBaseRtTimer.h>
#include "FUi_Control.h"
#include "FUi_EcoreEvas.h"
+#include "FUiAnim_ControlVisualElement.h"
namespace Tizen { namespace Ui { namespace Animations
{
class VisualElementSurface;
}}}
+namespace Tizen { namespace Ui
+{
+class _Control;
+}}
+
namespace Tizen { namespace Ui { namespace Controls
{
-class _Form;
class _Indicator
- : public _Control
+ : public Tizen::Ui::Animations::_ControlVisualElement
, public Tizen::Base::Runtime::ITimerEventListener
{
public:
result SetIndicatorOpacity(_IndicatorOpacity opacity);
bool GetIndicatorShowState(void) const;
_IndicatorOpacity GetIndicatorOpacity(void) const;
- result AddIndicatorObject(_Form* pForm);
+ result AddIndicatorObject(_Control* pControl, _Window* pWindow);
result DeleteIndicatorObject(void);
result ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement);
result SetNotificationTrayOpenEnabled(bool enable);
bool IsNotificationTrayOpenEnabled(void) const;
+ Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
+ Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const;
+
virtual void OnChangeLayout(_ControlOrientation orientation);
virtual result OnAttachedToMainTree(void);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
_Indicator(const _Indicator& value);
_Indicator& operator =(const _Indicator& value);
- Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
- Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const;
-
private:
Evas_Object* __pPortraitIndicatorEvasObject;
Evas_Object* __pLandscapeIndicatorEvasObject;
Tizen::Ui::Animations::_VisualElement* __pPortraitVisualElement;
Tizen::Ui::Animations::_VisualElement* __pLandscapeVisualElement;
Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement;
+ _Window* __pWindow;
bool __showstate;
_IndicatorOpacity __opacity;
namespace Tizen { namespace Ui {
class _Window;
+class _Control;
}};
namespace Tizen { namespace Base { namespace Collection
namespace Tizen { namespace Ui { namespace Controls
{
-class _Form;
typedef struct
{
Tizen::Ui::Animations::_VisualElement* pLandscapeVisualElement;
bool portraitVisualElementUsed;
bool landscapeVisualElementUsed;
- _Form* pForm;
+ _Control* pControl;
} IndicatorComponent ;
enum _IndicatorOrientation
static void InitializeInstance(void);
static void ReleaseInstance(void);
- Tizen::Ui::Animations::_VisualElement* GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Form* pForm) const;
+ Tizen::Ui::Animations::_VisualElement* GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Control* pControl) const;
result ReleaseIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, Tizen::Ui::Animations::_VisualElement* pVisualElement);
result AddWindow(_Window* pWindow);
IndicatorComponent* MakeIndicatorComponentArrayN(_Window* pWindow);
bool IsFull(IndicatorComponent* pIndicatorComponentArray) const;
- Evas_Object* GetEvasObject(_Window* pWindow, _Form* pForm, _IndicatorOrientation orientation)const;
+ Evas_Object* GetEvasObject(_Window* pWindow, _Control* pControl, _IndicatorOrientation orientation)const;
Tizen::Graphics::Dimension GetIndicatorSize(_IndicatorOrientation orientation) const;
Tizen::Graphics::FloatDimension GetIndicatorSizeF(_IndicatorOrientation orientation) const;
namespace Tizen { namespace Ui { namespace Controls
{
+class _Indicator;
class _PopupPresenter;
enum PopupModalResult
Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;
+ _Indicator* GetIndicator(void) const;
+
virtual void OnDraw(void);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
Tizen::Graphics::FloatRectangle __bounds;
PopupModalResult __popupResult;
+
+ _Indicator* __pIndicator;
}; // _Popup
static const int __TABLEVIEW__ = 37;
static const int __TOKENEDIT__ = 38;
static const int __FOCUSUI__ = 39;
+static const int __DIMMINGLAYER__ = 40;
struct TypeResource
{
#include "FUi_ResourceContextMenuConfig.h"
#include "FUi_ResourceDateTimeBarConfig.h"
#include "FUi_ResourceDateTimePickerConfig.h"
+#include "FUi_ResourceDimmingLayerConfig.h"
#include "FUi_ResourceEditConfig.h"
#include "FUi_ResourceEditDateConfig.h"
#include "FUi_ResourceEditTimeConfig.h"
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/**
+ * @file FUi_ResourceDimmingLayerConfig.h
+ * @brief This is the implementation file for the properties of DimmingLayer.
+ */
+#ifndef _FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_
+#define _FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_
+
+#include "FUi_ResourceConfigMacro.h"
+
+DECLARE_UI_CONFIG(DIMMINGLAYER);
+ DECLARE_IMAGE_CONFIG(BG_PORTRAIT, 1);
+ DECLARE_IMAGE_CONFIG(BG_LANDSCAPE, 2);
+DECLARE_END_UI_CONFIG(DIMMINGLAYER);
+
+#endif //_FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "FUi_ResourceDimmingLayerConfig.h"
+
+START_UI_CONFIG(DIMMINGLAYER);
+{
+ ADD_IMAGE_CONFIG(BG_PORTRAIT,#00_popup_dim_lighting_v.png);
+ ADD_IMAGE_CONFIG(BG_LANDSCAPE,#00_popup_dim_lighting_h.png);
+}
+END_UI_CONFIG(DIMMINGLAYER);
+