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 (** {1 Main interface to LablGtkMathView} *)
29 exception ErrorLoadingFile of string
30 exception ErrorWritingFile of string
31 exception ErrorLoadingDOM
33 (** {2 Standard classes} *)
35 (** Signals emitted by GtkMathView widgets *)
36 class math_view_signals :
37 ([> `gtk | `mathview_gmetadom | `widget] as 'b) Gtk.obj ->
39 inherit GObj.widget_signals
43 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
45 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
47 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
49 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
51 callback:(Gdome.element option * int * int * int -> unit) -> GtkSignal.id
53 callback:(unit -> unit) -> GtkSignal.id
56 (** GtkMathView core methods *)
57 class math_view_skel :
58 (Gtk_mathview.math_view Gtk.obj as 'a)->
62 method attribute_changed : Gdome.element -> name:Gdome.domString -> unit
63 method event : GObj.event_ops
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
89 method unselect : Gdome.element -> unit
92 (** GtkMathView standard class *)
94 Gtk_mathview.math_view Gtk.obj ->
96 inherit math_view_skel
97 method connect : math_view_signals
100 (** {2 Constructors} *)
102 (** math_view constructor *)
104 ?hadjustment:GData.adjustment ->
105 ?vadjustment:GData.adjustment ->
107 ?log_verbosity:int ->
110 ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> math_view
112 (** {2 Global configuration for all math_view instances} *)
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