/// /// 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.Windows.Forms; using System.Drawing; namespace JetBrains.UI.Components.CustomListBox { /// /// Interface for creating custom 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( object item ); /// /// Returns size of an item /// Size GetSize( object 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( object item, Graphics g, Rectangle rect, bool drawSelected); } }