#region Disclaimer / License // Copyright (C) 2012, Jackie Ng // http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@gmail.com // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // #endregion using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace Maestro.MapViewer { /// /// A callback for circle digitization /// /// The X coordinate of the circle's center /// The Y coordinate of the circle's center /// The circle's radius public delegate void CircleDigitizationCallback(double x, double y, double radius); /// /// A callback for line digitization /// /// The X coordinate of the line's first point /// The Y coordinate of the line's first point /// The X coordinate of the line's second point /// The Y coordinate of the line's second point public delegate void LineDigitizationCallback(double x1, double y1, double x2, double y2); /// /// A callback for point digitization /// /// The X coordinate of the point /// The Y coordinate of the point public delegate void PointDigitizationCallback(double x, double y); /// /// A callback for polygon digitization /// /// A n by 2 array of polygon coordinates, where n is the number of vertices public delegate void PolygonDigitizationCallback(double[,] coordinates); /// /// A callback for line string digitization /// /// A n by 2 array of line string coordinates, where n is the number of vertices public delegate void LineStringDigitizationCallback(double[,] coordinates); /// /// A callback for rectangle digitization /// /// The X coordinate of the rectangle's lower left point /// The Y coordinate of the rectangle's lower left point /// The X coordinate of the rectangle's upper right point /// The Y coordinate of the rectangle's upper right point public delegate void RectangleDigitizationCallback(double llx, double lly, double urx, double ury); /// /// Represents an entry in the view history stack /// public class MapViewHistoryEntry { internal MapViewHistoryEntry(double x, double y, double scale) { this.X = x; this.Y = y; this.Scale = scale; } /// /// Gets the X coordinate /// public double X { get; private set; } /// /// Gets the Y coordinate /// public double Y { get; private set; } /// /// Gets the view scale /// public double Scale { get; private set; } } /// /// Contains data of a MouseMapPositionChanged event /// public class MapPointEventArgs : EventArgs { /// /// Gets the X coordinate /// public readonly double X; /// /// Gets the Y coordinate /// public readonly double Y; /// /// /// /// /// public MapPointEventArgs(double x, double y) { this.X = x; this.Y = y; } } /// /// The type of digitization in progress /// public enum MapDigitizationType { /// /// No digitization in progress /// None, /// /// A point digitization is in progress /// Point, /// /// A line digitization is in progress /// Line, /// /// A line string digitization is in progress /// LineString, /// /// A rectangle digitization is in progress /// Rectangle, /// /// A polygon digitization is in progress /// Polygon, /// /// A circle digitization is in progress /// Circle } /// /// The active viewer tool /// public enum MapActiveTool { /// /// Zoom In command /// ZoomIn, /// /// Zoom Out command /// ZoomOut, /// /// Pan command /// Pan, /// /// Select command /// Select, /// /// No active command /// None } /// /// Viewer rendering options /// public class ViewerRenderingOptions { internal ViewerRenderingOptions(string format, int behavior, Color color) { this.Format = format; this.Behavior = behavior; this.Color = color; } /// /// Gets the format. /// public string Format { get; private set; } /// /// Gets the behavior. /// public int Behavior { get; private set; } /// /// Gets the color. /// public Color Color { get; private set; } } }