C# Class WindowlessControls.WindowlessControlHost

Inheritance: System.Windows.Forms.ScrollableControl, IWindowlessPaintControl
Show file Open project: koush/WindowlessControls Class Usage Examples

Private Properties

Property Type Description
ClipToBoundsChanged void
Control_KeyDown void
Control_KeyPress void
Control_KeyUp void
DisposeBackBuffer void
FindFocusable System.Windows.Forms.Control
GetBestNavigationHost System.Windows.Forms.Control
IsFocusable bool
OnWindowlessUnhandledKeyDown void
PaintChildrenChanged void
PaintSelfChanged void
PrepareBackBuffer void
PrepareDirtyRegion void
WindowlessInvalidate void
WindowlessPaintHost void

Public Methods

Method Description
FindFocusedControl ( Control control ) : Control
FormlessGotFocus ( ) : void
FormlessKeyDown ( KeyEventArgs e ) : void
FormlessLostFocus ( ) : void
InvokeClick ( ) : void
OnWindowlessPaint ( WindowlessPaintEventArgs e ) : void
Refresh ( ) : void
WindowlessBringIntoView ( IWindowlessControl control ) : void
WindowlessHookCommonControlKeyEvents ( Form form ) : void
WindowlessInvalidate ( ) : void
WindowlessInvalidate ( IWindowlessControl sender ) : void
WindowlessPaint ( Graphics graphics, Point origin, Rectangle clipRectangle ) : void

Protected Methods

