External/OxyPlot/OxyPlot/Manipulators/IPlotControl.cs
changeset 391 5be8f2773237
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/External/OxyPlot/OxyPlot/Manipulators/IPlotControl.cs	Sat Jun 08 16:53:22 2013 +0000
     1.3 @@ -0,0 +1,176 @@
     1.4 +// --------------------------------------------------------------------------------------------------------------------
     1.5 +// <copyright file="IPlotControl.cs" company="OxyPlot">
     1.6 +//   The MIT License (MIT)
     1.7 +//
     1.8 +//   Copyright (c) 2012 Oystein Bjorke
     1.9 +//
    1.10 +//   Permission is hereby granted, free of charge, to any person obtaining a
    1.11 +//   copy of this software and associated documentation files (the
    1.12 +//   "Software"), to deal in the Software without restriction, including
    1.13 +//   without limitation the rights to use, copy, modify, merge, publish,
    1.14 +//   distribute, sublicense, and/or sell copies of the Software, and to
    1.15 +//   permit persons to whom the Software is furnished to do so, subject to
    1.16 +//   the following conditions:
    1.17 +//
    1.18 +//   The above copyright notice and this permission notice shall be included
    1.19 +//   in all copies or substantial portions of the Software.
    1.20 +//
    1.21 +//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    1.22 +//   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    1.23 +//   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    1.24 +//   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    1.25 +//   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    1.26 +//   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    1.27 +//   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    1.28 +// </copyright>
    1.29 +// <summary>
    1.30 +//   Interface for Plot controls.
    1.31 +// </summary>
    1.32 +// --------------------------------------------------------------------------------------------------------------------
    1.33 +namespace OxyPlot
    1.34 +{
    1.35 +    using OxyPlot.Annotations;
    1.36 +    using OxyPlot.Axes;
    1.37 +    using OxyPlot.Series;
    1.38 +
    1.39 +    /// <summary>
    1.40 +    /// Defines functionality in the Plot controls.
    1.41 +    /// </summary>
    1.42 +    public interface IPlotControl
    1.43 +    {
    1.44 +        /// <summary>
    1.45 +        /// Gets the actual model.
    1.46 +        /// </summary>
    1.47 +        /// <value>The actual model.</value>
    1.48 +        PlotModel ActualModel { get; }
    1.49 +
    1.50 +        /// <summary>
    1.51 +        /// Gets the axes from a point.
    1.52 +        /// </summary>
    1.53 +        /// <param name="pt">
    1.54 +        /// The point.
    1.55 +        /// </param>
    1.56 +        /// <param name="xaxis">
    1.57 +        /// The x-axis.
    1.58 +        /// </param>
    1.59 +        /// <param name="yaxis">
    1.60 +        /// The y-axis.
    1.61 +        /// </param>
    1.62 +        void GetAxesFromPoint(ScreenPoint pt, out Axis xaxis, out Axis yaxis);
    1.63 +
    1.64 +        /// <summary>
    1.65 +        /// Gets the series from point.
    1.66 +        /// </summary>
    1.67 +        /// <param name="pt">
    1.68 +        /// The point (screen coordinates).
    1.69 +        /// </param>
    1.70 +        /// <param name="limit">
    1.71 +        /// The maximum allowed distance.
    1.72 +        /// </param>
    1.73 +        /// <returns>
    1.74 +        /// The series.
    1.75 +        /// </returns>
    1.76 +        Series.Series GetSeriesFromPoint(ScreenPoint pt, double limit = 100);
    1.77 +
    1.78 +        /// <summary>
    1.79 +        /// Hides the tracker.
    1.80 +        /// </summary>
    1.81 +        void HideTracker();
    1.82 +
    1.83 +        /// <summary>
    1.84 +        /// Hides the zoom rectangle.
    1.85 +        /// </summary>
    1.86 +        void HideZoomRectangle();
    1.87 +
    1.88 +        /// <summary>
    1.89 +        /// Invalidate the plot (not blocking the UI thread)
    1.90 +        /// </summary>
    1.91 +        /// <param name="updateData">
    1.92 +        /// if set to <c>true</c>, all data collections will be updated.
    1.93 +        /// </param>
    1.94 +        void InvalidatePlot(bool updateData = true);
    1.95 +
    1.96 +        /// <summary>
    1.97 +        /// Pans the specified axis.
    1.98 +        /// </summary>
    1.99 +        /// <param name="axis">
   1.100 +        /// The axis.
   1.101 +        /// </param>
   1.102 +        /// <param name="ppt">
   1.103 +        /// The previous point (screen coordinates).
   1.104 +        /// </param>
   1.105 +        /// <param name="cpt">
   1.106 +        /// The current point (screen coordinates).
   1.107 +        /// </param>
   1.108 +        void Pan(Axis axis, ScreenPoint ppt, ScreenPoint cpt);
   1.109 +
   1.110 +        /// <summary>
   1.111 +        /// Refresh the plot immediately (blocking UI thread)
   1.112 +        /// </summary>
   1.113 +        /// <param name="updateData">
   1.114 +        /// if set to <c>true</c>, all data collections will be updated.
   1.115 +        /// </param>
   1.116 +        void RefreshPlot(bool updateData = true);
   1.117 +
   1.118 +        /// <summary>
   1.119 +        /// Resets the specified axis.
   1.120 +        /// </summary>
   1.121 +        /// <param name="axis">
   1.122 +        /// The axis.
   1.123 +        /// </param>
   1.124 +        void Reset(Axis axis);
   1.125 +
   1.126 +        /// <summary>
   1.127 +        /// Sets the cursor type.
   1.128 +        /// </summary>
   1.129 +        /// <param name="cursorType">
   1.130 +        /// The cursor type.
   1.131 +        /// </param>
   1.132 +        void SetCursorType(CursorType cursorType);
   1.133 +
   1.134 +        /// <summary>
   1.135 +        /// Shows the tracker.
   1.136 +        /// </summary>
   1.137 +        /// <param name="trackerHitResult">
   1.138 +        /// The tracker data.
   1.139 +        /// </param>
   1.140 +        void ShowTracker(TrackerHitResult trackerHitResult);
   1.141 +
   1.142 +        /// <summary>
   1.143 +        /// Shows the zoom rectangle.
   1.144 +        /// </summary>
   1.145 +        /// <param name="r">
   1.146 +        /// The rectangle.
   1.147 +        /// </param>
   1.148 +        void ShowZoomRectangle(OxyRect r);
   1.149 +
   1.150 +        /// <summary>
   1.151 +        /// Zooms the specified axis to the specified values.
   1.152 +        /// </summary>
   1.153 +        /// <param name="axis">
   1.154 +        /// The axis.
   1.155 +        /// </param>
   1.156 +        /// <param name="p1">
   1.157 +        /// The new minimum value.
   1.158 +        /// </param>
   1.159 +        /// <param name="p2">
   1.160 +        /// The new maximum value.
   1.161 +        /// </param>
   1.162 +        void Zoom(Axis axis, double p1, double p2);
   1.163 +
   1.164 +        /// <summary>
   1.165 +        /// Zooms at the specified position.
   1.166 +        /// </summary>
   1.167 +        /// <param name="axis">
   1.168 +        /// The axis.
   1.169 +        /// </param>
   1.170 +        /// <param name="factor">
   1.171 +        /// The zoom factor.
   1.172 +        /// </param>
   1.173 +        /// <param name="x">
   1.174 +        /// The position to zoom at.
   1.175 +        /// </param>
   1.176 +        void ZoomAt(Axis axis, double factor, double x);
   1.177 +
   1.178 +    }
   1.179 +}
   1.180 \ No newline at end of file