1 (* Copyright (C) 2004-2005, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
30 let add_trailing_slash =
31 let rex = Pcre.regexp "/$" in
33 if Pcre.pmatch ~rex s then s
37 let rex = Pcre.regexp "^\\s*([^\\s]*)\\s*$" in
39 (Pcre.extract ~rex s).(1)
41 (** inherit from this class if you want to access current script *)
42 class scriptAccessor =
44 method private script = MatitaScript.instance ()
47 let cicBrowsers = ref []
49 let default_font_size () =
50 Helm_registry.get_opt_default Helm_registry.int
51 ~default:BuildTimeConf.default_font_size "matita.font_size"
52 let current_font_size = ref ~-1
53 let increase_font_size () = incr current_font_size
54 let decrease_font_size () = decr current_font_size
55 let reset_font_size () = current_font_size := default_font_size ()
57 (* is there any lablgtk2 constant corresponding to the left mouse button??? *)
60 let near (x1, y1) (x2, y2) =
61 let distance = sqrt (((x2 -. x1) ** 2.) +. ((y2 -. y1) ** 2.)) in
64 let href_ds = Gdome.domString "href"
65 let xref_ds = Gdome.domString "xref"
68 class clickableMathView obj =
69 let text_width = 80 in
71 inherit GMathViewAux.multi_selection_math_view obj
73 val mutable href_callback: (string -> unit) option = None
74 method set_href_callback f = href_callback <- f
76 val mutable _cic_info = None
77 method private set_cic_info info = _cic_info <- info
78 method private cic_info =
81 | None -> assert false
84 self#set_font_size !current_font_size;
85 ignore (self#connect#selection_changed self#choose_selection);
86 ignore (self#event#connect#button_press self#button_press);
87 ignore (self#event#connect#button_release self#button_release);
88 (* ignore (self#connect#click (fun (gdome_elt, _, _, _) ->
90 | Some elt |+ element is an hyperlink, use href_callback on it +|
91 when elt#hasAttributeNS ~namespaceURI:DomMisc.xlink_ns ~localName:href ->
92 (match href_callback with
96 elt#getAttributeNS ~namespaceURI:DomMisc.xlink_ns ~localName:href
99 | Some elt -> ignore (self#action_toggle elt)
102 val mutable button_press_x = -1.
103 val mutable button_press_y = -1.
104 val mutable selection_changed = false
106 method private button_press gdk_button =
107 if GdkEvent.Button.button gdk_button = left_button then begin
108 button_press_x <- GdkEvent.Button.x gdk_button;
109 button_press_y <- GdkEvent.Button.y gdk_button;
110 selection_changed <- false
114 method private button_release gdk_button =
115 if GdkEvent.Button.button gdk_button = left_button then begin
116 let button_release_x = GdkEvent.Button.x gdk_button in
117 let button_release_y = GdkEvent.Button.y gdk_button in
118 (if near (button_press_x, button_press_y)
119 (button_release_x, button_release_y)
120 && not selection_changed
122 let x = int_of_float button_press_x in
123 let y = int_of_float button_press_y in
124 (match self#get_element_at x y with
127 let namespaceURI = DomMisc.xlink_ns in
128 let localName = href_ds in
129 if elt#hasAttributeNS ~namespaceURI ~localName then
130 self#invoke_href_callback
131 (elt#getAttributeNS ~namespaceURI ~localName)#to_string
134 ignore (self#action_toggle elt)));
138 method private invoke_href_callback href_value gdk_button =
139 let button = GdkEvent.Button.button gdk_button in
140 if button = left_button then
141 let time = GdkEvent.Button.time gdk_button in
142 match href_callback with
145 (match MatitaMisc.split href_value with
148 let menu = GMenu.menu () in
152 GMenu.menu_item ~label:uri ~packing:menu#append ()
154 ignore (menu_item#connect#activate (fun () -> f uri)))
156 menu#popup ~button ~time)
158 method private choose_selection gdome_elt =
160 if (elt#getAttributeNS ~namespaceURI:DomMisc.helm_ns
161 ~localName:xref_ds)#to_string <> ""
162 (* if elt#hasAttributeNS ~namespaceURI:DomMisc.helm_ns ~localName:xref_ds
163 && (elt#getAttributeNS ~namespaceURI:DomMisc.helm_ns
164 ~localName:xref_ds)#to_string <> "" *)
166 self#set_selection (Some elt)
169 (match elt#get_parentNode with
170 | None -> assert false
171 | Some p -> aux (new Gdome.element_of_node p))
172 with GdomeInit.DOMCastException _ -> ()
173 (* debug_print "trying to select above the document root" *)
175 (match gdome_elt with
176 | Some elt -> aux elt
177 | None -> self#set_selection None);
178 selection_changed <- true
180 method update_font_size =
181 self#set_font_size !current_font_size
183 method private get_term_by_id context id =
184 let ids_to_terms, ids_to_hypotheses = self#cic_info in
186 `Term (Hashtbl.find ids_to_terms id)
189 let hyp = Hashtbl.find ids_to_hypotheses id in
190 let context' = MatitaMisc.list_tl_at hyp context in
192 with Not_found -> assert false
194 method string_of_selected_terms =
195 let get_id (node: Gdome.element) =
197 node#getAttributeNS ~namespaceURI:DomMisc.helm_ns ~localName:xref_ds
201 let script = MatitaScript.instance () in
202 let metasenv = script#proofMetasenv in
203 let context = script#proofContext in
204 let conclusion = script#proofConclusion in
207 (fun node -> self#get_term_by_id context (get_id node))
210 (* TODO: code for patterns
211 let conclusion = (MatitaScript.instance ())#proofConclusion in
212 let conclusion_pattern =
213 ProofEngineHelpers.pattern_of ~term:conclusion cic_terms
216 let dummy_goal = ~-1 in
222 ProofEngineHelpers.locate_in_conjecture t
223 (dummy_goal, context, conclusion)
225 dummy_goal, context', t
226 | `Hyp context :: _ -> dummy_goal, context, Cic.Rel 1
228 (* TODO: code for patterns
229 (* TODO context shouldn't be empty *)
230 let cic_sequent = ~-1, [], conclusion_pattern in
232 let acic_sequent, _, _, ids_to_inner_sorts, _ =
233 Cic2acic.asequent_of_sequent metasenv cic_sequent
235 let _, _, _, annterm = acic_sequent in
236 let ast, ids_to_uris =
237 CicNotationRew.ast_of_acic ids_to_inner_sorts annterm
239 let pped_ast = CicNotationRew.pp_ast ast in
240 let markup = CicNotationPres.render ids_to_uris pped_ast in
241 BoxPp.render_to_string text_width markup
245 let clickableMathView ?hadjustment ?vadjustment ?font_size ?log_verbosity =
246 GtkBase.Widget.size_params
247 ~cont:(OgtkMathViewProps.pack_return (fun p ->
248 OgtkMathViewProps.set_params
249 (new clickableMathView (GtkMathViewProps.MathView_GMetaDOM.create p))
250 ~font_size:None ~log_verbosity:None))
253 class sequentViewer obj =
255 inherit clickableMathView obj
257 method load_sequent metasenv metano =
258 let sequent = CicUtil.lookup_meta metano metasenv in
259 let (mathml, (_, (ids_to_terms, _, ids_to_hypotheses,_ ))) =
260 ApplyTransformation.mml_of_cic_sequent metasenv sequent
262 self#set_cic_info (Some (ids_to_terms, ids_to_hypotheses));
263 let name = "sequent_viewer.xml" in
264 prerr_endline ("load_sequent: dumping MathML to ./" ^ name);
265 ignore (DomMisc.domImpl#saveDocumentToFile ~name ~doc:mathml ());
266 self#load_root ~root:mathml#get_documentElement
269 class sequentsViewer ~(notebook:GPack.notebook)
270 ~(sequentViewer:sequentViewer) ()
273 inherit scriptAccessor
275 val mutable pages = 0
276 val mutable switch_page_callback = None
277 val mutable page2goal = [] (* associative list: page no -> goal no *)
278 val mutable goal2page = [] (* the other way round *)
279 val mutable goal2win = [] (* associative list: goal no -> scrolled win *)
280 val mutable _metasenv = []
281 val mutable scrolledWin: GBin.scrolled_window option = None
282 (* scrolled window to which the sequentViewer is currently attached *)
284 method private tab_label metano =
285 (GMisc.label ~text:(sprintf "?%d" metano) ~show:true ())#coerce
288 (match scrolledWin with
290 (* removing page from the notebook will destroy all contained widget,
291 * we do not want the sequentViewer to be destroyed as well *)
292 w#remove sequentViewer#coerce;
295 for i = 1 to pages do notebook#remove_page 0 done;
301 self#script#setGoal ~-1;
302 (match switch_page_callback with
304 GtkSignal.disconnect notebook#as_widget id;
305 switch_page_callback <- None
308 method load_sequents (status: ProofEngineTypes.status) =
309 let ((_, metasenv, _, _), goal) = status in
310 let sequents_no = List.length metasenv in
311 _metasenv <- metasenv;
312 pages <- sequents_no;
313 self#script#setGoal goal;
314 let parentref = ref None in
317 GBin.scrolled_window ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC
318 ~shadow_type:`IN ~show:true ()
321 scrolledWin <- Some w;
322 match sequentViewer#misc#parent with
323 | None -> w#add sequentViewer#coerce; parentref := Some w
326 match !parentref with None -> assert false | Some p -> p in
327 parent#remove sequentViewer#coerce;
328 w#add sequentViewer#coerce;
331 goal2win <- (metano, reparent) :: goal2win;
336 (fun (metano, _, _) ->
337 page2goal <- (!page, metano) :: page2goal;
338 goal2page <- (metano, !page) :: goal2page;
340 notebook#append_page ~tab_label:(self#tab_label metano) (win metano))
342 switch_page_callback <-
343 Some (notebook#connect#switch_page ~callback:(fun page ->
346 List.assoc page page2goal
347 with Not_found -> assert false
349 self#script#setGoal goal;
350 self#render_page ~page ~goal))
352 method private render_page ~page ~goal =
353 sequentViewer#load_sequent _metasenv goal;
355 List.assoc goal goal2win ();
356 sequentViewer#set_selection None
357 with Not_found -> assert false
359 method goto_sequent goal =
362 List.assoc goal goal2page
363 with Not_found -> assert false
365 notebook#goto_page page;
366 self#render_page page goal
372 type 'widget constructor =
373 ?hadjustment:GData.adjustment ->
374 ?vadjustment:GData.adjustment ->
376 ?log_verbosity:int ->
379 ?packing:(GObj.widget -> unit) ->
384 let sequentViewer ?hadjustment ?vadjustment ?font_size ?log_verbosity =
385 GtkBase.Widget.size_params
386 ~cont:(OgtkMathViewProps.pack_return (fun p ->
387 OgtkMathViewProps.set_params
388 (new sequentViewer (GtkMathViewProps.MathView_GMetaDOM.create p))
389 ~font_size ~log_verbosity))
392 let blank_uri = BuildTimeConf.blank_uri
393 let current_proof_uri = BuildTimeConf.current_proof_uri
396 [ `Ast of DisambiguateTypes.term
397 | `Cic of Cic.term * Cic.metasenv
401 class type cicBrowser =
403 method load: MatitaTypes.mathViewer_entry -> unit
404 (* method loadList: string list -> MatitaTypes.mathViewer_entry-> unit *)
405 method loadInput: string -> unit
408 let reloadable = function
409 | `About `Current_proof
414 class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
417 let term_RE = Pcre.regexp "^term:(.*)" in
418 let whelp_RE = Pcre.regexp "^\\s*whelp" in
421 "^cic:/([^/]+/)*[^/]+\\.(con|ind|var)(#xpointer\\(\\d+(/\\d+)+\\))?$"
423 let dir_RE = Pcre.regexp "^cic:((/([^/]+/)*[^/]+(/)?)|/|)$" in
424 let whelp_query_RE = Pcre.regexp "^\\s*whelp\\s+([^\\s]+)\\s+(.*)$" in
425 let trailing_slash_RE = Pcre.regexp "/$" in
426 let has_xpointer_RE = Pcre.regexp "#xpointer\\(\\d+/\\d+(/\\d+)?\\)$" in
427 let is_whelp txt = Pcre.pmatch ~rex:whelp_RE txt in
428 let is_uri txt = Pcre.pmatch ~rex:uri_RE txt in
429 let is_dir txt = Pcre.pmatch ~rex:dir_RE txt in
430 let gui = MatitaGui.instance () in
431 let win = gui#newBrowserWin () in
432 let queries = ["Locate";"Hint";"Match";"Elim";"Instance"] in
433 let combo,_ = GEdit.combo_box_text ~strings:queries () in
434 let activate_combo_query input q =
435 let q' = String.lowercase q in
436 let rec aux i = function
437 | [] -> failwith ("Whelp query '" ^ q ^ "' not found")
438 | h::_ when String.lowercase h = q' -> i
439 | _::tl -> aux (i+1) tl
441 combo#set_active (aux 0 queries);
442 win#queryInputText#set_text input
444 let set_whelp_query txt =
447 let q = Pcre.extract ~rex:whelp_query_RE txt in
449 with Invalid_argument _ -> failwith "Malformed Whelp query"
451 activate_combo_query arg query
453 let toplevel = win#toplevel in
454 let mathView = sequentViewer ~packing:win#scrolledBrowser#add () in
456 MatitaGtkMisc.report_error ~title:"Cic browser" ~message
460 [ "dir", GdkPixbuf.from_file (MatitaMisc.image_path "matita-folder.png");
461 "obj", GdkPixbuf.from_file (MatitaMisc.image_path "matita-object.png") ]
466 with exn -> fail (MatitaExcPp.to_string exn)
468 let handle_error' f = (fun () -> handle_error (fun () -> f ())) in
470 inherit scriptAccessor
472 (* Whelp bar queries *)
475 activate_combo_query "" "locate";
476 win#whelpBarComboVbox#add combo#coerce;
478 let query = String.lowercase (List.nth queries combo#active) in
479 let input = win#queryInputText#text in
480 let statement = "whelp " ^ query ^ " " ^ input ^ "." in
481 (MatitaScript.instance ())#advance ~statement ()
483 ignore(win#queryInputText#connect#activate ~callback:start_query);
484 ignore(combo#connect#changed ~callback:start_query);
485 win#whelpBarImage#set_file (MatitaMisc.image_path "whelp.png");
486 win#mathOrListNotebook#set_show_tabs false;
488 win#browserForwardButton#misc#set_sensitive false;
489 win#browserBackButton#misc#set_sensitive false;
490 ignore (win#browserUri#entry#connect#activate (handle_error' (fun () ->
491 self#loadInput win#browserUri#entry#text)));
492 ignore (win#browserHomeButton#connect#clicked (handle_error' (fun () ->
493 self#load (`About `Current_proof))));
494 ignore (win#browserRefreshButton#connect#clicked
495 (handle_error' self#refresh));
496 ignore (win#browserBackButton#connect#clicked (handle_error' self#back));
497 ignore (win#browserForwardButton#connect#clicked
498 (handle_error' self#forward));
499 ignore (win#toplevel#event#connect#delete (fun _ ->
500 let my_id = Oo.id self in
501 cicBrowsers := List.filter (fun b -> Oo.id b <> my_id) !cicBrowsers;
502 if !cicBrowsers = [] &&
503 Helm_registry.get "matita.mode" = "cicbrowser"
507 ignore(win#whelpResultTreeview#connect#row_activated
508 ~callback:(fun _ _ ->
509 handle_error (fun () -> self#loadInput (self#_getSelectedUri ()))));
510 mathView#set_href_callback (Some (fun uri ->
511 handle_error (fun () ->
512 self#load (`Uri (UriManager.uri_of_string uri)))));
513 self#_load (`About `Blank);
516 val mutable current_entry = `About `Blank
517 val mutable current_infos = None
518 val mutable current_mathml = None
521 new MatitaGtkMisc.taggedStringListModel tags win#whelpResultTreeview
523 val mutable lastDir = "" (* last loaded "directory" *)
525 method private _getSelectedUri () =
526 match model#easy_selection () with
527 | [sel] when is_uri sel -> sel (* absolute URI selected *)
528 (* | [sel] -> win#browserUri#entry#text ^ sel |+ relative URI selected +| *)
529 | [sel] -> lastDir ^ sel
532 (** history RATIONALE
534 * All operations about history are done using _historyFoo.
535 * Only toplevel functions (ATM load and loadInput) call _historyAdd.
538 method private _historyAdd item =
540 win#browserBackButton#misc#set_sensitive true;
541 win#browserForwardButton#misc#set_sensitive false
543 method private _historyPrev () =
544 let item = history#previous in
545 if history#is_begin then win#browserBackButton#misc#set_sensitive false;
546 win#browserForwardButton#misc#set_sensitive true;
549 method private _historyNext () =
550 let item = history#next in
551 if history#is_end then win#browserForwardButton#misc#set_sensitive false;
552 win#browserBackButton#misc#set_sensitive true;
555 (** notebook RATIONALE
557 * Use only these functions to switch between the tabs
559 method private _showList = win#mathOrListNotebook#goto_page 1
560 method private _showMath = win#mathOrListNotebook#goto_page 0
562 method private back () =
564 self#_load (self#_historyPrev ())
565 with MatitaMisc.History_failure -> ()
567 method private forward () =
569 self#_load (self#_historyNext ())
570 with MatitaMisc.History_failure -> ()
572 (* loads a uri which can be a cic uri or an about:* uri
573 * @param uri string *)
574 method private _load entry =
576 if entry <> current_entry || reloadable entry then begin
578 | `About `Current_proof -> self#home ()
579 | `About `Blank -> self#blank ()
580 | `About `Us -> () (* TODO implement easter egg here :-] *)
581 | `Check term -> self#_loadCheck term
582 | `Cic (term, metasenv) -> self#_loadTermCic term metasenv
583 | `Dir dir -> self#_loadDir dir
584 | `Uri uri -> self#_loadUriManagerUri uri
585 | `Whelp (query, results) ->
586 set_whelp_query query;
587 self#_loadList (List.map (fun r -> "obj",
588 UriManager.string_of_uri r) results));
591 with exn -> fail (MatitaExcPp.to_string exn)
593 method private blank () =
595 mathView#load_root (MatitaMisc.empty_mathml ())#get_documentElement
597 method private _loadCheck term =
598 failwith "not implemented _loadCheck";
601 method private home () =
603 match self#script#status.proof_status with
604 | Proof (uri, metasenv, bo, ty) ->
605 let name = UriManager.name_of_uri (MatitaMisc.unopt uri) in
606 let obj = Cic.CurrentProof (name, metasenv, bo, ty, [], []) in
608 | Incomplete_proof ((uri, metasenv, bo, ty), _) ->
609 let name = UriManager.name_of_uri (MatitaMisc.unopt uri) in
610 let obj = Cic.CurrentProof (name, metasenv, bo, ty, [], []) in
614 (** loads a cic uri from the environment
615 * @param uri UriManager.uri *)
616 method private _loadUriManagerUri uri =
617 let uri = UriManager.strip_xpointer uri in
618 let (obj, _) = CicEnvironment.get_obj CicUniv.empty_ugraph uri in
621 method private _loadDir dir =
622 let content = Http_getter.ls dir in
628 | Http_getter_types.Ls_section s -> "dir", s
629 | Http_getter_types.Ls_object o -> "obj", o.Http_getter_types.uri)
635 method private setEntry entry =
636 win#browserUri#entry#set_text (string_of_entry entry);
637 current_entry <- entry
639 method private _loadObj obj =
641 (* this must be _before_ loading the document, since
642 * if the widget is not mapped (hidden by the notebook)
643 * the document is not rendered *)
644 let use_diff = false in (* ZACK TODO use XmlDiff when re-rendering? *)
645 let (mathml, (_,((ids_to_terms, ids_to_father_ids, ids_to_conjectures,
646 ids_to_hypotheses, ids_to_inner_sorts, ids_to_inner_types) as info)))
648 ApplyTransformation.mml_of_cic_object obj
650 current_infos <- Some info;
651 (match current_mathml with
652 | Some current_mathml when use_diff ->
654 XmlDiff.update_dom ~from:current_mathml mathml;
657 let name = "cic_browser.xml" in
658 prerr_endline ("cic_browser: dumping MathML to ./" ^ name);
659 ignore (DomMisc.domImpl#saveDocumentToFile ~name ~doc:mathml ());
660 mathView#load_root ~root:mathml#get_documentElement;
661 current_mathml <- Some mathml);
663 method private _loadTermCic term metasenv =
664 let context = self#script#proofContext in
665 let dummyno = CicMkImplicit.new_meta metasenv [] in
666 let sequent = (dummyno, context, term) in
667 mathView#load_sequent (sequent :: metasenv) dummyno;
670 method private _loadList l =
671 model#list_store#clear ();
672 List.iter (fun (tag, s) -> model#easy_append ~tag s) l;
675 (** { public methods, all must call _load!! } *)
678 handle_error (fun () -> self#_load entry; self#_historyAdd entry)
680 (** this is what the browser does when you enter a string an hit enter *)
681 method loadInput txt =
682 let txt = strip_blanks txt in
684 UriManager.string_of_uri
685 (UriManager.strip_xpointer (UriManager.uri_of_string txt))
687 if is_whelp txt then begin
689 (MatitaScript.instance ())#advance ~statement:(txt ^ ".") ()
693 | txt when is_uri txt -> `Uri (UriManager.uri_of_string (fix_uri txt))
694 | txt when is_dir txt -> `Dir (add_trailing_slash txt)
698 with Invalid_argument _ ->
699 command_error (sprintf "unsupported uri: %s" txt))
702 self#_historyAdd entry
705 (** {2 methods accessing underlying GtkMathView} *)
707 method updateFontSize = mathView#set_font_size !current_font_size
709 (** {2 methods used by constructor only} *)
712 method history = history
713 method currentEntry = current_entry
715 if reloadable current_entry then self#_load current_entry
719 let sequentsViewer ~(notebook:GPack.notebook)
720 ~(sequentViewer:sequentViewer) ()
722 new sequentsViewer ~notebook ~sequentViewer ()
725 let size = BuildTimeConf.browser_history_size in
726 let rec aux history =
727 let browser = new cicBrowser_impl ~history () in
728 let win = browser#win in
729 ignore (win#browserNewButton#connect#clicked (fun () ->
731 new MatitaMisc.browser_history ~memento:history#save size
734 let newBrowser = aux history in
735 newBrowser#load browser#currentEntry));
737 (* attempt (failed) to close windows on CTRL-W ... *)
738 MatitaGtkMisc.connect_key win#browserWinEventBox#event ~modifiers:[`CONTROL]
739 GdkKeysyms._W (fun () -> win#toplevel#destroy ());
741 cicBrowsers := browser :: !cicBrowsers;
742 (browser :> cicBrowser)
744 let history = new MatitaMisc.browser_history size (`About `Blank) in
747 let default_sequentViewer () = sequentViewer ~show:true ()
748 let sequentViewer_instance = MatitaMisc.singleton default_sequentViewer
750 let default_sequentsViewer () =
751 let gui = MatitaGui.instance () in
752 let sequentViewer = sequentViewer_instance () in
753 sequentsViewer ~notebook:gui#main#sequentsNotebook ~sequentViewer ()
754 let sequentsViewer_instance = MatitaMisc.singleton default_sequentsViewer
758 method private get_browser reuse =
760 (match !cicBrowsers with
761 | [] -> cicBrowser ()
762 | b :: _ -> (b :> cicBrowser))
766 method show_entry ?(reuse=false) t = (self#get_browser reuse)#load t
768 method show_uri_list ?(reuse=false) ~entry l =
769 (self#get_browser reuse)#load entry
772 let refresh_all_browsers () = List.iter (fun b -> b#refresh ()) !cicBrowsers
774 let update_font_sizes () =
775 List.iter (fun b -> b#updateFontSize) !cicBrowsers;
776 (sequentViewer_instance ())#update_font_size