C# Class Flood.GUI.Controls.Canvas

Canvas control. It should be the root parent for all other controls.
Inheritance: Control
Afficher le fichier Open project: FloodProject/flood Class Usage Examples

Méthodes publiques

Méthode Description
AddDelayedDelete ( Control control ) : void

Adds given control to the delete queue and detaches it from canvas. Don't call from Dispose, it modifies child list.

Canvas ( Skins skin ) : System

Initializes a new instance of the Canvas class.

Dispose ( ) : void
GetCanvas ( ) : Canvas
Input_Character ( char chr ) : bool

Handles keyboard events. Called from Input subsystems.

Input_Key ( Keys key, bool down ) : bool

Handles keyboard events. Called from Input subsystems.

Input_MouseButton ( int button, bool down ) : bool

Handles mouse button events. Called from Input subsystems.

Input_MouseMoved ( int x, int y, int dx, int dy ) : bool

Handles mouse movement events. Called from Input subsystems.

Input_MouseWheel ( int val ) : bool

Handles the mouse wheel events. Called from Input subsystems.

Redraw ( ) : void

Re-renders the control, invalidates cached texture.

RenderCanvas ( ) : void

Renders the canvas. Call in your rendering loop.

Méthodes protégées

Méthode Description
Initialize ( ) : void

Additional initialization (which is sometimes not appropriate in the constructor)

OnBoundsChanged ( Rectangle oldBounds ) : void

Handler invoked when control's bounds change.

Render ( Skins skin ) : void

Renders the control using specified skin.

Private Methods

Méthode Description
ProcessDelayedDeletes ( ) : void
Update ( ) : void

Processes input and layout. Also purges delayed delete queue.

Method Details

AddDelayedDelete() public méthode

Adds given control to the delete queue and detaches it from canvas. Don't call from Dispose, it modifies child list.
public AddDelayedDelete ( Control control ) : void
control Control Control to delete.
Résultat void

Canvas() public méthode

Initializes a new instance of the Canvas class.
public Canvas ( Skins skin ) : System
skin Skins Skin to use.
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetCanvas() public méthode

public GetCanvas ( ) : Canvas
Résultat Canvas

Initialize() protected méthode

Additional initialization (which is sometimes not appropriate in the constructor)
protected Initialize ( ) : void
Résultat void

Input_Character() public méthode

Handles keyboard events. Called from Input subsystems.
public Input_Character ( char chr ) : bool
chr char
Résultat bool

Input_Key() public méthode

Handles keyboard events. Called from Input subsystems.
public Input_Key ( Keys key, bool down ) : bool
key Keys
down bool
Résultat bool

Input_MouseButton() public méthode

Handles mouse button events. Called from Input subsystems.
public Input_MouseButton ( int button, bool down ) : bool
button int
down bool
Résultat bool

Input_MouseMoved() public méthode

Handles mouse movement events. Called from Input subsystems.
public Input_MouseMoved ( int x, int y, int dx, int dy ) : bool
x int
y int
dx int
dy int
Résultat bool

Input_MouseWheel() public méthode

Handles the mouse wheel events. Called from Input subsystems.
public Input_MouseWheel ( int val ) : bool
val int
Résultat bool

OnBoundsChanged() protected méthode

Handler invoked when control's bounds change.
protected OnBoundsChanged ( Rectangle oldBounds ) : void
oldBounds Rectangle Old bounds.
Résultat void

Redraw() public méthode

Re-renders the control, invalidates cached texture.
public Redraw ( ) : void
Résultat void

Render() protected méthode

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
Résultat void

RenderCanvas() public méthode

Renders the canvas. Call in your rendering loop.
public RenderCanvas ( ) : void
Résultat void