示例#1
0
        public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coord_type, Atk.TextClipType x_clip_type, Atk.TextClipType y_clip_type)
        {
            IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc(rect);
            IntPtr raw_ret     = atk_text_get_bounded_ranges(Handle, native_rect, (int)coord_type, (int)x_clip_type, (int)y_clip_type);

            Atk.TextRange ret = Atk.TextRange.New(raw_ret);
            Marshal.FreeHGlobal(native_rect);
            return(ret);
        }
示例#2
0
 public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coordType, Atk.TextClipType xClipType, Atk.TextClipType yClipType)
 {
     return(textExpert.GetBoundedRanges(rect, coordType, xClipType, yClipType));
 }
示例#3
0
 public void GetRangeExtents(int startOffset, int endOffset, Atk.CoordType coordType, out Atk.TextRectangle rect)
 {
     textExpert.GetRangeExtents(startOffset, endOffset, coordType, out rect);
 }
示例#4
0
 public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coord_type, Atk.TextClipType x_clip_type, Atk.TextClipType y_clip_type)
 {
     Console.WriteLine("ATKTEXT: GetBoundedRanges");
     throw new NotImplementedException();
 }
示例#5
0
 public void GetRangeExtents(int start_offset, int end_offset, Atk.CoordType coord_type, out Atk.TextRectangle rect)
 {
     Console.WriteLine("ATKTEXT: GetRangeExtents");
     throw new NotImplementedException();
 }
示例#6
0
 public Atk.TextRange GetBoundedRanges(Atk.TextRectangle rect, Atk.CoordType coordType, Atk.TextClipType xClipType, Atk.TextClipType yClipType)
 {
     //TODO
     Log.Warn("GetBoundedRanges not implemented");
     return(new Atk.TextRange());
 }
示例#7
0
        public void GetRangeExtents(int startOffset, int endOffset, Atk.CoordType coordType, out Atk.TextRectangle rect)
        {
            int length = Length;

            System.Windows.Rect bounds = resource.BoundingRectangle;
            rect.X      = (int)(bounds.X + (length > 0 ? (bounds.Width * startOffset) / length : 0));
            rect.Y      = (int)bounds.Y;
            rect.Height = (int)bounds.Height;
            rect.Width  = (int)(length > 0 ? bounds.Width * (endOffset - startOffset) / length : 0);
            if (coordType == Atk.CoordType.Window)
            {
                resource.ConvertCoords(ref rect.X, ref rect.Y, false);
            }
        }