#include <FGrpFont.h>
#include <FGrp_BitmapImpl.h>
#include <FGrp_FontImpl.h>
+#include <FSys_SettingInfoImpl.h>
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUi_CoordinateSystemUtils.h"
using namespace Tizen::Locales;
using namespace Tizen::Graphics::_Text;
using namespace Tizen::Base::Collection;
-
+using namespace Tizen::System;
namespace Tizen { namespace Ui { namespace Controls
{
__pToolbarAccessibilityElement->Activate(false);
__pToolbarAccessibilityElement = null;
}
+
+ _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this);
}
_Edit*
__isAccessibilityCreated = true;
}
+ r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
return r;
}
return;
}
+void
+_Edit::OnSettingChanged(String& key)
+{
+ const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language";
+ if (key == LOCALE_LANGUAGE)
+ {
+ _pEditPresenter->UpdateKeypadCommandString();
+ }
+}
}}} // Tizen::Ui::Controls
}
}
+void
+_EditModel::UpdateKeypadCommandButtonText(void)
+{
+ GET_STRING_CONFIG(IDS_COM_SK_DONE, __leftCommandButtonText);
+ GET_STRING_CONFIG(IDS_COM_SK_CANCEL, __rightCommandButtonText);
+}
+
}}} // Tizen::Ui::Controls
, __isTextBlocked(false)
, __isGuideTextColorChanged(false)
, __isKeypadCommandButtonVisible(false)
+ , __isKeypadCommandButtonUserSetting(false)
, __isTextComposing(false)
, __isCopyPasteManagerExist(false)
, __isCursorChanged(false)
FooterItem footerItem;
footerItem.Construct(actionId);
footerItem.SetText(text);
+ __isKeypadCommandButtonUserSetting = true;
__pEditModel->SetCommandButtonItem(position, actionId, text);
if (__pCommandButton)
return false;
}
+void
+_EditPresenter::UpdateKeypadCommandString(void)
+{
+ if (!__isKeypadCommandButtonUserSetting)
+ {
+ __pEditModel->UpdateKeypadCommandButtonText();
+ if (__pCommandButton)
+ {
+ _Button* pLeftButton = __pCommandButton->GetItem(COMMAND_BUTTON_POSITION_LEFT);
+ if (pLeftButton)
+ {
+ pLeftButton->SetText(__pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_LEFT));
+ }
+ _Button* pRightButton = __pCommandButton->GetItem(COMMAND_BUTTON_POSITION_RIGHT);
+ if (pRightButton)
+ {
+ pRightButton->SetText(__pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_RIGHT));
+ }
+ }
+ }
+}
+
}}} // Tizen::Ui::Controls
#include <FBaseSysLog.h>
#include <FGrp_BitmapImpl.h>
+#include <FSys_SettingInfoImpl.h>
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUi_EcoreEvas.h"
using namespace Tizen::Base::Runtime;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
+using namespace Tizen::System;
namespace Tizen { namespace Ui { namespace Controls
{
__isInitialized = true;
+ r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
+ SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
return r;
CATCH:
delete __pTextEvent;
__pTextEvent = null;
}
+
+ _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this);
+
return r;
}
return;
}
+
+void
+_Keypad::OnSettingChanged(String& key)
+{
+ const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language";
+ if (key == LOCALE_LANGUAGE)
+ {
+ if (__pFooter)
+ {
+ _Button* pButton = __pFooter->GetItem(0);
+ if (pButton)
+ {
+ String doneText;
+ GET_STRING_CONFIG(IDS_COM_SK_DONE, doneText);
+ pButton->SetText(doneText);
+ }
+ }
+ }
+}
+
} } } // Tizen::Ui::Controls
#include <FGrpPoint.h>
#include <FGrpRectangle.h>
#include <FGrp_TextTextObject.h>
+#include <FSysISettingEventListener.h>
#include <FUiControl.h>
#include <FUiCtrlControlsTypes.h>
#include <FUiCtrlEditTypes.h>
, public _ITouchTapGestureEventListener
, public IClipboardPopupEventListener
, public _IEditTextFilter
+ , virtual public Tizen::System::ISettingEventListener
{
public:
DECLARE_CLASS_BEGIN(_Edit, _Control);
virtual void OnAncestorEnableStateChanged(const _Control& control);
virtual result OnDetachingFromMainTree(void);
virtual void OnVisibleStateChanged(void);
+ virtual void OnSettingChanged(Tizen::Base::String& key);
_EditPresenter* GetPresenter(void) const;
Tizen::Graphics::Dimension GetContentSizeInternal(void) const;
result SetCommandButtonItem(CommandButtonPosition buttonPosition, int actionId, const Tizen::Base::String& text);
Tizen::Base::String GetKeypadCommandButtonText(CommandButtonPosition position) const;
int GetKeypadCommandButtonActionId(CommandButtonPosition position) const;
+ void UpdateKeypadCommandButtonText(void);
private:
_EditModel(const _EditModel& value);
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);
virtual void ResetTextBounds(void){}
+ void UpdateKeypadCommandString(void);
protected:
void StopTitleSlidingTimer(void);
bool __isTextBlocked;
bool __isGuideTextColorChanged;
bool __isKeypadCommandButtonVisible;
+ bool __isKeypadCommandButtonUserSetting;
bool __isTextComposing;
bool __isCopyPasteManagerExist;
bool __isCursorChanged;
#ifndef _FUI_CTRL_INTERNAL_KEYPAD_H_
#define _FUI_CTRL_INTERNAL_KEYPAD_H_
+#include <FSysISettingEventListener.h>
#include <FUiCtrlEditTypes.h>
#include "FUi_Window.h"
#include "FUiCtrl_Button.h"
, public Tizen::Ui::_Window
, public _IActionEventListener
, public _IKeypadEventListener
+ , virtual public Tizen::System::ISettingEventListener
{
DECLARE_CLASS_BEGIN(_Keypad, _Control);
DECLARE_PROPERTY("singleLineEnabled", GetPropertySingleLineEnabled, SetPropertySingleLineEnabled);
virtual void OnChangeLayout(_ControlOrientation orientation);
virtual void OnNativeWindowActivated(void);
virtual bool IsRotationSynchronized(void) const;
+ virtual void OnSettingChanged(Tizen::Base::String& key);
private:
_Keypad(void);