using RealTimeGraphX.EventArguments;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace RealTimeGraphX
{
///
/// Represents a graph controller.
///
///
public interface IGraphController : IGraphComponent
{
#region Events
///
/// Occurs when the current effective minimum/maximum values have changed.
///
event EventHandler EffectiveRangeChanged;
///
/// Occurs when the current virtual (effective minimum/maximum after transformation) minimum/maximum values have changed.
///
event EventHandler VirtualRangeChanged;
#endregion
#region Properties
///
/// Gets or sets the controller refresh rate.
/// Higher rate requires more CPU time.
///
TimeSpan RefreshRate { get; set; }
///
/// Gets or sets a value indicating whether to pause the rendering.
///
bool IsPaused { get; set; }
///
/// Gets or sets a value indicating whether to disable the rendering of data.
///
bool DisableRendering { get; set; }
///
/// Gets the current effective x-axis minimum.
///
GraphDataPoint EffectiveMinimumX { get; }
///
/// Gets the current effective x-axis maximum.
///
GraphDataPoint EffectiveMaximumX { get; }
///
/// Gets the current effective y-axis minimum.
///
GraphDataPoint EffectiveMinimumY { get; }
///
/// Gets the current effective y-axis maximum.
///
GraphDataPoint EffectiveMaximumY { get; }
///
/// Gets the current virtual (effective minimum/maximum after transformation) x-axis minimum.
///
GraphDataPoint VirtualMinimumX { get; }
///
/// Gets the current virtual (effective minimum/maximum after transformation) x-axis maximum.
///
GraphDataPoint VirtualMaximumX { get; }
///
/// Gets the current virtual (effective minimum/maximum after transformation) y-axis minimum.
///
GraphDataPoint VirtualMinimumY { get; }
///
/// Gets the current virtual (effective minimum/maximum after transformation) y-axis maximum.
///
GraphDataPoint VirtualMaximumY { get; }
///
/// Clears all data points from this controller.
///
void Clear();
#endregion
#region Commands
///
/// Gets the clear command.
///
GraphCommand ClearCommand { get; }
#endregion
#region Methods
///
/// Requests the controller to invoke a virtual range change event.
///
void RequestVirtualRangeChange();
#endregion
}
///
/// Represents a graph controller capable of pushing data points to it's associated Graph Renderer
/// and rendering them to it's associated Graph Surface.
///
/// The type of the data series.
///
public interface IGraphController : IGraphController where TDataSeries : IGraphDataSeries
{
#region Properties
///
/// Gets the data series collection.
///
ObservableCollection DataSeriesCollection { get; }
///
/// Gets or sets the graph renderer.
///
IGraphRenderer Renderer { get; set; }
///
/// Gets or sets the graph surface.
///
IGraphSurface Surface { get; set; }
#endregion
}
///
/// Represents a graph controller capable of pushing data points to it's associated Graph Renderer
/// and rendering them to it's associated Graph Surface.
///
/// The type of the data series.
/// The type of the x data point.
/// The type of the y data point.
///
public interface IGraphController : IGraphController
where TXDataPoint : GraphDataPoint
where TYDataPoint : GraphDataPoint
where TDataSeries : IGraphDataSeries
{
#region Properties
///
/// Gets or sets the graph range (data point boundaries).
///
GraphRange Range { get; set; }
#endregion
#region Methods
///
/// Submits the specified x and y data points.
/// If the controller has more than one data series the data points will be duplicated.
///
/// X data point.
/// Y data point.
void PushData(TXDataPoint x, TYDataPoint y);
///
/// Submits the specified collections of x and y data points.
/// If the controller has more than one data series the data points will be distributed evenly.
///
/// X data point collection.
/// Y data point collection.
void PushData(IEnumerable xx, IEnumerable yy);
///
/// Submits a matrix of x and y data points. Meaning each data series should process a single collection of x/y data points.
///
/// X matrix.
/// Y matrix.
void PushData(IEnumerable> xxxx, IEnumerable> yyyy);
#endregion
}
}