db1f3f4d0f3a04e2f83095efaee1dba984cbfc55
[apps/osp/MusicPlayer.git] / src / MpSearchForm.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (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                MpSearchForm.cpp
19  * @brief               This is the implementation file for SearchForm class.
20  */
21
22 #include "MpSearchForm.h"
23
24 using namespace Tizen::Base;
25 using namespace Tizen::Base::Collection;
26 using namespace Tizen::Content;
27 using namespace Tizen::Graphics;
28 using namespace Tizen::Media;
29 using namespace Tizen::Ui;
30 using namespace Tizen::Ui::Controls;
31 using namespace Tizen::Ui::Scenes;
32
33 static const int H_SEARCH_BAR = 86;
34 static const int H_GROUP_NAME = 80;
35 static const int X_GAP = 16;
36 static const int SEARCH_FONT_SIZE = 50;
37 static const Tizen::Graphics::Color COLOR_GROUP_NAME_BG (127, 127, 127);
38 static const Tizen::Graphics::Color COLOR_GROUP_TEXT (255, 255, 255);
39
40 SearchForm::SearchForm(void)
41         : __pSearchTableView(null)
42         , __pSearchBar(null)
43         , __pNoContentTextLabel(null)
44         , __pSceneId(null)
45 {
46         AppLogDebug("ENTER");
47         AppLogDebug("EXIT");
48 }
49
50 SearchForm::~SearchForm(void)
51 {
52         AppLogDebug("ENTER");
53         AppLogDebug("EXIT");
54 }
55
56 bool
57 SearchForm::Initialize(void)
58 {
59         AppLogDebug("ENTER");
60         Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
61         AppLogDebug("EXIT");
62         return true;
63 }
64
65 result
66 SearchForm::OnInitializing(void)
67 {
68         AppLogDebug("ENTER");
69         GetHeader()->SetTitleText(ResourceManager::GetString("IDS_COM_BODY_SEARCH"));
70
71         __pSearchBar = new (std::nothrow) SearchBar();
72         __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_SEARCH_BAR));
73         __pSearchBar->SetGuideText(ResourceManager::GetString("IDS_COM_BODY_SEARCH"));
74         __pSearchBar->AddSearchBarEventListener(*this);
75         __pSearchBar->AddTextEventListener(*this);
76         __pSearchBar->AddKeypadEventListener(*this);
77         __pSearchBar->SetLowerCaseModeEnabled(true);
78
79         __pSearchTableView = new (std::nothrow) TableView();
80         __pSearchTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()),
81                                         true,
82                                         TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
83
84         __pSearchTableView->SetItemProvider(this);
85         __pSearchTableView->AddTableViewItemEventListener(*this);
86         __pSearchTableView->AddTouchEventListener(*this);
87         __pSearchTableView->AddScrollEventListener(*this);
88         __pSearchBar->SetContent(__pSearchTableView);
89
90         GetFooter()->SetBackButton();
91         SetFormBackEventListener(this);
92
93         AddControl(*__pSearchBar);
94
95         __pPresentationModel = SearchPresentationModel::GetInstance();
96
97         AppLogDebug("EXIT");
98         return E_SUCCESS;
99 }
100
101 result
102 SearchForm::OnTerminating(void)
103 {
104         AppLogDebug("ENTER");
105         AppLogDebug("EXIT");
106         return E_SUCCESS;
107 }
108
109 void
110 SearchForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
111                                                                         Tizen::Ui::Controls::SearchBarMode mode)
112 {
113         AppLogDebug("ENTER");
114         __pPresentationModel->RemoveSearchResult();
115
116         if (__pSearchTableView != null)
117         {
118                 __pSearchTableView->UpdateTableView();
119                 __pSearchTableView->ScrollToItem(INIT_VALUE);
120                 __pSearchTableView->Invalidate(true);
121         }
122         AppLogDebug("EXIT");
123 }
124
125 void
126 SearchForm::OnSearchBarContentAreaResized(Tizen::Ui::Controls::SearchBar& source,
127                                                                                         Dimension& size)
128 {
129         AppLogDebug("ENTER");
130         AppLogDebug("EXIT");
131 }
132
133 void
134 SearchForm::OnTextValueChanged(const Tizen::Ui::Control& source)
135 {
136         AppLogDebug("ENTER");
137         if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
138         {
139                 __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
140         }
141         else
142         {
143                 __pPresentationModel->RemoveSearchResult();
144         }
145         if (__pSearchTableView != null)
146         {
147                 __pSearchTableView->UpdateTableView();
148                 __pSearchTableView->ScrollToItem(INIT_VALUE);
149                 __pSearchTableView->Invalidate(true);
150         }
151         AppLogDebug("EXIT");
152 }
153
154 void
155 SearchForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
156 {
157         AppLogDebug("ENTER");
158         AppLogDebug("EXIT");
159 }
160
161 void
162 SearchForm::OnKeypadActionPerformed(Tizen::Ui::Control& source,
163                                                                         Tizen::Ui::KeypadAction keypadAction)
164 {
165         AppLogDebug("ENTER");
166         if (keypadAction == KEYPAD_ACTION_SEARCH)
167         {
168                 __pSearchBar->HideKeypad();
169                 if (__pSearchBar->GetText().GetLength() != INIT_VALUE)
170                 {
171                         __pPresentationModel->InitializeContentList(__pSearchBar->GetText());
172                 }
173                 else
174                 {
175                         __pPresentationModel->RemoveSearchResult();
176                 }
177                 if (__pSearchTableView != null)
178                 {
179                         __pSearchTableView->UpdateTableView();
180                         __pSearchTableView->ScrollToItem(INIT_VALUE);
181                         __pSearchTableView->Invalidate(true);
182                 }
183         }
184         AppLogDebug("EXIT");
185 }
186
187 void
188 SearchForm::OnKeypadClosed(Tizen::Ui::Control& source)
189 {
190         AppLogDebug("ENTER");
191 //      GetFooter()->SetShowState(true);
192 //      Rectangle clientBounds = GetClientAreaBounds();
193 //      __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
194         AppLogDebug("EXIT");
195 }
196
197 void
198 SearchForm::OnKeypadOpened(Tizen::Ui::Control& source)
199 {
200         AppLogDebug("ENTER");
201 //      Rectangle clientBounds = GetClientAreaBounds();
202 //      __pSearchTableView->SetBounds(Rectangle(0, 0, clientBounds.width, clientBounds.height - __pSearchBar->GetHeight()));
203         AppLogDebug("EXIT");
204 }
205
206 void
207 SearchForm::OnKeypadWillOpen(Tizen::Ui::Control &source)
208 {
209         AppLogDebug("ENTER");
210 //      GetFooter()->SetShowState(false);
211         AppLogDebug("EXIT");
212 }
213
214 int
215 SearchForm::GetItemCount(void)
216 {
217         AppLogDebug("ENTER");
218         int contentCount = __pPresentationModel->GetTotalContentCount();
219
220         if ( __pNoContentTextLabel != null)
221         {
222                 if (contentCount == 0)
223                 {
224                         __pNoContentTextLabel->SetShowState(true);
225                 }
226                 else
227                 {
228                         __pNoContentTextLabel->SetShowState(false);
229                 }
230         }
231
232         Invalidate(true);
233         AppLogDebug("EXIT");
234         return contentCount;
235 }
236
237 Tizen::Ui::Controls::TableViewItem*
238 SearchForm::CreateItem(const int itemIndex, int itemWidth)
239 {
240         AppLogDebug("ENTER");
241         RelativeLayout layout;
242         layout.Construct();
243
244         ContentInformation* pContentInfo = null;
245         TableViewItem* pItem = new (std::nothrow) TableViewItem();
246
247         result r = pItem->Construct(layout, Dimension(itemWidth, H_GROUP_NAME), TABLE_VIEW_ANNEX_STYLE_NORMAL);
248         TryCatch(r == E_SUCCESS, delete pItem, "pItem->Construct(%s)", GetErrorMessage(r));
249
250         if (__pPresentationModel->GetArtistIndex() == itemIndex)
251         {
252                 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ARTISTS"));
253                 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
254
255                 AppLogDebug("EXIT");
256                 return pItem;
257         }
258         else if (__pPresentationModel->GetAlbumIndex() == itemIndex)
259         {
260                 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_BODY_ALBUMS"));
261                 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
262
263                 AppLogDebug("EXIT");
264                 return pItem;
265         }
266         else if (__pPresentationModel->GetSongIndex() == itemIndex)
267         {
268                 r = CreateGroupNameTableViewItem(*pItem, ResourceManager::GetString(L"IDS_MUSIC_HEADER_SONGS"));
269                 TryCatch(r == E_SUCCESS, delete pItem, "CreateTableViewItem failed(%s)", GetErrorMessage(r));
270
271                 AppLogDebug("EXIT");
272                 return pItem;
273         }
274         else
275         {
276                 delete pItem;
277         }
278
279         pItem = new (std::nothrow) TableViewItem();
280         r = pItem->Construct(Dimension(itemWidth, ITEM_HEIGHT), TABLE_VIEW_ANNEX_STYLE_NORMAL);
281         TryCatch(r == E_SUCCESS, delete pItem, "pItem->Construct(%s)", GetErrorMessage(r));
282
283         pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
284         TryCatch(pContentInfo != null, delete pItem, "pContentInfo is null", GetErrorMessage(GetLastResult()));
285
286         if (itemIndex < __pPresentationModel->GetAlbumIndex())
287         {
288                 Label* pArtistNameLabel = new (std::nothrow) Label();
289                 pArtistNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, ITEM_HEIGHT), pContentInfo->ArtistName);
290                 pArtistNameLabel->SetTextColor(COLOR_MAIN_TEXT);
291                 pArtistNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
292                 pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
293                 pItem->AddControl(*pArtistNameLabel);
294         }
295         else if (itemIndex < __pPresentationModel->GetSongIndex())
296         {
297                 Label* pAlbumNameLabel = new (std::nothrow) Label();
298                 pAlbumNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, ITEM_HEIGHT / 2), pContentInfo->AlbumName);
299                 pAlbumNameLabel->SetTextColor(COLOR_MAIN_TEXT);
300                 pAlbumNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
301                 pAlbumNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
302
303                 Label* pArtistNameLabel = new (std::nothrow) Label();
304                 pArtistNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, pAlbumNameLabel->GetHeight(), W_CLIENT_AREA - X_GAP_THUMBNAIL, ITEM_HEIGHT / 2), pContentInfo->ArtistName);
305                 pArtistNameLabel->SetTextColor(COLOR_SUB_TEXT);
306                 pArtistNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
307                 pArtistNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
308
309                 pItem->AddControl(*pAlbumNameLabel);
310                 pItem->AddControl(*pArtistNameLabel);
311         }
312         else
313         {
314                 Label* pSongNameLabel = new (std::nothrow) Label();
315                 pSongNameLabel->Construct(Rectangle(X_GAP_THUMBNAIL, 0, W_CLIENT_AREA - X_GAP_THUMBNAIL, ITEM_HEIGHT), pContentInfo->TitleName);
316                 pSongNameLabel->SetTextColor(COLOR_MAIN_TEXT);
317                 pSongNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
318                 pSongNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
319
320                 pItem->AddControl(*pSongNameLabel);
321         }
322         delete pContentInfo;
323
324         AppLogDebug("EXIT");
325         return pItem;
326
327 CATCH:
328         AppLogDebug("EXIT(%ls)", GetErrorMessage(GetLastResult()));
329         delete pContentInfo;
330         return null;
331 }
332
333 bool
334 SearchForm::DeleteItem(const int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
335 {
336         AppLogDebug("ENTER");
337         delete pItem;
338         pItem = null;
339
340         AppLogDebug("EXIT");
341         return true;
342 }
343
344 void
345 SearchForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
346 {
347         AppLogDebug("ENTER");
348         AppLogDebug("EXIT");
349 }
350
351 int
352 SearchForm::GetDefaultItemHeight(void)
353 {
354         AppLogDebug("ENTER");
355         AppLogDebug("EXIT");
356         return ITEM_HEIGHT;
357 }
358
359 void
360 SearchForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
361                                                 int itemIndex,
362                                                 Tizen::Ui::Controls::TableViewItem* pItem,
363                                                 Tizen::Ui::Controls::TableViewItemStatus status)
364 {
365         AppLogDebug("ENTER");
366         if (status != TABLE_VIEW_ITEM_STATUS_SELECTED)
367         {
368                 return;
369         }
370
371         if (itemIndex == __pPresentationModel->GetArtistIndex()
372                 || itemIndex == __pPresentationModel->GetAlbumIndex()
373                 || itemIndex == __pPresentationModel->GetSongIndex())
374         {
375                 __pSearchBar->HideKeypad();
376                 Invalidate(true);
377                 return;
378         }
379
380         ContentInformation* pContentInfo;
381         SceneManager* pSceneManager = SceneManager::GetInstance();
382         AppAssert(pSceneManager);
383
384         if (itemIndex < __pPresentationModel->GetAlbumIndex())
385         {
386                 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
387
388                 ArrayList* pData = new (std::nothrow) ArrayList();
389                 pData->Construct();
390                 pData->Add(*(new (std::nothrow) String(IDSCN_ARTIST_LIST)));
391                 pData->Add(*(new (std::nothrow) String(pContentInfo->ArtistName)));
392
393                 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ARTIST_CONTENT_LIST), pData);
394         }
395         else if (itemIndex < __pPresentationModel->GetSongIndex())
396         {
397                 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
398
399                 ArrayList* pData = new (std::nothrow) ArrayList();
400                 pData->Construct();
401                 pData->Add(*(new (std::nothrow) String(IDSCN_SEARCH)));
402                 pData->Add(*(new (std::nothrow) String(pContentInfo->AlbumName)));
403                 pData->Add(*(new (std::nothrow) Integer(itemIndex)));
404
405                 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_LIST), pData);
406         }
407         else
408         {
409                 pContentInfo = __pPresentationModel->GetContentInfoN(itemIndex);
410                 ArrayList* pPath = new (std::nothrow) ArrayList();
411                 pPath->Construct();
412                 pPath->Add(*(new (std::nothrow) String(pContentInfo->ContentFilePath)));
413
414                 ArrayList* pData = new (std::nothrow) ArrayList();
415                 pData->Construct();
416                 pData->Add(*(new (std::nothrow) String(MUSIC)));
417                 pData->Add(*(new (std::nothrow) Integer(0)));
418                 pData->Add(*(pPath));
419
420                 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER), pData);
421         }
422
423         delete pContentInfo;
424         pContentInfo = null;
425         AppLogDebug("EXIT");
426 }
427
428 void
429 SearchForm::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView,
430                                                                         int itemIndex,
431                                                                         Tizen::Ui::Controls::TableViewContextItem* pContextItem,
432                                                                         bool activated)
433 {
434         AppLogDebug("ENTER");
435         AppLogDebug("EXIT");
436 }
437
438 void
439 SearchForm::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView,
440                                                 int itemIndexFrom,
441                                                 int itemIndexTo)
442 {
443         AppLogDebug("ENTER");
444         AppLogDebug("EXIT");
445 }
446
447 void
448 SearchForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
449                                                                 const Tizen::Ui::Scenes::SceneId& currentSceneId,
450                                                                 Tizen::Base::Collection::IList* pArgs)
451 {
452         AppLogDebug("ENTER");
453         if (__pSceneId == null)
454         {
455                 __pSceneId = new (std::nothrow) String(previousSceneId);
456         }
457
458         if (__pPresentationModel->GetTotalContentCount() == 0)
459         {
460                 if (__pNoContentTextLabel == null)
461                 {
462                         __pNoContentTextLabel = new (std::nothrow) Label();
463                         __pNoContentTextLabel->Construct(Rectangle(X_GAP, Y_GAP_NO_CONTENT, GetWidth() - (X_GAP * 2), H_NO_CONTENT),
464                                                         ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
465                         __pNoContentTextLabel->SetTextConfig(SEARCH_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
466                         AddControl(*__pNoContentTextLabel);
467                 }
468                 else
469                 {
470                         __pNoContentTextLabel->SetShowState(true);
471                 }
472
473                 if (pArgs != null)
474                 {
475                         pArgs->RemoveAll(true);
476                         delete pArgs;
477                 }
478
479                 if (__pSearchBar->GetMode() != SEARCH_BAR_MODE_INPUT)
480                 {
481                         __pSearchBar->SetMode(SEARCH_BAR_MODE_INPUT);
482                 }
483
484                 Invalidate(true);
485                 return;
486         }
487
488         if (__pNoContentTextLabel->GetShowState() == false)
489         {
490                 Invalidate(true);
491                 __pNoContentTextLabel->SetShowState(false);
492         }
493
494         if (pArgs != null)
495         {
496                 pArgs->RemoveAll(true);
497                 delete pArgs;
498         }
499         AppLogDebug("EXIT");
500 }
501
502 void
503 SearchForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
504                                                                 const Tizen::Ui::Scenes::SceneId& nextSceneId)
505 {
506         AppLogDebug("ENTER");
507 /*      if (__pSearchBar != null)
508         {
509                 __pSearchBar->HideKeypad();
510                 Invalidate(true);
511         }
512         __pPresentationModel->RemoveSearchResult();
513         __pSearchTableView->UpdateTableView();
514 */
515 //      if (__pSearchBar->GetKeypadAction() == true)
516 //      {
517 //              __pSearchBar->HideKeypad();
518 //      }
519 //
520 //      __pSearchBar->RemoveSearchBarEventListener(*this);
521 //      __pSearchBar->RemoveKeypadEventListener(*this);
522 //
523 //      __pSearchTableView->RemoveTableViewItemEventListener(*this);
524 //      __pSearchTableView->RemoveTouchEventListener(*this);
525 //      __pSearchTableView->RemoveScrollEventListener(*this);
526         AppLogDebug("EXIT");
527 }
528
529 void
530 SearchForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
531 {
532         AppLogDebug("ENTER");
533         SceneManager* pSceneManager = SceneManager::GetInstance();
534         AppAssert(pSceneManager);
535         AppLogDebug("OnActionPerformed : %d", actionId);
536         AppLogDebug("EXIT");
537 }
538
539 result
540 SearchForm::CreateGroupNameTableViewItem(Tizen::Ui::Container& parent, const Tizen::Base::String& GroupName)
541 {
542         AppLogDebug("ENTER");
543         result r = E_SUCCESS;
544
545         Label* pGroupNameLabel = new (std::nothrow) Label();
546         pGroupNameLabel->Construct(Rectangle(0, 0, W_CLIENT_AREA, H_GROUP_NAME), L"");
547         pGroupNameLabel->SetBackgroundColor(COLOR_GROUP_NAME_BG);
548         pGroupNameLabel->SetTextColor(COLOR_GROUP_TEXT);
549         pGroupNameLabel->SetTextConfig(MAIN_TEXT_SIZE, LABEL_TEXT_STYLE_NORMAL);
550         pGroupNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
551         pGroupNameLabel->SetText(GroupName);
552
553         parent.AddControl(*pGroupNameLabel);
554
555         AppLogDebug("EXIT");
556         return r;
557 }
558
559 Tizen::Base::String
560 SearchForm::MakeQuery(const Tizen::Base::String& WhereExpr, const Tizen::Base::String& SearchName)
561 {
562         AppLogDebug("ENTER");
563         if (WhereExpr == null || SearchName == null)
564         {
565                 return null;
566         }
567
568         String StrMakeQuery = WhereExpr;
569
570         StrMakeQuery.Append(L" like '%");
571         StrMakeQuery.Append(SearchName);
572         StrMakeQuery.Append(L"%'");
573
574         AppLogDebug("MakeQuery : %ls", StrMakeQuery.GetPointer());
575         AppLogDebug("EXIT");
576         return StrMakeQuery;
577 }
578
579 void
580 SearchForm::OnTouchDoublePressed (const Tizen::Ui::Control& source,
581                                         const Tizen::Graphics::Point& currentPosition,
582                                         const Tizen::Ui::TouchEventInfo& touchInfo)
583 {
584         AppLogDebug("ENTER");
585         AppLogDebug("EXIT");
586 }
587
588 void
589 SearchForm::OnTouchFocusIn (const Tizen::Ui::Control& source,
590                                         const Tizen::Graphics::Point& currentPosition,
591                                         const Tizen::Ui::TouchEventInfo& touchInfo)
592 {
593         AppLogDebug("ENTER");
594         AppLogDebug("EXIT");
595 }
596
597 void
598 SearchForm::OnTouchFocusOut (const Tizen::Ui::Control& source,
599                                         const Tizen::Graphics::Point& currentPosition,
600                                         const Tizen::Ui::TouchEventInfo& touchInfo)
601 {
602         AppLogDebug("ENTER");
603         AppLogDebug("EXIT");
604 }
605
606 void
607 SearchForm::OnTouchLongPressed (const Tizen::Ui::Control& source,
608                                         const Tizen::Graphics::Point& currentPosition,
609                                         const Tizen::Ui::TouchEventInfo& touchInfo)
610 {
611         AppLogDebug("ENTER");
612         AppLogDebug("EXIT");
613 }
614
615 void
616 SearchForm::OnTouchMoved (const Tizen::Ui::Control& source,
617                                         const Tizen::Graphics::Point& currentPosition,
618                                         const Tizen::Ui::TouchEventInfo& touchInfo)
619 {
620         AppLogDebug("ENTER");
621         AppLogDebug("EXIT");
622 }
623
624 void
625 SearchForm::OnTouchPressed (const Tizen::Ui::Control& source,
626                                         const Tizen::Graphics::Point& currentPosition,
627                                         const Tizen::Ui::TouchEventInfo& touchInfo)
628 {
629         AppLogDebug("ENTER");
630         AppLogDebug("EXIT");
631 }
632
633 void
634 SearchForm::OnTouchReleased (const Tizen::Ui::Control& source,
635                                         const Tizen::Graphics::Point& currentPosition,
636                                         const Tizen::Ui::TouchEventInfo& touchInfo)
637 {
638         AppLogDebug("ENTER");
639         AppLogDebug("EXIT");
640 }
641
642 void
643 SearchForm::OnScrollEndReached (Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type)
644 {
645         AppLogDebug( "ENTER");
646         AppLogDebug( "EXIT");
647 }
648
649 void
650 SearchForm::OnScrollPositionChanged (Tizen::Ui::Control& source, int scrollPos)
651 {
652         AppLogDebug( "ENTER");
653         AppLogDebug( "EXIT");
654 }
655
656 void
657 SearchForm::OnScrollStopped (Tizen::Ui::Control& source)
658 {
659         AppLogDebug( "ENTER");
660         AppLogDebug( "EXIT");
661 }
662
663 void
664 SearchForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
665 {
666         AppLogDebug("ENTER");
667         __pPresentationModel->RemoveSearchResult();
668         SceneManager* pSceneManager = SceneManager::GetInstance();
669         AppAssert(pSceneManager);
670
671         pSceneManager->GoForward(ForwardSceneTransition(__pSceneId->GetPointer(), SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
672         AppLogDebug("EXIT");
673 }