コード例 #1
0
		TextRange TextImplementor.GetBoundedRanges (TextRectangle rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type)
		{
			Atk.TextRange result = new Atk.TextRange ();
			// todo 
			return result;
		}
コード例 #2
0
ファイル: Value.cs プロジェクト: mono/uia2atk
		public void GetRangeExtents (int startOffset, int endOffset,
		                             CoordType coordType,
		                             out TextRectangle rect)
		{
			int length = Text.Length;
			System.Windows.Rect bounds = peer.GetBoundingRectangle ();

			rect.X = (int) (bounds.X + (bounds.Width * startOffset) / length);
			rect.Y = (int) bounds.Y;
			rect.Height = (int) bounds.Height;
			rect.Width = (int) (bounds.Width * (endOffset - startOffset)) / length;

/* TODO:
			if (coordType == Atk.CoordType.Window)
				resource.ConvertCoords (ref rect.X, ref rect.Y, false);
*/
		}
コード例 #3
0
		void TextImplementor.GetRangeExtents (int start_offset, int end_offset, CoordType coord_type, out TextRectangle rect)
		{
			Atk.TextRectangle result = new Atk.TextRectangle ();
			var point1 = editor.LocationToPoint (Document.OffsetToLocation (start_offset));
			var point2 = editor.LocationToPoint (Document.OffsetToLocation (end_offset));

			result.X = System.Math.Min (point2.X, point1.Y);
			result.Y = System.Math.Min (point2.Y, point1.Y);
			result.Width = System.Math.Abs (point2.X - point1.X);
			result.Height = (int)(System.Math.Abs (point2.Y - point1.Y) + editor.LineHeight);
			rect = result;
		}
コード例 #4
0
ファイル: Value.cs プロジェクト: mono/uia2atk
		public TextRange GetBoundedRanges (TextRectangle rect,
		                                   CoordType coordType,
		                                   TextClipType xClipType,
		                                   TextClipType yClipType)
		{
			Log.Warn ("GetBoundedRanges not implemented");
			return new Atk.TextRange ();
		}