C# Class Xwt.Canvas

Inheritance: Xwt.Widget
Afficher le fichier Open project: TheBrainTech/xwt Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
AddChild ( Xwt.Widget w ) : void

Adds a child widget.

The widget is placed in the canvas area, at the position (0,0) using the preferred size of the widget

AddChild ( Xwt.Widget widget, Xwt.Rectangle bounds ) : void

Adds a child widget.

The widget is placed in the canvas area, in the specified coordinates and using the specified size

AddChild ( Xwt.Widget w, double x, double y ) : void

Adds a child widget.

The widget is placed in the canvas area, at the specified coordinates, using the preferred size of the widget

Canvas ( ) : System
Clear ( ) : void

Removes all children of the Canvas

GetChildBounds ( Xwt.Widget widget ) : Xwt.Rectangle

Gets the bounds of a child widget

QueueDraw ( ) : void

Invalidates and forces the redraw of the whole area of the widget

QueueDraw ( Xwt.Rectangle rect ) : void

Invalidates and forces the redraw of a rectangular area of the widget

RemoveChild ( Xwt.Widget widget ) : void

Removes a child widget

SetChildBounds ( Xwt.Widget widget, Xwt.Rectangle bounds ) : void

Sets the position and size of a child widget

Méthodes protégées

Méthode Description
CreateBackendHost ( ) : BackendHost
Dispose ( bool disposing ) : void
OnDraw ( Xwt.Drawing.Context ctx, Xwt.Rectangle dirtyRect ) : void

Called when the widget needs to be redrawn

Method Details

AddChild() public méthode

Adds a child widget.
The widget is placed in the canvas area, at the position (0,0) using the preferred size of the widget
public AddChild ( Xwt.Widget w ) : void
w Xwt.Widget /// The widget ///
Résultat void

AddChild() public méthode

Adds a child widget.
The widget is placed in the canvas area, in the specified coordinates and using the specified size
public AddChild ( Xwt.Widget widget, Xwt.Rectangle bounds ) : void
widget Xwt.Widget /// The widget ///
bounds Xwt.Rectangle /// Position and size of the child widget, in container coordinates ///
Résultat void

AddChild() public méthode

Adds a child widget.
The widget is placed in the canvas area, at the specified coordinates, using the preferred size of the widget
public AddChild ( Xwt.Widget w, double x, double y ) : void
w Xwt.Widget /// The widget ///
x double /// X coordinate ///
y double /// Y coordinate ///
Résultat void

Canvas() public méthode

public Canvas ( ) : System
Résultat System

Clear() public méthode

Removes all children of the Canvas
public Clear ( ) : void
Résultat void

CreateBackendHost() protected méthode

protected CreateBackendHost ( ) : BackendHost
Résultat BackendHost

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetChildBounds() public méthode

Gets the bounds of a child widget
If the widget is not a child of this canvas
public GetChildBounds ( Xwt.Widget widget ) : Xwt.Rectangle
widget Xwt.Widget /// The widget ///
Résultat Xwt.Rectangle

OnDraw() protected méthode

Called when the widget needs to be redrawn
protected OnDraw ( Xwt.Drawing.Context ctx, Xwt.Rectangle dirtyRect ) : void
ctx Xwt.Drawing.Context /// Drawing context ///
dirtyRect Xwt.Rectangle
Résultat void

QueueDraw() public méthode

Invalidates and forces the redraw of the whole area of the widget
public QueueDraw ( ) : void
Résultat void

QueueDraw() public méthode

Invalidates and forces the redraw of a rectangular area of the widget
public QueueDraw ( Xwt.Rectangle rect ) : void
rect Xwt.Rectangle /// Area to invalidate ///
Résultat void

RemoveChild() public méthode

Removes a child widget
If the widget is not a child of this canvas
public RemoveChild ( Xwt.Widget widget ) : void
widget Xwt.Widget /// The widget to remove. The widget must have been previously added using AddChild. ///
Résultat void

SetChildBounds() public méthode

Sets the position and size of a child widget
If the widget is not a child of this canvas
public SetChildBounds ( Xwt.Widget widget, Xwt.Rectangle bounds ) : void
widget Xwt.Widget /// The child widget. It must have been added using the AddChild method. ///
bounds Xwt.Rectangle /// New bounds, in container coordinates ///
Résultat void