}
void
+_Control::OnChangeLayout(_ControlRotation rotation)
+{
+}
+
+void
_Control::OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate)
{
}
}
void
-_Control::ChangeLayout(_ControlOrientation orientation)
+_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation)
{
ClearLastResult();
Accept(visitor);
SysAssert(GetLastResult() == E_SUCCESS);
+
+ if (callRotation == true)
+ {
+ _ControlManager* pMgr = _ControlManager::GetInstance();
+ if (pMgr)
+ {
+ _ControlRotation rotation = pMgr->GetOrientationStatus();
+ ChangeLayout(rotation);
+ }
+ }
+}
+
+void
+_Control::ChangeLayout(_ControlRotation rotation)
+{
+ ClearLastResult();
+
+ struct _Visitor
+ : public Visitor
+ {
+ _Visitor(_ControlRotation rotation)
+ : __rotation(rotation){}
+
+ virtual VisitType Visit(_Control& control)
+ {
+ if (control.__rotation != __rotation)
+ {
+ control.__rotation = __rotation;
+ control.GetControlDelegate().OnChangeLayout(__rotation);
+ ClearLastResult();
+ }
+
+ return VISIT_DOWNWARD;
+ }
+
+private:
+ _ControlRotation __rotation;
+ };
+
+ _Visitor visitor(rotation);
+ Accept(visitor);
+
+ SysAssert(GetLastResult() == E_SUCCESS);
}
bool
, __area(_CONTROL_AREA_NONE)
, __layer(_CONTROL_LAYER_NONE)
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
+ , __rotation(_CONTROL_ROTATION_0)
, __pTouchEventPreviewer(null)
, __pKeyEventPreviewer(null)
, __pNotificationEventPreviewer(null)
}
void
+_ControlImpl::OnChangeLayout(_ControlRotation rotation)
+{
+ GetCore().OnChangeLayout(rotation);
+}
+
+void
_ControlImpl::OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate)
{
GetCore().OnZOrderChanging(zOrderUpdate);
SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : START ----------");
_ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
- ChangeLayout(controlOrientation);
+ ChangeLayout(controlOrientation, false);
+
+ _ControlRotation controlRotation = _CONTROL_ROTATION_0;
+ switch (rotation)
+ {
+ case 0:
+ controlRotation = _CONTROL_ROTATION_0;
+ break;
+ case 90:
+ controlRotation = _CONTROL_ROTATION_90;
+ break;
+ case 180:
+ controlRotation = _CONTROL_ROTATION_180;
+ break;
+ case 270:
+ controlRotation = _CONTROL_ROTATION_270;
+ break;
+ default:
+ break;
+ }
+ ChangeLayout(controlRotation);
pEcoreEvas->RotateWindow(*this, __rotation, false);
virtual void OnChildBoundsChanged(const _Control& child) = 0;
virtual void OnChildVisibleStateChanged(const _Control& child) = 0;
virtual void OnChangeLayout(_ControlOrientation orientation) = 0; // [ToDo] Generalize orientation to screen.
+ virtual void OnChangeLayout(_ControlRotation rotation) = 0;
virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate) = 0;
virtual void OnVisibleStateChanging(void) = 0;
virtual void OnVisibleStateChanged(void) = 0;
virtual void OnChildBoundsChanged(const _Control& child);
virtual void OnChildVisibleStateChanged(const _Control& child);
virtual void OnChangeLayout(_ControlOrientation orientation);
+ virtual void OnChangeLayout(_ControlRotation rotation);
virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate);
virtual void OnVisibleStateChanging(void);
virtual void OnVisibleStateChanged(void);
void SetUpdateLayoutState(bool state);
// Orientation
- void ChangeLayout(_ControlOrientation orientation);
+ void ChangeLayout(_ControlOrientation orientation, bool callRotation = true);
+ void ChangeLayout(_ControlRotation rotation);
_ControlOrientation GetOrientation(void) const;
virtual bool IsLayoutChangable(void) const;
virtual bool IsOrientationRoot(void) const;
_ControlArea __area;
_ControlLayer __layer;
_ControlOrientation __orientation;
+ _ControlRotation __rotation;
_ITouchEventPreviewer* __pTouchEventPreviewer;
_IKeyEventPreviewer* __pKeyEventPreviewer;
virtual void OnChildBoundsChanged(const _Control& child);
virtual void OnChildVisibleStateChanged(const _Control& child);
virtual void OnChangeLayout(_ControlOrientation orientation);
+ virtual void OnChangeLayout(_ControlRotation rotation);
virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate);
virtual void OnVisibleStateChanging(void);
virtual void OnVisibleStateChanged(void);