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 FUiCtrlExpandableEditArea.cpp
20 * @brief This file contains implementation of ExpandableEditArea class
23 #include <FBaseSysLog.h>
24 #include <FUiCtrlExpandableEditArea.h>
25 #include "FUiCtrl_ExpandableEditAreaImpl.h"
27 using namespace Tizen::Base;
28 using namespace Tizen::Base::Runtime;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::Locales;
31 using namespace Tizen::Ui;
32 using namespace Tizen::Ui::Controls;
34 static const int MINIMUM_SIZE_VALUE = 0;
35 static const int MAXIMUM_SIZE_VALUE = 65535;
36 static const int MAX_EXPANDABLE_LINES = 100;
38 namespace Tizen { namespace Ui { namespace Controls
41 ExpandableEditArea::ExpandableEditArea(void)
46 ExpandableEditArea::~ExpandableEditArea(void)
52 ExpandableEditArea::Construct(const Rectangle& rect, ExpandableEditAreaStyle style,
53 ExpandableEditAreaTitleStyle titleStyle,
54 int maxExpandableLines)
58 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
59 SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
61 SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines > 0), E_INVALID_ARG, "Invalid argument is used. maxExpandableLines is less than zero");
62 SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines <= MAX_EXPANDABLE_LINES), E_MAX_EXCEEDED, "maxExpandableLines exceeds the maximum limit.");
64 SysTryReturnResult(NID_UI_CTRL, !(style == EXPANDABLE_EDIT_AREA_STYLE_TOKEN && titleStyle == EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP),
65 E_UNSUPPORTED_OPTION, "The input option EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP is unsupported. The token style EXPANDABLE_EDIT_AREA_STYLE_TOKEN does not support the title style EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP");
67 SysTryReturnResult(NID_UI_CTRL,
68 (rect.width >= MINIMUM_SIZE_VALUE && rect.width <= MAXIMUM_SIZE_VALUE && rect.height >= MINIMUM_SIZE_VALUE && rect.height <= MAXIMUM_SIZE_VALUE), E_INVALID_ARG,
69 "Invalid argument is used. The specified size(%d, %d) is outside range of min size(%d, %d) and max size(%d, %d) of ExpandableEditArea."
70 , rect.width, rect.height, MINIMUM_SIZE_VALUE, MINIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE);
72 pImpl = _ExpandableEditAreaImpl::CreateExpandableEditAreaImplN(this, rect, style, titleStyle);
74 SysTryCatch(NID_UI_CTRL, pImpl != null, , r, "[%s] Propagating.", GetErrorMessage(r));
76 _pControlImpl = pImpl;
79 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
81 r = pImpl->Construct(rect, style, titleStyle, maxExpandableLines);
82 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
92 ExpandableEditArea::AppendCharacter(const Character& character)
94 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
95 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
97 return pImpl->AppendCharacter(character);
101 ExpandableEditArea::AppendText(const String& text)
103 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
104 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
106 return pImpl->AppendText(text);
110 ExpandableEditArea::AppendText(const String& text, const Bitmap& textImage)
112 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
113 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
115 return pImpl->AppendText(text, textImage);
119 ExpandableEditArea::DeleteCharacterAt(int index)
121 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
122 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
124 return pImpl->DeleteCharacterAt(index);
128 ExpandableEditArea::InsertCharacterAt(int index, const Character& character)
130 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
131 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
133 return pImpl->InsertCharacterAt(index, character);
137 ExpandableEditArea::InsertTextAt(int index, const String& text)
139 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
140 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
142 return pImpl->InsertTextAt(index, text);
146 ExpandableEditArea::InsertTextAt(int position, const String& text, const Bitmap& textImage)
148 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
149 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
151 return pImpl->InsertTextAt(position, text, textImage);
155 ExpandableEditArea::GetText(int start, int end) const
157 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
158 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
160 return pImpl->GetText(start, end);
164 ExpandableEditArea::GetText(void) const
166 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
167 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
169 return pImpl->GetText();
173 ExpandableEditArea::GetTextLength(void) const
175 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
176 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
178 return pImpl->GetTextLength();
182 ExpandableEditArea::SetText(const String& text)
184 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
185 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
187 return pImpl->SetText(text);
191 ExpandableEditArea::Clear(void)
193 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
194 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
196 return pImpl->Clear();
200 ExpandableEditArea::SetTitleText(const String& title)
202 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
203 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
205 return pImpl->SetTitleText(title);
209 ExpandableEditArea::GetTitleText(void) const
211 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
212 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
214 return pImpl->GetTitleText();
218 ExpandableEditArea::GetGuideText(void) const
220 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
221 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
223 return pImpl->GetGuideText();
227 ExpandableEditArea::SetGuideText(const String& guideText)
229 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
230 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
232 return pImpl->SetGuideText(guideText);
236 ExpandableEditArea::GetLineSpacing (void) const
238 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
239 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
241 return pImpl->GetLineSpacing();
245 ExpandableEditArea::SetLineSpacing (int multiplier, int extra)
247 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
248 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
250 return pImpl->SetLineSpacing(multiplier, extra);
254 ExpandableEditArea::GetMaxLineCount(void) const
256 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
257 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
259 return pImpl->GetMaxLineCount();
263 ExpandableEditArea::GetTextLineCount(void) const
265 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
266 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
268 return pImpl->GetTextLineCount();
272 ExpandableEditArea::GetTextSize(void) const
274 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
275 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
277 return pImpl->GetTextSize();
281 ExpandableEditArea::SetTextSize(int size)
283 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
284 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
286 return pImpl->SetTextSize(size);
290 ExpandableEditArea::GetMargin(EditMarginType marginType) const
292 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
293 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
295 return pImpl->GetMargin(marginType);
299 ExpandableEditArea::SetMargin(EditMarginType marginType, int margin)
301 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
302 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
304 return pImpl->SetMargin(marginType, margin);
308 ExpandableEditArea::SetLowerCaseModeEnabled(bool enable)
310 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
311 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
313 return pImpl->SetLowerCaseModeEnabled(enable);
317 ExpandableEditArea::IsLowerCaseModeEnabled(void) const
319 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
320 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
322 return pImpl->IsLowerCaseModeEnabled();
326 ExpandableEditArea::GetCursorPosition(void) const
328 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
329 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
331 return pImpl->GetCursorPosition();
335 ExpandableEditArea::SetCursorPosition(int position)
337 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
338 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
340 return pImpl->SetCursorPosition(position);
344 ExpandableEditArea::GetBlockRange(int& start, int& end) const
346 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
347 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
349 return pImpl->GetBlockRange(start, end);
353 ExpandableEditArea::ReleaseBlock(void)
355 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
356 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
358 return pImpl->ReleaseBlock();
362 ExpandableEditArea::RemoveTextBlock(void)
364 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
365 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
367 return pImpl->RemoveTextBlock();
371 ExpandableEditArea::SetBlockRange(int start, int end)
373 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
374 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
376 return pImpl->SetBlockRange(start, end);
380 ExpandableEditArea::GetKeypadAction(void) const
382 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
383 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
385 return pImpl->GetKeypadAction();
389 ExpandableEditArea::GetKeypadStyle(void) const
391 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
392 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
394 return pImpl->GetKeypadStyle();
398 ExpandableEditArea::HideKeypad(void)
400 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
401 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
403 return pImpl->HideKeypad();
407 ExpandableEditArea::IsKeypadEnabled(void) const
409 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
410 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
412 return pImpl->IsKeypadEnabled();
416 ExpandableEditArea::SetKeypadAction(KeypadAction keypadAction)
418 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
419 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
421 return pImpl->SetKeypadAction(keypadAction);
425 ExpandableEditArea::SetKeypadStyle(KeypadStyle keypadStyle)
427 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
428 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
430 return pImpl->SetKeypadStyle(keypadStyle);
434 ExpandableEditArea::IsTextPredictionEnabled(void) const
436 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
437 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
439 return pImpl->IsTextPredictionEnabled();
443 ExpandableEditArea::SetTextPredictionEnabled(bool enable)
445 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
446 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
448 return pImpl->SetTextPredictionEnabled(enable);
452 ExpandableEditArea::SetKeypadEnabled(bool enable)
454 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
455 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
457 pImpl->SetKeypadEnabled(enable);
463 ExpandableEditArea::ShowKeypad(void)
465 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
466 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
468 return pImpl->ShowKeypad();
472 ExpandableEditArea::SetTokenFilter(const ITokenFilter* pFilter)
474 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
475 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
477 return pImpl->SetTokenFilter(pFilter);
481 ExpandableEditArea::GetTokenFilter(void) const
483 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
484 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
486 return pImpl->GetTokenFilter();
490 ExpandableEditArea::AppendToken(const String& token)
492 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
493 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
495 return pImpl->AppendToken(token);
499 ExpandableEditArea::InsertTokenAt(int index, const String& token)
501 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
502 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
504 return pImpl->InsertTokenAt(index, token);
508 ExpandableEditArea::GetTokenAt(int index) const
510 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
511 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
513 return pImpl->GetTokenAt(index);
517 ExpandableEditArea::GetTokenCount(void) const
519 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
520 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
522 return pImpl->GetTokenCount();
526 ExpandableEditArea::GetSelectedTokenIndex(void) const
528 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
529 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
531 return pImpl->GetSelectedTokenIndex();
535 ExpandableEditArea::IsTokenEditModeEnabled(void) const
537 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
538 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
540 return pImpl->IsTokenEditModeEnabled();
544 ExpandableEditArea::RemoveTokenAt(int index)
546 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
547 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
549 return pImpl->RemoveTokenAt(index);
553 ExpandableEditArea::SetTokenSelected(int index, bool selected)
555 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
556 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
558 return pImpl->SetTokenSelected(index, selected);
562 ExpandableEditArea::SetTokenEditModeEnabled(bool enable)
564 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
565 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
567 return pImpl->SetTokenEditModeEnabled(enable);
571 ExpandableEditArea::GetLimitLength(void) const
573 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
574 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
576 return pImpl->GetLimitLength();
580 ExpandableEditArea::SetLimitLength(int limitLength)
582 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
583 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
585 return pImpl->SetLimitLength(limitLength);
589 ExpandableEditArea::GetColor(EditStatus status) const
591 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
592 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
594 return pImpl->GetColor(status);
598 ExpandableEditArea::GetTextColor(EditTextColor type) const
600 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
601 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
603 return pImpl->GetTextColor(type);
607 ExpandableEditArea::GetGuideTextColor(void) const
609 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
610 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
612 return pImpl->GetGuideTextColor();
616 ExpandableEditArea::GetTitleTextColor(EditStatus status) const
618 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
619 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
621 return pImpl->GetTitleTextColor(status);
625 ExpandableEditArea::GetTokenColor(ExpandableEditAreaTokenStatus status) const
627 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
628 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
630 return pImpl->GetTokenColor(status);
634 ExpandableEditArea::GetTokenTextColor(void) const
636 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
637 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
639 return pImpl->GetTokenTextColor();
643 ExpandableEditArea::GetSelectedTokenTextColor(void) const
645 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
646 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
648 return pImpl->GetSelectedTokenTextColor();
652 ExpandableEditArea::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap)
654 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
655 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
657 return pImpl->SetBackgroundBitmap(status, bitmap);
661 ExpandableEditArea::SetColor(EditStatus status, const Color& color)
663 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
664 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
666 return pImpl->SetColor(status, color);
670 ExpandableEditArea::SetGuideTextColor(const Color& color)
672 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
673 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
675 return pImpl->SetGuideTextColor(color);
679 ExpandableEditArea::SetTitleTextColor(EditStatus status, const Color& color)
681 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
682 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
684 return pImpl->SetTitleTextColor(status, color);
688 ExpandableEditArea::SetTextColor(EditTextColor type, const Color& color)
690 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
691 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
693 return pImpl->SetTextColor(type, color);
697 ExpandableEditArea::SetSelectedTokenTextColor(const Color& color)
699 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
700 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
702 return pImpl->SetSelectedTokenTextColor(color);
706 ExpandableEditArea::SetTokenColor(ExpandableEditAreaTokenStatus status, const Color& color)
708 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
709 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
711 return pImpl->SetTokenColor(status, color);
715 ExpandableEditArea::SetTokenTextColor(const Color& color)
717 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
718 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
720 return pImpl->SetTokenTextColor(color);
724 ExpandableEditArea::SetAutoResizingEnabled(bool enable)
726 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
727 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
729 return pImpl->SetAutoResizingEnabled(enable);
733 ExpandableEditArea::IsAutoResizingEnabled(void) const
735 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
736 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
738 return pImpl->IsAutoResizingEnabled();
742 ExpandableEditArea::SetCurrentLanguage(LanguageCode languageCode)
744 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
745 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
747 return pImpl->SetCurrentLanguage(languageCode);
751 ExpandableEditArea::GetCurrentLanguage(LanguageCode& language) const
753 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
754 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
756 return pImpl->GetCurrentLanguage(language);
760 ExpandableEditArea::AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener)
762 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
763 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
765 result r = pImpl->AddExpandableEditAreaEventListener(listener);
766 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
770 ExpandableEditArea::AddKeypadEventListener(IKeypadEventListener& listener)
772 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
773 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
775 result r = pImpl->AddKeypadEventListener(listener);
776 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
780 ExpandableEditArea::AddTextBlockEventListener(ITextBlockEventListener& listener)
782 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
783 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
785 result r = pImpl->AddTextBlockEventListener(listener);
786 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
790 ExpandableEditArea::AddTextEventListener(ITextEventListener& listener)
792 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
793 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
795 result r = pImpl->AddTextEventListener(listener);
796 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
800 ExpandableEditArea::RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener)
802 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
803 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
805 result r = pImpl->RemoveExpandableEditAreaEventListener(listener);
806 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
810 ExpandableEditArea::RemoveKeypadEventListener(IKeypadEventListener& listener)
812 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
813 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
815 result r = pImpl->RemoveKeypadEventListener(listener);
816 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
820 ExpandableEditArea::RemoveTextBlockEventListener(ITextBlockEventListener& listener)
822 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
823 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
825 result r = pImpl->RemoveTextBlockEventListener(listener);
826 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
830 ExpandableEditArea::RemoveTextEventListener(ITextEventListener& listener)
832 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
833 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
835 result r = pImpl->RemoveTextEventListener(listener);
836 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
840 ExpandableEditArea::AddLanguageEventListener(ILanguageEventListener& listener)
842 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
843 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
845 result r = pImpl->AddLanguageEventListener(listener);
846 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
850 ExpandableEditArea::RemoveLanguageEventListener(ILanguageEventListener& listener)
852 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
853 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
855 result r = pImpl->RemoveLanguageEventListener(listener);
856 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
860 ExpandableEditArea::SetAutoShrinkModeEnabled(bool enable)
862 _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
863 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
865 pImpl->SetAutoShrinkModeEnabled(enable);
869 ExpandableEditArea::IsAutoShrinkModeEnabled(void) const
871 const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this);
872 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
874 return pImpl->IsAutoShrinkModeEnabled();
877 }}} // Tizen::Ui::Controls