]> matita.cs.unibo.it Git - helm.git/blob - DEVEL/lablgtkmathview/0.7.8-2/gMathView.mli
tagging
[helm.git] / DEVEL / lablgtkmathview / 0.7.8-2 / 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 (** {1 Main interface to LablGtkMathView} *)
28
29 exception ErrorLoadingFile of string
30 exception ErrorWritingFile of string
31 exception ErrorLoadingDOM
32
33 (** {2 Standard classes} *)
34
35 (** Signals emitted by GtkMathView widgets *)
36 class math_view_signals :
37   ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj ->
38   object ('a)
39     inherit GObj.widget_signals
40     val after: bool
41     val obj: 'b Gtk.obj
42     method click :
43       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
44     method element_over :
45       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
46     method select_begin :
47       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
48     method select_over :
49       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
50     method select_end :
51       callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
52     method select_abort :
53       callback:(unit -> unit) -> GtkSignal.id
54   end
55
56 (** GtkMathView core methods *)
57 class math_view_skel :
58   (Gtk_mathview.math_view Gtk.obj as 'a)->
59   object
60     inherit GObj.widget
61     val obj : 'a
62     method attribute_changed : Gdome.element -> name:Gdome.domString -> unit
63     method event : GObj.event_ops
64     method freeze : unit
65     method get_adjustments : GData.adjustment * GData.adjustment
66     method get_bounding_box : int * int * int
67     method get_buffer : Gdk.pixmap
68     method get_document : Gdome.document option
69     method get_element_at : int -> int -> Gdome.element option  (* x, y *)
70     method get_font_size : int
71     method get_log_verbosity : int
72     method get_size : int * int
73     method get_t1_anti_aliased_mode : bool
74     method get_t1_opaque_mode : bool
75     method get_top : int * int
76     method is_selected : Gdome.element -> bool
77     method load_root : root:Gdome.element -> unit
78     method load_uri : filename:string -> unit
79     method select : Gdome.element -> unit
80     method set_adjustments : GData.adjustment -> GData.adjustment -> unit
81     method set_font_size : int -> unit
82     method set_log_verbosity : int -> unit
83     method set_top : int -> int -> unit
84     method set_t1_anti_aliased_mode : bool -> unit
85     method set_t1_opaque_mode : bool -> unit
86     method structure_changed : Gdome.element -> unit
87     method thaw : unit
88     method unload : unit
89     method unselect : Gdome.element -> unit
90   end
91
92 (** GtkMathView standard class *)
93 class math_view :
94   Gtk_mathview.math_view Gtk.obj ->
95   object
96     inherit math_view_skel
97     method connect : math_view_signals
98   end
99
100 (** {2 Constructors} *)
101
102 (** math_view constructor *)
103 val math_view :
104   ?hadjustment:GData.adjustment ->
105   ?vadjustment:GData.adjustment ->
106   ?font_size:int ->
107   ?log_verbosity:int ->
108   ?width:int ->
109   ?height:int ->
110   ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view
111
112 (** {2 Global configuration for all math_view instances} *)
113
114   (** @param fname file name to be added to the list of configuration files read
115    * at initialization time.
116    * To be invoked before GTK initialization. *)
117 val add_configuration_path: string -> unit
118