private double to; // end of the range, or selection point /// <summary> /// Create a new audio selection for an audio node from a time (in ms) to another time. /// </summary> public AudioSelection(View.ProjectView view, AudioNode node, double from, double to) : base(view) { this.node = node; this.isRange = true; this.from = from; this.to = to; EnsureTimesWithinRange(); }
// Propagate selection upward private void SelectUp() { if (!Selected) { ProjectView view = Parent as ProjectView; if (view != null) { Selection = new NodeSelection(view, this.node); view.SelectFromBelow(this.selection); } } }
private void layoutPanel_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { ProjectView view = Parent as ProjectView; if (view != null) { this.Selection = new TrackIndexSelection(view, this.node, trackLayout.IndexForX(e.X)); this.trackLayout.Invalidate(); view.SelectFromBelow(this.Selection); } } }
protected List <urakawa.core.TreeNode> nodes; // list of selected nodes /// <summary> /// Create an empty selection. /// </summary> public NodeSelection(View.ProjectView view) : base(view) { this.nodes = new List <urakawa.core.TreeNode>(); }
public TrackIndexSelection(View.ProjectView view, TrackNode node, int index) : base(view) { this.node = node; this.index = index; }
private View.ProjectView view; // view in which the selection is made /// <summary> /// Create an empty selection. /// </summary> public SingleNodeSelection(View.ProjectView view) { this.view = view; }
public AudioSelection(View.ProjectView view, AudioNode node, double at) : base(view) { this.node = node; At = at; }
/// <summary> /// Create a single node selection. /// </summary> public NodeSelection(View.ProjectView view, urakawa.core.TreeNode node) : this(view) { AddNode(node); }