Ejemplo n.º 1
0
        object IAccessible.accNavigate(NAVDIR navDir, VarInt varStart)
        {
            int i = varStart;

            if (navDir == NAVDIR.FIRSTCHILD || navDir == NAVDIR.LASTCHILD)
            {
                if (i != -1)
                {
                    return(null);
                }
            }
            else
            {
                if (i == -1)
                {
                    return(_StdAO.accNavigate(navDir, varStart));                         //never mind: gets some not adjacent UI element
                }
            }
            var v = Navigate(navDir, i);

            if (v == null)
            {
                return(null);
            }
            return(v.Value + 1);
        }
Ejemplo n.º 2
0
            public override int?Navigate(NAVDIR navDir, int childStart)
            {
                if (childStart == -1)                   //navDir can be only first or last
                {
                    int n = _tv.CountVisible; if (n == 0)
                    {
                        return(null);
                    }
                    return(navDir == NAVDIR.FIRSTCHILD ? 0 : n - 1);
                }
                else                     //navDir cannot be first or last
                {
                    switch (navDir)
                    {
                    case NAVDIR.PREVIOUS:
                    case NAVDIR.UP:
                        if (childStart > 0)
                        {
                            return(childStart - 1);
                        }
                        break;

                    case NAVDIR.NEXT:
                    case NAVDIR.DOWN:
                        if (++childStart < _tv.CountVisible)
                        {
                            return(childStart);
                        }
                        break;
                    }
                    return(null);
                }
            }
Ejemplo n.º 3
0
        object IAccessible.accNavigate(NAVDIR navDir, VarInt varStart)
        {
            int i = varStart;

            if (navDir == NAVDIR.FIRSTCHILD || navDir == NAVDIR.LASTCHILD)
            {
                if (i == -1)
                {
                    return(navDir == NAVDIR.FIRSTCHILD ? 1 : _a.Count);
                }
            }
            else
            {
                if (i == -1)
                {
                    return(_StdAO.accNavigate(navDir, varStart));
                }
                switch (navDir)
                {
                case NAVDIR.PREVIOUS:
                    if (i > 0)
                    {
                        return(i);
                    }
                    break;

                case NAVDIR.NEXT:
                    if (++i < _a.Count)
                    {
                        return(i + 1);
                    }
                    break;
                }
            }
            return(null);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns null.
 /// If self (childStart==-1), navDir is FIRSTCHILD or LASTCHILD, else navDir is any except these.
 /// </summary>
 public virtual int?Navigate(NAVDIR navDir, int childStart) => null;