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); } }
public override void OnButtonRelease(MouseButtonEvent evt) { base.OnButtonRelease(evt); _dragButton = null; if (Root != null) Root.OnButtonRelease(evt); }
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); } }
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; } } }