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

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

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

package de.sciss.mellite
package gui

import de.sciss.lucre
import de.sciss.lucre.stm
import de.sciss.lucre.synth.Sys
import de.sciss.mellite.gui.impl.interpreter.{CodeFrameImpl => Impl}
import de.sciss.synth.proc.{Action, Code, Proc}

object CodeFrame {
  def apply[S <: Sys[S]](obj: Code.Obj[S], hasExecute: Boolean)
                        (implicit tx: S#Tx, workspace: Workspace[S], cursor: stm.Cursor[S],
                         compiler: Code.Compiler): CodeFrame[S] =
    Impl(obj, hasExecute = hasExecute)

  def proc[S <: Sys[S]](proc: Proc[S])
                        (implicit tx: S#Tx, workspace: Workspace[S], cursor: stm.Cursor[S],
                         compiler: Code.Compiler): CodeFrame[S] =
    Impl.proc(proc)

  def action[S <: Sys[S]](action: Action[S])
                         (implicit tx: S#Tx, workspace: Workspace[S], cursor: stm.Cursor[S],
                          compiler: Code.Compiler): CodeFrame[S] =
    Impl.action(action)
}

trait CodeFrame[S <: stm.Sys[S]] extends lucre.swing.Window[S] {
  def codeView: CodeView[S]
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy