Пример #1
0
		
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			QueuePaneRender();
Пример #2
0
		protected void OnButtonPress(object sender, gtk.ButtonPressEventArgs args)
		{
			GrabFocus();
			
			// get the number of clicks
			ClickMultiplicity multiplicity = ClickMultiplicity.Single;
			if (args.Event.Type == Gdk.EventType.TwoButtonPress)
				multiplicity = ClickMultiplicity.Double;
			
			MouseButtonEvent evt = new MouseButtonEvent(Viewport.RootScene, new Coord(args.Event.X, HeightGL - args.Event.Y), 
			                                            (int)args.Event.Button, GetModifier(args.Event.State), multiplicity);
			Viewport.OnButtonPress(evt);
			
			PaintGL();

		}
Пример #3
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);
			
			CloseButton.OnButtonRelease(evt);
		}
Пример #4
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);
			
			if (evt.IsHandled || !IsEnabled)
				return;

			if (evt.Button == 1 && HitTest(evt.Pos) && !justClicked)
			{
				evt.Handle(this);
				justClicked = true;
				IsSelected = true;
				IsFocused = true;
				QueuePaneRender();
			}
		}
Пример #5
0
		public virtual void OnButtonRelease(MouseButtonEvent evt)
		{
			LastMousePosition = evt.Pos;

			evt.HitLine = Camera.ScreenToWorld(evt.Pos);
			var parentScene = evt.Scene;
			evt.Scene = this;
			
			OverlayInteractor.OnButtonRelease(evt);
			if (evt.IsHandled)
			{
				if (EnableViewInteractor)
					ViewInteractor.Cancel();
				evt.Scene = parentScene;
				return;
			}
			
			if (PrimaryInteractor != null)
			{
				PrimaryInteractor.OnButtonRelease(evt);
				if (evt.IsHandled)
				{
					if (EnableViewInteractor)
						ViewInteractor.Cancel();
					evt.Scene = parentScene;
					return;
				}
			}
						
			if (EnableViewInteractor)
				ViewInteractor.OnButtonRelease(evt);
			evt.Scene = parentScene;
		}
Пример #6
0
		public void OnButtonPress(MouseButtonEvent evt)
		{
			RootScene.OnButtonPress(evt);
		}
Пример #7
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);

			if (Root != null)
			{
				Root.OnButtonPress(evt);

				// see if a DockButton caught it
				if (evt.IsHandled && evt.LastHandler is DockButton)
				{
					_dragButton = evt.LastHandler as DockButton;
				}
				else
				{
					_dragButton = null;
				}
			}
		}
Пример #8
0
		protected override void OnMouseDown(MouseEventArgs args)
		{
			base.OnMouseDown(args);

			var evt = new MouseButtonEvent(Viewport.RootScene, 
			                               MouseToViewport(args.Location),
			                               Extensions.ButtonNumber(args.Button),
			                               Extensions.GetModifier(ModifierKeys));
			Viewport.OnButtonPress(evt);

			_lastClickHandled = evt.IsHandled;

			PaintGL();
		}
Пример #9
0
		protected override void OnMouseUp(MouseEventArgs args)
		{
			base.OnMouseUp(args);

			var evt = new MouseButtonEvent(Viewport.RootScene, 
			                               MouseToViewport(args.Location),
			                               Extensions.ButtonNumber(args.Button),
			                               Extensions.GetModifier(ModifierKeys));
			Viewport.OnButtonRelease(evt);

			PaintGL();
		}
Пример #10
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			if (evt.IsHandled)
			{
				Deselect();
				return;
			}

			base.OnButtonRelease(evt);

			if (evt.Modifier != InteractionModifier.Shift)
				Deselect();
			if (HitTest(evt.HitLine))
			{
				evt.Handle(this);
			}
		}
Пример #11
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			_anchor = evt.Pos - Origin;
			if (_label.HitTest(evt.Pos))
			{
				evt.Handle(this);
				if (Clicked != null)
					Clicked(this, new EventArgs());
			}
			else 
			{
				CloseButton.OnButtonPress(evt);
			}
			
		}
Пример #12
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);
			
			if (!evt.IsHandled)
				_textBox.OnButtonRelease(evt);
			if (!evt.IsHandled)
				_upButton.OnButtonRelease(evt);
			if (!evt.IsHandled)
				_downButton.OnButtonRelease(evt);
		}
