예제 #1
0
        /// <summary>
        /// One of many methods that delegate to the IAccessible, with a suitable default if it is null.
        /// Not directly tested so far...this will work provided the navdir enum uses the same values as the old C++ defines
        /// for NAVDIR_DOWN etc.
        /// /// </summary>
        public override AccessibleObject Navigate(AccessibleNavigation navdir)
        {
            if (AccessibleImpl == null)
            {
                return(null);
            }
            object target = AccessibleImpl.accNavigate((int)navdir, null);

            if (target is Accessibility.IAccessible)
            {
                return(MakeRelatedWrapper(target as Accessibility.IAccessible));
            }
            return(null);
        }
예제 #2
0
        /// <summary>
        /// One of many methods that delegate to the IAccessible, with a suitable default if it is null.
        /// </summary>
        public override AccessibleObject HitTest(int x, int y)
        {
            if (AccessibleImpl == null)
            {
                return(null);
            }
            object target = AccessibleImpl.accHitTest(x, y);

            if (target is Accessibility.IAccessible)
            {
                return(MakeRelatedWrapper(target as Accessibility.IAccessible));
            }
            if (target is int)
            {
                return(this);                // Views accessibility object only makes int for CHILDID_SELF
            }
            return(null);
        }