using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using Microsoft.Research.DynamicDataDisplay.Common; namespace Microsoft.Research.DynamicDataDisplay.ViewportRestrictions { /// /// Represents a base class for all restrictions that are being applied to viewport's visible rect. /// public abstract class ViewportRestriction { #region IViewportRestriction Members /// /// Applies the restriction. /// /// Previous data rectangle. /// Proposed data rectangle. /// The viewport, to which current restriction is being applied. /// New changed visible rectangle. public abstract DataRect Apply(DataRect previousDataRect, DataRect proposedDataRect, Viewport2D viewport); /// /// Raises the changed event. /// protected void RaiseChanged() { Changed.Raise(this); } /// /// Occurs when restriction changes. /// Causes update of 's Visible property. /// public event EventHandler Changed; #endregion } }