]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/gMathView.mli
ocaml 3.09 transition
[helm.git] / helm / DEVEL / lablgtkmathview / gMathView.mli
1 (* Copyright (C) 2000-2005,
2  *    Luca Padovani           <lpadovan@cs.unibo.it>
3  *    Claudio Sacerdoti Coen  <sacerdot@cs.unibo.it>
4  *    Stefano Zacchiroli      <zacchiro@cs.unibo.it>
5  *
6  * This file is part of lablgtkmathview, the Ocaml binding for the
7  * GtkMathView widget.
8  * 
9  * lablgtkmathview is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * lablgtkmathview is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with lablgtkmathview; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22  * 02111-1307, USA.
23  * 
24  * For details, send a mail to the authors.
25  *)
26
27 exception ErrorLoadingFile of string
28 exception ErrorWritingFile of string
29 exception ErrorLoadingDOM
30
31 class math_view_signals :
32   ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj ->
33   object ('a)
34     inherit GObj.widget_signals
35     val after: bool
36     val obj: 'b Gtk.obj
37     method click :
38       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
39     method element_over :
40       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
41     method select_begin :
42       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
43     method select_over :
44       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
45     method select_end :
46       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
47     method select_abort :
48       callback:(unit -> unit) -> GtkSignal.id
49   end
50
51 class math_view_skel :
52   (Gtk_mathview.math_view Gtk.obj as 'a)->
53   object
54     inherit GObj.widget
55     val obj : 'a
56     method attribute_changed : Gdome.element -> name:Gdome.domString -> unit
57     method event : GObj.event_ops
58     method freeze : unit
59     method get_adjustments : GData.adjustment * GData.adjustment
60     method get_bounding_box : int * int * int
61     method get_buffer : Gdk.pixmap
62     method get_document : Gdome.document option
63     method get_element_at : int -> int -> Gdome.element option  (* x, y *)
64     method get_font_size : int
65     method get_log_verbosity : int
66     method get_size : int * int
67     method get_t1_anti_aliased_mode : bool
68     method get_t1_opaque_mode : bool
69     method get_top : int * int
70     method is_selected : Gdome.element -> bool
71     method load_root : root:Gdome.element -> unit
72     method load_uri : filename:string -> unit
73     method select : Gdome.element -> unit
74     method set_adjustments : GData.adjustment -> GData.adjustment -> unit
75     method set_font_size : int -> unit
76     method set_log_verbosity : int -> unit
77     method set_top : int -> int -> unit
78     method set_t1_anti_aliased_mode : bool -> unit
79     method set_t1_opaque_mode : bool -> unit
80     method structure_changed : Gdome.element -> unit
81     method thaw : unit
82     method unload : unit
83     method unselect : Gdome.element -> unit
84   end
85
86 class math_view :
87   Gtk_mathview.math_view Gtk.obj ->
88   object
89     inherit math_view_skel
90     method connect : math_view_signals
91   end
92
93 val math_view :
94   ?hadjustment:GData.adjustment ->
95   ?vadjustment:GData.adjustment ->
96   ?font_size:int ->
97   ?log_verbosity:int ->
98   ?width:int ->
99   ?height:int ->
100   ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view
101
102 (** {2 Global configuration for all math_view instances *)
103
104   (** @param fname file name to be added to the list of configuration files read
105    * at initialization time.
106    * To be invoked before GTK initialization. *)
107 val add_configuration_path: string -> unit
108