/// <devdoc> /// Called by the dataGrid when the mouse leaves /// the caption area. /// </devdoc> internal void MouseLeft() { CaptionLocation oldLoc = lastMouseLocation; lastMouseLocation = CaptionLocation.Nowhere; InvalidateLocation(oldLoc); }
internal void MouseLeft() { CaptionLocation lastMouseLocation = this.lastMouseLocation; this.lastMouseLocation = CaptionLocation.Nowhere; this.InvalidateLocation(lastMouseLocation); }
/// <devdoc> /// Called by the dataGrid when the mouse is /// inside the caption. /// </devdoc> internal void MouseOver(int x, int y) { CaptionLocation newLoc = FindLocation(x, y); InvalidateLocation(lastMouseLocation); InvalidateLocation(newLoc); lastMouseLocation = newLoc; }
internal void MouseOver(int x, int y) { CaptionLocation loc = this.FindLocation(x, y); this.InvalidateLocation(this.lastMouseLocation); this.InvalidateLocation(loc); this.lastMouseLocation = loc; }
private void InvalidateLocation(CaptionLocation loc) { Rectangle r; switch (loc) { case CaptionLocation.BackButton: r = backButtonRect; r.Inflate(1, 1); InvalidateCaptionRect(r); break; case CaptionLocation.DownButton: r = downButtonRect; r.Inflate(1, 1); InvalidateCaptionRect(r); break; } }
private void InvalidateLocation(CaptionLocation loc) { Rectangle backButtonRect; switch (loc) { case CaptionLocation.BackButton: backButtonRect = this.backButtonRect; backButtonRect.Inflate(1, 1); this.InvalidateCaptionRect(backButtonRect); return; case CaptionLocation.DownButton: backButtonRect = this.downButtonRect; backButtonRect.Inflate(1, 1); this.InvalidateCaptionRect(backButtonRect); return; } }
/// <devdoc> /// Called by the dataGrid when the mouse is pressed /// inside the caption. /// </devdoc> internal void MouseDown(int x, int y) { CaptionLocation loc = FindLocation(x, y); switch (loc) { case CaptionLocation.BackButton: backPressed = true; InvalidateLocation(loc); break; case CaptionLocation.DownButton: downPressed = true; InvalidateLocation(loc); break; case CaptionLocation.Text: OnCaptionClicked(EventArgs.Empty); break; } }
internal void MouseDown(int x, int y) { CaptionLocation loc = this.FindLocation(x, y); switch (loc) { case CaptionLocation.BackButton: this.backPressed = true; this.InvalidateLocation(loc); return; case CaptionLocation.DownButton: this.downPressed = true; this.InvalidateLocation(loc); return; case CaptionLocation.Text: this.OnCaptionClicked(EventArgs.Empty); return; } }
/// <devdoc> /// Called by the dataGrid when the mouse is released /// inside the caption. /// </devdoc> internal void MouseUp(int x, int y) { CaptionLocation loc = FindLocation(x, y); switch (loc) { case CaptionLocation.DownButton: if (downPressed == true) { downPressed = false; OnDownClicked(EventArgs.Empty); } break; case CaptionLocation.BackButton: if (backPressed == true) { backPressed = false; OnBackwardClicked(EventArgs.Empty); } break; } }
private void InvalidateLocation(CaptionLocation loc) { Rectangle r; switch (loc) { case CaptionLocation.BackButton: r = backButtonRect; r.Inflate(1,1); InvalidateCaptionRect(r); break; case CaptionLocation.DownButton: r = downButtonRect; r.Inflate(1,1); InvalidateCaptionRect(r); break; } }