#include <FBaseErrorDefine.h>
#include <FGrp_BitmapImpl.h>
#include "FUi_ResourceManager.h"
-#include "FUi_TouchManager.h"
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
#include "FUiAnim_VisualElement.h"
}
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- if (pContainer)
+ if (pContainer != null)
{
pContainer->Activate(true);
}
_Slider::~_Slider(void)
{
- if (__pAdjustmentEvent != null)
- {
- delete __pAdjustmentEvent;
- __pAdjustmentEvent = null;
- }
+ delete __pAdjustmentEvent;
+ __pAdjustmentEvent = null;
- if (__pSliderEvent != null)
- {
- delete __pSliderEvent;
- __pSliderEvent = null;
- }
+ delete __pSliderEvent;
+ __pSliderEvent = null;
delete __pLeftBitmap;
__pLeftBitmap = null;
delete __pSliderPresenter;
__pSliderPresenter = null;
- if (__pAccessibilityElement)
+ if (__pAccessibilityElement != null)
{
__pAccessibilityElement->Activate(false);
__pAccessibilityElement = null;
{
result r = E_SUCCESS;
- if (__pAccessibilityElement)
+ if (__pAccessibilityElement != null)
{
return r;
}
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- if (pContainer)
+ if (pContainer != null)
{
__pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
{
__pSliderPresenter->SetFocusMode(false);
- if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed == true))
+ if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed))
{
_SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay();
pSliderOverlay->SetVisibleState(false);
pSliderOverlay->Close();
}
+ if (__isKeyPressed)
+ {
+ FireAdjustmentValueEvent(GetValue());
+ }
+
__isKeyPressed = false;
Invalidate();
_Slider::OnFocusModeStateChanged()
{
__pSliderPresenter->SetFocusMode(false);
+
+ if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed )
+ {
+ _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay();
+ pSliderOverlay->SetVisibleState(false);
+ pSliderOverlay->Close();
+ }
+
+ if (__isKeyPressed)
+ {
+ FireAdjustmentValueEvent(GetValue());
+ }
+
+ __isKeyPressed = false;
+
Invalidate();
}
{
__pSliderPresenter->OnBoundsChanged();
- if (__pAccessibilityElement)
+ if (__pAccessibilityElement != null)
{
__pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height));
}
void
_Slider::SetAccessibilityElementValue()
{
- if (__pAccessibilityElement)
+ if (__pAccessibilityElement != null)
{
- String string;
- GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
- char buffer[10] = {0,};
- sprintf(buffer, "%d", GetValue());
- string.Replace(L"%1$d", buffer);
- memset(buffer, 0, 10);
- sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
- string.Replace(L"%2$d", buffer);
- __pAccessibilityElement->SetValue(string);
+ String string;
+ GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
+ char buffer[10] = {0,};
+ sprintf(buffer, "%d", GetValue());
+ string.Replace(L"%1$d", buffer);
+ memset(buffer, 0, 10);
+ sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+ string.Replace(L"%2$d", buffer);
+ __pAccessibilityElement->SetValue(string);
}
return;
void
_Slider::OnAncestorVisibleStateChanged(const _Control& control)
{
- _TouchManager* pTouchMgr = _TouchManager::GetInstance();
- if (pTouchMgr && (IsVisible() == false))
- {
- pTouchMgr->SetTouchCanceled(null);
- }
+ __pSliderPresenter->OnAncestorVisibleStateChanged(control);
return;
}
bool
_Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
- if (GetEnableState() == false)
+ if (!GetEnableState())
{
return true;
}
bool
_Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
- if (GetEnableState() == false)
+ if (!GetEnableState())
{
return true;
}