String commitText(pEvent->compose);
wchar_t commitChar= '\0';
commitText.GetCharAt(0, commitChar);
-
+ IInputConnectionEventListener* pListener = GetInputConnectionListener();
+ IInputConnectionEventListenerF* pListenerF = GetInputConnectionListenerF();
if (Character::IsAlphaNumeric(commitChar))
{
- if (__pListener)
+ if (pListener)
{
- __pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
- if (__pListenerF)
+ if (pListenerF)
{
- __pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
}
if (commitText == L" " || commitText == L"\t")
{
- if (__pListener)
+ if (pListener)
{
- __pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
- if (__pListenerF)
+ if (pListenerF)
{
- __pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
}
if (commitText == L"\n" || commitText == L"\r")
{
- if (__pListener)
+ if (pListener)
{
- __pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
- if (__pListenerF)
+ if (pListenerF)
{
- __pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
}
if ( (commitChar >= 0x21 && commitChar <= 0x2F) || (commitChar >= 0x3A && commitChar <= 0x40) ||
- (commitChar >= 0x5B && commitChar <= 0x60) || (commitChar >= 0x7B && commitChar<= 0x7E) )
+ (commitChar >= 0x5B && commitChar <= 0x60) || (commitChar >= 0x7B && commitChar<= 0x7E) )
{
- if (__pListener)
+ if (pListener)
{
- __pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
- if (__pListenerF)
+ if (pListenerF)
{
- __pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
+ pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText);
}
}
if (cursorPos != -1)
{
- if (editVisibleArea.y <= absCursorRect.y) // DownSide
+ if (pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
+ {
+ if (point.x - __touchPressedPoint.x >= 0.0f) // RightSide
+ {
+ if (__handlerCursorPos == pEditPresenter->GetTextLength())
+ {
+ cursorPos = __handlerCursorPos;
+ }
+ else
+ {
+ cursorPos = __handlerCursorPos + 1;
+
+ if (__leftHandler && (cursorPos == pEditPresenter->GetTextLength()))
+ {
+ cursorPos = __handlerCursorPos;
+ }
+ }
+ }
+ else //LeftSide
+ {
+ if (__handlerCursorPos != 0)
+ {
+ cursorPos = __handlerCursorPos - 1;
+
+ if (__leftHandler)
+ {
+ pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos);
+ }
+ }
+ }
+ if (point.y < 0.0f || (point.y > GetBoundsF().height))
+ {
+ return true;
+ }
+ }
+ else if (editVisibleArea.y <= absCursorRect.y) // DownSide
{
if (curCursorLine < totalLine - 1)
{
FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f);
- bool keypadExist = false;
bool commandButtonExist = false;
FloatRectangle cursorRect = GetCursorBoundsF(true);
panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF();
}
__pEdit->GetKeypadBounds(keypadBounds);
- FloatDimension screenSize(0.0f, 0.0f);
- screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
- if (keypadBounds.y != screenSize.height)
- {
- keypadExist = true;
- }
// Edit Show Area
{
editShowAreaAbsRect = editAbsRect;
+ FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF();
+ editShowAreaAbsRect.x += textObjectBounds.x;
+ editShowAreaAbsRect.y += textObjectBounds.y;
+ editShowAreaAbsRect.width = textObjectBounds.width;
+ editShowAreaAbsRect.height = textObjectBounds.height;
if (commandButtonExist)
{
bool hasParentForm = false;
bool hasCommandButton = false;
Rectangle cursorRect = GetCursorBounds(true);
- int indicatorHeight = 0;
editAbsRect = __pEdit->GetAbsoluteBounds();
_EditPresenter* pEditPresenter = __pEdit->GetPresenter();
}
__pEdit->GetKeypadBounds(keypadBounds);
- if (pForm && pForm->IsIndicatorVisible())
- {
- indicatorHeight = pForm->GetIndicatorBounds().height;
- }
-
{
editShowAreaAbsRect = editAbsRect;
- if (indicatorHeight)
- {
- if (editShowAreaAbsRect.y < indicatorHeight)
- {
- editShowAreaAbsRect.y = indicatorHeight;
- }
- }
if (hasCommandButton)
{
bool hasParentForm = false;
bool hasCommandButton = false;
FloatRectangle cursorRect = GetCursorBoundsF(true);
- float indicatorHeight = 0;
editAbsRect = __pEdit->GetAbsoluteBoundsF();
_EditPresenter* pEditPresenter = __pEdit->GetPresenter();
}
__pEdit->GetKeypadBounds(keypadBounds);
- if (pForm && pForm->IsIndicatorVisible())
- {
- indicatorHeight = pForm->GetIndicatorBoundsF().height;
- }
-
{
editShowAreaAbsRect = editAbsRect;
- if (indicatorHeight)
- {
- if (editShowAreaAbsRect.y < indicatorHeight)
- {
- editShowAreaAbsRect.y = indicatorHeight;
- }
- }
if (hasCommandButton)
{
Rectangle panelAbsoulteBounds(0, 0, 0, 0);
Rectangle editAbsBounds = __pEdit->GetAbsoluteBounds();
_EditPresenter* pEditPresenter = __pEdit->GetPresenter();
+ Rectangle textObjectBounds = pEditPresenter->GetTextBounds();
+ editAbsBounds.x += textObjectBounds.x;
+ editAbsBounds.y += textObjectBounds.y;
+ editAbsBounds.width = textObjectBounds.width;
+ editAbsBounds.height = textObjectBounds.height;
_Toolbar* pCommandButton = pEditPresenter->GetKeypadCommandButton();
if (pCommandButton)
{
FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle editAbsBounds = __pEdit->GetAbsoluteBoundsF();
_EditPresenter* pEditPresenter = __pEdit->GetPresenter();
+ FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF();
+ editAbsBounds.x += textObjectBounds.x;
+ editAbsBounds.y += textObjectBounds.y;
+ editAbsBounds.width = textObjectBounds.width;
+ editAbsBounds.height = textObjectBounds.height;
_Toolbar* pCommandButton = pEditPresenter->GetKeypadCommandButton();
if (pCommandButton)
{
bool IsBounded(void) const;
void SetControlInitialBounds(Tizen::Graphics::FloatRectangle initBounds);
bool IsUpdateInitialBounds(void);
+ virtual Tizen::Graphics::Rectangle GetTextBounds(void) const;
+ virtual Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const;
protected:
void StopTitleSlidingTimer(void);
result CalculateCursorBounds(const Tizen::Graphics::Rectangle& textBounds, Tizen::Graphics::Rectangle& cursorBounds, int curPos = -1);
result CalculateCursorBounds(const Tizen::Graphics::FloatRectangle& textBounds, Tizen::Graphics::FloatRectangle& cursorBounds, int curPos = -1);
Tizen::Ui::Animations::_VisualElement* GetCursorVisualElement(void) const;
- virtual Tizen::Graphics::Rectangle GetTextBounds(void) const;
- virtual Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const;
result DrawBackground(Tizen::Graphics::Canvas& canvas, bool drawTitleText = true);
result InitializeCursor(void);
result DrawText(Tizen::Graphics::Canvas& canvas);