, __inputPanelStyle(INPUT_PANEL_STYLE_NORMAL)
, __pUSBEventHandler(null)
, __IsKeyEventSkipped(false)
+ , __passwordMode(false)
{
}
{
case INPUT_PANEL_STYLE_NORMAL:
ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
+ if (__passwordMode == true)
+ {
+ ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
+ }
break;
case INPUT_PANEL_STYLE_NUMBER:
ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
}
result
+_InputConnectionImpl::SetPasswordMode(bool enable)
+{
+ result r = E_SUCCESS;
+
+ SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use.");
+
+ __passwordMode = true;
+ ecore_imf_context_input_panel_layout_set(__pContext, ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD);
+
+ return r;
+}
+
+bool
+_InputConnectionImpl::IsPasswordMode(void) const
+{
+ return __passwordMode;
+}
+
+result
_InputConnectionImpl::SetInputPanelLanguage(LanguageCode languageCode)
{
result r = E_SUCCESS;
bool IsTextPredictionEnabled(void) const;
result SetCapsLockEnabled(bool enable);
bool IsCapsLockEnabled(void) const;
+ result SetPasswordMode(bool enable);
+ bool IsPasswordMode(void) const;
result SetInputPanelLanguage(Tizen::Locales::LanguageCode languageCode);
Tizen::Locales::LanguageCode GetInputPanelLanguage(void) const;
InputPanelStyle __inputPanelStyle;
Ecore_Event_Handler* __pUSBEventHandler;
bool __IsKeyEventSkipped;
+ bool __passwordMode;
}; // _InputConnectionImpl
result
_Edit::SetPropertyKeypadStyle(const Variant& style)
{
- SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != (KeypadStyle)style.ToInt()), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.");
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
+ {
+ SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != (KeypadStyle)style.ToInt()), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.");
+ }
return _pEditPresenter->SetKeypadStyle((KeypadStyle)style.ToInt());
}
keypadStyle = KEYPAD_STYLE_IP_V4;
break;
+ case EDIT_FIELD_STYLE_PASSWORD :
+ keypadStyle = KEYPAD_STYLE_PASSWORD;
+ break;
+
default:
break;
}
ScrollPanelToCursorPosition();
DrawText();
+ if (__composingTextLength > 0)
+ {
+ ChangePasswordToEchoCharacter((GetCursorPosition() - __composingTextLength), __composingTextLength);
+ }
__pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
break;
case KEYPAD_STYLE_PASSWORD:
inputPanelStyle = INPUT_PANEL_STYLE_NORMAL;
+ if (__pInputConnection)
+ {
+ __pInputConnection->SetPasswordMode(true);
+ }
break;
case KEYPAD_STYLE_EMAIL:
inputPanelStyle = INPUT_PANEL_STYLE_EMAIL;
}
ReplaceTextIntoPasswordHyphenString();
+ if (__composingTextLength > 0)
+ {
+ _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont);
+ SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "[E_SYSTEM] fontImpl is null.");
+ fontImpl->SetUnderline(false);
+ int composingStartPosition = GetCursorPosition()-__composingTextLength;
+ __pTextObject->SetFont(__pFont, composingStartPosition, composingStartPosition+__composingTextLength);
+ }
+
+ __isCursorChanged = true;
__pEdit->Invalidate();