C# Class LongoMatch.Drawing.SelectionCanvas

A selection canvas supports selecting ICanvasSelectableObject objects from the canvas and moving, resizing them.
Inheritance: Canvas
Afficher le fichier Open project: GNOME/longomatch

Méthodes publiques

Méthode Description
ClearSelection ( ) : void

Reset the list of select objects

SelectionCanvas ( IWidget widget ) : System

Méthodes protégées

Méthode Description
ClearObjects ( ) : void

Clears the objects.

CursorMoved ( Point coords ) : void

Called when the cursor is being moved. Highlights objects when the cursor passes over them.

Dispose ( bool disposing ) : void
GetSelection ( Point coords, bool inMotion = false, bool skipSelected = false ) : Selection
HandleLeftButton ( Point coords, ButtonModifier modif ) : void
HandleMotionEvent ( Point coords ) : void
HandleRightButton ( Point coords, ButtonModifier modif ) : void
SelectionChanged ( List sel ) : void

Notifies subclasses when the selected objects has changed.

SelectionMoved ( Selection sel ) : void

Notifies subclasses when an object has been moved.

ShowMenu ( Point coords ) : void

Notifies subclasses a menu should be displayed. Canvas' with menus should override it to display their menu here.

StartMove ( Selection sel ) : void

Notifies subclasses when an object starts to be moved.

StopMove ( bool moved ) : void

Notifies subclass when the move process stops.

UpdateSelection ( Selection sel, bool notify = true ) : void

Updates the current selection. If sel is null, it clears the current selection. If sel wasn't previously selected, it's added to the list of selected objects, otherwise it's removed from the list.

Private Methods

Méthode Description
HandleButtonPressEvent ( Point coords, uint time, ButtonType type, ButtonModifier modifier ) : void
HandleButtonReleasedEvent ( Point coords, ButtonType type, ButtonModifier modifier ) : void
HandleShowTooltipEvent ( Point coords ) : void

Method Details

ClearObjects() protected méthode

Clears the objects.
protected ClearObjects ( ) : void
Résultat void

ClearSelection() public méthode

Reset the list of select objects
public ClearSelection ( ) : void
Résultat void

CursorMoved() protected méthode

Called when the cursor is being moved. Highlights objects when the cursor passes over them.
protected CursorMoved ( Point coords ) : void
coords Point Coords.
Résultat void

Dispose() protected méthode

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

GetSelection() protected méthode

protected GetSelection ( Point coords, bool inMotion = false, bool skipSelected = false ) : Selection
coords Point
inMotion bool
skipSelected bool
Résultat LongoMatch.Core.Store.Drawables.Selection

HandleLeftButton() protected méthode

protected HandleLeftButton ( Point coords, ButtonModifier modif ) : void
coords Point
modif ButtonModifier
Résultat void

HandleMotionEvent() protected méthode

protected HandleMotionEvent ( Point coords ) : void
coords Point
Résultat void

HandleRightButton() protected méthode

protected HandleRightButton ( Point coords, ButtonModifier modif ) : void
coords Point
modif ButtonModifier
Résultat void

SelectionCanvas() public méthode

public SelectionCanvas ( IWidget widget ) : System
widget IWidget
Résultat System

SelectionChanged() protected méthode

Notifies subclasses when the selected objects has changed.
protected SelectionChanged ( List sel ) : void
sel List List of selected objects.
Résultat void

SelectionMoved() protected méthode

Notifies subclasses when an object has been moved.
protected SelectionMoved ( Selection sel ) : void
sel LongoMatch.Core.Store.Drawables.Selection The selection moved.
Résultat void

ShowMenu() protected méthode

Notifies subclasses a menu should be displayed. Canvas' with menus should override it to display their menu here.
protected ShowMenu ( Point coords ) : void
coords Point Position where the click happens.
Résultat void

StartMove() protected méthode

Notifies subclasses when an object starts to be moved.
protected StartMove ( Selection sel ) : void
sel LongoMatch.Core.Store.Drawables.Selection The selection moved.
Résultat void

StopMove() protected méthode

Notifies subclass when the move process stops.
protected StopMove ( bool moved ) : void
moved bool If set to true, the object position changed.
Résultat void

UpdateSelection() protected méthode

Updates the current selection. If sel is null, it clears the current selection. If sel wasn't previously selected, it's added to the list of selected objects, otherwise it's removed from the list.
protected UpdateSelection ( Selection sel, bool notify = true ) : void
sel LongoMatch.Core.Store.Drawables.Selection The selection.
notify bool If set to true, notifies about the changes.
Résultat void