|
|
72b17c |
using System;
|
|
|
72b17c |
using System.Collections.Generic;
|
|
|
b82ef4 |
using Assistance.Drawing;
|
|
|
72b17c |
|
|
|
72b17c |
namespace Assistance {
|
|
|
589f9a |
public class Modifier: ActivePoint.Owner, InputManager.IModifier {
|
|
|
b82ef4 |
public static readonly Pen pen = new Pen("Light Gray");
|
|
|
72b17c |
|
|
|
726e8a |
public Modifier(Document document): base(document) {
|
|
|
726e8a |
document.modifiers.Add(this);
|
|
|
0f2bf8 |
document.workarea.updateModifiers();
|
|
|
72b17c |
}
|
|
|
72b17c |
|
|
|
72b17c |
public override void remove() {
|
|
|
72b17c |
base.remove();
|
|
|
726e8a |
document.modifiers.Remove(this);
|
|
|
0f2bf8 |
document.workarea.updateModifiers();
|
|
|
72b17c |
}
|
|
|
72b17c |
|
|
|
72b17c |
public override void bringToFront() {
|
|
|
726e8a |
document.modifiers.Remove(this);
|
|
|
726e8a |
document.modifiers.Add(this);
|
|
|
72b17c |
}
|
|
|
72b17c |
|
|
|
1d3aae |
public virtual void activate() { }
|
|
|
589f9a |
public virtual void modify(Track track, InputManager.KeyPoint keyPoint, List<track> outTracks) { }
|
|
|
589f9a |
public virtual void modify(List<track> tracks, InputManager.KeyPoint keyPoint, List<track> outTracks)
|
|
|
589f9a |
{ foreach(Track track in tracks) modify(track, keyPoint, outTracks); }
|
|
|
0f2bf8 |
public virtual void drawHover(Cairo.Context context, Point hover) { }
|
|
|
0f2bf8 |
public virtual void drawTrack(Cairo.Context context, Track track) { }
|
|
|
0f2bf8 |
public virtual void draw(Cairo.Context context, List<track> tracks, List<point> hovers) {</point>
|
|
|
0f2bf8 |
foreach(Track track in tracks) drawTrack(context, track);
|
|
|
0f2bf8 |
foreach(Point hover in hovers) drawHover(context, hover);
|
|
|
0f2bf8 |
}
|
|
|
1d3aae |
public virtual void deactivate() { }
|
|
|
72b17c |
|
|
|
1d3aae |
public virtual void draw(Cairo.Context context) { }
|
|
|
72b17c |
}
|
|
|
72b17c |
}
|