/// /// This file is part of ILNumerics Community Edition. /// /// ILNumerics Community Edition - high performance computing for applications. /// Copyright (C) 2006 - 2012 Haymo Kutschbach, http://ilnumerics.net /// /// ILNumerics Community Edition is free software: you can redistribute it and/or modify /// it under the terms of the GNU General Public License version 3 as published by /// the Free Software Foundation. /// /// ILNumerics Community Edition 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 General Public License for more details. /// /// You should have received a copy of the GNU General Public License /// along with ILNumerics Community Edition. See the file License.txt in the root /// of your distribution package. If not, see . /// /// In addition this software uses the following components and/or licenses: /// /// ================================================================================= /// The Open Toolkit Library License /// /// Copyright (c) 2006 - 2009 the Open Toolkit library. /// /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to deal /// in the Software without restriction, including without limitation the rights to /// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of /// the Software, and to permit persons to whom the Software is furnished to do /// so, subject to the following conditions: /// /// The above copyright notice and this permission notice shall be included in all /// copies or substantial portions of the Software. /// /// ================================================================================= /// #pragma warning disable 1591 using System; using System.Collections.Generic; using System.Text; using System.Drawing; using ILNumerics.Drawing.Graphs; using ILNumerics.Drawing.Interfaces; namespace ILNumerics.Drawing { /// /// tick provider function delegate definition /// /// minimum axis limit /// maximum axis limit /// maximum number of ticks to create /// list of tick position to be drawn /// User defined tick providers must fulfill this delegates signature. /// public delegate List ILLabeledTickProvider (float min, float max, int maxCount); /// /// occours if the clipping data for an subfigure have changed /// /// object which changed the data /// arguments containing the new clipping data public delegate void ILClippingDataChangedEvent (object sender, ClippingChangedEventArgs e); /// /// delegate used to measure text, device dependent /// /// text to be measured /// Font used for rendering /// Size in screen coords public delegate Size MeasureTextDelegate(string text, Font font); /// /// arguments on ClippinChangedEvents /// public class ClippingChangedEventArgs : EventArgs { /// /// creates a new ClippingChangedEventArgs object /// /// public ClippingChangedEventArgs(ILClippingData clippingData) { ClippingData = clippingData; } /// /// the current (new) clipping data /// public ILClippingData ClippingData; } /// /// occours if a graphics device has been reset by the underlying graphics framework /// /// objects who hosts the graphics device /// public delegate void ILGraphicsDeviceResetEvent(object sender, EventArgs eventArgs); /// /// occours if a graphics device has been (re)created by an output panel /// /// objects who hosts the graphics device /// public delegate void ILGraphicsDeviceCreatedEvent(object sender, EventArgs eventArgs); /// /// arguments to communicate changes on graphs /// public class ILGraphChangedEventArgs : EventArgs { /// /// string description of the changed parameter /// public readonly string Source; public ILGraphChangedEventArgs (string source) { this.Source = source; } } /// /// fires, if properties of a graph were /have changed /// /// /// public delegate void ILGraphChangedEvent (object sender, ILGraphChangedEventArgs args); /// /// arguments for ILGraphCollectionChanged events /// public class ILGraphCollectionChangedEventArgs: EventArgs { public readonly GraphCollectionChangeReason Reason; public readonly ILGraph Graph; /// /// description of element changed (in some cases) /// public readonly IILPanelConfigurator Configurator; /// /// arguments for GraphCollectionChanged events /// /// the graph who was changed, for ILPlot: the scene graph /// reason /// instance of IILPanelConfigurator or null public ILGraphCollectionChangedEventArgs(ILGraph graph, GraphCollectionChangeReason reason, IILPanelConfigurator configurator) { this.Graph = graph; this.Reason = reason; this.Configurator = configurator; } } /// /// occurs on changes to the graph collection: add, delete /// /// graph collection /// public delegate void ILGraphCollectionChangedEvent(object sender, ILGraphCollectionChangedEventArgs args); /// /// Event handler handling LabeledTickAdding events /// public class ILLabeledTickAddingArgs : EventArgs { public bool Cancel; public float Value; public string Expression; public int Index; public ILLabeledTickAddingArgs (float value, string expression, int index) { Value = value; Expression = expression; Cancel = false; Index = index; } } /// /// Delegate definition for function handling LabeledTickAdding events /// /// the sender of the event (e.g. ILTickCollection) /// arguments public delegate void LabeledTickAddingHandler (object sender, ILLabeledTickAddingArgs args); /// /// Event arguments for axis changed events /// public class ILAxisChangedEventArgs : EventArgs { /// /// Name of changed axis (X-,Y-,ZAxis) /// public AxisNames AxisName; /// /// construct a new instance /// /// public ILAxisChangedEventArgs (AxisNames name) { AxisName = name; } } /// /// delegate for functions handling AxisChanged events /// /// /// public delegate void AxisChangedEventHandler (object sender, ILAxisChangedEventArgs args); /// /// event argument for SceneGraphNodeAdded events /// public class ILSceneGraphNodeEventArgs : EventArgs { /// /// Node which was added to the scene graph /// public ILSceneGraphNode Node; public ILSceneGraphNodeEventArgs(ILSceneGraphNode node) { Node = node; } } /// /// used for events fired once a SceneGraphNode was added /// /// the object /// the arguments public delegate void SceneGraphNodeHandler (object sender, ILSceneGraphNodeEventArgs args); }