Ejemplo n.º 1
0
		protected virtual void Decorate(DockButton button)
		{
			var parent = button.ParentControl;
			if (parent == null)
				FillRectangle(Coord.Zeros, button.RenderSize, Corner.None, FillType.Background, button.HitState, AnchorLocation.S);
			else
			{
				FillRectangle(Coord.Zeros, button.RenderSize, Corner.None, FillType.Background, button.HitState, AnchorLocation.S);
				StrokeRectangle(Coord.Zeros, button.RenderSize, Corner.None, button.HitState);
			}
		}
Ejemplo n.º 2
0
		public override void OnButtonRelease(MouseButtonEvent evt)
		{
			base.OnButtonRelease(evt);

			_dragButton = null;

			if (Root != null)
				Root.OnButtonRelease(evt);
		}
Ejemplo n.º 3
0
		public override void OnMouseMotion(MouseEvent evt)
		{
			base.OnMouseMotion(evt);

			if (_dragButton != null) // begin dragging
			{
				if (PreSceneUndocked != null)
					PreSceneUndocked(_dragButton.Scene);
				_dragButton = null;
			}
			else // normal
			{
				if (Root != null)
					Root.OnMouseMotion(evt);
			}
		}
Ejemplo n.º 4
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;
				}
			}
		}