_EditCopyPasteManager::~_EditCopyPasteManager(void)
{
- Release();
+ ReleaseCopyPastePopup();
+ ReleaseHandle();
if (__pCoreCopyPasteEvent)
{
}
void
-_EditCopyPasteManager::Release(void)
+_EditCopyPasteManager::ReleaseHandle(void)
{
- if (__pCopyPastePopup)
- {
- __pCopyPastePopup->Close();
- delete __pCopyPastePopup;
- __pCopyPastePopup = null;
- }
-
if (__pHandle[HANDLER_TYPE_CENTER])
{
__pHandle[HANDLER_TYPE_CENTER]->Close();
void
_EditCopyPasteManager::CreateHandle(void)
{
- Release();
+ ReleaseHandle();
if (__pEdit->IsBlocked())
{
__pEdit->GetWordPosition(cursorPos, start, end);
__pEdit->SetBlockRange(start, end);
SendTextBlockEvent();
-
- Release();
CreateHandle();
CreateCopyPastePopup();
Show();
__pEdit->SetBlockRange(0, textLength);
SendTextBlockEvent();
__pEditPresenter->UpdateComponentInformation();
-
- Release();
CreateHandle();
CreateCopyPastePopup();
Show();
__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
__footerVisibleChanged = false;
+ if (__pParentPanel)
+ {
+ __pParentPanel->RemoveScrollEventListener(*__pEdit);
+ }
if (__pClipboard)
{
__pCopyPasteManager->CreateHandle();
if (__needToCreateCopyPastePopup)
{
- __pCopyPasteManager->CreateCopyPastePopup();
- __needToCreateCopyPastePopup = false;
+ if (__pParentPanel)
+ {
+ if (!__pParentPanel->IsScrollAnimationRunning())
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
+ }
+ else
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
}
__pCopyPasteManager->Show();
}
{
__needToCreateCopyPastePopup = true;
}
- __pCopyPasteManager->Release();
+ __pCopyPasteManager->ReleaseCopyPastePopup();
+ __pCopyPasteManager->ReleaseHandle();
}
bool isScrollPanelBoundsReloaded = false;
if (pScrollPanel)
{
__pParentPanel = pScrollPanel;
+ __pParentPanel->AddScrollEventListener(*__pEdit);
break;
}
}
float upSideGap = 0.0f;
float newScrollPosition = 0.0f;
- SysLog(NID_UI_CTRL, "absPanelRect(%f, %f, %f, %f)", absPanelRect.x, absPanelRect.y, absPanelRect.width, absPanelRect.height);
- SysLog(NID_UI_CTRL, "absEditRect(%f, %f, %f, %f)", absEditRect.x, absEditRect.y, absEditRect.width, absEditRect.height);
- SysLog(NID_UI_CTRL, "absCursorBounds(%f, %f, %f, %f)", absCursorBounds.x, absCursorBounds.y, absCursorBounds.width, absCursorBounds.height);
-
if (__textObjectBounds.height < absCursorBounds.height)
{
absCursorBounds.height = __textObjectBounds.height;
newScrollPosition = scrollPosition -(absPanelRect.y -absCursorBounds.y);
SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
}
- /*
- if (__pTextObject->GetFirstDisplayLineIndex() == __pTextObject->GetCursorIndex()) //cursor exists in first line
- {
- newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y);
- SysLog(NID_UI_CTRL, "Move up till top boundary of edit.");
- }
- else
- {
- newScrollPosition = scrollPosition -(absPanelRect.y -absCursorBounds.y);
- SysLog(NID_UI_CTRL, "Move up till up position of cursor.");
- }*/
SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
}
SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
}
- /*
- if (__pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()) == (__pTextObject->GetFirstDisplayLineIndex() + __pTextObject->GetDisplayLineCount() - 1))//cursor exists in last line
- {
- newScrollPosition = scrollPosition + ((absEditRect.y + absEditRect.height) -(absPanelRect.y + absPanelRect.height));
- SysLog(NID_UI_CTRL, "Move down till down boundary of edit.");
- }
- else
- {
- newScrollPosition = scrollPosition + ((absCursorBounds.y + absCursorBounds.height) -(absPanelRect.y + absPanelRect.height));
- SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
- }*/
-
SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
}
return r;
}
+void
+_EditPresenter::OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition)
+{
+ if (__isCopyPasteManagerExist)
+ {
+ __pCopyPasteManager->Show();
+ }
+}
+
+void
+_EditPresenter::OnScrollStopped(Tizen::Ui::_Control& source)
+{
+ if (__pCopyPasteManager)
+ {
+ if (__needToCreateCopyPastePopup && !__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteManager->GetCopyPastePopup())
+ {
+ __needToCreateCopyPastePopup = false;
+ }
+ }
+ __pCopyPasteManager->Show();
+ }
+}
+
_Window*
_EditPresenter::OnDragAndDropBeginning(void)
{
#include "FUiCtrl_ITextBlockEventListener.h"
#include "FUiCtrl_ITextEventListener.h"
#include "FUiCtrl_ILanguageEventListener.h"
+#include "FUiCtrl_IScrollEventListener.h"
#include "FUiCtrl_IScrollPanelEventListener.h"
#include "FUiCtrl_IUiLinkEventListener.h"
#include "FUiCtrl_KeypadEvent.h"
, public _ITouchTapGestureEventListener
, public IClipboardPopupEventListener
, public _IEditTextFilter
+ , public _IScrollEventListener
, virtual public Tizen::System::ISettingEventListener
{
public:
virtual void OnDragAndDropLeft(void);
virtual void OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem);
+ virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) {};
+ virtual void OnScrollStopped(Tizen::Ui::_Control& source);
+ virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition);
_EditPresenter* GetPresenter(void) const;
Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const;