Пример #13
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);
			
			if (Control != null)
			{
				var controlEvt = evt.Copy();
				controlEvt.Pos = GetControlPoint(evt.Pos);
				Control.OnButtonRelease(controlEvt);
				if (controlEvt.IsHandled)
					evt.Handle(controlEvt.LastHandler);
			}
		}
Пример #14
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);
			
			if (Control != null)
			{
				var controlEvt = evt.Copy();
				controlEvt.Pos = GetControlPoint(evt.HitLine);
				if (evt.IsHandled)
					controlEvt.Handle(this);
				Control.OnButtonPress(controlEvt);
				if (controlEvt.IsHandled)
					evt.Handle(this);
			}
		}
Пример #15
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);

			if (evt.IsHandled)
				return;

			hitRegion = HitRegion(evt.Pos);

			if (hitRegion != Region.None)
			{
				if (IsTogglable)
				{
					if (IsSelected)
						Deselect();
				}

				Select(hitRegion);

				evt.Handle(this);
				if (hitRegion == Region.Button1)
					RaiseAction1();
				else
					RaiseAction2();

				MakeDirty();
			}
		}
Пример #16
0
		protected override void OnMouseDoubleClick(MouseEventArgs args)
		{
			base.OnMouseDoubleClick(args);

			// not sure why we really need this, but it breaks the card interactor
			//if (_lastClickHandled)
			//    return;

			var evt = new MouseButtonEvent(Viewport.RootScene, MouseToViewport(args.Location),
			                               Extensions.ButtonNumber(args.Button),
			                               InteractionModifier.None, ClickMultiplicity.Double);
			Viewport.OnButtonPress(evt);

			PaintGL();
		}
Пример #17
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);

			if (IsSelected && !IsTogglable)
			{
				Deselect();
			}

			// if we were just clicked, we get to handle the next button release event
			if (hitRegion != Region.None)
			{
				hitRegion = Region.None;
				evt.Handle(this);
				MakeDirty();
			}

		}
Пример #18
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);
			
			if (LastPosition == null)
				return;
			var relPos = evt.Pos - LastPosition;
			if (relPos >= IndicatorPosition && relPos <= IndicatorPosition + IndicatorSize)
			{
				_isDragging = true;
				evt.Handle(this);
				GrabFocus();
			}
			else if (HitTest(evt.Pos))
			{
				SetClosestValue(evt.Pos);
				evt.Handle(this);
				GrabFocus();
			}
		}
Пример #19
0
		public void OnButtonRelease(MouseButtonEvent evt)
		{
			RootScene.OnButtonRelease(evt);
		}
Пример #20
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);
			
			if (_isDragging)
			{
				_isDragging = false;
				evt.Handle(this);
			}
		}
Пример #21
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);

			_dragButton = null;

			if (Root != null)
				Root.OnButtonRelease(evt);
		}
Пример #22
0
		public virtual void OnButtonPress(MouseButtonEvent evt) {}
Пример #23
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);

			if (!IsEnabled)
				return;
			
			if (IsSelected && !IsTogglable)
				Deselect();

			// if we were just clicked, we get to handle the next button release event
			if (evt.Button == 1 && justClicked)
			{
				justClicked = false;
				evt.Handle(this);
				QueuePaneRender();
				Click();
			}

		}
Пример #24
0
		public virtual void OnButtonRelease(MouseButtonEvent evt) {}
Пример #25
0
		public override void OnButtonRelease (MouseButtonEvent evt)
		{
			base.OnButtonRelease (evt);
			
			foreach (var anchor in anchors.Values)
				anchor.OnButtonRelease(evt);
		}
Пример #26
0
		
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			QueuePaneRender();
Пример #27
0
		protected void OnButtonRelease(object sender, gtk.ButtonReleaseEventArgs args)
		{
			MouseButtonEvent evt = new MouseButtonEvent(Viewport.RootScene, new Coord(args.Event.X, HeightGL - args.Event.Y), 
			                                      (int)args.Event.Button, GetModifier(args.Event.State));
			Viewport.OnButtonRelease(evt);
			
			PaintGL();
		}
Пример #28
0
		public override void OnButtonPress(MouseButtonEvent evt)
		{
			base.OnButtonPress(evt);
			
			CloseButton.OnButtonPress(evt);
		}