Fixed N_SE-38563, N_SE-38552
[apps/osp/Settings.git] / src / StAccessibilityForm.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                StAccessibilityForm.cpp
19  * @brief               This is the implementation file for AccessibilityForm class.
20  */
21
22 #include "StAccessibilityForm.h"
23 #include "StResourceManager.h"
24 #include "StTypes.h"
25
26 using namespace Tizen::App;
27 using namespace Tizen::Base;
28 using namespace Tizen::Base::Collection;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::System;
31 using namespace Tizen::Ui;
32 using namespace Tizen::Ui::Controls;
33 using namespace Tizen::Ui::Scenes;
34
35 static const int ID_GROUP_SCREEN_READER = 0;
36 static const int ID_ITEM_SCREEN_READER = 0;
37 static const int ID_ITEM_RATE_SPEECH_RATE = 1;
38 static const int ID_GROUP_SCREEN_READER_ITEM_COUNT = 2;
39
40 static const int ID_GROUP_SPEECH_RATE_LIST = 1;
41 static const int ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW = 0;
42 static const int ID_ITEM_RATE_SPEECH_RATE_SLOW = 1;
43 static const int ID_ITEM_RATE_SPEECH_RATE_NORMAL = 2;
44 static const int ID_ITEM_RATE_SPEECH_RATE_FAST = 3;
45 static const int ID_ITEM_RATE_SPEECH_RATE_VERY_FAST = 4;
46 static const int ID_GROUP_SPEECH_RATE_ITEM_COUNT = 5;
47
48 static const int ID_GROUP_SPEED_AT_WHICH_THE_TEXT_IS_SPOKEN = 2;
49
50 static const int ID_GROUP_COUNT = 3;
51 static const int REFRESH_GROUP_INDEX = -1;
52
53 AccessibilityForm::AccessibilityForm(void)
54         : ttsSpeechRate(0)
55 {
56 }
57
58 AccessibilityForm::~AccessibilityForm(void)
59 {
60 }
61
62 void
63 AccessibilityForm::CreateFooter(void)
64 {
65         Footer* pFooter = GetFooter();
66         AppAssert(pFooter);
67
68         pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
69         pFooter->SetBackButton();
70         pFooter->AddActionEventListener(*this);
71
72         SetFormBackEventListener(this);
73 }
74
75 result
76 AccessibilityForm::OnInitializing(void)
77 {
78         CreateHeader(ResourceManager::GetString(L"IDS_ST_BODY_ACCESSIBILITY"));
79         CreateFooter();
80         CreateTableView();
81
82         AppLogDebug("ENTER");
83
84         return E_SUCCESS;
85 }
86
87 result
88 AccessibilityForm::OnTerminating(void)
89 {
90         __pTableView = null;
91
92         SetFormBackEventListener(null);
93         return E_SUCCESS;
94 }
95
96 void
97 AccessibilityForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
98 {
99         result r = E_FAILURE;
100
101         if (pArgs != null)
102         {
103                 delete pArgs;
104         }
105
106         __pTableView->UpdateTableView();
107
108         bool ttsStatus = false;
109         if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS, ttsStatus)) != E_SUCCESS)
110         {
111                 AppLogDebug("GetValue fail.. TTS Result [%s]", GetErrorMessage(r));
112         }
113
114         __pTableView->SetItemChecked(0, 0, ttsStatus);
115
116         int ttsRate = 0;
117         if (SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate) == E_SUCCESS)
118         {
119                 AppLogDebug("GetValue Success.. TTS Rate Result [%s]", GetErrorMessage(r));
120
121                 for (int count = 0; count < __pTableView->GetItemCountAt(ID_GROUP_SPEECH_RATE_LIST); count++)
122                 {
123                         bool check = ((count == ttsRate)?(true):(false));
124                         __pTableView->SetItemChecked(ID_GROUP_SPEECH_RATE_LIST, count, check);
125                 }
126         }
127         else
128         {
129                 AppLogDebug("GetValue fail.. TTS Rate Result [%s]", GetErrorMessage(r));
130         }
131         __pTableView->CollapseGroup(ID_GROUP_SPEECH_RATE_LIST);
132 }
133
134 void
135 AccessibilityForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
136 {
137 }
138
139 void
140 AccessibilityForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
141 {
142         SceneManager* pSceneManager = SceneManager::GetInstance();
143         AppAssert(pSceneManager);
144
145         pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
146 }
147
148 int
149 AccessibilityForm::GetGroupCount(void)
150 {
151         AppLogDebug("ENTER");
152         return ID_GROUP_COUNT;
153 }
154
155 int
156 AccessibilityForm::GetItemCount(int groupIndex)
157 {
158         int itemCount = 0;
159
160         switch (groupIndex)
161         {
162         case ID_GROUP_SCREEN_READER:
163                 {
164                         itemCount = ID_GROUP_SCREEN_READER_ITEM_COUNT;
165                 }
166                 break;
167
168         case ID_GROUP_SPEECH_RATE_LIST:
169                 {
170                         itemCount = ID_GROUP_SPEECH_RATE_ITEM_COUNT;
171                 }
172                 break;
173
174         default:
175                 break;
176         }
177         AppLogDebug("GetItemCount %d", itemCount);
178
179         return itemCount;
180 }
181
182 TableViewGroupItem*
183 AccessibilityForm::CreateGroupItem(int groupIndex, int itemWidth)
184 {
185         AppLogDebug("ENTER");
186
187         int itemHeight = H_GROUP_INDEX_NO_TITLE_DEFAULT;
188         int yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
189         LabelTextStyle style = LABEL_TEXT_STYLE_NORMAL;
190         Rectangle itemMainRectangle;
191         int fontSize = GetFontSize();
192         String groupText;
193         Label* pLabel = null;
194
195         TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
196
197         switch (groupIndex)
198         {
199         case ID_GROUP_SPEED_AT_WHICH_THE_TEXT_IS_SPOKEN:
200                 {
201                         groupText = ResourceManager::GetString(L"IDS_ST_BODY_SPEED_AT_WHICH_THE_TEXT_IS_SPOKEN");
202                         yItemOffset = 0;
203                         itemHeight = GetHeightForStringArea(groupText, itemWidth, fontSize);
204                 }
205                 break;
206
207         default:
208                 {
209                         yItemOffset = 0;
210                         itemHeight = 0;
211                 }
212                 break;
213         }
214
215         itemMainRectangle.x = X_GROUP_ITEM_DEFAULT_LABEL;
216         itemMainRectangle.y = yItemOffset;
217         itemMainRectangle.width = itemWidth;
218         itemMainRectangle.height = itemHeight;
219
220         RelativeLayout relativeLayout;
221         relativeLayout.Construct();
222
223         pItem->Construct(relativeLayout, Dimension(itemWidth, itemHeight));
224         pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT);
225
226         pLabel = new (std::nothrow) Label();
227         pLabel->Construct(itemMainRectangle, groupText);
228         pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
229         pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
230         pLabel->SetTextConfig(fontSize, style);
231         pLabel->SetTextColor(COLOR_HELP_TEXT_TYPE_01);
232
233         pItem->AddControl(pLabel);
234         pItem->SetEnabled(false);
235         relativeLayout.SetMargin(*pLabel, itemMainRectangle.x, 0, 0, 0);
236         relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
237         relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
238
239         return pItem;
240 }
241
242 TableViewItem*
243 AccessibilityForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
244 {
245         AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
246
247         Rectangle itemMainRectangle;
248         Rectangle itemSubRectangle;
249         TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
250         String itemMainText;
251         String itemSubText;
252         String fontReturnValue;
253         Label* pLabel = null;
254         int fontSize = GetFontSize();
255         int startGap = 0;
256         TableViewItem* pItem = new (std::nothrow) TableViewItem();
257
258         ItemTypeOneLine(itemMainRectangle);
259
260         switch (groupIndex)
261         {
262         case ID_GROUP_SCREEN_READER:
263                 {
264                         switch (itemIndex)
265                         {
266                         case ID_ITEM_SCREEN_READER:
267                                 {
268                                         style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
269                                         itemMainText = ResourceManager::GetString(L"IDS_ST_MBODY_SCREEN_READER_HTTS");
270                                 }
271                                 break;
272
273                         case ID_ITEM_RATE_SPEECH_RATE:
274                                 {
275                                         result r = E_FAILURE;
276                                         ItemTypeTwoLine(itemMainRectangle, itemSubRectangle, fontSize);
277                                         itemMainText = ResourceManager::GetString(L"IDS_ST_BODY_SPEECH_RATE");
278
279                                         int ttsRate = 0;
280
281                                         if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate)) == E_SUCCESS)
282                                         {
283                                                 switch (ttsRate)
284                                                 {
285                                                 case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
286                                                         {
287                                                                 itemSubText = ResourceManager::GetString(L"IDS_ST_POP_VERY_SLOW");
288                                                         }
289                                                         break;
290
291                                                 case ID_ITEM_RATE_SPEECH_RATE_SLOW:
292                                                         {
293                                                                 itemSubText = ResourceManager::GetString(L"IDS_ST_POP_SLOW");
294                                                         }
295                                                         break;
296
297                                                 case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
298                                                         {
299                                                                 itemSubText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
300                                                         }
301                                                         break;
302
303                                                 case ID_ITEM_RATE_SPEECH_RATE_FAST:
304                                                         {
305                                                                 itemSubText = ResourceManager::GetString(L"IDS_ST_POP_FAST");
306                                                         }
307                                                         break;
308
309                                                 case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
310                                                         {
311                                                                 itemSubText = ResourceManager::GetString(L"IDS_ST_POP_VERY_FAST");
312                                                         }
313                                                         break;
314
315                                                 default:
316                                                         break;
317                                                 }
318                                         }
319                                         else
320                                         {
321                                                 AppLogDebug("GetValue Fail.. TTS rate Result[%s]", GetErrorMessage(r));
322                                         }
323                                 }
324                                 break;
325
326                         default:
327                                 break;
328                         }
329                 }
330                 break;
331
332         case ID_GROUP_SPEECH_RATE_LIST:
333                 {
334                         style = TABLE_VIEW_ANNEX_STYLE_RADIO;
335                         startGap = RELATIVE_LAYOUT_LEFT_MARGIN;
336
337                         switch (itemIndex)
338                         {
339                         case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
340                                 {
341                                         itemMainText = ResourceManager::GetString(L"IDS_ST_POP_VERY_SLOW");
342                                 }
343                                 break;
344
345                         case ID_ITEM_RATE_SPEECH_RATE_SLOW:
346                                 {
347                                         itemMainText = ResourceManager::GetString(L"IDS_ST_POP_SLOW");
348                                 }
349                                 break;
350
351                         case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
352                                 {
353                                         itemMainText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
354                                 }
355                                 break;
356
357                         case ID_ITEM_RATE_SPEECH_RATE_FAST:
358                                 {
359                                         itemMainText = ResourceManager::GetString(L"IDS_ST_POP_FAST");
360                                 }
361                                 break;
362
363                         case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
364                                 {
365                                         itemMainText = ResourceManager::GetString(L"IDS_ST_POP_VERY_FAST");
366                                 }
367                                 break;
368
369                         default:
370                                 break;
371                         }
372                 }
373                 break;
374
375         default:
376                 break;
377         }
378
379         RelativeLayout relativeLayout;
380         relativeLayout.Construct();
381
382         pItem->Construct(relativeLayout, Dimension(itemWidth, H_GROUP_ITEM_DEFAULT), style);
383         pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
384
385         pLabel = new (std::nothrow) Label();
386         pLabel->Construct(itemMainRectangle, itemMainText);
387         pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
388
389         pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
390         pLabel->SetTextColor(COLOR_MAIN_TEXT);
391
392         pItem->AddControl(pLabel);
393
394         if (style == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)
395         {
396                 relativeLayout.SetMargin(*pLabel, startGap, RELATIVE_LAYOUT_RIGHT_MARGIN_ONOFF_SLIDING, 0, 0);
397         }
398         else
399         {
400                 relativeLayout.SetMargin(*pLabel, startGap, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
401         }
402         relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
403         relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
404
405         if (itemSubText.IsEmpty() == false)
406         {
407                 pLabel = new (std::nothrow) Label();
408                 pLabel->Construct(itemSubRectangle, itemSubText);
409                 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
410                 pLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL);
411                 pLabel->SetTextColor(COLOR_SUB_TEXT);
412
413                 pItem->AddControl(pLabel);
414
415                 relativeLayout.SetMargin(*pLabel, 0, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
416                 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
417                 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
418         }
419
420         return pItem;
421 }
422
423 bool
424 AccessibilityForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
425 {
426         AppLogDebug("ENTER");
427
428         delete pItem;
429         pItem = null;
430
431         return true;
432 }
433
434 bool
435 AccessibilityForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
436 {
437         AppLogDebug("ENTER");
438
439         delete pItem;
440         pItem = null;
441
442         return true;
443 }
444
445 void
446 AccessibilityForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
447 {
448         AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
449
450         result r = E_FAILURE;
451
452         switch (groupIndex)
453         {
454         case ID_GROUP_SCREEN_READER:
455                 {
456                         switch (itemIndex)
457                         {
458                         case ID_ITEM_SCREEN_READER:
459                                 {
460                                         bool itemStatus = tableView.IsItemChecked(groupIndex, itemIndex);
461
462                                         if ((r = SettingInfo::SetValueForPrivilegedKey(SETTING_INFO_KEY_TTS, itemStatus)) == E_SUCCESS)
463                                         {
464                                                 tableView.SetItemChecked(groupIndex, itemIndex, itemStatus);
465                                         }
466                                         else
467                                         {
468                                                 AppLogDebug("SetValue Fail.. TTS Result[%s]", GetErrorMessage(r));
469                                         }
470                                 }
471                                 break;
472
473                         case ID_ITEM_RATE_SPEECH_RATE:
474                                 {
475                                         if (tableView.IsGroupExpanded(ID_GROUP_SPEECH_RATE_LIST) == false)
476                                         {
477                                                 tableView.ExpandGroup(ID_GROUP_SPEECH_RATE_LIST);
478                                         }
479                                         else
480                                         {
481                                                 tableView.CollapseGroup(ID_GROUP_SPEECH_RATE_LIST);
482                                         }
483                                 }
484                                 break;
485
486                         default:
487                                 break;
488                         }
489                 }
490                 break;
491
492         case ID_GROUP_SPEECH_RATE_LIST:
493                 {
494                         int itemCount = tableView.GetItemCountAt(ID_GROUP_SPEECH_RATE_LIST);
495
496                         for (int count = 0; count < itemCount; count++)
497                         {
498                                 bool check = ((count == itemIndex)?(true):(false));
499                                 tableView.SetItemChecked(groupIndex, count, check);
500
501                                 if (check == true)
502                                 {
503                                         r = SettingInfo::SetValue(SETTING_INFO_KEY_TTS_RATE, count);
504                                         AppLogDebug("SetValue. TTS Rate Result[%s] ", GetErrorMessage(r));
505                                         tableView.RefreshItem(ID_GROUP_SCREEN_READER, ID_ITEM_RATE_SPEECH_RATE, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
506                                 }
507                         }
508                         RefreshGroupItemAt(ID_GROUP_SPEECH_RATE_LIST);
509                 }
510                 break;
511
512         default:
513                 break;
514         }
515 }
516
517 int
518 AccessibilityForm::GetDefaultGroupItemHeight(void)
519 {
520         return H_GROUP_INDEX_NO_TITLE_DEFAULT;
521 }
522
523 int
524 AccessibilityForm::GetDefaultItemHeight(void)
525 {
526         return H_GROUP_ITEM_DEFAULT;
527 }
528
529 void
530 AccessibilityForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
531 {
532 }
533
534 void
535 AccessibilityForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
536 {
537         switch (groupIndex)
538         {
539         case ID_GROUP_SCREEN_READER:
540                 {
541                         if (itemIndex == ID_ITEM_RATE_SPEECH_RATE)
542                         {
543                                 result r = E_FAILURE;
544                                 Label* secondLine = static_cast<Label*>(pItem->GetControl(ID_ITEM_RATE_SPEECH_RATE));
545                                 String itemSubText;
546
547                                 int ttsRate = 0;
548
549                                 if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate)) == E_SUCCESS)
550                                 {
551                                         switch (ttsRate)
552                                         {
553                                         case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
554                                                 {
555                                                         itemSubText = ResourceManager::GetString(L"IDS_ST_POP_VERY_SLOW");
556                                                         secondLine->SetText(itemSubText);
557                                                 }
558                                                 break;
559
560                                         case ID_ITEM_RATE_SPEECH_RATE_SLOW:
561                                                 {
562                                                         itemSubText = ResourceManager::GetString(L"IDS_ST_POP_SLOW");
563                                                         secondLine->SetText(itemSubText);
564                                                 }
565                                                 break;
566
567                                         case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
568                                                 {
569                                                         itemSubText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
570                                                         secondLine->SetText(itemSubText);
571                                                 }
572                                                 break;
573
574                                         case ID_ITEM_RATE_SPEECH_RATE_FAST:
575                                                 {
576                                                         itemSubText = ResourceManager::GetString(L"IDS_ST_POP_FAST");
577                                                         secondLine->SetText(itemSubText);
578                                                 }
579                                                 break;
580
581                                         case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
582                                                 {
583                                                         itemSubText = ResourceManager::GetString(L"IDS_ST_POP_VERY_FAST");
584                                                         secondLine->SetText(itemSubText);
585                                                 }
586                                                 break;
587
588                                         default:
589                                                 break;
590                                         }
591
592                                         secondLine->Invalidate(false);
593                                 }
594                         }
595                         else
596                         {
597                                 pItem->Invalidate(false);
598                         }
599                 }
600                 break;
601
602         case ID_GROUP_SPEECH_RATE_LIST:
603                 {
604                         pItem->Invalidate(false);
605                 }
606                 break;
607
608         default:
609                 break;
610         }
611 }
612
613 void
614 AccessibilityForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
615 {
616 }
617
618 void
619 AccessibilityForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
620 {
621 }
622
623 void
624 AccessibilityForm::RefreshAllItem(void)
625 {
626         int groupCount = __pTableView->GetGroupCount();
627
628         for (int count = 0; count < groupCount; count++)
629         {
630                 RefreshGroupAt(count);
631         }
632 }
633
634 void
635 AccessibilityForm::RefreshGroupAt(int groupIndex)
636 {
637         __pTableView->RefreshItem(groupIndex, REFRESH_GROUP_INDEX, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
638 }
639
640 void
641 AccessibilityForm::RefreshGroupItemAt(int groupIndex)
642 {
643         int itemCount = __pTableView->GetItemCountAt(groupIndex);
644
645         for (int count = 0; count < itemCount; count++)
646         {
647                 __pTableView->RefreshItem(groupIndex, count, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
648         }
649 }
650
651 void
652 AccessibilityForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
653 {
654         Invalidate(true);
655 }