Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_FrameImpl.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #include <new>
19 #include <FUiCtrlForm.h>
20 #include <FUiAnimFrameAnimator.h>
21 #include <FUiCtrlIFrameEventListener.h>
22 #include <FBaseSysLog.h>
23 #include <FApp_AppInfo.h>
24 #include "FUi_ControlManager.h"
25 #include "FUi_OrientationAgent.h"
26 #include "FUi_ImeOrientationAgent.h"
27 #include "FUi_CoordinateSystemUtils.h"
28 #include "FUiCtrlForm.h"
29 #include "FUiCtrl_FrameImpl.h"
30 #include "FUiCtrl_FormImpl.h"
31 #include "FUiCtrl_Frame.h"
32 #include "FUiCtrl_PublicFrameEvent.h"
33
34 using namespace Tizen::App;
35 using namespace Tizen::Base;
36 using namespace Tizen::Base::Collection;
37 using namespace Tizen::Base::Runtime;
38 using namespace Tizen::Graphics;
39 using namespace Tizen::Ui;
40 using namespace Tizen::Ui::Animations;
41
42 namespace
43 {
44 const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
45 }
46
47 namespace Tizen { namespace Ui { namespace Controls {
48
49
50 const _FrameImpl*
51 _FrameImpl::GetInstance(const Frame& frame)
52 {
53         return static_cast<const _FrameImpl*> (frame._pControlImpl);
54 }
55
56 _FrameImpl*
57 _FrameImpl::GetInstance(Frame& frame)
58 {
59         return static_cast<_FrameImpl*> (frame._pControlImpl);
60 }
61
62 void
63 _FrameImpl::Dispose(void)
64 {
65         GetCore().RemoveFrameEventListener(*this);
66
67         if (__pFrameEvent)
68         {
69                 delete __pFrameEvent;
70                 __pFrameEvent = null;
71         }
72
73         if (__pOrientationAgent)
74         {
75                 delete __pOrientationAgent;
76                 __pOrientationAgent = null;
77         }
78
79         if (__pImeOrientationAgent)
80         {
81                 delete __pImeOrientationAgent;
82                 __pImeOrientationAgent = null;
83         }
84
85         delete __pFrameAnimator;
86         __pFrameAnimator = null;
87 }
88
89 _FrameImpl::_FrameImpl(Frame* pPublic, _Frame* pCore)
90         : _WindowImpl(pPublic, pCore)
91         , __pFrameEvent(null)
92         , __pFrameAnimator(null)
93         , __pOrientationAgent(null)
94         , __pImeOrientationAgent(null)
95 {
96         __pFrameEvent = _PublicFrameEvent::CreateInstanceN(*pPublic);
97         SysTryReturnVoidResult(NID_UI_CTRL, __pFrameEvent, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
98
99         int appType = _AppInfo::GetAppType();
100         if (appType & _APP_TYPE_IME_APP)
101         {
102                 __pImeOrientationAgent = _ImeOrientationAgent::CreateInstanceN(*pPublic);
103                 SysTryCatch(NID_UI_CTRL, __pImeOrientationAgent != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
104         }
105         else
106         {
107                 __pOrientationAgent = _OrientationAgent::CreateInstanceN(*pPublic);
108                 SysTryCatch(NID_UI_CTRL, __pOrientationAgent != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
109         }
110
111         return;
112
113 CATCH:
114         Dispose();
115 }
116
117 _FrameImpl::~_FrameImpl(void)
118 {
119         // [ToDo] Wrong point to call OnFrameTerminating().
120         if (__pFrameEvent)
121         {
122                 IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_TERMINATING);
123                 if (pEventArg)
124                 {
125                         __pFrameEvent->Fire(*pEventArg);
126                 }
127         }
128
129         Dispose();
130         ClearLastResult();
131 }
132
133 const char*
134 _FrameImpl::GetPublicClassName(void) const
135 {
136         return "Tizen::Ui::Controls::Frame";
137 }
138
139 const Frame&
140 _FrameImpl::GetPublic(void) const
141 {
142         return static_cast<const Frame&>(_ControlImpl::GetPublic());
143 }
144
145 Frame&
146 _FrameImpl::GetPublic(void)
147 {
148         return static_cast<Frame&>(_ControlImpl::GetPublic());
149 }
150
151 const _Frame&
152 _FrameImpl::GetCore(void) const
153 {
154         return static_cast<const _Frame&>(_ControlImpl::GetCore());
155 }
156
157 _Frame&
158 _FrameImpl::GetCore(void)
159 {
160         return static_cast<_Frame&>(_ControlImpl::GetCore());
161 }
162
163 result
164 _FrameImpl::SetCurrentForm(const _FormImpl& formImpl)
165 {
166         result r = E_SUCCESS;
167
168         _FormImpl* pNewCurForm = const_cast<_FormImpl*>(&formImpl);
169
170         SysTryReturn(NID_UI_CTRL,
171                 pNewCurForm != null, E_INVALID_ARG,
172                 E_INVALID_ARG, "[E_INVALID_ARG] The Form is not initialized.");
173
174         SysTryReturn(NID_UI_CTRL,
175                 IsAncestorOf(pNewCurForm), E_INVALID_ARG,
176                 E_INVALID_ARG, "[E_INVALID_ARG] The Form is not the child of this Frame.");
177
178         FrameShowMode showMode = GetCore().GetShowMode();
179         if (showMode != FRAME_SHOW_MODE_FULL_SCREEN)
180         {
181                 if (showMode == FRAME_SHOW_MODE_MINIMIZED)
182                 {
183                         if (GetCore().GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN)
184                         {
185                                 SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
186                         }
187                 }
188                 else
189                 {
190                         SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
191                 }
192         }
193
194
195         r = MoveChildToTop(*pNewCurForm);
196         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
197
198         // [ToDo] Change the method to return result. And the arg should be reference.
199         GetCore().SetCurrentForm(&pNewCurForm->GetCore());
200         r = GetLastResult();
201         SysAssert(r == E_SUCCESS); // [ToDo] Exception check.
202
203         pNewCurForm->UpdateOrientationStatus();
204
205         // [ToDo] Check last result
206         SysAssert(GetLastResult() == E_SUCCESS);
207         return E_SUCCESS;
208 }
209
210 result
211 _FrameImpl::SetCurrentForm(_FormImpl* pFormImpl)
212 {
213         result r = E_SUCCESS;
214
215         _FormImpl* pNewCurForm = pFormImpl;
216
217         SysTryReturn(NID_UI_CTRL,
218                 pNewCurForm != null, E_INVALID_ARG,
219                 E_INVALID_ARG, "[E_INVALID_ARG] The Form is not initialized.");
220
221         SysTryReturn(NID_UI_CTRL,
222                 IsAncestorOf(pNewCurForm), E_INVALID_ARG,
223                 E_INVALID_ARG, "[E_INVALID_ARG] The Form is not the child of this Frame.");
224
225         if (GetCore().GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN)
226         {
227                 SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
228         }
229
230
231         r = MoveChildToTop(*pNewCurForm);
232         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
233
234         // [ToDo] Change the method to return result. And the arg should be reference.
235         GetCore().SetCurrentForm(&pNewCurForm->GetCore());
236         r = GetLastResult();
237         SysAssert(r == E_SUCCESS); // [ToDo] Exception check.
238
239         pNewCurForm->UpdateOrientationStatus();
240
241         // [ToDo] Check last result
242         SysAssert(GetLastResult() == E_SUCCESS);
243         return E_SUCCESS;
244 }
245
246 // [ToDo] This function should return _FormImpl*.
247 _FormImpl*
248 _FrameImpl::GetCurrentForm(void) const
249 {
250         _Control* pFormCore = GetCore().GetCurrentForm();
251         SysTryReturn(NID_UI_CTRL, pFormCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
252
253         _FormImpl* pFormImpl = static_cast<_FormImpl*>(pFormCore->GetUserData());
254
255         return pFormImpl;
256 }
257
258 _FrameImpl*
259 _FrameImpl::CreateFrameImplN(Frame* pPublic)
260 {
261         ClearLastResult();
262         result r = E_SUCCESS;
263
264         _Frame* pCore = _Frame::CreateFrameN();
265         SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
266
267         _FrameImpl* pImpl = new (std::nothrow) _FrameImpl(pPublic, pCore);
268         r = _ControlImpl::CheckConstruction(pCore, pImpl);
269         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
270
271         pCore->SetSize(_ControlManager::GetInstance()->GetScreenSizeF());
272
273         pCore->AddFrameEventListener(*pImpl);
274
275         SetLastResult(E_SUCCESS);
276
277         return pImpl;
278 }
279
280 void
281 _FrameImpl::AddFrameEventListener(IFrameEventListener& listener)
282 {
283         result r = __pFrameEvent->AddListener(listener);
284         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
285 }
286
287 void
288 _FrameImpl::RemoveFrameEventListener(IFrameEventListener& listener)
289 {
290         result r = __pFrameEvent->RemoveListener(listener);
291         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
292 }
293
294 Animations::FrameAnimator*
295 _FrameImpl::GetFrameAnimator(void) const
296 {
297         if (__pFrameAnimator == null)
298         {
299                 FrameAnimator* pFrameAnimator = new (std::nothrow) FrameAnimator();
300                 SysTryReturn(NID_UI_CTRL,
301                         pFrameAnimator != null, null,
302                         E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
303
304                 result r = pFrameAnimator->Construct(GetPublic());
305                 if (IsFailed(r))
306                 {
307                         SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] FrameAnimator::Construct failed");
308                         delete pFrameAnimator;
309                         return null;
310                 }
311
312                 const_cast<_FrameImpl*>(this)->__pFrameAnimator = pFrameAnimator;
313         }
314
315         SetLastResult(E_SUCCESS);
316
317         return __pFrameAnimator;
318 }
319
320 void
321 _FrameImpl::OnDraw(void)
322 {
323         if (__pOrientationAgent)
324         {
325                 __pOrientationAgent->FireOrientationEvent();
326         }
327
328         _WindowImpl::OnDraw();
329 }
330
331 void
332 _FrameImpl::OnChangeLayout(_ControlOrientation orientation)
333 {
334         // Change layout.
335         _ContainerImpl::OnChangeLayout(orientation);
336         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
337
338         bool resizable = IsResizable();
339         SetResizable(true);
340
341         _ControlManager* pCoreManager = _ControlManager::GetInstance();
342         SysAssert(pCoreManager);
343         const FloatDimension& screenSize = pCoreManager->GetScreenSizeF();
344
345         FrameShowMode frameShowMode = GetCore().GetShowMode();
346
347         if (frameShowMode == FRAME_SHOW_MODE_FULL_SCREEN)
348         {
349                 GetCore().SetRotation(true);
350
351                 if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
352                 {
353                         SetSize(screenSize);
354                 }
355                 else
356                 {
357                         SetSize(FloatDimension(screenSize.height, screenSize.width));
358                 }
359
360                 GetCore().SetRotation(false);
361         }
362         else if ((frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING))
363         {
364                 bool movable = IsMovable();
365                 SetMovable(true);
366
367                 FloatPoint prevPoint = GetPositionF();
368                 FloatPoint curPoint(prevPoint.x, prevPoint.y);
369                 float ratio = screenSize.width / screenSize.height;
370                 if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
371                 {
372                         if (prevPoint.x > 0.0f)
373                         {
374                                 curPoint.x = prevPoint.x * ratio;
375                         }
376
377                         if (prevPoint.y > 0.0f)
378                         {
379                                 curPoint.y = prevPoint.y / ratio;
380                         }
381                 }
382                 else
383                 {
384                         if (prevPoint.x > 0.0f)
385                         {
386                                 curPoint.x = prevPoint.x / ratio;
387                         }
388
389                         if (prevPoint.y > 0.0f)
390                         {
391                                 curPoint.y = prevPoint.y * ratio;
392                         }
393                 }
394
395                 SetPosition(curPoint);
396                 SetMovable(movable);
397                 GetCore().SetFloatingOrientation(orientation);
398         }
399
400         SetResizable(resizable);
401 }
402
403 void
404 _FrameImpl::OnChildDetaching(const _Control& child)
405 {
406         result r = E_SUCCESS;
407
408         _FormImpl* pFormImpl = static_cast<_FormImpl*>(child.GetUserData());
409
410         _FormImpl* pCurrentForm = GetCurrentForm();
411
412         if (pCurrentForm != null)
413         {
414                 if (pCurrentForm == pFormImpl)
415                 {
416                         // if the given control will be the current form, hide the current form
417                         int count = GetChildCount();
418                         if (count > 1)
419                         {
420                                 _ControlImpl* pControlImpl = GetChild(count - 2);
421                                 if (!pControlImpl)
422                                 {
423                                         return ;
424                                 }
425
426                                 Form* pPrevForm = static_cast<Form*>(&pControlImpl->GetPublic());
427
428                                 if (pPrevForm != null)
429                                 {
430                                         r = pPrevForm->SetShowState(true);
431                                         if (IsFailed(r))
432                                         {
433                                                 SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
434                                                 return ;
435                                         }
436                                 }
437                         }
438                 }
439         }
440 }
441
442 void
443 _FrameImpl::OnChildDetached(const _Control& child)
444 {
445         _ControlImpl::OnChildDetached(child);
446
447         int childCount = GetCore().GetChildCount();
448         if (childCount == 0)
449         {
450                 UpdateOrientationStatus();
451         }
452         else if (childCount > 0)
453         {
454                 _Control* pControl = GetCore().GetChild(childCount - 1);
455                 _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pControl->GetUserData());
456                 _FormImpl* pCurrentFormImpl = dynamic_cast<_FormImpl*>(pControlImpl);
457                 SysTryReturnVoidResult(NID_UI_CTRL, pCurrentFormImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
458                 pCurrentFormImpl->UpdateOrientationStatus(true);
459         }
460 }
461
462 void
463 _FrameImpl::OnFrameActivated(const _Frame& source)
464 {
465         if (__pFrameEvent)
466         {
467                 IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_ACTIVATED);
468                 if (pEventArg)
469                 {
470                         __pFrameEvent->Fire(*pEventArg);
471                 }
472         }
473 }
474
475 void
476 _FrameImpl::OnFrameDeactivated(const _Frame& source)
477 {
478         if (__pFrameEvent)
479         {
480                 IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_DEACTIVATED);
481                 if (pEventArg)
482                 {
483                         __pFrameEvent->Fire(*pEventArg);
484                 }
485         }
486 }
487
488 void
489 _FrameImpl::OnFrameMinimized(const _Frame& source)
490 {
491         if (__pFrameEvent)
492         {
493                 IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_MINIMIZED);
494                 if (pEventArg)
495                 {
496                         __pFrameEvent->Fire(*pEventArg);
497                 }
498         }
499 }
500
501 void
502 _FrameImpl::OnFrameRestored(const _Frame& source)
503 {
504         if (__pFrameEvent)
505         {
506                 IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_RESTORED);
507                 if (pEventArg)
508                 {
509                         __pFrameEvent->Fire(*pEventArg);
510                 }
511         }
512 }
513
514 void
515 _FrameImpl::OnBoundsChanged(void)
516 {
517         int childcount = GetChildCount();
518         FloatRectangle bounds = GetBoundsF();
519
520         for (int i = 0 ; i < childcount ; i++)
521         {
522                 _ControlImpl* pChild = GetChild(i);
523                 _FormImpl* pForm = dynamic_cast<_FormImpl*>(pChild);
524                 if (pForm)
525                 {
526                         if (GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN)
527                         {
528                                 if (pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
529                                 {
530                                         pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
531                                 }
532                                 else
533                                 {
534                                         pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.height, bounds.width));
535                                 }
536                         }
537                         else
538                         {
539                                 pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height));
540                         }
541
542                 }
543         }
544
545         _ContainerImpl::OnBoundsChanged();
546
547 }
548
549 result
550 _FrameImpl::OnAttachedToMainTree(void)
551 {
552         result r = _WindowImpl::OnAttachedToMainTree();
553         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
554
555         if (__pOrientationAgent)
556         {
557                 __pOrientationAgent->RequestOrientationEvent();
558         }
559
560         return r;
561 }
562
563 result
564 _FrameImpl::OnDetachingFromMainTree(void)
565 {
566         result r = _WindowImpl::OnDetachingFromMainTree();
567         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
568
569         delete __pFrameAnimator;
570         __pFrameAnimator = null;
571
572         return r;
573 }
574
575 bool
576 _FrameImpl::OnNotifiedN(const _ControlImpl& source, IList* pArgs)
577 {
578         String* pString = dynamic_cast <Tizen::Base::String*>(pArgs->GetAt(0));
579         if (pString)
580         {
581                 if (*pString == _REQUEST_ORIENTATION_EVENT)
582                 {
583                         if (__pOrientationAgent)
584                         {
585                                 __pOrientationAgent->FireOrientationEvent();
586                         }
587
588                         pArgs->RemoveAll(true);
589                         delete pArgs;
590
591                         return true;
592                 }
593         }
594
595         return false;
596 }
597
598 void
599 _FrameImpl::AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener)
600 {
601         if (__pOrientationAgent)
602         {
603                 __pOrientationAgent->AddListener(listener);
604         }
605         else if (__pImeOrientationAgent)
606         {
607                 __pImeOrientationAgent->AddListener(listener);
608         }
609 }
610
611 void
612 _FrameImpl::RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener)
613 {
614         if (__pOrientationAgent)
615         {
616                 __pOrientationAgent->RemoveListener(listener);
617         }
618         else if (__pImeOrientationAgent)
619         {
620                 __pImeOrientationAgent->RemoveListener(listener);
621         }
622 }
623
624 void
625 _FrameImpl::SetOrientation(Orientation orientation)
626 {
627         if (__pOrientationAgent)
628         {
629                 __pOrientationAgent->SetMode(orientation);
630         }
631 }
632
633 Orientation
634 _FrameImpl::GetOrientation(void) const
635 {
636         if (__pOrientationAgent)
637         {
638                 return __pOrientationAgent->GetMode();
639         }
640
641         return ORIENTATION_NONE;
642 }
643
644 OrientationStatus
645 _FrameImpl::GetOrientationStatus(void) const
646 {
647         if (__pOrientationAgent)
648         {
649                 return __pOrientationAgent->GetStatus();
650         }
651         else if (__pImeOrientationAgent)
652         {
653                 return __pImeOrientationAgent->GetStatus();
654         }
655
656         return ORIENTATION_STATUS_NONE;
657 }
658
659 bool
660 _FrameImpl::IsChildAttachable(_ControlImpl& child) const
661 {
662         return (dynamic_cast<_FormImpl*>(&child) != null);
663 }
664
665 void
666 _FrameImpl::UpdateOrientationStatus(void)
667 {
668         if (__pOrientationAgent)
669         {
670                 __pOrientationAgent->Update();
671         }
672 }
673
674 void
675 _FrameImpl::UpdateOrientation(void)
676 {
677         if (__pOrientationAgent)
678         {
679                 __pOrientationAgent->UpdateOrientation();
680         }
681 }
682
683 void
684 _FrameImpl::UpdateOrientation(int angle)
685 {
686         SysLog(NID_UI_CTRL, "[Ime Rotation]");
687
688         if (__pImeOrientationAgent)
689         {
690                 __pImeOrientationAgent->UpdateOrientation(angle);
691         }
692 }
693
694 bool
695 _FrameImpl::IsOpaque(void) const
696 {
697         //return true;
698         return false;
699 }
700
701 void
702 _FrameImpl::SetFloatingBounds(const FloatRectangle& rect)
703 {
704         GetCore().SetFloatingBounds(rect);
705 }
706
707 void
708 _FrameImpl::SetFloatingBounds(const Rectangle& rect)
709 {
710         GetCore().SetFloatingBounds(rect);
711 }
712
713 result
714 _FrameImpl::SetShowMode(FrameShowMode showMode)
715 {
716         return GetCore().SetShowMode(showMode);
717 }
718
719 FrameShowMode
720 _FrameImpl::GetShowMode(void) const
721 {
722         return GetCore().GetShowMode();
723 }
724
725 }}} // Tizen::Ui::Controls