__updateContents = true;
}
void
-_AccessibilityElement::SetTrait(AccessibilityTraits trait)
-{
- __trait = trait;
- __traitString = (_traitString[__trait]);
- __updateContents = true;
-}
-void
_AccessibilityElement::SetTrait(const Tizen::Base::String& trait)
{
__traitString = trait;
{
return __status;
}
-AccessibilityTraits
-_AccessibilityElement::GetTrait(void) const
-{
- return __trait;
-}
String
_AccessibilityElement::GetTraitString(void) const
{
return __pCore->SetStatus(status);
}
void
-_AccessibilityElementImpl::SetTrait(AccessibilityTraits trait)
-{
- SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error.");
- return __pCore->SetTrait(trait);
-}
-void
_AccessibilityElementImpl::SetTrait(const Tizen::Base::String& trait)
{
SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error.");
SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error.");
return __pCore->GetStatus();
}
-AccessibilityTraits
-_AccessibilityElementImpl::GetTrait(void) const
-{
- SysTryReturn(NID_UI, __pCore, ACCESSIBILITY_TRAITS_NONE, E_SYSTEM, "[E_SYSTEM] System Error.");
- return __pCore->GetTrait();
-}
Tizen::Base::String
_AccessibilityElementImpl::GetTraitString(void) const
{
}
pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
+
if (pFrame != null)
{
int accesibilityVisualElementLevel = 3000;
}
_Control* pControl = null;
Point pt((int)point.x, (int)point.y);
- _TouchManager* pTouchManager = _TouchManager::GetInstance();
- _Control* pCapturedControl = pTouchManager->GetCapturedControl();
- if (pCapturedControl)
+ _Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow();
+ if (!(pWindow->IsLayoutChangable()))
{
- if(pCapturedControl->GetAbsoluteBounds().Contains(pt))
- {
- pControl = pCapturedControl;
- }
+ Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds();
+ pt.x = pt.x + topWindowAbsBounds.x;
+ pt.y = pt.y + topWindowAbsBounds.y;
}
- else
- {
- pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
- }
- if (pControl == null)
+ pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt);
+ if (!(pControl->GetAbsoluteBounds().Contains(pt)))
{
return false;
}
bool
_AccessibilitySystemSettingLoader::IsScreenReaderActivated(void)
{
- return GetEcoreEvasMgr()->GetEcoreEvas()->IsAccessibilityScreenReaderActivated();
+// return GetEcoreEvasMgr()->GetEcoreEvas()->IsAccessibilityScreenReaderActivated();
+ bool enable = false;
+ _SettingInfoImpl::GetValue(L"http://tizen.org/setting/speech.tts.screen", enable);
+ return enable;
}
float
: public _IAccessibilityListener
{
public:
- FooterItemAccessibilityListener(void){}
+ FooterItemAccessibilityListener(const Tizen::Ui::Controls::_Toolbar* toolbar)
+ :__pToolbar(null)
+ {
+ __pToolbar = const_cast<Tizen::Ui::Controls::_Toolbar*>(toolbar);
+ }
virtual ~FooterItemAccessibilityListener(void){}
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
- virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
+ virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+ {
+ FloatRectangle rect = element.GetAbsoluteBounds();
+ Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen();
+ int screenW = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height;
+ if(rect.x < 0.0f)
+ {
+ __pToolbar->GetPresenter()->AdjustItemPositionX(-(rect.x));
+ __pToolbar->Invalidate(true);
+ }
+ else if(rect.x + rect.width > screenW)
+ {
+ float adjustX = 0.0f;
+ if(rect.x + rect.width > screenW)
+ {
+ adjustX = -(rect.x + rect.width - screenW);
+ }
+ else
+ {
+ adjustX = -rect.x;
+ }
+ __pToolbar->GetPresenter()->AdjustItemPositionX(adjustX);
+ __pToolbar->Invalidate(true);
+ }
+ return true;
+ }
virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;}
_AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM_OF_CONTENTS);
return true;
}
+private:
+ Tizen::Ui::Controls::_Toolbar* __pToolbar;
};
-FooterItemAccessibilityListener footerItemAccessibilityListener;
}
namespace Tizen { namespace Ui { namespace Controls
, __titleTextArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __itemArea(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
, __pTitleTextElement(null)
+ , __pAccessibilityListener(null)
{
_AccessibilityContainer* pContainer = null;
__isButtonBgColorSetByUser[i] = false;
__isButtonTextColorSetByUser[i] = false;
}
+ __pAccessibilityListener = new (std::nothrow) FooterItemAccessibilityListener(this);
}
_Toolbar::~_Toolbar(void)
__pTitleTextElement = null;
}
+ if(__pAccessibilityListener)
+ {
+ delete __pAccessibilityListener;
+ __pAccessibilityListener = null;
+ }
ClearLastResult();
}
|| style == TOOLBAR_TAB)
{
pElement->SetHint(L"Double tap to move to contents");
- pButton->GetAccessibilityContainer()->AddListener(footerItemAccessibilityListener);
+ pButton->GetAccessibilityContainer()->AddListener(*__pAccessibilityListener);
}
}
}
return E_SUCCESS;
}
+_ToolbarPresenter*
+_Toolbar::GetPresenter(void) const
+{
+ return __pToolbarPresenter;
+}
+
result
_Toolbar::ApplyUserGUI(ButtonType buttonType, _Button* pButton)
{
namespace Tizen { namespace Ui
{
class _AccessibilityElement;
+class _IAccessibilityListener;
}} // Tizen::Ui
namespace Tizen { namespace Ui { namespace Controls
result SetTransBackButton(bool transparent);
+ _ToolbarPresenter* GetPresenter(void) const;
+
protected:
result SetPresenter(const _ToolbarPresenter& toolbarPresenter);
Tizen::Ui::_AccessibilityElement* __pTitleTextElement;
+ _IAccessibilityListener* __pAccessibilityListener;
+
static const float SENSITIVE = 0.08f;
};
Tizen::Base::String GetHint(void) const;
void SetStatus(const Tizen::Base::String& guide);
Tizen::Base::String GetStatus(void) const;
- void SetTrait(AccessibilityTraits trait);
- AccessibilityTraits GetTrait(void) const;
void SetTrait(const Tizen::Base::String& trait);
Tizen::Base::String GetTraitString(void) const;
void SetValue(const Tizen::Base::String& value);
void SetLabel(const Tizen::Base::String& label);
void SetHint(const Tizen::Base::String& hint);
void SetStatus(const Tizen::Base::String& status);
- void SetTrait(AccessibilityTraits trait);
void SetTrait(const Tizen::Base::String& trait);
void SetValue(const Tizen::Base::String& value); //variant gogogo
Tizen::Base::String GetLabel(void) const;
Tizen::Base::String GetHint(void) const;
Tizen::Base::String GetStatus(void) const;
- AccessibilityTraits GetTrait(void) const;
Tizen::Base::String GetTraitString(void) const;
Tizen::Base::String GetValue(void) const; //variant gogogo
namespace
{
-const int __BASIC__ = 1;
-const int __ACCESSIBILITY__ = 2;
-const int __BUTTON__ = 3;
-const int __CHECKBUTTON__ = 4;
-const int __COLORPICKER__ = 5;
-const int __CONTEXTMENU__ = 6;
-const int __DATETIMEBAR__ = 7;
-const int __DATETIMEPICKER__ = 8;
-const int __EDIT__ = 9;
-const int __EDITDATE__ = 10;
-const int __EDITTIME__ = 11;
-const int __FASTSCROLL__ = 12;
-const int __FOOTER__ = 13;
-const int __FORM__ = 14;
-const int __GALLERY__ = 15;
-const int __GROUPCONTAINER__ = 16;
-const int __HEADER__ = 17;
-const int __ICONLIST__ = 18;
-const int __INPUTPAD__ = 19;
-const int __LABEL__ = 20;
-const int __LIST__ = 21;
-const int __LISTVIEW__ = 22;
-const int __APPWIDGET__ = 23;
-const int __MESSAGEBOX__ = 24;
-const int __OPTIONMENU__ = 25;
-const int __OVERLAYPANEL__ = 26;
-const int __PANEL__ = 27;
-const int __POPUP__ = 28;
-const int __PROGRESS__ = 29;
-const int __RADIOGROUP__ = 30;
-const int __SCROLL__ = 31;
-const int __SEARCHBAR__ = 32;
-const int __SLIDER__ =33;
-const int __SPLITPANEL__ = 34;
-const int __TABBAR__ = 35;
-const int __TAB__ = 36;
-const int __TABLEVIEW__ = 37;
-const int __TOKENEDIT__ = 38;
-const int __FOCUSUI__ = 39;
+struct TypeDefined
+{
+static const int __BASIC__ = 1;
+static const int __ACCESSIBILITY__ = 2;
+static const int __BUTTON__ = 3;
+static const int __CHECKBUTTON__ = 4;
+static const int __COLORPICKER__ = 5;
+static const int __CONTEXTMENU__ = 6;
+static const int __DATETIMEBAR__ = 7;
+static const int __DATETIMEPICKER__ = 8;
+static const int __EDIT__ = 9;
+static const int __EDITDATE__ = 10;
+static const int __EDITTIME__ = 11;
+static const int __FASTSCROLL__ = 12;
+static const int __FOOTER__ = 13;
+static const int __FORM__ = 14;
+static const int __GALLERY__ = 15;
+static const int __GROUPCONTAINER__ = 16;
+static const int __HEADER__ = 17;
+static const int __ICONLIST__ = 18;
+static const int __INPUTPAD__ = 19;
+static const int __LABEL__ = 20;
+static const int __LIST__ = 21;
+static const int __LISTVIEW__ = 22;
+static const int __APPWIDGET__ = 23;
+static const int __MESSAGEBOX__ = 24;
+static const int __OPTIONMENU__ = 25;
+static const int __OVERLAYPANEL__ = 26;
+static const int __PANEL__ = 27;
+static const int __POPUP__ = 28;
+static const int __PROGRESS__ = 29;
+static const int __RADIOGROUP__ = 30;
+static const int __SCROLL__ = 31;
+static const int __SEARCHBAR__ = 32;
+static const int __SLIDER__ =33;
+static const int __SPLITPANEL__ = 34;
+static const int __TABBAR__ = 35;
+static const int __TAB__ = 36;
+static const int __TABLEVIEW__ = 37;
+static const int __TOKENEDIT__ = 38;
+static const int __FOCUSUI__ = 39;
- struct _TYPE_RESOURCE
+ struct TypeResource
{
static const int _COLOR_ = 0x00010000;
static const int _IMAGE_ = 0x00020000;
static const int _FIXED_VALUE_ = 0x00050000;
static const int _ANIMATION_ = 0x00060000;
};
+};
}
#define DECLARE_UI_CONFIG(x) \
AddConfig(table, mode, GetAPIVersion());\
return true;\
};\
- static const int _VALUE_ = __##x##__ << 24;
+ static const int _VALUE_ = TypeDefined::__##x##__ << 24;
#define DECLARE_END_UI_CONFIG(X) };}}}
-#define DECLARE_COLOR_CONFIG(id,value) static const int id##_COLOR = _VALUE_ + _TYPE_RESOURCE::_COLOR_ + value;
-#define DECLARE_IMAGE_CONFIG(id,value) static const int id##_IMAGE = _VALUE_ + _TYPE_RESOURCE::_IMAGE_ + value;
-#define DECLARE_SHAPE_CONFIG(id,value) static const int id##_SHAPE = _VALUE_ + _TYPE_RESOURCE::_SHAPE_ + value;
-#define DECLARE_DIMENSION_CONFIG(id,value) static const int id##_DIMENSION = _VALUE_ + _TYPE_RESOURCE::_DIMENSION_ + value;
-#define DECLARE_FIXED_VALUE_CONFIG(id,value) static const int id##_FIXED_VALUE = _VALUE_ + _TYPE_RESOURCE::_FIXED_VALUE_ + value;
-#define DECLARE_ANIMATION_CONFIG(id,value) static const int id##_ANIMATION = _VALUE_ + _TYPE_RESOURCE::_ANIMATION_ + value;
+#define DECLARE_COLOR_CONFIG(id,value) static const int id##_COLOR = _VALUE_ + TypeDefined::TypeResource::_COLOR_ + value;
+#define DECLARE_IMAGE_CONFIG(id,value) static const int id##_IMAGE = _VALUE_ + TypeDefined::TypeResource::_IMAGE_ + value;
+#define DECLARE_SHAPE_CONFIG(id,value) static const int id##_SHAPE = _VALUE_ + TypeDefined::TypeResource::_SHAPE_ + value;
+#define DECLARE_DIMENSION_CONFIG(id,value) static const int id##_DIMENSION = _VALUE_ + TypeDefined::TypeResource::_DIMENSION_ + value;
+#define DECLARE_FIXED_VALUE_CONFIG(id,value) static const int id##_FIXED_VALUE = _VALUE_ + TypeDefined::TypeResource::_FIXED_VALUE_ + value;
+#define DECLARE_ANIMATION_CONFIG(id,value) static const int id##_ANIMATION = _VALUE_ + TypeDefined::TypeResource::_ANIMATION_ + value;
#define START_UI_CONFIG(control)\