当前位置: 首页>>代码示例>>C#>>正文


C# TextEditor.HideTooltip方法代码示例

本文整理汇总了C#中TextEditor.HideTooltip方法的典型用法代码示例。如果您正苦于以下问题:C# TextEditor.HideTooltip方法的具体用法?C# TextEditor.HideTooltip怎么用?C# TextEditor.HideTooltip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextEditor的用法示例。


在下文中一共展示了TextEditor.HideTooltip方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MouseHover

		public void MouseHover (TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
		{
			if (!IsVisible)
				return;
			if (LineSegment == null)
				return;
			if (bubbleDrawX < args.X && args.X < bubbleDrawX + bubbleWidth) {
				editor.HideTooltip ();
				result.Cursor = null;
				cache.StartHover (this, bubbleDrawX, bubbleDrawY, bubbleWidth, bubbleIsReduced);
			}
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:12,代码来源:MessageBubbleTextMarker.cs

示例2: ShowTooltipWindow

		public override Window ShowTooltipWindow (TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
		{
			var titem = (item.Item as TTI).sr;
			DestroyLastTooltipWindow ();

			var tipWindow = CreateTooltipWindow (editor, offset, modifierState, item) as TooltipInformationWindow;
			if (tipWindow == null)
				return null;

			var positionWidget = editor.TextArea;

			Cairo.Point p1, p2;

			var dn = titem as INode;
			if (dn != null)
			{
				if (dn.NameLocation.IsEmpty)
					p1 = p2 = editor.LocationToPoint(dn.Location.Line, dn.Location.Column);
				else
				{
					p1 = editor.LocationToPoint(dn.NameLocation.Line, dn.NameLocation.Column);
					p2 = editor.LocationToPoint(dn.NameLocation.Line, dn.NameLocation.Column + (dn.Name ?? "").Length);
				}
			}
			else {
				p1 = editor.LocationToPoint (editor.OffsetToLocation(item.ItemSegment.Offset));
				p2 = editor.LocationToPoint (editor.OffsetToLocation(item.ItemSegment.EndOffset));
			}

			var caret = new Gdk.Rectangle (p1.X - positionWidget.Allocation.X, p2.Y - positionWidget.Allocation.Y, (p2.X - p1.X), (int)editor.LineHeight);
			tipWindow.ShowPopup (positionWidget, caret, PopupPosition.Top);
			

			lastWindow = tipWindow;

			tipWindow.EnterNotifyEvent += delegate {
				editor.HideTooltip (false);
			};

			//lastNode = titem.Result;
			return tipWindow;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:42,代码来源:DToolTipProvider.cs

示例3: ShowTooltipWindow

		public override Gtk.Window ShowTooltipWindow (TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
		{
			var titem = (ToolTipData)item.Item;
			if (lastNode != null && lastWindow != null && lastWindow.IsRealized && titem.Node != null && lastNode == titem.Node)
				return lastWindow;
			
			DestroyLastTooltipWindow ();

			var tipWindow = CreateTooltipWindow (editor, offset, modifierState, item) as TooltipInformationWindow;
			if (tipWindow == null)
				return null;

			var hoverNode = titem.Node.GetNodeAt (editor.OffsetToLocation (offset)) ?? titem.Node;
			var p1 = editor.LocationToPoint (hoverNode.StartLocation);
			var p2 = editor.LocationToPoint (hoverNode.EndLocation);
			var positionWidget = editor.TextArea;
			var caret = new Gdk.Rectangle ((int)p1.X - positionWidget.Allocation.X, (int)p2.Y - positionWidget.Allocation.Y, (int)(p2.X - p1.X), (int)editor.LineHeight);

			tipWindow.ShowPopup (positionWidget, caret, PopupPosition.Top);
			tipWindow.EnterNotifyEvent += delegate {
				editor.HideTooltip (false);
			};
			lastWindow = tipWindow;
			lastNode = titem.Node;
			return tipWindow;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:26,代码来源:LanguageItemTooltipProvider.cs

示例4: ShowTooltipWindow

        public override Window ShowTooltipWindow(TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
        {
            var titems = item.Item as AbstractType;/*
            if (lastNode != null && lastWindow != null && lastWindow.IsRealized && titem.Result != null && lastNode == titem.Result)
                return lastWindow;*/

            DestroyLastTooltipWindow ();

            var tipWindow = CreateTooltipWindow (editor, offset, modifierState, item) as TooltipInformationWindow;
            if (tipWindow == null)
                return null;

            var titem = titems.DeclarationOrExpressionBase;
            var positionWidget = editor.TextArea;

            Cairo.Point p1, p2;

            if (titem != null) {
                p1 = editor.LocationToPoint (titem.Location.Line, titem.Location.Column);
                p2 = editor.LocationToPoint (titem.EndLocation.Line, titem.EndLocation.Column);
            } else {
                p1 = editor.LocationToPoint (editor.OffsetToLocation(item.ItemSegment.Offset));
                p2 = editor.LocationToPoint (editor.OffsetToLocation(item.ItemSegment.EndOffset));
            }

            var caret = new Gdk.Rectangle (p1.X - positionWidget.Allocation.X, p2.Y - positionWidget.Allocation.Y, (p2.X - p1.X), (int)editor.LineHeight);
            tipWindow.ShowPopup (positionWidget, caret, PopupPosition.Top);

            lastWindow = tipWindow;

            tipWindow.EnterNotifyEvent += delegate {
                editor.HideTooltip (false);
            };

            //lastNode = titem.Result;
            return tipWindow;
        }
开发者ID:Geod24,项目名称:Mono-D,代码行数:37,代码来源:DToolTipProvider.cs


注:本文中的TextEditor.HideTooltip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。