C# 클래스 BrightIdeasSoftware.HeaderControl

Class used to capture window messages for the header of the list view control.
상속: System.Windows.Forms.NativeWindow
파일 보기 프로젝트 열기: soywiz/cspspemu 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CalculateColumnHeight float
CalculateFilterIndicatorWidth int
DrawImageAndText void
DrawText void
DrawVerticalText void
HandleHeaderCustomDraw bool
NeedsCustomDraw bool
NeedsCustomDraw bool
WndProc void

공개 메소드들

메소드 설명
GetItemRect ( int itemIndex ) : Rectangle

Return the bounds of the item with the given index

HeaderControl ( ObjectListView olv ) : System

Create a header control for the given ObjectListView.

Invalidate ( ) : void

Force the header to redraw by invalidating it

보호된 메소드들

메소드 설명
CalculateFont ( OLVColumn column, bool isHot, bool isPressed ) : Font

What font should be used to draw the header text?

CalculateHeight ( Graphics g ) : int

Calculate how height the header needs to be

CalculateStyle ( OLVColumn column, bool isHot, bool isPressed ) : BrightIdeasSoftware.HeaderStateStyle

What style should be applied to the header?

CreateToolTip ( ) : void

Create a native tool tip control for this listview

CustomDrawHeaderCell ( Graphics g, int columnIndex, int itemState ) : void

Draw one cell of the header

DrawFilterIndicator ( Graphics g, Rectangle r ) : Rectangle

Draw an indication that this column has a filter applied to it

DrawHeaderImageAndText ( Graphics g, Rectangle r, OLVColumn column, BrightIdeasSoftware.HeaderStateStyle stateStyle ) : void

Draw the header's image and text

DrawThemedBackground ( Graphics g, Rectangle r, int columnIndex, bool isSelected ) : void

Draw a more-or-less pure themed header background.

DrawThemedSortIndicator ( Graphics g, Rectangle r ) : void

Draw a sort indicator using themes

DrawUnthemedBackground ( Graphics g, Rectangle r, int columnIndex, bool isSelected, BrightIdeasSoftware.HeaderStateStyle stateStyle ) : void

Draw a background for the header, without using Themes.

DrawUnthemedSortIndicator ( Graphics g, Rectangle r ) : Rectangle

Draw a sort indicator without using themes

HandleDestroy ( Message &m ) : bool

Handle when the underlying header control is destroyed

HandleLayout ( Message &m ) : bool

The message divides a ListView's space between the header and the rows of the listview. The WINDOWPOS structure controls the headers bounds, the RECT controls the listview bounds.

HandleMouseMove ( Message &m ) : bool

Handle the MouseMove windows message

HandleNotify ( Message &m ) : bool

Handle the Notify windows message

HandleSetCursor ( Message &m ) : bool

Handle the SetCursor windows message

HasFilterIndicator ( OLVColumn column ) : bool

Should the given column be drawn with a filter indicator against it?

HasNonThemedSortIndicator ( OLVColumn column ) : bool

Should the given column show a non-themed sort indicator?

HasSortIndicator ( OLVColumn column ) : bool

Should the given column show a sort indicator?

NeedsCustomDraw ( ) : bool

Does this header need to be custom drawn?

Word wrapping and colored text require custom drawning. Funnily enough, we can change the font natively.

비공개 메소드들

메소드 설명
CalculateColumnHeight ( Graphics g, OLVColumn column, TextFormatFlags flags, bool isHot, int i ) : float
CalculateFilterIndicatorWidth ( Rectangle r ) : int
DrawImageAndText ( Graphics g, Rectangle r, OLVColumn column, TextFormatFlags flags, Font f, Color color, int imageTextGap ) : void
DrawText ( Graphics g, Rectangle r, OLVColumn column, TextFormatFlags flags, Font f, Color color ) : void
DrawVerticalText ( Graphics g, Rectangle r, OLVColumn column, Font f, Color color ) : void
HandleHeaderCustomDraw ( Message &m ) : bool

Handle the CustomDraw windows message

NeedsCustomDraw ( BrightIdeasSoftware.HeaderFormatStyle style ) : bool
NeedsCustomDraw ( BrightIdeasSoftware.HeaderStateStyle style ) : bool
WndProc ( Message &m ) : void

메소드 상세

CalculateFont() 보호된 메소드

What font should be used to draw the header text?
protected CalculateFont ( OLVColumn column, bool isHot, bool isPressed ) : Font
column OLVColumn
isHot bool
isPressed bool
리턴 System.Drawing.Font

CalculateHeight() 보호된 메소드

Calculate how height the header needs to be
protected CalculateHeight ( Graphics g ) : int
g System.Drawing.Graphics
리턴 int

CalculateStyle() 보호된 메소드

