Esempio n. 1
0
        public override void ShowTooltipWindow(TextEditor editor, Control tipWindow, TooltipItem item, Xwt.ModifierKeys modifierState, int mouseX, int mouseY)
        {
            var location   = editor.OffsetToLocation(item.Offset);
            var point      = editor.LocationToPoint(location);
            int lineHeight = (int)editor.LineHeight;
            int y          = (int)point.Y;

            // find the top of the line that the mouse is hovering over
            while (y + lineHeight < mouseY)
            {
                y += lineHeight;
            }

            var caret = new Gdk.Rectangle(mouseX, y, 1, lineHeight);

            tooltip = (DebugValueWindow)tipWindow;
            tooltip.ShowPopup(editor, caret, PopupPosition.TopLeft);
        }
Esempio n. 2
0
        public override Gtk.Window ShowTooltipWindow(TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
        {
            var location   = editor.OffsetToLocation(item.ItemSegment.Offset);
            var point      = editor.LocationToPoint(location);
            int lineHeight = (int)editor.LineHeight;
            int y          = point.Y;

            // find the top of the line that the mouse is hovering over
            while (y + lineHeight < mouseY)
            {
                y += lineHeight;
            }

            var caret = new Gdk.Rectangle(mouseX, y, 1, lineHeight);

            tooltip = new DebugValueWindow(editor, offset, DebuggingService.CurrentFrame, (ObjectValue)item.Item, null);
            tooltip.ShowPopup(editor, caret, PopupPosition.TopLeft);

            return(tooltip);
        }
		public override Gtk.Window ShowTooltipWindow (TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
		{
			var location = editor.OffsetToLocation (item.ItemSegment.Offset);
			var point = editor.LocationToPoint (location);
			int lineHeight = (int) editor.LineHeight;
			int y = (int) point.Y;

			// find the top of the line that the mouse is hovering over
			while (y + lineHeight < mouseY)
				y += lineHeight;

			var caret = new Gdk.Rectangle (mouseX - editor.Allocation.X, y - editor.Allocation.Y, 1, lineHeight);

			tooltip = new DebugValueWindow (editor, offset, DebuggingService.CurrentFrame, (ObjectValue) item.Item, null);
			tooltip.ShowPopup (editor, caret, PopupPosition.TopLeft);

			return tooltip;
		}
		public override void ShowTooltipWindow (TextEditor editor, Control tipWindow, TooltipItem item, Gdk.ModifierType modifierState, int mouseX, int mouseY)
		{
			var location = editor.OffsetToLocation (item.Offset);
			var point = editor.LocationToPoint (location);
			int lineHeight = (int) editor.LineHeight;
			int y = (int)point.Y;

			// find the top of the line that the mouse is hovering over
			while (y + lineHeight < mouseY)
				y += lineHeight;

			var caret = new Gdk.Rectangle (mouseX, y, 1, lineHeight);
			tooltip = (DebugValueWindow)tipWindow;
			tooltip.ShowPopup (editor, caret, PopupPosition.TopLeft);
		}