Beispiel #1
0
        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();
        }
Beispiel #2
0
 // 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);
         }
     }
 }
Beispiel #3
0
 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);
         }
     }
 }
Beispiel #4
0
        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>();
        }
Beispiel #5
0
 public TrackIndexSelection(View.ProjectView view, TrackNode node, int index)
     : base(view)
 {
     this.node  = node;
     this.index = index;
 }
Beispiel #6
0
        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;
        }
Beispiel #7
0
 public AudioSelection(View.ProjectView view, AudioNode node, double at)
     : base(view)
 {
     this.node = node;
     At        = at;
 }
Beispiel #8
0
 /// <summary>
 /// Create a single node selection.
 /// </summary>
 public NodeSelection(View.ProjectView view, urakawa.core.TreeNode node) : this(view)
 {
     AddNode(node);
 }