What style should be applied to the header?
protected CalculateStyle ( OLVColumn column, bool isHot, bool isPressed ) : BrightIdeasSoftware.HeaderStateStyle
column OLVColumn
isHot bool
isPressed bool
리턴 BrightIdeasSoftware.HeaderStateStyle

CreateToolTip() 보호된 메소드

Create a native tool tip control for this listview
protected CreateToolTip ( ) : void
리턴 void

CustomDrawHeaderCell() 보호된 메소드

Draw one cell of the header
protected CustomDrawHeaderCell ( Graphics g, int columnIndex, int itemState ) : void
g System.Drawing.Graphics
columnIndex int
itemState int
리턴 void

DrawFilterIndicator() 보호된 메소드

Draw an indication that this column has a filter applied to it
protected DrawFilterIndicator ( Graphics g, Rectangle r ) : Rectangle
g System.Drawing.Graphics
r System.Drawing.Rectangle
리턴 System.Drawing.Rectangle

DrawHeaderImageAndText() 보호된 메소드

Draw the header's image and text
protected DrawHeaderImageAndText ( Graphics g, Rectangle r, OLVColumn column, BrightIdeasSoftware.HeaderStateStyle stateStyle ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
column OLVColumn
stateStyle BrightIdeasSoftware.HeaderStateStyle
리턴 void

DrawThemedBackground() 보호된 메소드

Draw a more-or-less pure themed header background.
protected DrawThemedBackground ( Graphics g, Rectangle r, int columnIndex, bool isSelected ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
columnIndex int
isSelected bool
리턴 void

DrawThemedSortIndicator() 보호된 메소드

Draw a sort indicator using themes
protected DrawThemedSortIndicator ( Graphics g, Rectangle r ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
리턴 void

DrawUnthemedBackground() 보호된 메소드

Draw a background for the header, without using Themes.
protected DrawUnthemedBackground ( Graphics g, Rectangle r, int columnIndex, bool isSelected, BrightIdeasSoftware.HeaderStateStyle stateStyle ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
columnIndex int
isSelected bool
stateStyle BrightIdeasSoftware.HeaderStateStyle
리턴 void

DrawUnthemedSortIndicator() 보호된 메소드

Draw a sort indicator without using themes
protected DrawUnthemedSortIndicator ( Graphics g, Rectangle r ) : Rectangle
g System.Drawing.Graphics
r System.Drawing.Rectangle
리턴 System.Drawing.Rectangle

GetItemRect() 공개 메소드

Return the bounds of the item with the given index
public GetItemRect ( int itemIndex ) : Rectangle
itemIndex int
리턴 System.Drawing.Rectangle

HandleDestroy() 보호된 메소드

Handle when the underlying header control is destroyed
protected HandleDestroy ( Message &m ) : bool
m System.Windows.Forms.Message
리턴 bool

HandleLayout() 보호된 메소드

The message divides a ListView's space between the header and the rows of the listview. The WINDOWPOS structure controls the headers bounds, the RECT controls the listview bounds.
protected HandleLayout ( Message &m ) : bool
m System.Windows.Forms.Message
리턴 bool

HandleMouseMove() 보호된 메소드

Handle the MouseMove windows message
protected HandleMouseMove ( Message &m ) : bool
m System.Windows.Forms.Message
리턴 bool

HandleNotify() 보호된 메소드

Handle the Notify windows message
protected HandleNotify ( Message &m ) : bool
m System.Windows.Forms.Message
리턴 bool

HandleSetCursor() 보호된 메소드

Handle the SetCursor windows message
protected HandleSetCursor ( Message &m ) : bool
m System.Windows.Forms.Message
리턴 bool

HasFilterIndicator() 보호된 메소드

Should the given column be drawn with a filter indicator against it?
protected HasFilterIndicator ( OLVColumn column ) : bool
column OLVColumn
리턴 bool

HasNonThemedSortIndicator() 보호된 메소드

Should the given column show a non-themed sort indicator?
protected HasNonThemedSortIndicator ( OLVColumn column ) : bool
column OLVColumn
리턴 bool

HasSortIndicator() 보호된 메소드

Should the given column show a sort indicator?
protected HasSortIndicator ( OLVColumn column ) : bool
column OLVColumn
리턴 bool

HeaderControl() 공개 메소드

Create a header control for the given ObjectListView.
public HeaderControl ( ObjectListView olv ) : System
olv ObjectListView
리턴 System

Invalidate() 공개 메소드

Force the header to redraw by invalidating it
public Invalidate ( ) : void
리턴 void

NeedsCustomDraw() 보호된 메소드

Does this header need to be custom drawn?
Word wrapping and colored text require custom drawning. Funnily enough, we can change the font natively.
protected NeedsCustomDraw ( ) : bool
리턴 bool