Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Visualization/3.2/PanListener.cs @ 2608

Last change on this file since 2608 was 2019, checked in by bspisic, 15 years ago

Added some comments (#664)

File size: 779 bytes
RevLine 
[1055]1using System.Drawing;
2using System.Windows.Forms;
3
4namespace HeuristicLab.Visualization {
[2019]5  /// <summary>
6  /// Supports the state panning.
7  /// </summary>
[1055]8  public class PanListener : IMouseEventListener {
[1249]9    private Point startPoint;
[1055]10
[2019]11    /// <summary>
12    /// This event will be fired every MouseMove call.
13    /// </summary>
[1249]14    public event MoveHandler Pan;
15
16    public PanListener(Point startPoint) {
[1055]17      this.startPoint = startPoint;
18    }
19
20    #region IMouseEventListener Members
21
22    public void MouseMove(object sender, MouseEventArgs e) {
[1249]23      if (Pan != null) {
24        Pan(startPoint, e.Location);
[1055]25      }
26
[1249]27      startPoint = e.Location; 
[1055]28    }
29
[2017]30    public void MouseUp(object sender, MouseEventArgs e) {}
[1055]31
32    #endregion
33  }
34}
Note: See TracBrowser for help on using the repository browser.