* @exception E_OPERATION_FAILED The operation has failed.
* @remarks
* - Due to the hardware accelerated rendering, there are limitations for an overlay panel.
- * - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
+ * - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay
* panel. In such cases, Construct() will return @c E_INVALID_ARG. @n
* To prevent this kind of problem, the application must the this method to get a validated bounds
* @exception E_OPERATION_FAILED The operation has failed.
* @remarks
* - Due to the hardware accelerated rendering, there are limitations for an overlay panel.
- * - The hardware capability for an overlay region is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
+ * - The hardware capability for an overlay panel is checked by using the GetWidthUnit(), GetHeightUnit() and GetMaxCount().
* - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations of the overlay
* panel. In such cases, Construct() will return E_INVALID_ARG. @n
* To prevent this kind of problem, the application must use this method to get a validated bounds
__pOverlayAgent->SetEvasImageDirtyCallback();
}
+ // raise up childs
+ _Control* pChild = null;
+ for (int idx = 0 ; idx < GetChildCount(); idx++)
+ {
+ pChild = dynamic_cast <_Control*>(GetChild(idx));
+ if(pChild != null)
+ {
+ __pOverlayAgent->MoveChildToTop(*pChild);
+ }
+ }
+
return E_SUCCESS;
}
void
_OverlayPanel::OnBoundsChanged(void)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] OverlayAgent must not be null.");
+ ClearLastResult();
+
+ if (__pOverlayAgent == null)
+ {
+ return;
+ }
}
void
void
_OverlayPanel::OnChildAttached(const _Control& child)
{
- SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] OverlayAgent must not be null.");
+ ClearLastResult();
+
+ if (__pOverlayAgent == null)
+ {
+ return;
+ }
+
__pOverlayAgent->MoveChildToTop(child);
}
_UiBuilderControlLayout* pControlProperty = null;
GetProperty(pControl, &pControlProperty);
- SysTryReturn(NID_UI, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
std::unique_ptr<OverlayPanel> pOverlayPanel(new (std::nothrow) OverlayPanel());
- SysTryReturn(NID_UI, pOverlayPanel != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- Rectangle rect = pControlProperty->GetRect();
+ FloatRectangle overlayPanelBounds = pControlProperty->GetRectF();
+ bool modified = false;
- result r = pOverlayPanel->Construct(rect);
- SysTryReturn(NID_UI, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+ OverlayPanel::EvaluateBounds(OVERLAY_PANEL_EVAL_OPT_LESS_THAN, overlayPanelBounds, modified);
+ SysTryLog(NID_UI_CTRL, modified, "The bounds of OverlayPanel is modified into [%.3f, %.3f, %.3f, %.3f]"
+ , overlayPanelBounds.x, overlayPanelBounds.y, overlayPanelBounds.width, overlayPanelBounds.height);
+
+ result r = pOverlayPanel->Construct(overlayPanelBounds);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
return pOverlayPanel.release();
}