]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/gMathView.mli
1fb5b821d8975e4e3f8d5a169c6fcfe4ce7d7fc3
[helm.git] / helm / DEVEL / lablgtkmathview / gMathView.mli
1 (* Copyright (C) 2000-2003, Luca Padovani <luca.padovani@cs.unibo.it>,
2  *                          Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>.
3  *
4  * This file is part of lablgtkmathview, the Ocaml binding
5  * for the GtkMathView widget.
6  * 
7  * lablgtkmathview 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.
11  *
12  * lablgtkmathview 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.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with lablgtkmathview; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20  * 
21  * For details, send a mail to the author.
22  *)
23
24 exception ErrorLoadingFile of string
25 exception ErrorWritingFile of string
26 exception ErrorLoadingDOM
27
28 class math_view_signals :
29   ([> `container | `gtk | `mathview | `widget] as 'b) Gtk.obj ->
30   object ('a)
31     inherit GContainer.container_signals
32     val after: bool
33     val obj: 'b Gtk.obj
34     method click :
35       callback:(Gdome.element option -> int -> unit) -> GtkSignal.id
36     method element_over :
37       callback:(Gdome.element option -> int -> unit) -> GtkSignal.id
38     method select_begin :
39       callback:(Gdome.element option -> int -> unit) -> GtkSignal.id
40     method select_over :
41       callback:(Gdome.element option -> int -> unit) -> GtkSignal.id
42     method select_end :
43       callback:(Gdome.element option -> int -> unit) -> GtkSignal.id
44     method select_abort :
45       callback:(unit -> unit) -> GtkSignal.id
46   end
47
48 class math_view_skel :
49   (Gtk_mathview.math_view Gtk.obj as 'a)->
50   object
51     inherit GContainer.container
52     method freeze : unit
53     method thaw : unit
54     method get_buffer : Gdk.pixmap
55     method get_font_size : int
56     method get_drawing_area : GMisc.drawing_area
57     method get_hadjustment : GData.adjustment
58     method get_height : int
59     method get_log_verbosity : int
60     method get_top : int * int
61     method get_vadjustment : GData.adjustment
62     method get_width : int
63     method load_uri : filename:string -> unit
64     method load_doc : dom:Gdome.document -> unit
65     method set_adjustments : GData.adjustment -> GData.adjustment -> unit
66     method set_font_size : int -> unit
67     method set_log_verbosity : int -> unit
68     method select : Gdome.element -> unit
69     method unselect : Gdome.element -> unit
70     method get_element_at : int -> int -> Gdome.element option
71     method is_selected : Gdome.element -> bool
72     method set_top : int -> int -> unit
73     method unload : unit
74     val obj : 'a
75   end
76
77 class math_view :
78   Gtk_mathview.math_view Gtk.obj ->
79   object
80     inherit math_view_skel
81     method connect : math_view_signals
82   end
83
84 val math_view :
85   ?hadjustment:GData.adjustment ->
86   ?vadjustment:GData.adjustment ->
87   ?font_size:int ->
88   ?log_verbosity:int ->
89   ?border_width:int ->
90   ?width:int ->
91   ?height:int ->
92   ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view