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

de.sciss.mellite.impl.proc.ProcObjViewImpl.scala Maven / Gradle / Ivy

/*
 *  ProcObjViewImpl.scala
 *  (Mellite)
 *
 *  Copyright (c) 2012-2023 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.impl.proc

import de.sciss.lucre.swing.Window
import de.sciss.lucre.synth.Txn
import de.sciss.mellite.impl.objview.{ObjListViewImpl, ObjViewImpl}
import de.sciss.mellite.{CodeFrame, ObjListView, ObjView, UniverseHandler}

trait ProcObjViewImpl[T <: Txn[T]]
  extends ObjListView[T]
    with ObjViewImpl.Impl[T]
    with ObjListViewImpl.EmptyRenderer[T]
    with ObjListViewImpl.NonEditable[T]
    with ProcObjView[T] {

  final def factory   : ObjView.Factory = ProcObjView
  final def isViewable: Boolean         = true

  // currently this just opens a code editor. in the future we should
  // add a scans map editor, and a convenience button for the attributes
  override def openView(parent: Option[Window[T]])
                    (implicit tx: T, handler: UniverseHandler[T]): Option[Window[T]] = {
    import de.sciss.mellite.Mellite.compiler
    val frame = CodeFrame.proc(obj)
    Some(frame)
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy