///
/// 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.CustomTreeView
{
///
/// Interface for creating custom node painters
///
public interface INodePainter
{
///
/// Checks if a given node can be handled by the painter
///
/// The node to check
/// true if the node can be handled, false it cannot.
bool IsHandled( TreeNode node );
///
/// Draws a given node in specified rectangle
///
///
/// If the node cannot be handled, the method should do nothing
///
/// The node to draw
/// Device context to draw in
/// Bounding rectangle to use
void Draw( TreeNode node, IntPtr hdc, Rectangle rect );
///
/// Gets node which is displayed at specified point
///
/// TreeView control to look for nodes in
/// The point to look for node at.
/// Node at point or null if there's no such node.
TreeNode GetNodeAt( TreeView treeView, Point point );
///
/// Invalidates the specified tree node.
///
/// The node to invalidate.
void InvalidateNode( TreeNode node );
}
}