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 FUiCtrlEditArea.cpp
20 * @brief This is the implementation file for EditArea class.
23 #include <FBaseSysLog.h>
24 #include <FUiCtrlEditArea.h>
25 #include "FUiCtrl_EditAreaImpl.h"
27 using namespace Tizen::Base;
28 using namespace Tizen::Base::Utility;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::Locales;
31 using namespace Tizen::Security;
32 using namespace Tizen::Ui;
34 namespace Tizen { namespace Ui { namespace Controls
37 EditArea::EditArea(void)
41 EditArea::~EditArea(void)
47 EditArea::Construct(const Rectangle& rect, InputStyle inputStyle, int limitLength)
51 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
52 SysAssertf(pEditAreaImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
54 pEditAreaImpl = _EditAreaImpl::CreateEditAreaImplN(this, rect);
55 SysTryReturn(NID_UI_CTRL, pEditAreaImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
57 _pControlImpl = pEditAreaImpl;
59 r = SetBounds(rect.x, rect.y, rect.width, rect.height);
60 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
62 r = pEditAreaImpl->Initialize(inputStyle, limitLength);
63 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
75 EditArea::Construct(const FloatRectangle& rect, InputStyle inputStyle, int limitLength)
79 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
80 SysAssertf(pEditAreaImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
82 pEditAreaImpl = _EditAreaImpl::CreateEditAreaImplN(this, rect);
83 SysTryReturn(NID_UI_CTRL, pEditAreaImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
85 _pControlImpl = pEditAreaImpl;
87 r = SetBounds(rect.x, rect.y, rect.width, rect.height);
88 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
90 r = pEditAreaImpl->Initialize(inputStyle, limitLength);
91 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
103 EditArea::GetTextAlignment(void) const
105 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
106 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
108 return pEditAreaImpl->GetTextAlignment();
112 EditArea::SetTextAlignment(HorizontalAlignment alignment)
114 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
115 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
117 return pEditAreaImpl->SetTextAlignment(alignment);
121 EditArea::IsViewModeEnabled(void) const
123 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
124 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
126 return pEditAreaImpl->IsViewModeEnabled();
130 EditArea::SetViewModeEnabled(bool enable)
132 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
133 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
135 return pEditAreaImpl->SetViewModeEnabled(enable);
139 EditArea::SetAutoLinkMask(unsigned long autoLinks)
141 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
142 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
144 return pEditAreaImpl->SetAutoLinkMask(autoLinks);
148 EditArea::GetAutoLinkMask(void) const
150 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
151 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
153 return pEditAreaImpl->GetAutoLinkMask();
157 EditArea::GetLineSpacing(void) const
159 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
160 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
162 return pEditAreaImpl->GetLineSpacing();
166 EditArea::GetLineSpacingF(void) const
168 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
169 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
171 return pEditAreaImpl->GetLineSpacingF();
175 EditArea::SetLineSpacing(int multiplier, int extra)
177 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
178 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
180 return pEditAreaImpl->SetLineSpacing(multiplier, extra);
184 EditArea::SetLineSpacing(int multiplier, float extra)
186 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
187 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
189 return pEditAreaImpl->SetLineSpacing(multiplier, extra);
193 EditArea::GetMargin(EditMarginType marginType) const
195 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
196 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
198 return pEditAreaImpl->GetMargin(marginType);
202 EditArea::GetMarginF(EditMarginType marginType) const
204 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
205 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
207 return pEditAreaImpl->GetMarginF(marginType);
211 EditArea::SetMargin(EditMarginType marginType, int margin)
213 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
214 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
216 return pEditAreaImpl->SetMargin(marginType, margin);
220 EditArea::SetMargin(EditMarginType marginType, float margin)
222 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
223 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
225 return pEditAreaImpl->SetMargin(marginType, margin);
229 EditArea::SetKeypadActionEnabled(bool enable)
231 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
232 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
234 return pEditAreaImpl->SetKeypadActionEnabled(enable);
238 EditArea::IsKeypadActionEnabled(void) const
240 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
241 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
243 return pEditAreaImpl->IsKeypadActionEnabled();
248 EditArea::GetKeypadAction(void) const
250 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
251 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
253 return pEditAreaImpl->GetKeypadAction();
257 EditArea::SetKeypadAction(KeypadAction keypadAction)
259 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
260 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
262 return pEditAreaImpl->SetKeypadAction(keypadAction);
266 EditArea::GetKeypadStyle(void) const
268 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
269 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
271 return pEditAreaImpl->GetKeypadStyle();
275 EditArea::SetKeypadStyle(KeypadStyle keypadStyle)
277 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
278 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
280 return pEditAreaImpl->SetKeypadStyle(keypadStyle);
284 EditArea::IsTextPredictionEnabled(void) const
286 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
287 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
289 return pEditAreaImpl->IsTextPredictionEnabled();
293 EditArea::SetTextPredictionEnabled(bool enable)
295 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
296 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
298 return pEditAreaImpl->SetTextPredictionEnabled(enable);
302 EditArea::SetOverlayKeypadCommandButtonVisible(bool visible)
304 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
305 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
307 return pEditAreaImpl->SetOverlayKeypadCommandButtonVisible(visible);
311 EditArea::IsOverlayCommandButtonVisible(void) const
313 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
314 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
316 return pEditAreaImpl->IsOverlayCommandButtonVisible();
320 EditArea::HideKeypad(void)
322 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
323 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
325 return pEditAreaImpl->HideKeypad();
329 EditArea::GetTextSize(void) const
331 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
332 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
334 return pEditAreaImpl->GetTextSize();
338 EditArea::GetTextSizeF(void) const
340 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
341 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
343 return pEditAreaImpl->GetTextSizeF();
347 EditArea::SetTextSize(int size)
349 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
350 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
352 return pEditAreaImpl->SetTextSize(size);
356 EditArea::SetTextSize(float size)
358 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
359 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
361 return pEditAreaImpl->SetTextSize(size);
365 EditArea::GetColor(EditStatus status) const
367 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
368 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
370 return pEditAreaImpl->GetColor(status);
374 EditArea::GetTextColor(EditTextColor type) const
376 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
377 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
379 return pEditAreaImpl->GetTextColor(type);
383 EditArea::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap)
385 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
386 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
388 return pEditAreaImpl->SetBackgroundBitmap(status, bitmap);
392 EditArea::SetColor(EditStatus status, const Color& color)
394 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
395 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
397 return pEditAreaImpl->SetColor(status, color);
401 EditArea::SetTextColor(EditTextColor type, const Color& color)
403 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
404 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
406 return pEditAreaImpl->SetTextColor(type, color);
410 EditArea::GetText(int start, int end) const
412 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
413 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
415 return pEditAreaImpl->GetText(start, end);
419 EditArea::AddUiLinkEventListener(IUiLinkEventListener& listener)
421 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
422 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
424 result r = pEditAreaImpl->AddUiLinkEventListener(listener);
425 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
429 EditArea::RemoveUiLinkEventListener(IUiLinkEventListener& listener)
431 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
432 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
434 result r = pEditAreaImpl->RemoveUiLinkEventListener(listener);
435 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
439 EditArea::AddKeypadEventListener(IKeypadEventListener& listener)
441 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
442 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
444 result r = pEditAreaImpl->AddKeypadEventListener(listener);
445 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
449 EditArea::RemoveKeypadEventListener(IKeypadEventListener& listener)
451 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
452 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
454 result r = pEditAreaImpl->RemoveKeypadEventListener(listener);
455 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
459 EditArea::AddTextBlockEventListener(ITextBlockEventListener& listener)
461 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
462 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
464 result r = pEditAreaImpl->AddTextBlockEventListener(listener);
465 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
469 EditArea::RemoveTextBlockEventListener(ITextBlockEventListener& listener)
471 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
472 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
474 result r = pEditAreaImpl->RemoveTextBlockEventListener(listener);
475 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
479 EditArea::AddTextEventListener(ITextEventListener& listener)
481 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
482 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
484 result r = pEditAreaImpl->AddTextEventListener(listener);
485 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
489 EditArea::RemoveTextEventListener(ITextEventListener& listener)
491 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
492 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
494 result r = pEditAreaImpl->RemoveTextEventListener(listener);
495 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
499 EditArea::AddScrollPanelEventListener(IScrollPanelEventListener& listener)
501 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
502 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
504 result r = pEditAreaImpl->AddScrollPanelEventListener(listener);
505 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
509 EditArea::RemoveScrollPanelEventListener(IScrollPanelEventListener& listener)
511 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
512 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
514 result r = pEditAreaImpl->RemoveScrollPanelEventListener(listener);
515 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
519 EditArea::AddActionEventListener(IActionEventListener& listener)
521 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
522 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
524 result r = pEditAreaImpl->AddActionEventListener(listener);
525 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
529 EditArea::RemoveActionEventListener(IActionEventListener& listener)
531 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
532 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
534 result r = pEditAreaImpl->RemoveActionEventListener(listener);
535 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
539 EditArea::AddLanguageEventListener(ILanguageEventListener& listener)
541 result r = E_SUCCESS;
543 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
544 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
546 r = pEditAreaImpl->AddLanguageEventListener(listener);
547 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
551 EditArea::RemoveLanguageEventListener(ILanguageEventListener& listener)
553 result r = E_SUCCESS;
555 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
556 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
558 r = pEditAreaImpl->RemoveLanguageEventListener(listener);
559 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
563 EditArea::GetRemainingLength(void) const
565 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
566 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
568 return pEditAreaImpl->GetRemainingLength();
572 EditArea::SetLowerCaseModeEnabled(bool enable)
574 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
575 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
577 pEditAreaImpl->SetLowerCaseModeEnabled(enable);
581 EditArea::IsLowerCaseModeEnabled(void) const
583 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
584 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
586 return pEditAreaImpl->IsLowerCaseModeEnabled();
590 EditArea::SetInputModeCategory(unsigned long categories, bool enable)
592 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
593 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
595 return pEditAreaImpl->SetInputModeCategory(categories, enable);
599 EditArea::SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory)
601 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
602 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
604 return pEditAreaImpl->SetCurrentInputModeCategory(inputModeCategory);
608 EditArea::GetInputModeCategory(void) const
610 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
611 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
613 return pEditAreaImpl->GetInputModeCategory();
616 EditInputModeCategory
617 EditArea::GetCurrentInputModeCategory(void) const
619 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
620 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
622 return pEditAreaImpl->GetCurrentInputModeCategory();
626 EditArea::SetCursorPosition(int position)
628 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
629 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
631 return pEditAreaImpl->SetCursorPosition(position);
635 EditArea::GetCursorPosition(void) const
637 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
638 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
640 return pEditAreaImpl->GetCursorPosition();
644 EditArea::GetText(void) const
646 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
647 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
649 return pEditAreaImpl->GetText();
653 EditArea::GetTextLength(void) const
655 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
656 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
658 return pEditAreaImpl->GetTextLength();
662 EditArea::SetText(const String& text)
664 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
665 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
667 return pEditAreaImpl->SetText(text);
671 EditArea::InsertTextAtCursorPosition(const String& text)
673 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
674 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
676 return pEditAreaImpl->InsertTextAtCursorPosition(text);
680 EditArea::AppendText(const String& text)
682 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
683 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
685 return pEditAreaImpl->AppendText(text);
689 EditArea::AppendCharacter(const Character& character)
691 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
692 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
694 return pEditAreaImpl->AppendCharacter(character);
698 EditArea::InsertTextAt(int position, const String& text, const Bitmap& textImage)
700 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
701 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
703 return pEditAreaImpl->InsertTextAt(position, text, textImage);
707 EditArea::AppendText(const String& text, const Bitmap& textImage)
709 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
710 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
712 return pEditAreaImpl->AppendText(text, textImage);
716 EditArea::Clear(void)
718 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
719 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
721 return pEditAreaImpl->Clear();
725 EditArea::DeleteCharacterAtCursorPosition(void)
727 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
728 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
730 return pEditAreaImpl->DeleteCharacterAtCursorPosition();
734 EditArea::GetCurrentTextRange(int& start, int& end) const
736 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
737 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
739 return pEditAreaImpl->GetCurrentTextRange(start, end);
743 EditArea::SetGuideText(const String& guideText)
745 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
746 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
748 return pEditAreaImpl->SetGuideText(guideText);
752 EditArea::GetGuideText(void) const
754 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
755 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
757 return pEditAreaImpl->GetGuideText();
761 EditArea::GetGuideTextColor(void) const
763 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
764 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
766 return pEditAreaImpl->GetGuideTextColor();
770 EditArea::SetGuideTextColor(const Color& color)
772 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
773 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
775 return pEditAreaImpl->SetGuideTextColor(color);
779 EditArea::SetKeypadEnabled(bool enable)
781 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
782 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
784 pEditAreaImpl->SetKeypadEnabled(enable);
790 EditArea::IsKeypadEnabled(void) const
792 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
793 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
795 return pEditAreaImpl->IsKeypadEnabled();
799 EditArea::ShowKeypad(void)
801 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
802 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
804 return pEditAreaImpl->ShowKeypad();
808 EditArea::GetTextLineCount(void) const
810 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
811 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
813 return pEditAreaImpl->GetTextLineCount();
817 EditArea::GetBlockRange(int& start, int& end) const
819 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
820 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
822 pEditAreaImpl->GetBlockRange(start, end);
826 EditArea::BeginBlock(void)
828 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
829 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
831 return pEditAreaImpl->BeginBlock();
835 EditArea::ReleaseBlock(void)
837 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
838 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
840 return pEditAreaImpl->ReleaseBlock();
844 EditArea::IsBlocked(void) const
846 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
847 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
849 return pEditAreaImpl->IsBlocked();
855 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
856 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
858 return pEditAreaImpl->Copy();
864 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
865 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
867 return pEditAreaImpl->Cut();
871 EditArea::Paste(void)
873 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
874 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
876 return pEditAreaImpl->Paste();
880 EditArea::Remove(void)
882 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
883 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
885 return pEditAreaImpl->Remove();
889 EditArea::IsClipped(void) const
891 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
892 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
894 return pEditAreaImpl->IsClipped();
898 EditArea::SetOverlayKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId)
900 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
901 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
903 return pEditAreaImpl->SetOverlayKeypadCommandButton(position, text, actionId);
907 EditArea::GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const
909 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
910 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
912 return pEditAreaImpl->GetOverlayKeypadCommandButtonText(position);
916 EditArea::GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const
918 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
919 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
921 return pEditAreaImpl->GetOverlayKeypadCommandButtonActionId(position);
925 EditArea::SetCurrentLanguage(LanguageCode languageCode)
927 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
928 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
930 return pEditAreaImpl->SetCurrentLanguage(languageCode);
934 EditArea::GetCurrentLanguage(LanguageCode& language) const
936 const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
937 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
939 return pEditAreaImpl->GetCurrentLanguage(language);
943 EditArea::SetEditTextFilter(IEditTextFilter* pFilter)
945 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
946 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
948 pEditAreaImpl->SetEditTextFilter(pFilter);
953 EditArea::SendOpaqueCommand (const String& command)
955 _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this);
956 SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use.");
958 pEditAreaImpl->SendOpaqueCommand(command);
963 }}} // Tizen::Ui::Controls