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


C# Gtk.MotionNotifyEventArgs类代码示例

本文整理汇总了C#中Gtk.MotionNotifyEventArgs的典型用法代码示例。如果您正苦于以下问题:C# MotionNotifyEventArgs类的具体用法?C# MotionNotifyEventArgs怎么用?C# MotionNotifyEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MotionNotifyEventArgs类属于Gtk命名空间,在下文中一共展示了MotionNotifyEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleWidgetMotionNotifyEvent

		private void HandleWidgetMotionNotifyEvent (object o, MotionNotifyEventArgs args)
		{
			X = args.Event.XRoot;
			Y = args.Event.YRoot;

			if (MotionNotifyEvent != null) {
				MotionNotifyEvent (this, new MouseButtonEventArgs ());
			}			
		}
开发者ID:Octavio,项目名称:moro.PresentationFramework,代码行数:9,代码来源:WidgetMouseInputProvider.cs

示例2: MotionNotifyEventHandler

	void MotionNotifyEventHandler (object o, MotionNotifyEventArgs args)
	{
		if (!is_dragging)
			return;

		int x, y;
		GetPointer (out x, out y);
		Selected = HitTest (y);
	}
开发者ID:alfredodev,项目名称:mono-tools,代码行数:9,代码来源:list.cs

示例3: ProcessMotionEvent

 public void ProcessMotionEvent(MotionNotifyEventArgs args)
 {
     if (swiping) {
         swipeTest = new Point((int) args.Event.X, (int) args.Event.Y);
         // Swipe must be horizontal or vertical
         if ((swipeTest.X - swipeStart.X > maxError || swipeTest.X - swipeStart.X < -maxError) && (swipeTest.Y - swipeStart.Y > maxError || swipeTest.Y - swipeStart.Y < -maxError)) {
             swiping = false;
         }
     }
 }
开发者ID:peter-gregory,项目名称:ClockRadio,代码行数:10,代码来源:GestureDetector.cs

示例4: HandleMotionNotifyEvent

        void HandleMotionNotifyEvent(object o, MotionNotifyEventArgs args)
        {
            decorator.Clean();

            var doc = IdeApp.Workbench.ActiveDocument;
            if (doc == null || !IsCtrlPush(args.Event.State))
                return;

            decorator.Draw(doc, args.Event.X, args.Event.Y);

        }
开发者ID:nomit007,项目名称:MonoDevelop.MouseJumper,代码行数:11,代码来源:StartupHandler.cs

示例5: OnMouseMove

        protected override void OnMouseMove(object o, MotionNotifyEventArgs args, Cairo.PointD point)
        {
            if (!is_drawing)
                return;

            double x = Utility.Clamp (point.X, 0, PintaCore.Workspace.ImageSize.Width - 1);
            double y = Utility.Clamp (point.Y, 0, PintaCore.Workspace.ImageSize.Height - 1);

            PintaCore.Layers.ShowSelection = true;

            Rectangle dirty = DrawShape (PointsToRectangle (shape_origin, new PointD (x, y), (args.Event.State & Gdk.ModifierType.ShiftMask) == Gdk.ModifierType.ShiftMask), PintaCore.Layers.SelectionLayer);

            PintaCore.Workspace.Invalidate ();

            last_dirty = dirty;
        }
开发者ID:joehillen,项目名称:Pinta,代码行数:16,代码来源:SelectTool.cs

示例6: onDAMotionNotify

    protected void onDAMotionNotify(object o, MotionNotifyEventArgs args)
    {
        if (circuit == null)
            return;

        if (selectedTool == ToolType.LINK_CHK) {
            circuit.linkCheck(args.Event.X, args.Event.Y);
        }

        if (selectedTool == ToolType.DEL_M || selectedTool == ToolType.DEL_S) {
            clickCell(args.Event.X, args.Event.Y);
        }

        if (!linkingCells)
            return;

        switch (mouseButton) {

            case 1: // bouton 1

                switch (selectedTool) {
                    case ToolType.SILICON_N:
                        if (linkingCells)
                            clickCell(args.Event.X, args.Event.Y);
                        break;
                    case ToolType.SILICON_P:
                        if (linkingCells)
                            clickCell(args.Event.X, args.Event.Y);
                        break;
                    case ToolType.METAL:
                        if (linkingCells)
                            clickCell(args.Event.X, args.Event.Y);
                        break;
                }
                break;

        }
    }
开发者ID:macbernick,项目名称:celltronix,代码行数:38,代码来源:MainWindow.cs

示例7: HandleMotionNotifyEvent

		void HandleMotionNotifyEvent (object sender, MotionNotifyEventArgs args)
		{
			var document = IdeApp.Workbench.ActiveDocument;

			if (IdeApp.Workspace == null) return;
			if (document == null) return;
			if (document.ParsedDocument == null) return;

			try
			{
				if (_marker != null) 
				{
					RemoveMarker (document.Editor.Document);
				}
				
				if ((args.Event.State & ModifierType.ControlMask) == ModifierType.ControlMask)
				{
					DocumentLocation location = document.Editor.Parent.PointToLocation(args.Event.X - document.Editor.Parent.TextViewMargin.XOffset, args.Event.Y);
					
					int offset = document.Editor.LocationToOffset(location);
					int start = document.Editor.FindCurrentWordStart(offset);
					int end = document.Editor.FindCurrentWordEnd(offset);
					
					if (end - start <= 0) return;
					
					_marker = new UnderlineTextSegmentMarker(document.Editor.ColorStyle.KeywordNamespace.Foreground, new TextSegment(start, end - start));
					_marker.Wave = false;
					_marker.IsVisible = true;
					document.Editor.Document.AddMarker(_marker);
					document.Editor.Parent.QueueDraw();
				}
			}
			catch (Exception exception)
			{
				LoggingService.LogError(exception.ToString());
			}
		}
