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


C# TextEditor.GetContent方法代码示例

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


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

示例1: GetExtensibleTextEditor

		internal static ExtensibleTextEditor GetExtensibleTextEditor (TextEditor editor)
		{
			var view = editor.GetContent<SourceEditorView> ();
			if (view == null)
				return null;
			return view.TextEditor;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:CompileErrorTooltipProvider.cs

示例2: ShowTooltipWindow

		public virtual void ShowTooltipWindow (TextEditor editor, Control tipWindow, TooltipItem item, Xwt.ModifierKeys modifierState, int mouseX, int mouseY)
		{
			if (tipWindow == null)
				return;

			var tipInfoWindow = ((Gtk.Widget)tipWindow) as TooltipInformationWindow;
			if (tipInfoWindow != null) {
				ShowTipInfoWindow (editor, tipInfoWindow, item, modifierState, mouseX, mouseY);
				return;
			}

			var origin = editor.GetContent<ITextEditorImpl> ().GetEditorWindowOrigin ();

			int w;
			double xalign;
			GetRequiredPosition (editor, tipWindow, out w, out xalign);
			w += 10;

			var allocation = GetAllocation (editor);
			int x = (int)(mouseX + origin.X + allocation.X);
			int y = (int)(mouseY + origin.Y + allocation.Y);
			Gtk.Widget widget = editor;
			var geometry = widget.Screen.GetUsableMonitorGeometry (widget.Screen.GetMonitorAtPoint (x, y));
			
			x -= (int) ((double) w * xalign);
			y += 10;
			
			if (x + w >= geometry.X + geometry.Width)
				x = geometry.X + geometry.Width - w;
			if (x < geometry.Left)
				x = geometry.Left;
			
			var gtkWindow = (Gtk.Window)tipWindow;
			int h = gtkWindow.SizeRequest ().Height;
			if (y + h >= geometry.Y + geometry.Height)
				y = geometry.Y + geometry.Height - h;
			if (y < geometry.Top)
				y = geometry.Top;
			
			gtkWindow.Move (x, y);
			
			gtkWindow.ShowAll ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:43,代码来源:TooltipProvider.cs

示例3: GetAllocation

		protected Xwt.Rectangle GetAllocation (TextEditor editor)
		{
			return editor.GetContent<ITextEditorImpl> ().GetEditorAllocation ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:4,代码来源:TooltipProvider.cs


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