2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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
9 // http://floralicense.org/license/
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.
19 * @file FUiCtrlSearchBar.cpp
20 * @brief This is the implementation file for SearchBar class.
23 #include <FBaseSysLog.h>
24 #include <FLclLocale.h>
25 #include <FUiCtrlSearchBar.h>
26 #include "FUiCtrl_SearchBarImpl.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::Locales;
31 using namespace Tizen::Ui;
33 namespace Tizen { namespace Ui { namespace Controls {
35 SearchBar::SearchBar(void)
39 SearchBar::~SearchBar(void)
44 SearchBar::Construct(const Rectangle& rect, bool searchBarButton, KeypadAction keypadAction)
48 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
49 SysAssertf(pSearchBarImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
51 pSearchBarImpl = _SearchBarImpl::CreateSearchBarImplN(this, rect, searchBarButton, keypadAction);
53 SysTryReturn(NID_UI_CTRL, pSearchBarImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
55 _pControlImpl = pSearchBarImpl;
61 SearchBar::GetContent(void) const
63 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
64 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
66 return pSearchBarImpl->GetContent();
70 SearchBar::SetContent(const Control* pContent)
72 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
73 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
75 return pSearchBarImpl->SetContent(pContent);
79 SearchBar::UpdateContentArea(bool invalidate)
81 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
82 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
84 return pSearchBarImpl->UpdateContentArea(invalidate);
88 SearchBar::SetContentAreaVisible(bool visible)
90 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
91 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
93 return pSearchBarImpl->SetContentAreaVisible(visible);
97 SearchBar::IsContentAreaVisible(void) const
99 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
100 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
102 return pSearchBarImpl->IsContentAreaVisible();
106 SearchBar::SetContentAreaSize(const Dimension& size)
108 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
109 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
111 return pSearchBarImpl->SetContentAreaSize(size);
115 SearchBar::GetContentAreaSize(void) const
117 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
118 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
120 return pSearchBarImpl->GetContentAreaSize();
124 SearchBar::GetMode(void) const
126 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
127 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
129 return pSearchBarImpl->GetMode();
133 SearchBar::IsModeLocked(void) const
135 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
136 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
138 return pSearchBarImpl->IsModeLocked();
142 SearchBar::SetMode(SearchBarMode mode)
144 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
145 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
147 return pSearchBarImpl->SetMode(mode);
151 SearchBar::SetModeLocked(bool modeLocked)
153 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
154 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
156 return pSearchBarImpl->SetModeLocked(modeLocked);
160 SearchBar::GetButtonActionId(void) const
162 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
163 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
165 return pSearchBarImpl->GetButtonActionId();
169 SearchBar::GetButtonColor(SearchBarButtonStatus status) const
171 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
172 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
174 return pSearchBarImpl->GetButtonColor(status);
178 SearchBar::GetButtonTextColor(SearchBarButtonStatus status) const
180 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
181 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
183 return pSearchBarImpl->GetButtonTextColor(status);
186 SearchBarButtonStatus
187 SearchBar::GetButtonStatus(void) const
189 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
190 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
192 return pSearchBarImpl->GetButtonStatus();
196 SearchBar::SetButton(const String& text, int actionId)
198 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
199 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
201 return pSearchBarImpl->SetButton(text, actionId);
205 SearchBar::SetButtonEnabled(bool enabled)
207 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
208 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
210 return pSearchBarImpl->SetButtonEnabled(enabled);
214 SearchBar::SetButtonColor(SearchBarButtonStatus status, const Color& color)
216 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
217 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
219 return pSearchBarImpl->SetButtonColor(status, color);
223 SearchBar::SetButtonTextColor(SearchBarButtonStatus status, const Color& color)
225 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
226 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
228 return pSearchBarImpl->SetButtonTextColor(status, color);
232 SearchBar::AppendCharacter(const Character& character)
234 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
235 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
237 return pSearchBarImpl->AppendCharacter(character);
241 SearchBar::AppendText(const String& text)
243 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
244 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
246 return pSearchBarImpl->AppendText(text);
250 SearchBar::SetText(const String& text)
252 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
253 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
255 return pSearchBarImpl->SetText(text);
259 SearchBar::InsertCharacterAt(int index, const Character& character)
261 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
262 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
264 return pSearchBarImpl->InsertCharacterAt(index, character);
268 SearchBar::InsertTextAt(int index, const String& text)
270 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
271 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
273 return pSearchBarImpl->InsertTextAt(index, text);
277 SearchBar::DeleteCharacterAt(int index)
279 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
280 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
282 return pSearchBarImpl->DeleteCharacterAt(index);
286 SearchBar::Clear(void)
288 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
289 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
291 return pSearchBarImpl->Clear();
295 SearchBar::GetTextLength(void) const
297 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
298 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
300 return pSearchBarImpl->GetTextLength();
304 SearchBar::GetText(void) const
306 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
307 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
309 return pSearchBarImpl->GetText();
313 SearchBar::GetText(int start, int end) const
315 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
316 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
318 return pSearchBarImpl->GetText(start, end);
322 SearchBar::GetLimitLength(void) const
324 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
325 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
327 return pSearchBarImpl->GetLimitLength();
331 SearchBar::SetLimitLength(int limitLength)
333 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
334 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
336 return pSearchBarImpl->SetLimitLength(limitLength);
340 SearchBar::ShowKeypad(void) const
342 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
343 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
345 return pSearchBarImpl->ShowKeypad();
349 SearchBar::HideKeypad(void) const
351 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
352 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
354 return pSearchBarImpl->HideKeypad();
358 SearchBar::GetSearchFieldTextSize(void) const
360 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
361 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
363 return pSearchBarImpl->GetSearchFieldTextSize();
367 SearchBar::SetSearchFieldTextSize(int size)
369 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
370 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
372 return pSearchBarImpl->SetSearchFieldTextSize(size);
376 SearchBar::GetBlockRange(int& start, int& end) const
378 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
379 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
381 return pSearchBarImpl->GetBlockRange(start, end);
385 SearchBar::ReleaseBlock(void)
387 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
388 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
390 return pSearchBarImpl->ReleaseBlock();
394 SearchBar::SetBlockRange(int start, int end)
396 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
397 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
399 return pSearchBarImpl->SetBlockRange(start, end);
403 SearchBar::RemoveTextBlock(void)
405 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
406 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
408 return pSearchBarImpl->RemoveTextBlock();
412 SearchBar::GetColor(void) const
414 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
415 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
417 return pSearchBarImpl->GetColor();
421 SearchBar::GetSearchFieldColor(SearchFieldStatus status) const
423 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
424 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
426 return pSearchBarImpl->GetSearchFieldColor(status);
430 SearchBar::GetSearchFieldTextColor(SearchFieldStatus status) const
432 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
433 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
435 return pSearchBarImpl->GetSearchFieldTextColor(status);
439 SearchBar::SetBackgroundBitmap(const Bitmap& bitmap)
441 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
442 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
444 return pSearchBarImpl->SetBackgroundBitmap(bitmap);
448 SearchBar::SetColor(const Color& color)
450 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
451 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
453 return pSearchBarImpl->SetColor(color);
457 SearchBar::SetSearchFieldColor(SearchFieldStatus status, const Color& color)
459 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
460 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
462 return pSearchBarImpl->SetSearchFieldColor(status, color);
466 SearchBar::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color)
468 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
469 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
471 return pSearchBarImpl->SetSearchFieldTextColor(status, color);
475 SearchBar::GetGuideText(void) const
477 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
478 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
480 return pSearchBarImpl->GetGuideText();
484 SearchBar::SetGuideText(const String& guideText)
486 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
487 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
489 return pSearchBarImpl->SetGuideText(guideText);
493 SearchBar::GetGuideTextColor(void) const
495 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
496 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
498 return pSearchBarImpl->GetGuideTextColor();
502 SearchBar::SetGuideTextColor(const Color& color)
504 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
505 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
507 return pSearchBarImpl->SetGuideTextColor(color);
511 SearchBar::GetCursorPosition(void) const
513 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
514 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
516 return pSearchBarImpl->GetCursorPosition();
520 SearchBar::SetCursorPosition(int index)
522 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
523 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
525 return pSearchBarImpl->SetCursorPosition(index);
529 SearchBar::IsLowerCaseModeEnabled(void) const
531 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
532 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
534 return pSearchBarImpl->IsLowerCaseModeEnabled();
538 SearchBar::SetLowerCaseModeEnabled(bool enable)
540 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
541 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
543 pSearchBarImpl->SetLowerCaseModeEnabled(enable);
549 SearchBar::GetEllipsisPosition(void) const
551 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
552 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
554 return pSearchBarImpl->GetEllipsisPosition();
558 SearchBar::SetEllipsisPosition(EllipsisPosition position)
560 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
561 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
563 return pSearchBarImpl->SetEllipsisPosition(position);
567 SearchBar::GetKeypadAction(void) const
569 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
570 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
572 return pSearchBarImpl->GetKeypadAction();
576 SearchBar::IsTextPredictionEnabled(void) const
578 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
579 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
581 return pSearchBarImpl->IsTextPredictionEnabled();
585 SearchBar::SetTextPredictionEnabled(bool enable)
587 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
588 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
590 return pSearchBarImpl->SetTextPredictionEnabled(enable);
594 SearchBar::SetCurrentLanguage(LanguageCode languageCode)
596 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
597 SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use.");
599 return pSearchBarImpl->SetCurrentLanguage(languageCode);
603 SearchBar::GetCurrentLanguage(LanguageCode& language) const
605 const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
606 SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use.");
608 return pSearchBarImpl->GetCurrentLanguage(language);
612 SearchBar::AddActionEventListener(IActionEventListener& listener)
614 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
615 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
617 result r = pSearchBarImpl->AddActionEventListener(listener);
618 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
624 SearchBar::RemoveActionEventListener(IActionEventListener& listener)
626 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
627 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
629 result r = pSearchBarImpl->RemoveActionEventListener(listener);
630 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
636 SearchBar::AddTextEventListener(ITextEventListener& listener)
638 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
639 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
641 result r = pSearchBarImpl->AddTextEventListener(listener);
642 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
648 SearchBar::RemoveTextEventListener(ITextEventListener& listener)
650 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
651 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
653 result r = pSearchBarImpl->RemoveTextEventListener(listener);
654 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
660 SearchBar::AddSearchBarEventListener(ISearchBarEventListener& listener)
662 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
663 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
665 result r = pSearchBarImpl->AddSearchBarEventListener(listener);
666 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
672 SearchBar::RemoveSearchBarEventListener(ISearchBarEventListener& listener)
674 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
675 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
677 result r = pSearchBarImpl->RemoveSearchBarEventListener(listener);
678 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
684 SearchBar::AddTextBlockEventListener(ITextBlockEventListener& listener)
686 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
687 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
689 result r = pSearchBarImpl->AddTextBlockEventListener(listener);
690 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
696 SearchBar::RemoveTextBlockEventListener(ITextBlockEventListener& listener)
698 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
699 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
701 result r = pSearchBarImpl->RemoveTextBlockEventListener(listener);
702 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
708 SearchBar::AddKeypadEventListener(IKeypadEventListener& listener)
710 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
711 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
713 result r = pSearchBarImpl->AddKeypadEventListener(listener);
714 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
720 SearchBar::RemoveKeypadEventListener(IKeypadEventListener& listener)
722 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
723 SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use.");
725 result r = pSearchBarImpl->RemoveKeypadEventListener(listener);
726 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
732 SearchBar::AddLanguageEventListener(ILanguageEventListener& listener)
734 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
735 SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use.");
737 result r = pSearchBarImpl->AddLanguageEventListener(listener);
738 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
744 SearchBar::RemoveLanguageEventListener(ILanguageEventListener& listener)
746 _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this);
747 SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use.");
749 result r = pSearchBarImpl->RemoveLanguageEventListener(listener);
750 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
755 }}} // Tizen::Ui::Controls