C# 클래스 YamuiFramework.HtmlRenderer.WinForms.HtmlContainer

Low level handling of Html Renderer logic, this class is used by HtmlParser, HtmlLabel, HtmlToolTip and HtmlRender.
상속: IDisposable
파일 보기 프로젝트 열기: jcaillon/3P 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateKeyEevent YamuiFramework.HtmlRenderer.Core.Adapters.Entities.RKeyEvent
CreateMouseEvent RMouseEvent

공개 메소드들

메소드 설명
Dispose ( ) : void
GetAttributeAt ( Point location, string attribute ) : string

Get attribute value of element at the given x,y location by given key.
If more than one element exist with the attribute at the location the inner most is returned.

GetElementRectangle ( string elementId ) : RectangleF?

Get the rectangle of html element as calculated by html layout.
Element if found by id (id attribute on the html element).
Note: to get the screen rectangle you need to adjust by the hosting control.

GetHtml ( HtmlGenerationStyle styleGen = HtmlGenerationStyle.Inline ) : string

Get html from the current DOM tree with style if requested.

GetLinkAt ( Point location ) : string

Get css link href at the given x,y location.

GetLinks ( ) : List>

Get all the links in the HTML with the element rectangle and href data.

HandleKeyDown ( Control parent, KeyEventArgs e ) : void

Handle key down event for selection and copy.

HandleMouseDoubleClick ( Control parent, MouseEventArgs e ) : void

Handle mouse double click to select word under the mouse.

HandleMouseDown ( Control parent, MouseEventArgs e ) : void

Handle mouse down to handle selection.

HandleMouseLeave ( Control parent ) : void

Handle mouse leave to handle hover cursor.

HandleMouseMove ( Control parent, MouseEventArgs e ) : void

Handle mouse move to handle hover cursor and text selection.

HandleMouseUp ( Control parent, MouseEventArgs e ) : void

Handle mouse up to handle selection and link click.

HtmlContainer ( ) : System

Init.

PerformLayout ( Graphics g ) : void

Measures the bounds of box and children, recursively.

PerformPaint ( Graphics g ) : void

Render the html using the given device.

SetHtml ( string htmlSource, YamuiFramework.HtmlRenderer.Core.Core.CssData baseCssData = null ) : void

Init with optional document and stylesheet.

비공개 메소드들

메소드 설명
CreateKeyEevent ( KeyEventArgs e ) : YamuiFramework.HtmlRenderer.Core.Adapters.Entities.RKeyEvent

Create HtmlRenderer key event from win forms key event.

CreateMouseEvent ( MouseEventArgs e ) : RMouseEvent

Create HtmlRenderer mouse event from win forms mouse event.

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetAttributeAt() 공개 메소드

Get attribute value of element at the given x,y location by given key.
If more than one element exist with the attribute at the location the inner most is returned.
public GetAttributeAt ( Point location, string attribute ) : string
location Point the location to find the attribute at
attribute string the attribute key to get value by
리턴 string

GetElementRectangle() 공개 메소드

Get the rectangle of html element as calculated by html layout.
Element if found by id (id attribute on the html element).
Note: to get the screen rectangle you need to adjust by the hosting control.
public GetElementRectangle ( string elementId ) : RectangleF?
elementId string the id of the element to get its rectangle
리턴 RectangleF?

GetHtml() 공개 메소드

Get html from the current DOM tree with style if requested.
public GetHtml ( HtmlGenerationStyle styleGen = HtmlGenerationStyle.Inline ) : string
styleGen HtmlGenerationStyle Optional: controls the way styles are generated when html is generated (default: )
리턴 string

GetLinkAt() 공개 메소드

Get css link href at the given x,y location.
public GetLinkAt ( Point location ) : string
location Point the location to find the link at
리턴 string

GetLinks() 공개 메소드

Get all the links in the HTML with the element rectangle and href data.
public GetLinks ( ) : List>
리턴 List>

HandleKeyDown() 공개 메소드

Handle key down event for selection and copy.
public HandleKeyDown ( Control parent, KeyEventArgs e ) : void
parent System.Windows.Forms.Control the control hosting the html to invalidate
e System.Windows.Forms.KeyEventArgs the pressed key
리턴 void

HandleMouseDoubleClick() 공개 메소드

Handle mouse double click to select word under the mouse.
public HandleMouseDoubleClick ( Control parent, MouseEventArgs e ) : void
parent System.Windows.Forms.Control the control hosting the html to set cursor and invalidate
e MouseEventArgs mouse event args
리턴 void

HandleMouseDown() 공개 메소드

Handle mouse down to handle selection.
public HandleMouseDown ( Control parent, MouseEventArgs e ) : void
parent System.Windows.Forms.Control the control hosting the html to invalidate
e MouseEventArgs the mouse event args
리턴 void

HandleMouseLeave() 공개 메소드

Handle mouse leave to handle hover cursor.
public HandleMouseLeave ( Control parent ) : void
parent System.Windows.Forms.Control the control hosting the html to set cursor and invalidate
리턴 void

HandleMouseMove() 공개 메소드

Handle mouse move to handle hover cursor and text selection.
public HandleMouseMove ( Control parent, MouseEventArgs e ) : void
parent System.Windows.Forms.Control the control hosting the html to set cursor and invalidate
e MouseEventArgs the mouse event args
리턴 void

HandleMouseUp() 공개 메소드

Handle mouse up to handle selection and link click.
public HandleMouseUp ( Control parent, MouseEventArgs e ) : void
parent System.Windows.Forms.Control the control hosting the html to invalidate
e MouseEventArgs the mouse event args
리턴 void

HtmlContainer() 공개 메소드

Init.
public HtmlContainer ( ) : System
리턴 System

PerformLayout() 공개 메소드

Measures the bounds of box and children, recursively.
public PerformLayout ( Graphics g ) : void
g System.Drawing.Graphics Device context to draw
리턴 void

PerformPaint() 공개 메소드

Render the html using the given device.
public PerformPaint ( Graphics g ) : void
g System.Drawing.Graphics the device to use to render
리턴 void

SetHtml() 공개 메소드

Init with optional document and stylesheet.
public SetHtml ( string htmlSource, YamuiFramework.HtmlRenderer.Core.Core.CssData baseCssData = null ) : void
htmlSource string the html to init with, init empty if not given
baseCssData YamuiFramework.HtmlRenderer.Core.Core.CssData optional: the stylesheet to init with, init default if not given
리턴 void