开发者ID:nixxa,项目名称:MonoDevelop.AddIns,代码行数:37,代码来源:JumpToDefinitionHandler.cs

示例8: OnMouseMove

        protected override void OnMouseMove(object o, MotionNotifyEventArgs args, Cairo.PointD point)
        {
            ctrlKey = (args.Event.State & ModifierType.ControlMask) != 0;

            lastMousePosition = point.ToGdkPoint();

            // If we're dragging the text around, do that
            if (tracking)
            {
                Cairo.PointD delta = new Cairo.PointD(point.X - startMouseXY.X, point.Y - startMouseXY.Y);

                clickPoint = new Point((int)(startClickPoint.X + delta.X), (int)(startClickPoint.Y + delta.Y));
                CurrentTextEngine.Origin = clickPoint;

                RedrawText(true, true);
            }
            else
            {
                UpdateMouseCursor();
            }
        }
开发者ID:Kharevich,项目名称:Pinta,代码行数:21,代码来源:TextTool.cs

示例9: DrawMotionNotifyEvent

 void DrawMotionNotifyEvent(object o, MotionNotifyEventArgs args)
 {
     if (this.Sensitive && MouseClick != null && _button != MouseButton.None) {
         MouseClick (this, new MouseEventArgs ((int)args.Event.X, (int)args.Event.Y, _button));
     }
 }
开发者ID:codingcave,项目名称:CoupledOdeViewer,代码行数:6,代码来源:PlainSurfaceItem.cs

示例10: DoMouseMove

 public void DoMouseMove(object o, MotionNotifyEventArgs args, Cairo.PointD point)
 {
     OnMouseMove (o, args, point);
 }
开发者ID:deckarep,项目名称:Pinta,代码行数:4,代码来源:BaseTool.cs

示例11: HandleMotionNotifyEvent

        private void HandleMotionNotifyEvent(object sender, MotionNotifyEventArgs args)
        {
            if (!this.CanApplyMarker()) return;

            this.RemoveMarker();

            if ((args.Event.State & ModifierType.Mod1Mask) == ModifierType.Mod1Mask)
            {
                var document = IdeApp.Workbench.ActiveDocument;
                var location = document.Editor.Parent.PointToLocation(args.Event.X - document.Editor.Parent.TextViewMargin.XOffset, args.Event.Y);

                int offset = document.Editor.LocationToOffset(location);
                int start = document.Editor.FindCurrentWordStart(offset);
                int end = document.Editor.FindCurrentWordEnd(offset);

                if (end - start <= 0) return;

                var element = this.GetCurrentElement(document, offset);
                if (element != null)
                {
                    this.PlaceMarker(document, start, end);
                }
                else
                {
                    var variable = this.GetCurrentVariable(document, offset);
                    if (variable != null)
                    {
                        this.PlaceMarker(document, start, end);
                    }
                }
            }
        }
开发者ID:sgmunn,项目名称:MonkeyWrench,代码行数:32,代码来源:ClickToDefinition.cs

示例12: OnMotionNotify

 void OnMotionNotify(object o, MotionNotifyEventArgs args)
 {
     OnMove((o as Preview).GetXY(args));
 }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:4,代码来源:MouseFunc.cs

示例13: HandleMotionNotifyEvent

		void HandleMotionNotifyEvent(object o, MotionNotifyEventArgs args)
		{
			TreeIter iter;
				
				if (!elementsTreeview.Selection.GetSelected (out iter))
					return;
				Gdk.Rectangle rect = elementsTreeview.GetCellArea (elementsStore.GetPath (iter), elementsTreeview.GetColumn (0));
				int x, y;
				this.GdkWindow.GetOrigin (out x, out y);
				x += rect.X;
				y += rect.Y;
				if (this.tooltipWindow == null || ox != x || oy != y) {
					ShowTooltipForSelectedEntry ();
					ox = x;
					oy = y;
				}
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:17,代码来源:RegexToolkitWindow.cs

示例14: OnEventVolumeMotionNotifyEvent

        protected void OnEventVolumeMotionNotifyEvent(object o, MotionNotifyEventArgs args)
        {
            int width;
            int height;
            drawVolume.GdkWindow.GetSize(out width, out height);

            int x = (int) args.Event.X;
            int startInside = 36;
            int endInside = width - 36;

            if (x < startInside) {
                Percentage = 0;
            } else if (x > endInside) {
                Percentage = 100;
            } else {
                Percentage = (x - startInside) * 100 / (endInside - startInside);
            }

            QueueDraw();
        }
开发者ID:peter-gregory,项目名称:ClockRadio,代码行数:20,代码来源:Volume.cs

示例15: HandleImageViewMotion

        void HandleImageViewMotion(object sender, MotionNotifyEventArgs args)
        {
            Gdk.Point coords;
            coords = new Gdk.Point ((int) args.Event.X, (int) args.Event.Y);

            SetSamplePoint (view.WindowCoordsToImage (coords));
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:Loupe.cs


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