C# Class Xwt.Canvas

Inheritance: Xwt.Widget
Datei anzeigen Open project: TheBrainTech/xwt Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method 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

Protected Methods

Method 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 method

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 ///
return void

AddChild() public method

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 ///
return void

AddChild() public method

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 ///
return void

Canvas() public method

public Canvas ( ) : System
return System

Clear() public method

Removes all children of the Canvas
public Clear ( ) : void
return void

CreateBackendHost() protected method

protected CreateBackendHost ( ) : BackendHost
return BackendHost

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetChildBounds() public method

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 ///
return Xwt.Rectangle

OnDraw() protected method

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
return void

QueueDraw() public method

Invalidates and forces the redraw of the whole area of the widget
public QueueDraw ( ) : void
return void

QueueDraw() public method

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

RemoveChild() public method

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. ///
return void

SetChildBounds() public method

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 ///
return void