Method Description
GetEdgeDistance ( int primary1, int secondary1, int dimension1, int primary2, int secondary2, int dimension2, bool positiveDirection ) : long
GetNavigationSourceRectangle ( ) : Rectangle
OnClick ( EventArgs e ) : void
OnDoubleClick ( EventArgs e ) : void
OnGotFocus ( EventArgs e ) : void
OnKeyDown ( KeyEventArgs e ) : void
OnKeyPress ( KeyPressEventArgs e ) : void
OnKeyUp ( KeyEventArgs e ) : void
OnLostFocus ( EventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
OnMouseUp ( MouseEventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void
OnPaintBackground ( PaintEventArgs e ) : void
OnWindowlessClick ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
OnWindowlessDoubleClick ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
OnWindowlessGotFocus ( WindowlessControlHost sender, EventArgs e ) : void
OnWindowlessKeyDown ( Control sender, KeyEventArgs e ) : void
OnWindowlessKeyPress ( Control sender, KeyPressEventArgs e ) : void
OnWindowlessKeyUp ( Control sender, KeyEventArgs e ) : void
OnWindowlessLostFocus ( WindowlessControlHost sender, EventArgs e ) : void
OnWindowlessMouseDown ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
OnWindowlessMouseFocus ( WindowlessControlHost sender, MouseEventArgs e ) : void
OnWindowlessMouseMove ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
OnWindowlessMouseUp ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
OnWindowlessNavigate ( Control sender, WindowlessNavigateEventArgs e ) : void
OnWindowlessNavigatingTo ( WindowlessControlHost sender, WindowlessNavigateEventArgs e ) : void
OnWindowlessPaint ( WindowlessControlHost sender, Graphics graphics, Point origin, Rectangle clipRectangle ) : void
ScoreDistance ( long distance, bool positiveDirection ) : ulong

Private Methods

Method Description
ClipToBoundsChanged ( object sender, DependencyPropertyEventArgs e ) : void
Control_KeyDown ( object sender, KeyEventArgs e ) : void
Control_KeyPress ( object sender, KeyPressEventArgs e ) : void
Control_KeyUp ( object sender, KeyEventArgs e ) : void
DisposeBackBuffer ( ) : void
FindFocusable ( Control control ) : Control
GetBestNavigationHost ( Rectangle rect, Keys key, Control parent, Control exclude, ulong &bestScore ) : Control
IsFocusable ( Control control ) : bool
OnWindowlessUnhandledKeyDown ( Control control, KeyEventArgs e ) : void

If a key down event is unhandled, this will attempt to handle it by navigating or scrolling.

PaintChildrenChanged ( object sender, DependencyPropertyEventArgs e ) : void
PaintSelfChanged ( object sender, DependencyPropertyEventArgs e ) : void
PrepareBackBuffer ( Rectangle clipRectangle ) : void
PrepareDirtyRegion ( ) : void
WindowlessInvalidate ( Rectangle rect ) : void
WindowlessPaintHost ( IWindowlessControl control, Graphics graphics, Point origin, Rectangle destRect ) : void

Method Details

FindFocusedControl() public static method

public static FindFocusedControl ( Control control ) : Control
control System.Windows.Forms.Control
return System.Windows.Forms.Control

FormlessGotFocus() public method

public FormlessGotFocus ( ) : void
return void

FormlessKeyDown() public method

public FormlessKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

FormlessLostFocus() public method

public FormlessLostFocus ( ) : void
return void

GetEdgeDistance() protected static method

protected static GetEdgeDistance ( int primary1, int secondary1, int dimension1, int primary2, int secondary2, int dimension2, bool positiveDirection ) : long
primary1 int
secondary1 int
dimension1 int
primary2 int
secondary2 int
dimension2 int
positiveDirection bool
return long

GetNavigationSourceRectangle() protected method

protected GetNavigationSourceRectangle ( ) : Rectangle
return System.Drawing.Rectangle

InvokeClick() public method

public InvokeClick ( ) : void
return void

OnClick() protected method

protected OnClick ( EventArgs e ) : void
e System.EventArgs
return void

OnDoubleClick() protected method

protected OnDoubleClick ( EventArgs e ) : void
e System.EventArgs
return void

OnGotFocus() protected method

protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnKeyDown() protected method

protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnKeyPress() protected method

protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
return void

OnKeyUp() protected method

protected OnKeyUp ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnLostFocus() protected method

protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseUp() protected method

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPaintBackground() protected method

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnWindowlessClick() protected method

protected OnWindowlessClick ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
sender WindowlessControlHost
e WindowlessMouseEventArgs
return void

OnWindowlessDoubleClick() protected method

protected OnWindowlessDoubleClick ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
sender WindowlessControlHost
e WindowlessMouseEventArgs
return void

OnWindowlessGotFocus() protected method

protected OnWindowlessGotFocus ( WindowlessControlHost sender, EventArgs e ) : void
sender WindowlessControlHost
e System.EventArgs
return void

OnWindowlessKeyDown() protected method

protected OnWindowlessKeyDown ( Control sender, KeyEventArgs e ) : void
sender System.Windows.Forms.Control
e System.Windows.Forms.KeyEventArgs
return void

OnWindowlessKeyPress() protected method

protected OnWindowlessKeyPress ( Control sender, KeyPressEventArgs e ) : void
sender System.Windows.Forms.Control
e System.Windows.Forms.KeyPressEventArgs
return void

OnWindowlessKeyUp() protected method

protected OnWindowlessKeyUp ( Control sender, KeyEventArgs e ) : void
sender System.Windows.Forms.Control
e System.Windows.Forms.KeyEventArgs
return void

OnWindowlessLostFocus() protected method

protected OnWindowlessLostFocus ( WindowlessControlHost sender, EventArgs e ) : void
sender WindowlessControlHost
e System.EventArgs
return void

OnWindowlessMouseDown() protected method

protected OnWindowlessMouseDown ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
sender WindowlessControlHost
e WindowlessMouseEventArgs
return void

OnWindowlessMouseFocus() protected method

protected OnWindowlessMouseFocus ( WindowlessControlHost sender, MouseEventArgs e ) : void
sender WindowlessControlHost
e MouseEventArgs
return void

OnWindowlessMouseMove() protected method

protected OnWindowlessMouseMove ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
sender WindowlessControlHost
e WindowlessMouseEventArgs
return void

OnWindowlessMouseUp() protected method

protected OnWindowlessMouseUp ( WindowlessControlHost sender, WindowlessMouseEventArgs e ) : void
sender WindowlessControlHost
e WindowlessMouseEventArgs
return void

OnWindowlessNavigate() protected method

protected OnWindowlessNavigate ( Control sender, WindowlessNavigateEventArgs e ) : void
sender System.Windows.Forms.Control
e WindowlessNavigateEventArgs
return void

OnWindowlessNavigatingTo() protected method

protected OnWindowlessNavigatingTo ( WindowlessControlHost sender, WindowlessNavigateEventArgs e ) : void
sender WindowlessControlHost
e WindowlessNavigateEventArgs
return void

OnWindowlessPaint() protected method

protected OnWindowlessPaint ( WindowlessControlHost sender, Graphics graphics, Point origin, Rectangle clipRectangle ) : void
sender WindowlessControlHost
graphics System.Drawing.Graphics
origin Point
clipRectangle System.Drawing.Rectangle
return void

OnWindowlessPaint() public method

public OnWindowlessPaint ( WindowlessPaintEventArgs e ) : void
e WindowlessPaintEventArgs
return void

Refresh() public method

public Refresh ( ) : void
return void

ScoreDistance() protected static method

protected static ScoreDistance ( long distance, bool positiveDirection ) : ulong
distance long
positiveDirection bool
return ulong

WindowlessBringIntoView() public static method

public static WindowlessBringIntoView ( IWindowlessControl control ) : void
control IWindowlessControl
return void

WindowlessHookCommonControlKeyEvents() public static method

public static WindowlessHookCommonControlKeyEvents ( Form form ) : void
form System.Windows.Forms.Form
return void

WindowlessInvalidate() public method

public WindowlessInvalidate ( ) : void
return void

WindowlessInvalidate() public static method

public static WindowlessInvalidate ( IWindowlessControl sender ) : void
sender IWindowlessControl
return void

WindowlessPaint() public method

public WindowlessPaint ( Graphics graphics, Point origin, Rectangle clipRectangle ) : void
graphics System.Drawing.Graphics
origin Point
clipRectangle System.Drawing.Rectangle
return void