let script =
MatitaScript.script
- ~buffer:gui#sourceView#buffer
+ ~view:(gui#sourceView :> GText.view)
~init:(Lazy.force MatitaEngine.initial_status)
~mathviewer:(MatitaMathView.mathViewer ())
~urichooser:(fun uris ->
let i = ref 0 in
fun () -> incr i; !i
-class script ~(buffer: GText.buffer) ~(init: MatitaTypes.status)
+class script ~(view: GText.view)
+ ~(init: MatitaTypes.status)
~(mathviewer: MatitaTypes.mathViewer)
~set_star
~ask_confirmation
~urichooser
~develcreator
() =
+let buffer = view#buffer in
object (self)
val scriptId = fresh_script_id ()
Incomplete_proof (_,goal) -> self#setGoal goal
| _ -> ()
end ;
+ let mark_position = buffer#get_iter_at_mark mark in
+ if view#move_mark_onscreen mark then
+ begin
+ buffer#move_mark mark mark_position;
+ view#scroll_to_mark ~use_align:true ~xalign:1.0 ~yalign:0.1 mark;
+ end;
while Glib.Main.pending () do ignore(Glib.Main.iteration false); done
method clean_dirty_lock =
let _script = ref None
-let script ~buffer ~init ~mathviewer ~urichooser ~develcreator ~ask_confirmation ~set_star ()
+let script ~view ~init ~mathviewer ~urichooser ~develcreator ~ask_confirmation ~set_star ()
=
let s = new script
- ~buffer ~init ~mathviewer ~ask_confirmation ~urichooser ~develcreator ~set_star ()
+ ~view ~init ~mathviewer ~ask_confirmation ~urichooser ~develcreator ~set_star ()
in
_script := Some s;
s
(** @param set_star callback used to set the modified symbol (usually a star
* "*") on the side of a script name *)
val script:
- buffer:GText.buffer ->
+ view:GText.view ->
init:MatitaTypes.status ->
mathviewer: MatitaTypes.mathViewer->
urichooser: (UriManager.uri list -> UriManager.uri list) ->