/// /// Copyright © 2003-2008 JetBrains s.r.o. /// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder). /// using System; using System.Drawing; using System.Windows.Forms; namespace JetBrains.UI.Components.CustomListView { /// /// Interface for creating custom Item painters /// public interface IItemPainter { /// /// Checks if a given Item can be handled by the painter /// /// The Item to check /// true if the Item can be handled, false it cannot. bool IsHandled( ListViewItem Item ); /// /// Returns size of an item /// Size GetSize( ListViewItem item, Graphics g ); /// /// Draws a given Item in specified rectangle /// /// /// If the Item cannot be handled, the method should do nothing /// /// The Item to draw /// Graphics to draw in /// Bounding rectangle to use void Draw( ListViewItem Item, Graphics g, Rectangle rect); /// /// Gets Item which is displayed at specified point /// /// ListView control to look for Items in /// The point to look for Item at. /// Item at point or null if there's no such Item. ListViewItem GetItemAt( ListView ListView, Point point ); } }