C# Class BrightIdeasSoftware.TreeListView.TreeRenderer

This class handles drawing the tree structure of the primary column.
Inheritance: HighlightTextRenderer
显示文件 Open project: jcaillon/3P

Public Properties

Property Type Description
PIXELS_PER_LEVEL int

Private Properties

Property Type Description

Public Methods

Method Description
Render ( System graphic, System rect ) : void

The real work of drawing the tree is done in this method

TreeRenderer ( ) : System

Create a TreeRenderer

Protected Methods

Method Description
DrawExpansionGlyph ( Graphics g, Rectangle r, bool isExpanded ) : void

Draw the expansion indicator

DrawExpansionGlyphManual ( Graphics g, Rectangle r, bool isExpanded ) : void

Draw the expansion indicator without using styles

DrawExpansionGlyphStyled ( Graphics g, Rectangle r, bool isExpanded ) : void

Draw the expansion indicator using styles

DrawLines ( Graphics g, Rectangle r, Pen p, Branch br, int glyphMidVertical ) : void

Draw the lines of the tree

HandleGetEditRectangle ( Graphics g, Rectangle cellBounds, BrightIdeasSoftware.OLVListItem item, int subItemIndex, Size preferredSize ) : Rectangle

Calculate the edit rect

HandleHitTest ( Graphics g, BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void

Do the hit test

Method Details

DrawExpansionGlyph() protected method

Draw the expansion indicator
protected DrawExpansionGlyph ( Graphics g, Rectangle r, bool isExpanded ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
isExpanded bool
return void

DrawExpansionGlyphManual() protected method

Draw the expansion indicator without using styles
protected DrawExpansionGlyphManual ( Graphics g, Rectangle r, bool isExpanded ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
isExpanded bool
return void

DrawExpansionGlyphStyled() protected method

Draw the expansion indicator using styles
protected DrawExpansionGlyphStyled ( Graphics g, Rectangle r, bool isExpanded ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
isExpanded bool
return void

DrawLines() protected method

Draw the lines of the tree
protected DrawLines ( Graphics g, Rectangle r, Pen p, Branch br, int glyphMidVertical ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
p System.Drawing.Pen
br Branch
glyphMidVertical int
return void

HandleGetEditRectangle() protected method

Calculate the edit rect
protected HandleGetEditRectangle ( Graphics g, Rectangle cellBounds, BrightIdeasSoftware.OLVListItem item, int subItemIndex, Size preferredSize ) : Rectangle
g System.Drawing.Graphics
cellBounds System.Drawing.Rectangle
item BrightIdeasSoftware.OLVListItem
subItemIndex int
preferredSize System.Drawing.Size
return System.Drawing.Rectangle

HandleHitTest() protected method

Do the hit test
protected HandleHitTest ( Graphics g, BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void
g System.Drawing.Graphics
hti BrightIdeasSoftware.OlvListViewHitTestInfo
x int
y int
return void

Render() public method

The real work of drawing the tree is done in this method
public Render ( System graphic, System rect ) : void
graphic System
rect System
return void

TreeRenderer() public method

Create a TreeRenderer
public TreeRenderer ( ) : System
return System

Property Details

PIXELS_PER_LEVEL public_oe static_oe property

How many pixels will be reserved for each level of indentation?
public static int PIXELS_PER_LEVEL
return int