8 exception ErrorLoadingFile of string;;
10 class math_view_signals obj = object
11 inherit GContainer.container_signals obj
12 method clicked = GtkSignal.connect ~sgn:MathView.Signals.clicked obj ~after
13 method jump = GtkSignal.connect ~sgn:MathView.Signals.jump obj ~after
14 method selection_changed =
15 GtkSignal.connect ~sgn:MathView.Signals.selection_changed obj ~after
18 class math_view obj = object
19 inherit GContainer.container (obj : Gtk_mathview.math_view obj)
20 method connect = new math_view_signals obj
21 method load ~filename =
22 if not (MathView.load obj ~filename) then raise (ErrorLoadingFile filename)
23 method unload = MathView.unload obj
24 (*method dump = MathView.dump obj*)
25 method get_selection = MathView.get_selection obj
26 method set_selection = MathView.set_selection obj
27 method get_width = MathView.get_width obj
28 method get_height = MathView.get_height obj
29 method get_top = MathView.get_top obj
30 method set_top = MathView.set_top obj
31 method set_adjustments =
33 MathView.set_adjustments obj (GData.as_adjustment adj1)
34 (GData.as_adjustment adj2)
35 method get_hadjustment = new GData.adjustment (MathView.get_hadjustment obj)
36 method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj)
37 method get_buffer = MathView.get_buffer obj
38 method get_frame = new GBin.frame (MathView.get_frame obj)
39 method set_font_size = MathView.set_font_size obj
40 method get_font_size = MathView.get_font_size obj
41 method set_anti_aliasing = MathView.set_anti_aliasing obj
42 method get_anti_aliasing = MathView.get_anti_aliasing obj
43 method set_kerning = MathView.set_kerning obj
44 method get_kerning = MathView.get_kerning obj
45 method log_set_verbosity = MathView.log_set_verbosity obj
46 method log_get_verbosity = MathView.log_get_verbosity obj
47 method export_to_postscript = MathView.export_to_postscript obj
50 let math_view ?adjustmenth ?adjustmentv ?(use_t1_lib=false) ?border_width
51 ?width ?height ?packing ?show ()
55 ?adjustmenth:(may_map ~f:GData.as_adjustment adjustmenth)
56 ?adjustmentv:(may_map ~f:GData.as_adjustment adjustmentv)
60 Container.set w ?border_width ?width ?height;
61 pack_return (new math_view w) ~packing ~show