C# Class LongoMatch.Drawing.SelectionCanvas

A selection canvas supports selecting ICanvasSelectableObject objects from the canvas and moving, resizing them.
Inheritance: Canvas
显示文件 Open project: GNOME/longomatch

Public Methods

Method Description
ClearSelection ( ) : void

Reset the list of select objects

SelectionCanvas ( IWidget widget ) : System

Protected Methods

Method 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

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

Clears the objects.
protected ClearObjects ( ) : void
return void

ClearSelection() public method

Reset the list of select objects
public ClearSelection ( ) : void
return void

CursorMoved() protected method

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

Dispose() protected method

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

GetSelection() protected method

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

HandleLeftButton() protected method

protected HandleLeftButton ( Point coords, ButtonModifier modif ) : void
coords Point
modif ButtonModifier
return void

HandleMotionEvent() protected method

protected HandleMotionEvent ( Point coords ) : void
coords Point
return void

HandleRightButton() protected method

protected HandleRightButton ( Point coords, ButtonModifier modif ) : void
coords Point
modif ButtonModifier
return void

SelectionCanvas() public method

public SelectionCanvas ( IWidget widget ) : System
widget IWidget
return System

SelectionChanged() protected method

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

SelectionMoved() protected method

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

ShowMenu() protected method

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

StartMove() protected method

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

StopMove() protected method

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

UpdateSelection() protected method

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