All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.sciss.mellite.gui.TimelineView.scala Maven / Gradle / Ivy

The newest version!
/*
 *  TimelineView.scala
 *  (Mellite)
 *
 *  Copyright (c) 2012-2019 Hanns Holger Rutz. All rights reserved.
 *
 *  This software is published under the GNU Affero General Public License v3+
 *
 *
 *  For further information, please contact Hanns Holger Rutz at
 *  [email protected]
 */

package de.sciss.mellite.gui

import de.sciss.desktop.UndoManager
import de.sciss.lucre.stm
import de.sciss.lucre.synth.Sys
import de.sciss.mellite.gui.impl.timeline.{TimelineViewImpl => Impl}
import de.sciss.synth.proc.gui.TransportView
import de.sciss.synth.proc.{Timeline, Universe}

import scala.swing.Action

object TimelineView {
  def apply[S <: Sys[S]](group: Timeline[S])
                        (implicit tx: S#Tx, universe: Universe[S],
                         undoManager: UndoManager): TimelineView[S] =
    Impl[S](group)

  /** Number of pixels for one unit of track height (convention). */
  final val TrackScale  = 8
  /** Minimum duration in sample-frames for some cases where it should be greater than zero. */
  final val MinDur      = 32

  final val DefaultTrackHeight = 8
}
trait TimelineView[S <: stm.Sys[S]] extends TimelineViewBase[S, Int, TimelineObjView[S]] with CanBounce {
  def timelineH: stm.Source[S#Tx , Timeline[S]]
  def timeline(implicit tx: S#Tx): Timeline[S]

  override def canvas: TimelineTrackCanvas[S]

  def globalView    : GlobalProcsView[S]
  def transportView : TransportView  [S]

  // ---- further GUI actions ----
  def actionSplitObjects        : Action
  def actionCleanUpObjects      : Action
  def actionStopAllSound        : Action
  def actionClearSpan           : Action
  def actionRemoveSpan          : Action
  def actionAlignObjectsToCursor: Action
  def actionDropMarker          : Action
  def actionDropNamedMarker     : Action
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy