2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrl_Slider.cpp
20 * @brief This is the implementation file for the _Slider class.
23 #include <FBaseSysLog.h>
24 #include <FBaseErrorDefine.h>
25 #include <FGrp_BitmapImpl.h>
26 #include "FUi_ResourceManager.h"
27 #include "FUi_AccessibilityContainer.h"
28 #include "FUi_AccessibilityElement.h"
29 #include "FUiAnim_VisualElement.h"
30 #include "FUiCtrl_Slider.h"
31 #include "FUiCtrl_SliderPresenter.h"
32 #include "FUiCtrl_IAdjustmentEventListener.h"
33 #include "FUiCtrl_ISliderEventListener.h"
35 using namespace Tizen::Ui;
36 using namespace Tizen::Base;
37 using namespace Tizen::Graphics;
38 using namespace Tizen::Ui::Animations;
40 namespace Tizen { namespace Ui { namespace Controls
42 IMPLEMENT_PROPERTY(_Slider);
44 _Slider::_Slider(void)
45 : __pSliderPresenter(null)
46 , __pAdjustmentEvent(null)
47 , __pSliderEvent(null)
50 , __pRightBitmap(null)
55 , __sliderStyle(_SLIDER_STYLE_OVERLAY)
58 , __pAccessibilityElement(null)
60 __pBase = GetVisualElement();
64 __pBase->SetSurfaceOpaque(false);
65 __pBase->SetClipChildrenEnabled(false);
68 _AccessibilityContainer* pContainer = GetAccessibilityContainer();
71 pContainer->Activate(true);
75 _Slider::~_Slider(void)
77 if (__pAdjustmentEvent != null)
79 delete __pAdjustmentEvent;
80 __pAdjustmentEvent = null;
83 if (__pSliderEvent != null)
85 delete __pSliderEvent;
86 __pSliderEvent = null;
92 delete __pRightBitmap;
93 __pRightBitmap = null;
95 delete __pSliderPresenter;
96 __pSliderPresenter = null;
98 if (__pAccessibilityElement)
100 __pAccessibilityElement->Activate(false);
101 __pAccessibilityElement = null;
104 if (__pBase != null && __pHandle != null)
106 __pBase->DetachChild(*__pHandle);
107 __pHandle->Destroy();
115 _Slider::CreateSliderN(void)
117 result r = E_SUCCESS;
119 _Slider* pSlider = new (std::nothrow) _Slider;
120 SysTryReturn(NID_UI_CTRL, pSlider, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
122 pSlider->__pSliderPresenter = _SliderPresenter::CreateInstanceN(*pSlider);
124 SysTryCatch(NID_UI_CTRL, pSlider->__pSliderPresenter != null, , r, "[%s] Propagating.", GetErrorMessage(r));
126 r = pSlider->Initialize();
127 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
129 pSlider->AcquireHandle();
141 _Slider::Initialize(void)
143 result r = E_SUCCESS;
145 FloatRectangle handleRect(0.0f, 0.0f, 0.0f, 0.0f);
146 _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
148 r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __bgColor);
149 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
151 r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __barColor);
152 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
154 r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __barBgColor);
155 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
157 r = GET_COLOR_CONFIG(SLIDER::TITLE_TEXT_NORMAL, __titleTextColor);
158 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
160 r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, handleRect.width);
161 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
163 r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, handleRect.height);
164 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
166 __pHandle = new (std::nothrow) Tizen::Ui::Animations::_VisualElement;
167 SysTryReturn(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
169 r = __pHandle->Construct();
170 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
172 __pHandle->SetBounds(FloatRectangle(handleRect.x, handleRect.y, handleRect.width, handleRect.height));
174 __pHandle->SetShowState(true);
176 __pBase->SetClipChildrenEnabled(true);
177 __pHandle->SetClipToParent(true);
180 r = __pHandle->SetSurfaceOpaque(false);
181 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
183 __pHandle->SetImplicitAnimationEnabled(false);
185 r = __pBase->AttachChild(*__pHandle);
186 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
188 __pAdjustmentEvent = _AdjustmentEvent::CreateInstanceN(*this);
190 SysTryReturn(NID_UI_CTRL, __pAdjustmentEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
192 __pSliderEvent = _SliderEvent::CreateInstanceN(*this);
194 SysTryReturn(NID_UI_CTRL, __pSliderEvent, r, r, "[%s] Propagating.", GetErrorMessage(r));
196 InitializeAccessibilityElement();
202 _Slider::InitializeAccessibilityElement(void)
204 result r = E_SUCCESS;
206 if (__pAccessibilityElement)
211 _AccessibilityContainer* pContainer = GetAccessibilityContainer();
214 __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
215 SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
216 "[E_OUT_OF_MEMORY] Memory allocation failed.");
217 __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
218 __pAccessibilityElement->SetLabel(__titleText);
219 __pAccessibilityElement->SetName(L"SliderControl");
220 __pAccessibilityElement->SetTrait(L"Slider");
221 __pAccessibilityElement->SetHint(L"flick up and down to adjust");
222 SetAccessibilityElementValue();
223 r = pContainer->AddElement(*__pAccessibilityElement);
224 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
225 pContainer->AddListener(*this);
232 _Slider::OnDraw(void)
234 __pSliderPresenter->Draw();
239 _Slider::OnAttachedToMainTree(void)
241 return _Control::OnAttachedToMainTree();
245 _Slider::SetStyle(int style)
247 __sliderStyle = style;
252 _Slider::GetStyle(void) const
254 return __sliderStyle;
258 _Slider::GetHandleCanvasN(void) const
260 return __pHandle->GetCanvasN();
264 _Slider::GetHandle(void) const
270 _Slider::SetGroupStyle(GroupStyle groupStyle)
272 __pSliderPresenter->SetGroupStyle(groupStyle);
277 _Slider::UpdateHandle(const FloatRectangle& handleRect)
279 __pHandle->SetBounds(handleRect);
281 return __pHandle->SetFlushNeeded();
285 _Slider::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
287 return __pSliderPresenter->OnTouchPressed(source, touchinfo);
291 _Slider::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
293 return __pSliderPresenter->OnTouchReleased(source, touchinfo);
297 _Slider::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
299 return __pSliderPresenter->OnTouchMoved(source, touchinfo);
303 _Slider::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
305 return __pSliderPresenter->OnTouchCanceled(source, touchinfo);
309 _Slider::OnDrawFocus(void)
311 __pSliderPresenter->SetFocusMode(true);
318 _Slider::OnFocusGained(const _Control& source)
320 __pSliderPresenter->SetFocusMode(true);
327 _Slider::OnFocusLost(const _Control& source)
329 __pSliderPresenter->SetFocusMode(false);
336 _Slider::OnFocusModeStateChanged()
338 __pSliderPresenter->SetFocusMode(false);
343 _Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
345 if(__pSliderPresenter->GetFocusMode() == false)
350 _KeyCode keyCode = keyInfo.GetKeyCode();
352 if (keyCode == _KEY_RIGHT)
354 SetValue(GetValue() + 1);
359 if (keyCode == _KEY_LEFT)
361 SetValue(GetValue() - 1);
370 _Slider::OnBoundsChanged(void)
372 __pSliderPresenter->OnBoundsChanged();
374 if (__pAccessibilityElement)
376 __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
383 _Slider::OnChangeLayout(_ControlOrientation orientation)
385 __pSliderPresenter->OnChangeLayout(orientation);
390 _Slider::SetRange(int minValue, int maxValue)
392 result r = E_SUCCESS;
394 SysTryReturn(NID_UI_CTRL, (minValue >= _SLIDER_MINIMUM_VALUE && maxValue >= _SLIDER_MINIMUM_VALUE),
395 E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The minimum value %d is out of range [-99 to 999].", minValue);
396 SysTryReturn(NID_UI_CTRL, (minValue <= _SLIDER_MAXIMUM_VALUE && maxValue <= _SLIDER_MAXIMUM_VALUE),
397 E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The maximum value %d is out of range [-99 to 999].", maxValue);
398 SysTryReturn(NID_UI_CTRL, (minValue < maxValue), E_INVALID_ARG, E_INVALID_ARG,
399 "[E_INVALID_ARG] The minimum value is greater than maximum value.");
401 Variant oldMinValue = GetProperty("minValue");
402 Variant value = GetProperty("value");
404 r = SetProperty("minValue", Variant(minValue));
405 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set minimum value.", GetErrorMessage(r));
407 r = SetProperty("maxValue", Variant(maxValue));
410 SysLogException(NID_UI_CTRL, r, "[%s] Failed to set maximum value.", GetErrorMessage(r));
412 result nestedResult = SetPropertyMinValue(oldMinValue);
413 if (nestedResult != E_SUCCESS)
415 SysLog(NID_UI_CTRL, "Failed to recover original minimum value");
419 nestedResult = SetPropertyValue(value);
420 if (nestedResult != E_SUCCESS)
422 SysLog(NID_UI_CTRL, "Failed to recover original value");
426 SetAccessibilityElementValue();
432 _Slider::SetPropertyMinValue(const Variant& minValue)
434 result r = E_SUCCESS;
436 int tempMinValue = minValue.ToInt();
438 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
440 __pSliderPresenter->SetMinValue(tempMinValue);
446 _Slider::SetPropertyMaxValue(const Variant& maxValue)
448 result r = E_SUCCESS;
450 int tempMaxValue = maxValue.ToInt();
452 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
454 __pSliderPresenter->SetMaxValue(tempMaxValue);
460 _Slider::GetRange(int& minValue, int& maxValue) const
462 result r = E_SUCCESS;
464 Variant minimum = GetProperty("minValue");
466 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
468 Variant maximum = GetProperty("maxValue");
470 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
472 minValue = minimum.ToInt();
473 maxValue = maximum.ToInt();
479 _Slider::GetPropertyMinValue(void) const
481 return Variant(__pSliderPresenter->GetMinValue());
485 _Slider::GetPropertyMaxValue(void) const
487 return Variant(__pSliderPresenter->GetMaxValue());
491 _Slider::SetValue(int value)
493 return SetProperty("value", Variant(value));
497 _Slider::SetPropertyValue(const Variant& value)
499 result r = E_SUCCESS;
501 int tempValue = value.ToInt();
503 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
505 __pSliderPresenter->SetValue(tempValue);
507 SetAccessibilityElementValue();
513 _Slider::SetAccessibilityElementValue()
515 if (__pAccessibilityElement)
518 string.Append(__pSliderPresenter->GetValue());
519 string.Append(L" of ");
520 string.Append(__pSliderPresenter->GetMaxValue());
521 __pAccessibilityElement->SetValue(string);
527 _Slider::GetValue(void) const
529 result r = E_SUCCESS;
531 Variant value = GetProperty("value");
533 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
535 return value.ToInt();
539 _Slider::GetPropertyValue(void) const
541 return Variant(__pSliderPresenter->GetValue());
545 _Slider::SetIcon(IconPosition position, const Bitmap& icon)
547 result r = E_SUCCESS;
549 float iconWidth = 0.0f;
550 float iconHeight = 0.0f;
551 _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
552 Bitmap* pNewBitmap = null;
554 r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth);
555 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
557 r = GET_SHAPE_CONFIG(SLIDER::ICON_HEIGHT, orientation, iconHeight);
558 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
560 if (position == ICON_POSITION_LEFT)
562 pNewBitmap = _BitmapImpl::CloneN(icon);
565 SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
567 r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight));
568 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
570 delete __pLeftBitmap;
571 __pLeftBitmap = pNewBitmap;
574 else //(position == ICON_POSITION_RIGHT)
576 pNewBitmap = _BitmapImpl::CloneN(icon);
579 SysTryReturn(NID_UI_CTRL, pNewBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
581 r = pNewBitmap->Scale(Dimension(iconWidth, iconHeight));
582 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
584 delete __pRightBitmap;
585 __pRightBitmap = pNewBitmap;
589 __pSliderPresenter->SetNeedUpdate();
600 _Slider::GetIcon(IconPosition position) const
602 if (position == ICON_POSITION_LEFT)
604 return __pLeftBitmap;
606 else //(position == ICON_POSITION_RIGHT)
608 return __pRightBitmap;
613 _Slider::SetTitleText(const String& title)
615 return SetProperty("titleText", Variant(title));
619 _Slider::SetPropertyTitleText(const Variant& titleText)
621 result r = E_SUCCESS;
622 String title = titleText.ToString();
624 if (!(GetStyle() & _SLIDER_STYLE_TITLE_TEXT))
626 SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The current Slider style does not support title text.");
631 __pSliderPresenter->SetNeedUpdate();
633 r = InitializeAccessibilityElement();
634 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
636 if (__pAccessibilityElement != null)
638 __pAccessibilityElement->SetLabel(__titleText);
645 _Slider::GetTitleText(void) const
647 result r = E_SUCCESS;
649 Variant titleText = GetProperty("titleText");
651 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, String(), r, "[%s] Propagating.", GetErrorMessage(r));
653 return titleText.ToString();
657 _Slider::GetPropertyTitleText(void) const
659 return Variant(__titleText);
663 _Slider::SetTitleTextColor(const Color& color)
665 return SetProperty("titleTextColor", Variant(color));
669 _Slider::SetPropertyTitleTextColor(const Variant& titleTextColor)
671 result r = E_SUCCESS;
673 Color tempColor = titleTextColor.ToColor();
675 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
677 __titleTextColor = tempColor;
678 __pSliderPresenter->SetNeedUpdate();
684 _Slider::GetTitleTextColor(void) const
686 result r = E_SUCCESS;
688 Variant titleTexColor = GetProperty("titleTextColor");
690 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r));
692 return titleTexColor.ToColor();
696 _Slider::GetPropertyTitleTextColor(void) const
698 return Variant(__titleTextColor);
702 _Slider::AddAdjustmentEventListener(const _IAdjustmentEventListener& listener)
704 return __pAdjustmentEvent->AddListener(listener);
708 _Slider::RemoveAdjustmentEventListener(const _IAdjustmentEventListener& listener)
710 return __pAdjustmentEvent->RemoveListener(listener);
714 _Slider::AddSliderEventListener(const _ISliderEventListener& listener)
716 return __pSliderEvent->AddListener(listener);
720 _Slider::RemoveSliderEventListener(const _ISliderEventListener& listener)
722 return __pSliderEvent->RemoveListener(listener);
726 _Slider::SetBarColor(const Color& color)
728 return SetProperty("barColor", Variant(color));
732 _Slider::SetPropertyBarColor(const Variant& barColor)
734 result r = E_SUCCESS;
736 Color tempBarColor = barColor.ToColor();
738 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
740 __barColor = tempBarColor;
741 __barColor.SetAlpha(0xFF);
743 __pSliderPresenter->SetNeedUpdate();
749 _Slider::GetBarColor(void) const
751 result r = E_SUCCESS;
753 Variant barColor = GetProperty("barColor");
755 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r));
757 return barColor.ToColor();
761 _Slider::GetPropertyBarColor(void) const
763 return Variant(__barColor);
767 _Slider::SetBarBackgroundColor(const Color& color)
769 return SetProperty("barBackgroundColor", Variant(color));
773 _Slider::SetPropertyBarBackgroundColor(const Variant& barBackgroundColor)
775 result r = E_SUCCESS;
777 Color tempBarBackgroundColor = barBackgroundColor.ToColor();
779 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
781 __barBgColor = tempBarBackgroundColor;
782 __barBgColor.SetAlpha(0xFF);
784 __pSliderPresenter->SetNeedUpdate();
790 _Slider::GetBarBackgroundColor(void) const
792 result r = E_SUCCESS;
794 Variant barBgColor = GetProperty("barBackgroundColor");
796 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r));
798 return barBgColor.ToColor();
802 _Slider::GetPropertyBarBackgroundColor(void) const
804 return Variant(__barBgColor);
808 _Slider::SetColor(const Color& color)
810 return SetProperty("color", Variant(color));
814 _Slider::SetPropertyColor(const Variant& color)
816 if (__sliderStyle & _SLIDER_STYLE_NO_BG)
818 SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current Slider style does not support background color.");
819 return E_INVALID_OPERATION;
822 result r = E_SUCCESS;
824 Color tempBgColor = color.ToColor();
825 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
827 __bgColor = tempBgColor;
829 __pSliderPresenter->SetNeedUpdate();
835 _Slider::GetColor(void) const
837 result r = E_SUCCESS;
839 Variant color = GetProperty("color");
841 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r));
843 return color.ToColor();
847 _Slider::GetPropertyColor(void) const
849 if (__sliderStyle & _SLIDER_STYLE_NO_BG)
851 SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current Slider style does not support background color.");
852 return Variant(Color());
856 return Variant(__bgColor);
860 Tizen::Base::Runtime::_Event*
861 _Slider::GetAdjustmentEvent(void) const
863 return __pAdjustmentEvent;
867 _Slider::GetSliderEvent(void) const
869 return __pSliderEvent;
873 _Slider::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap)
875 return __pSliderPresenter->SetThumbBitmap(status, bitmap);
879 _Slider::SetThumbTextColor(SliderThumbStatus status, const Color& color)
881 __pSliderPresenter->SetThumbTextColor(status, color);
886 _Slider::OnFontChanged(Font* pFont)
888 __pSliderPresenter->OnFontChanged(pFont);
893 _Slider::OnFontInfoRequested(unsigned long& style, float& size)
895 __pSliderPresenter->OnFontInfoRequested(style, size);
900 _Slider::OnAncestorEnableStateChanged(const _Control& control)
902 __pSliderPresenter->OnAncestorEnableStateChanged(control);
908 _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
910 SetValue(GetValue() + 1);
912 string.Append(__pSliderPresenter->GetValue());
913 string.Append(L" of ");
914 string.Append(__pSliderPresenter->GetMaxValue());
915 _AccessibilityManager::GetInstance()->ReadContent(string);
922 _Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
924 SetValue(GetValue() - 1);
927 string.Append(__pSliderPresenter->GetValue());
928 string.Append(L" of ");
929 string.Append(__pSliderPresenter->GetMaxValue());
930 _AccessibilityManager::GetInstance()->ReadContent(string);
936 }}} // Tizen::Ui::Controls