src/Pure/PIDE/editor.scala
author wenzelm
Wed Dec 03 14:04:38 2014 +0100 (2014-12-03 ago)
changeset 59083 88b0b1f28adc
parent 56494 1b74abf064e1
child 60893 3c8b9b4b577c
permissions -rw-r--r--
tuned signature;
wenzelm@52971
     1
/*  Title:      Pure/PIDE/editor.scala
wenzelm@52971
     2
    Author:     Makarius
wenzelm@52971
     3
wenzelm@52971
     4
General editor operations.
wenzelm@52971
     5
*/
wenzelm@52971
     6
wenzelm@52971
     7
package isabelle
wenzelm@52971
     8
wenzelm@52971
     9
wenzelm@52971
    10
abstract class Editor[Context]
wenzelm@52971
    11
{
wenzelm@52971
    12
  def session: Session
wenzelm@52974
    13
  def flush(): Unit
wenzelm@54461
    14
  def invoke(): Unit
wenzelm@52971
    15
  def current_context: Context
wenzelm@52971
    16
  def current_node(context: Context): Option[Document.Node.Name]
wenzelm@52978
    17
  def current_node_snapshot(context: Context): Option[Document.Snapshot]
wenzelm@52974
    18
  def node_snapshot(name: Document.Node.Name): Document.Snapshot
wenzelm@53844
    19
  def current_command(context: Context, snapshot: Document.Snapshot): Option[Command]
wenzelm@52977
    20
wenzelm@52977
    21
  def node_overlays(name: Document.Node.Name): Document.Node.Overlays
wenzelm@52977
    22
  def insert_overlay(command: Command, fn: String, args: List[String]): Unit
wenzelm@52977
    23
  def remove_overlay(command: Command, fn: String, args: List[String]): Unit
wenzelm@52980
    24
wenzelm@56494
    25
  abstract class Hyperlink {
wenzelm@56494
    26
    def external: Boolean
wenzelm@56494
    27
    def follow(context: Context): Unit
wenzelm@56494
    28
  }
wenzelm@52980
    29
  def hyperlink_command(
wenzelm@55884
    30
    snapshot: Document.Snapshot, command: Command, offset: Symbol.Offset = 0): Option[Hyperlink]
wenzelm@52971
    31
}
wenzelm@52971
    32