8 exception ErrorLoadingFile of string;;
10 class math_view_signals obj = object
11 inherit GContainer.container_signals obj
12 method jump = GtkSignal.connect ~sgn:MathView.Signals.jump obj ~after
13 method clicked = GtkSignal.connect ~sgn:MathView.Signals.clicked obj ~after
16 class math_view obj = object
17 inherit GContainer.container (obj : Gtk_mathview.math_view obj)
18 method connect = new math_view_signals obj
19 method load ~filename =
20 if not (MathView.load obj ~filename) then raise (ErrorLoadingFile filename)
21 method get_selection = MathView.get_selection obj
22 method unload = MathView.unload obj
23 method dump = MathView.dump obj
24 method get_width = MathView.get_width obj
25 method get_height = MathView.get_height obj
26 method set_adjustments =
28 MathView.set_adjustments obj (GData.as_adjustment adj1)
29 (GData.as_adjustment adj2)
30 method get_hadjustment = new GData.adjustment (MathView.get_hadjustment obj)
31 method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj)
32 method get_buffer = MathView.get_buffer obj
33 method get_frame = new GBin.frame (MathView.get_frame obj)
34 method set_font_size = MathView.set_font_size obj
35 (*method get_top = MathView.get_top obj
36 method set_top = MathView.set_top obj*)
39 let math_view ?adjustmenth ?adjustmentv ?border_width ?width ?height
44 ?adjustmenth:(may_map ~f:GData.as_adjustment adjustmenth)
45 ?adjustmentv:(may_map ~f:GData.as_adjustment adjustmentv)
48 Container.set w ?border_width ?width ?height;
49 pack_return (new math_view w) ~packing ~show