}
result
-_Edit::SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int selectedTokenIndex)
+_Edit::SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int newLineCount)
{
if (__pExpandableEditAreaEvent)
{
- IEventArg* pEventArg = _ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(status, selectedTokenIndex);
+ IEventArg* pEventArg = _ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(status, newLineCount);
SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
__pExpandableEditAreaEvent->Fire(*pEventArg);
__pEdit->Invalidate();
__prevTotalTextHeight = __pTextObject->GetTotalHeightF();
- __pEdit->SendExpandableEditAreaEvent(expandableEditAreaStatus);
+ __pEdit->SendExpandableEditAreaEvent(expandableEditAreaStatus, __pTextObject->GetTotalLineCount());
pVisualElement->SetImplicitAnimationEnabled(false);
*/
_ExpandableEditAreaEventStatus GetStatus(void) const;
- int GetSelectedTokenIndex(void) const;
+ int GetNewLineCount(void) const;
// Attribute
*/
_ExpandableEditAreaEventStatus __status;
- int __selecteTokenIndex;
+ int __newLineCount;
}; // _CoreExpandableEditAreaEventArg
-_CoreExpandableEditAreaEventArg::_CoreExpandableEditAreaEventArg(_ExpandableEditAreaEventStatus status, int selectedTokenIndex)
+_CoreExpandableEditAreaEventArg::_CoreExpandableEditAreaEventArg(_ExpandableEditAreaEventStatus status, int newLineCount)
: __status(status)
- , __selecteTokenIndex(selectedTokenIndex)
+ , __newLineCount(newLineCount)
{
// nothing
}
}
int
-_CoreExpandableEditAreaEventArg::GetSelectedTokenIndex(void) const
+_CoreExpandableEditAreaEventArg::GetNewLineCount(void) const
{
- return __selecteTokenIndex;
+ return __newLineCount;
}
////////////////////////////////////////////////////////////////////////////////
_ExpandableEditAreaEventStatus status = pArg->GetStatus();
if (status == _EXPANDABLE_EDITAREA_EVENT_ADDED)
{
- pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*__pSource, 0);
+ pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*__pSource, pArg->GetNewLineCount());
}
else if (status == _EXPANDABLE_EDITAREA_EVENT_REMOVED)
{
- pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*__pSource, 0);
+ pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*__pSource, pArg->GetNewLineCount());
}
SetLastResult(E_SUCCESS);
}
IEventArg*
-_ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int selectedTokenIndex)
+_ExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int newLineCount)
{
- _CoreExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _CoreExpandableEditAreaEventArg(status, selectedTokenIndex);
+ _CoreExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _CoreExpandableEditAreaEventArg(status, newLineCount);
SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
return pEventArg;
if (__pPublicExpandableEditAreaEvent)
{
IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(
- EXPANDABLE_EDITAREA_EVENT_ADDED);
+ EXPANDABLE_EDITAREA_EVENT_ADDED, newLineCount);
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
if (__pPublicExpandableEditAreaEvent)
{
IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(
- EXPANDABLE_EDITAREA_EVENT_REMOVED);
+ EXPANDABLE_EDITAREA_EVENT_REMOVED, newLineCount);
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
*/
ExpandableEditAreaEventStatus GetStatus(void) const;
- int GetSelectedTokenIndex(void) const;
+ int GetNewLineCount(void) const;
// Attribute
*/
ExpandableEditAreaEventStatus __status;
- int __selecteTokenIndex;
+ int __newLineCount;
}; // _PublicExpandableEditAreaEventArg
-_PublicExpandableEditAreaEventArg::_PublicExpandableEditAreaEventArg(ExpandableEditAreaEventStatus status, int selectedTokenIndex)
+_PublicExpandableEditAreaEventArg::_PublicExpandableEditAreaEventArg(ExpandableEditAreaEventStatus status, int newLineCount)
: __status(status)
- , __selecteTokenIndex(selectedTokenIndex)
+ , __newLineCount(newLineCount)
{
// nothing
}
}
int
-_PublicExpandableEditAreaEventArg::GetSelectedTokenIndex(void) const
+_PublicExpandableEditAreaEventArg::GetNewLineCount(void) const
{
- return __selecteTokenIndex;
+ return __newLineCount;
}
ExpandableEditAreaEventStatus status = pArg->GetStatus();
if (status == EXPANDABLE_EDITAREA_EVENT_ADDED)
{
- pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*dynamic_cast <ExpandableEditArea*>(const_cast <Control*>(__pSource)), 0);
+ pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*dynamic_cast <ExpandableEditArea*>(const_cast <Control*>(__pSource)),
+ pArg->GetNewLineCount());
}
else if (status == EXPANDABLE_EDITAREA_EVENT_REMOVED)
{
- pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*dynamic_cast <ExpandableEditArea*>(const_cast <Control*>(__pSource)), 0);
+ pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*dynamic_cast <ExpandableEditArea*>(const_cast <Control*>(__pSource)),
+ pArg->GetNewLineCount());
}
SetLastResult(E_SUCCESS);
}
IEventArg*
-_PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int index)
+_PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int newLineCount)
{
- _PublicExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _PublicExpandableEditAreaEventArg(status, index);
+ _PublicExpandableEditAreaEventArg* pEventArg = new (std::nothrow) _PublicExpandableEditAreaEventArg(status, newLineCount);
SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
return pEventArg;
result AttachScrollPanelEvent(void);
result DetachScrollPanelEvent(void);
- result SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int selectedTokenIndex = -1);
+ result SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int newLineCount = 0);
result SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus eventstatus);
result SendLanguageEvent(Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode);
result SendLinkEvent(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link);
{
_EXPANDABLE_EDITAREA_EVENT_ADDED = 0,
_EXPANDABLE_EDITAREA_EVENT_REMOVED
-// _EXPANDABLE_EDITAREA_EVENT_TOKEN_SELECTED
};
/**
*/
const Tizen::Ui::_Control* GetSource(void) const;
- static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int selectedTokenIndex);
+ static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int newLineCount);
// Operations
protected:
virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
public:
- static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int index = -1);
+ static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int newLineCount = 0);
//Attributess
private: