result
_SearchBar::SetModeLocked(bool modeLocked)
{
- if (modeLocked == true && GetMode() == SEARCH_BAR_MODE_NORMAL)
- {
- __pEdit->SetViewModeEnabled(true);
- }
-
- if (modeLocked == false && __pEdit->IsViewModeEnabled())
- {
- __pEdit->SetViewModeEnabled(false);
- }
-
return __pSearchBarPresenter->SetModeLocked(modeLocked);
}
}
void
-_Slider::OnDrawFocus(void)
-{
- __pSliderPresenter->SetFocusMode(true);
- Invalidate();
- return;
-}
-
-bool
-_Slider::OnFocusGained(const _Control& source)
-{
- __pSliderPresenter->SetFocusMode(true);
- Invalidate();
-
- return true;
-}
-
-
-bool
-_Slider::OnFocusLost(const _Control& source)
-{
- __pSliderPresenter->SetFocusMode(false);
- Invalidate();
-
- return true;
-}
-
-void
-_Slider::OnFocusModeStateChanged()
-{
- __pSliderPresenter->SetFocusMode(false);
- Invalidate();
-}
-
-bool
-_Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
-{
-
- if(__pSliderPresenter->GetFocusMode() == false)
- {
- return false;
- }
-
- _KeyCode keyCode = keyInfo.GetKeyCode();
-
- if (keyCode == _KEY_RIGHT)
- {
- SetValue(GetValue() + 1);
- Invalidate();
- return true;
- }
-
- if (keyCode == _KEY_LEFT)
- {
- SetValue(GetValue() - 1);
- Invalidate();
- return true;
- }
-
- return false;
-}
-
-void
_Slider::OnBoundsChanged(void)
{
__pSliderPresenter->OnBoundsChanged();
, __handleX(0)
, __prevSliderValue(0)
, __isSliderPressed(false)
- , __isFocusModeStateChanged(false)
, __isNeedToBeUpdated(true)
, __isResourceLoaded(false)
, __isCustomHandle(false)
float offset = 0.0f;
float minimumHeight = 0.0f;
float minimumWidth = 0.0f;
+ float topMargin = 0.0f;
float iconRightMargin = 0.0f;
float titleHeight = 0.0f;
FloatRectangle titleTextBounds;
}
__rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height);
+ r = GET_SHAPE_CONFIG(SLIDER::BAR_TOP_MARGIN, orientation, topMargin);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
minimumHeight = minimumHeight + titleHeight;
}
- if (__rect.height < minimumHeight)
+ if (__rect.height < minimumHeight )
{
__rect.height = minimumHeight;
}
}
}
}
- else if (__isSliderPressed == true) // pressed
+ else if (__isSliderPressed == true) // pressed
{
pHandleBitmap = __pHandlePressedBitmap;
pHandleEffectBitmap = __pHandlePressedEffectBitmap;
isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_PRESSED);
}
+ else if (__pSlider->IsFocused() == true)
+ {
+ pHandleBitmap = __pHandleHighlightedBitmap;
+ pHandleEffectBitmap = __pHandleHighlightedEffectBitmap;
+ isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_HIGHLIGHTED);
+ }
else //(__isSliderPressed == false) // normal state
{
pHandleBitmap = __pHandleNormalBitmap;
DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap);
if (isCustomBarBitmap == false)
{
- DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap);
+ DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap);
}
isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_NORMAL);
DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarColorReplacementBitmap);
if (isCustomBarBitmap == false)
{
- DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarResourceEffectBitmap);
+ DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarResourceEffectBitmap);
}
__handleRect.x = __touchRect.x + __handleX;
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (isCustomHandleBitmap == false)
{
- r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
}
else
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
- if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged == true))
- {
- if (__pHandleHighlightedBitmap)
- {
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pHandleHighlightedBitmap))
- {
- r = pHandleCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap);
- }
- else
- {
- r = pHandleCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap);
- }
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- }
- }
-
r = __pSlider->UpdateHandle(__handleRect);
if (r != E_SUCCESS)
{
if (__pTitleTextObject == null)
{
__pTitleTextObject = new (std::nothrow) TextObject();
- SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pTitleTextObject->Construct();
}
r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_X, orientation, titleTextBounds.x);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_Y, orientation, topMargin);
+ r = GET_SHAPE_CONFIG(SLIDER::BAR_TOP_MARGIN, orientation, topMargin);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r));
titleTextBounds.y = topMargin;
return;
}
-void
-_SliderPresenter::SetFocusMode(bool focusmode)
-{
- __isFocusModeStateChanged = focusmode;
-}
-
-bool
-_SliderPresenter::GetFocusMode(void)
-{
- return __isFocusModeStateChanged;
-}
-
result
_SliderPresenter::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap)
{
, __pTokenBgBitmap(null)
, __pTokenBgNormalEffectBitmap(null)
, __pTokenBgPressedEffectBitmap(null)
- , __pTokenBgReplacementFocusBitmap(null)
- , __pTokenBgFocusEffectBitmap(null)
, __pressedTokenIndex(-1)
, __isEditingToken(false)
, __edittingTokenIndex(-1)
, __touchPressInfo(FloatPoint(-1.0f, -1.0f))
, __editContentFontSize(0.0f)
, __trackTokenIndex(-1)
- , __focusedTokenIndex(-1)
- , __focusedEditingTokenIndex(-1)
, __isAnimationInProgress(false)
{
}
delete __pTokenBgPressedEffectBitmap;
__pTokenBgPressedEffectBitmap = null;
- delete __pTokenBgReplacementFocusBitmap;
- __pTokenBgReplacementFocusBitmap = null;
-
- delete __pTokenBgFocusEffectBitmap;
- __pTokenBgFocusEffectBitmap = null;
-
if (__pDescriptionTextVisualElement)
{
__pDescriptionTextVisualElement->Destroy();
float tokenBottomMargin = 0.0f;
float tokenHeight = 0.0f;
_ControlOrientation orientation = __pTokenEdit->GetOrientation();
- Color focusTokenColor;
- Bitmap* pTokenBgFocusBitmap = null;
GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
- GET_COLOR_CONFIG(TOKENEDIT::BG_FOCUS, focusTokenColor);
// For drawing token in specific area
__clientRect.x = leftMargin;
r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgPressedEffectBitmap);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTokenBgFocusBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pTokenBgReplacementFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(
- *pTokenBgFocusBitmap,Color::GetColor(COLOR_ID_MAGENTA), focusTokenColor);
- SysTryCatch(NID_UI_CTRL, __pTokenBgReplacementFocusBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgFocusEffectBitmap);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- delete pTokenBgFocusBitmap;
- pTokenBgFocusBitmap = null;
-
-
__isTokenEditPresenterInitialized = true;
__previousCursorPosition = GetCursorPosition();
delete __pTokenBgNormalEffectBitmap;
__pTokenBgNormalEffectBitmap = null;
- delete __pTokenBgPressedEffectBitmap;
- __pTokenBgPressedEffectBitmap = null;
-
- delete pTokenBgFocusBitmap;
- pTokenBgFocusBitmap = null;
-
- delete __pTokenBgReplacementFocusBitmap;
- __pTokenBgReplacementFocusBitmap = null;
-
return r;
}
}
}
- if (__focusedTokenIndex == i && IsFocused() && (!__isEditingToken))
- {
- if (__pTokenBgReplacementFocusBitmap)
- {
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
- {
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
- }
- else
- {
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
- }
- }
-
- if (__pTokenBgFocusEffectBitmap)
- {
- if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
- {
- pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
- }
- else
- {
- pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
- }
- }
-
- }
-
pTokenElement->SetAnimationProvider(null);
if (pToken->isImplicitAnimation)
{
{
__pressedTokenIndex++;
}
- else if (__focusedTokenIndex >= index)
- {
- __focusedTokenIndex++;
- }
}
return r;
{
__pressedTokenIndex--;
}
-
- if (index == __focusedTokenIndex)
- {
- __focusedTokenIndex = -1;
- }
- else if(index >= 0 && index < __focusedTokenIndex)
- {
- __focusedTokenIndex--;
- }
}
else if (index == __pressedTokenIndex)
{
SetCursorDisabled(false);
StartCursorTimer();
}
- else if (index == __focusedTokenIndex)
- {
- __focusedTokenIndex = -1;
- }
return r;
}
if ((__isEditingToken == true) && (__pressedTokenIndex != -1))
{
- r = AttachCursorToPressedToken();
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+ _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
+ SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
+
+ _VisualElement* pCursorVisualElement = GetCursorVisualElement();
+ SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
+
+ _Token* pToken = null;
+ _VisualElement* pTokenVisualElement = null;
+
+ pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+
+ bool isParentChanged = false;
+ if (pToken)
+ {
+ pTokenVisualElement = pToken->GetVisualElement();
+ SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
+
+ if (pCursorVisualElement->GetParent() != pTokenVisualElement)
+ {
+ isParentChanged = true;
+ result r = E_SUCCESS;
+ r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+ r = pTokenVisualElement->AttachChild(*pCursorVisualElement);
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+ }
+ }
}
if (__isEditingToken == false)
_TokenEditPresenter::OnFocusLost(void)
{
result r = E_SUCCESS;
- __isFocus = false;
//Remove pressed state on focus lost
__pressedTokenIndex = -1;
- __focusedTokenIndex = -1;
- __focusedEditingTokenIndex = -1;
+
+ __isFocus = false;
_EditPresenter::StopTitleSlidingTimer();
__isTitleSliding = false;
bool
_TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- //Remove token focus on touch press
- __focusedTokenIndex = -1;
- __focusedEditingTokenIndex = -1;
int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
__trackTokenIndex = tokenIndex;
__edittingTokenIndex = -1;
__isEditingToken = false;
- if ((__focusedTokenIndex == -1) && (__focusedEditingTokenIndex != -1)
- && (inputTokenString.GetLength() > 0))
- {
- //1. Tokenedit is focussed
- //2. The valid Editing token is focussed
- __focusedTokenIndex = __focusedEditingTokenIndex;
- ScrollToFocussedToken();
- }
- else
- {
- CheckTokenScrolling();
- }
+ CheckTokenScrolling();
SetCursorDisabled(false);
if (inputTokenString.GetLength() <= 0)
{
MakeToken();
}
- else if ((__focusedEditingTokenIndex == -1) && (__focusedTokenIndex != -1) && (!__isEditingToken))
- {
- if (__isEditModeEnabled)
- {
- __edittingTokenIndex = __focusedTokenIndex;
- __pressedTokenIndex = __edittingTokenIndex;
- __isEditingToken = true;
- __focusedEditingTokenIndex = __focusedTokenIndex;
- __focusedTokenIndex = -1;
- __isTokenEditingFinished = false;
-
- SetEditingTokenTextBounds(__edittingTokenIndex);
-
- r = AttachCursorToPressedToken();
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- }
- }
- else
- {
- //Focussed token is ready to be edited again.
- __focusedEditingTokenIndex = -1;
- }
for (int i = 0; i < __pTokenList->GetCount(); i++)
{
InitializeTokenVisibilityAt(i);
}
- if ((__pressedTokenIndex < 0) || (__focusedEditingTokenIndex > -1))
+ if (__pressedTokenIndex < 0)
{
SetCursorDisabled(true);
__pTokenEdit->Draw();
__pTokenEdit->Invalidate();
return;
}
- else if (__focusedTokenIndex >= 0 && __edittingTokenIndex < 0 && !__isEditingToken)
- {
- RemoveTokenAt(__focusedTokenIndex);
- __pTokenEdit->Invalidate();
- return;
- }
-
//Backspace on Blocked text, delete full block
if (IsBlocked() == true)
return;
}
-result
-_TokenEditPresenter::AttachCursorToPressedToken(void)
-{
- result r = E_SUCCESS;
-
- _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
-
- _VisualElement* pCursorVisualElement = GetCursorVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
-
- _Token* pToken = null;
- _VisualElement* pTokenVisualElement = null;
-
- pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
- if (pToken)
- {
- pTokenVisualElement = pToken->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
-
- if (pCursorVisualElement->GetParent() != pTokenVisualElement)
- {
- r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
-
- r = pTokenVisualElement->AttachChild(*pCursorVisualElement);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- }
- }
-
- return r;
-}
-
bool
_TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
_KeyCode keyCode = keyInfo.GetKeyCode();
- bool focusChanged = false;
- int tokenCount = GetTokenCount();
if (IsUsbKeyboardConnected() && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL))
{
}
}
- if ((keyCode == _KEY_NUM_LEFT) || (keyCode == _KEY_LEFT))
- {
- if (!__isEditingToken)
- {
- if ((__focusedTokenIndex > 0) && (__focusedTokenIndex < tokenCount))
- {
- __focusedTokenIndex--;
- focusChanged = true;
- }
- }
- }
-
- if ((keyCode == _KEY_NUM_RIGHT) || (keyCode == _KEY_RIGHT))
- {
- int lastTokenIndex = tokenCount - 1;
- if (!__isEditingToken)
- {
- if (__pressedTokenIndex != -1)
- {
- __pressedTokenIndex = -1;
- __focusedTokenIndex = 0;
- focusChanged = true;
- }
- else if (__focusedTokenIndex < lastTokenIndex)
- {
- __focusedTokenIndex++;
- focusChanged = true;
- }
- }
- }
-
- if (focusChanged)
- {
- ScrollToFocussedToken();
- }
-
return _EditPresenter::OnKeyPressed(source, keyInfo);
}
-
-result
-_TokenEditPresenter::ScrollToFocussedToken(void)
-{
- result r = E_SUCCESS;
- int tokenCount = GetTokenCount();
- FloatRectangle focussedTokenRectangle;
- float newScrollValue = 0.0f;
- float tokenTopMargin = 0.0f;
- float tokenBottomMargin = 0.0f;
- _ControlOrientation orientation = __pTokenEdit->GetOrientation();
-
-
- GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
- GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
-
- FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF();
-
- if ((__focusedTokenIndex > -1) && (__focusedTokenIndex < tokenCount))
- {
- _Token* pToken = null;
- pToken = static_cast <_Token*>(__pTokenList->GetAt(__focusedTokenIndex));
-
- focussedTokenRectangle = pToken->displayRect;
-
- float focussedTokenPosition= focussedTokenRectangle.y + focussedTokenRectangle.height ;
-
- if ((focussedTokenRectangle.y > 0) && (focussedTokenPosition < tokenEditRect.height))
- {
- //Focused token is within the tokenEdit boundary
- DrawToken();
- }
- else
- {
- if (focussedTokenRectangle.y < 0)
- {
- //Focused token is above the upper boundary
- newScrollValue = focussedTokenRectangle.y - tokenTopMargin - __scrollValue;
- }
- else
- {
- //Focused token is below the lower boundary
- newScrollValue = focussedTokenPosition - tokenEditRect.height + tokenBottomMargin - __scrollValue;
- }
-
- r = RecalculateTokenBounds(newScrollValue);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
- }
- }
-
- return r;
-}
-
}}} //Tizen::Ui::Controls
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
- virtual void OnDrawFocus(void);
- virtual bool OnFocusGained(const _Control& source);
- virtual bool OnFocusLost(const _Control &source);
- virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
virtual void OnBoundsChanged(void);
virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
virtual void OnDraw(void);
virtual result OnAttachedToMainTree(void);
- virtual void OnFocusModeStateChanged(void);
virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
virtual void OnFontInfoRequested(unsigned long& style, float& size);
static _SliderPresenter* CreateInstanceN(const _Slider& slider);
result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap);
void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color);
- void SetFocusMode(bool focusmode);
- bool GetFocusMode(void);
+
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
private:
int __handleX;
int __prevSliderValue;
bool __isSliderPressed;
- bool __isFocusModeStateChanged;
bool __isNeedToBeUpdated;
bool __isResourceLoaded;
virtual result ChangeLayout(_ControlOrientation orientation);
virtual void ResetTextBounds(void);
virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
- result ScrollToFocussedToken(void);
- result AttachCursorToPressedToken(void);
+
private:
bool DrawToken(int count = -1);
Tizen::Graphics::Color GetTokenEditColor(const ExpandableEditAreaTokenStatus status) const;
Tizen::Graphics::Bitmap* __pTokenBgBitmap;
Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap;
Tizen::Graphics::Bitmap* __pTokenBgPressedEffectBitmap;
- Tizen::Graphics::Bitmap* __pTokenBgReplacementFocusBitmap;
- Tizen::Graphics::Bitmap* __pTokenBgFocusEffectBitmap;
int __pressedTokenIndex;
int __trackTokenIndex;
- int __focusedTokenIndex;
-
- int __focusedEditingTokenIndex;
-
bool __isAnimationInProgress;
static const int ANIMATION_DURATION_BOUNDS = 167;
DECLARE_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 6);
DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 7);
DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 8);
- DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 9);
+ DECLARE_SHAPE_CONFIG(BAR_TOP_MARGIN, 9);
DECLARE_SHAPE_CONFIG(BAR_OFFSET, 10);
DECLARE_SHAPE_CONFIG(ICON_WIDTH, 11);
DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 12);
DECLARE_COLOR_CONFIG(BG_SELECTED, 2);
DECLARE_COLOR_CONFIG(TEXT_NORMAL, 3);
DECLARE_COLOR_CONFIG(TEXT_SELECTED, 4);
- DECLARE_COLOR_CONFIG(BG_FOCUS, 5);
DECLARE_IMAGE_CONFIG(BG_NORMAL, 1);
DECLARE_IMAGE_CONFIG(BG_NORMAL_EFFECT, 2);
DECLARE_IMAGE_CONFIG(BG_PRESSED_EFFECT, 3);
- DECLARE_IMAGE_CONFIG(BG_FOCUS, 4);
- DECLARE_IMAGE_CONFIG(BG_FOCUS_EFFECT, 5);
DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 1);
DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 2);
DECLARE_SHAPE_CONFIG(TOP_MARGIN, 3);
ADD_COLOR_CONFIG(HANDLE_BG_NORMAL, $W0641);
ADD_COLOR_CONFIG(HANDLE_BG_PRESSED, $W0641P);
ADD_COLOR_CONFIG(HANDLE_BG_DISABLED, $W0641D);
- ADD_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, $W161);
+ ADD_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, $W0641);
ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_DISABLED, $W0611D);
ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_NORMAL, $W0611);
ADD_IMAGE_CONFIG(HANDLE_BG_NORMAL, #00_slider_handle.png);
ADD_IMAGE_CONFIG(HANDLE_BG_PRESSED, #00_slider_handle.png);
ADD_IMAGE_CONFIG(HANDLE_BG_DISABLED, #00_slider_handle.png);
- ADD_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, #00_slider_handle_focus.png);
+ ADD_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, #00_slider_handle.png);
ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_NORMAL, #00_slider_handle_ef.png);
ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_PRESSED, #00_slider_handle_ef_press.png);
ADD_SHAPE_CONFIG(BAR_HEIGHT, 36);
ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN_WITH_ICON, 26);
ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 36);
+ ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 16);
ADD_SHAPE_CONFIG(BAR_OFFSET, 9);
ADD_SHAPE_CONFIG(ICON_WIDTH, 72);
ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16);
ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 12);
- ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 16);
ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 32);
ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 49);
ADD_COLOR_CONFIG(BG_SELECTED, $W0713);
ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L10);
ADD_COLOR_CONFIG(TEXT_SELECTED, $F011L10);
- ADD_COLOR_CONFIG(BG_FOCUS, $W0715);
ADD_IMAGE_CONFIG(BG_NORMAL, #00_contacts_button_bg.#.png);
ADD_IMAGE_CONFIG(BG_NORMAL_EFFECT, #00_contacts_button_bg_ef.#.png);
ADD_IMAGE_CONFIG(BG_PRESSED_EFFECT, #00_contacts_button_bg_press_ef.#.png);
- ADD_IMAGE_CONFIG(BG_FOCUS, #00_contacts_button_focus.#.png);
- ADD_IMAGE_CONFIG(BG_FOCUS_EFFECT, #00_contacts_button_focus_ef.#.png);
START_UI_CONFIG_MODE(720x1280);
{