C# Class YamuiFramework.HtmlRenderer.WinForms.HtmlContainer

Low level handling of Html Renderer logic, this class is used by HtmlParser, HtmlLabel, HtmlToolTip and HtmlRender.
Inheritance: IDisposable
Afficher le fichier Open project: jcaillon/3P Class Usage Examples

Private Properties

Свойство Type Description
CreateKeyEevent YamuiFramework.HtmlRenderer.Core.Adapters.Entities.RKeyEvent
CreateMouseEvent RMouseEvent

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetAttributeAt() public méthode

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
Résultat string

GetElementRectangle() public méthode

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
Résultat RectangleF?

GetHtml() public méthode

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: )
Résultat string

GetLinkAt() public méthode

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

GetLinks() public méthode

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

HandleKeyDown() public méthode

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
Résultat void

HandleMouseDoubleClick() public méthode

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
Résultat void

HandleMouseDown() public méthode

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
Résultat void

HandleMouseLeave() public méthode

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
Résultat void

HandleMouseMove() public méthode

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
Résultat void

HandleMouseUp() public méthode

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
Résultat void

HtmlContainer() public méthode

Init.
public HtmlContainer ( ) : System
Résultat System

PerformLayout() public méthode

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

PerformPaint() public méthode

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

SetHtml() public méthode

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
Résultat void