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>
6 * This file is part of lablgtkmathview, the Ocaml binding for the
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.
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.
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
24 * For details, send a mail to the authors.
27 exception ErrorLoadingFile of string
28 exception ErrorWritingFile of string
29 exception ErrorLoadingDOM
31 class math_view_signals :
32 ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj ->
34 inherit GObj.widget_signals
38 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
40 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
42 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
44 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
46 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
48 callback:(unit -> unit) -> GtkSignal.id
51 class math_view_skel :
52 (Gtk_mathview.math_view Gtk.obj as 'a)->
56 method attribute_changed : Gdome.element -> name:Gdome.domString -> unit
57 method event : GObj.event_ops
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
83 method unselect : Gdome.element -> unit
87 Gtk_mathview.math_view Gtk.obj ->
89 inherit math_view_skel
90 method connect : math_view_signals
94 ?hadjustment:GData.adjustment ->
95 ?vadjustment:GData.adjustment ->
100 ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view
102 (** {2 Global configuration for all math_view instances *)
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