return E_SUCCESS;
}
+result
+_Control::AdjustAbsoluteBounds(void)
+{
+ result r = E_SUCCESS;
+
+ struct _Visitor
+ : public Visitor
+ {
+ _Visitor(_Control* pControl)
+ : __pControl(pControl){}
+
+ virtual VisitType Visit(_Control& control)
+ {
+ result r = E_SUCCESS;
+
+ if (__pControl == &control)
+ {
+ return VISIT_DOWNWARD;
+ }
+ FloatRectangle fbounds = control.GetBoundsF();
+ if (control.IsLayoutChangable() == false)
+ {
+ r = control.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height));
+ }
+ else
+ {
+ r = control.UpdateBoundsOfVisualElement(fbounds);
+ }
+
+ ControlList& children = control.GetChildList();
+
+ int childrenCount = children.GetCount();
+ if (childrenCount <= 0)
+ {
+ return VISIT_STOP;
+ }
+ else
+ {
+ return VISIT_DOWNWARD;
+ }
+ }
+ private :
+ _Control* __pControl;
+ };
+
+ _Visitor visitor(this);
+ Accept(visitor);
+}
+
bool
_Control::IsInSizeRange(const Dimension& size) const
{
}
}
- if ((moved || resized || !changeLayoutBaseRect) && callUpdateBoundsOfVisualElement)
+ if ((moved || resized) && callUpdateBoundsOfVisualElement)
{
const FloatRectangle fbounds(bounds.x, bounds.y, bounds.width, bounds.height);
if (IsLayoutChangable() == false)
__clientBounds = _CoordinateSystemUtils::ConvertToFloat(bounds);
__isSetClientBounds = true;
+ AdjustAbsoluteBounds();
+
SetUpdateLayoutState(true);
return E_SUCCESS;
__clientBounds = bounds;
__isSetClientBounds = true;
+ AdjustAbsoluteBounds();
+
SetUpdateLayoutState(true);
return E_SUCCESS;
result SetBoundsInternal(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks, bool callUpdateBoundsOfVisualElement = true);
result SetBoundsFinal(const Tizen::Graphics::FloatRectangle& newBounds, bool changeLayoutBaseRect, bool callBoundsChangeCallbacks, bool callUpdateBoundsOfVisualElement = true);
result UpdateBoundsOfVisualElement(const Tizen::Graphics::FloatRectangle& controlBounds);
+ result AdjustAbsoluteBounds(void);
const ControlList& GetChildList(void) const;
ControlList& GetChildList(void);