-(* Copyright (C) 2000-2003, Luca Padovani <luca.padovani@cs.unibo.it>,
- * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>.
+(* Copyright (C) 2000-2005,
+ * Luca Padovani <lpadovan@cs.unibo.it>
+ * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+ * Stefano Zacchiroli <zacchiro@cs.unibo.it>
*
- * This file is part of lablgtkmathview, the Ocaml binding
- * for the GtkMathView widget.
+ * This file is part of lablgtkmathview, the Ocaml binding for the
+ * GtkMathView widget.
*
* lablgtkmathview is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
*
* lablgtkmathview is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with lablgtkmathview; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
*
- * For details, send a mail to the author.
+ * For details, send a mail to the authors.
*)
open Gaux
None -> None
| Some v -> Some (new Gdome.element v)
+let option_document_of_option =
+ function
+ None -> None
+ | Some v -> Some (new Gdome.document v)
+
class math_view_skel obj = object
inherit GObj.widget (obj : Gtk_mathview.math_view obj)
+ method event = new GObj.event_ops obj
method freeze = MathView.freeze obj
method thaw = MathView.thaw obj
method load_uri ~filename =
method unselect element = MathView.unselect obj ((element : Gdome.element)#as_Element)
method is_selected element = MathView.is_selected obj ((element : Gdome.element)#as_Element)
method get_element_at x y = option_element_of_option (MathView.get_element_at obj x y)
+ method get_document = option_document_of_option (MathView.get_document obj)
method structure_changed element = MathView.structure_changed obj ((element : Gdome.element)#as_Element)
method attribute_changed element ~name = MathView.attribute_changed obj ((element : Gdome.element)#as_Element) ((name : Gdome.domString)#as_DOMString)
method get_bounding_box = MathView.get_bounding_box obj
method get_font_size = MathView.get_font_size obj
method set_log_verbosity = MathView.set_log_verbosity obj
method get_log_verbosity = MathView.get_log_verbosity obj
+ method set_t1_opaque_mode = MathView.set_t1_opaque_mode obj
+ method get_t1_opaque_mode = MathView.get_t1_opaque_mode obj
+ method set_t1_anti_aliased_mode = MathView.set_t1_anti_aliased_mode obj
+ method get_t1_anti_aliased_mode = MathView.get_t1_anti_aliased_mode obj
end
class math_view_signals obj = object
GtkBase.Widget.size_params ~cont:(
OgtkMathViewProps.pack_return
(fun p -> OgtkMathViewProps.set_params (new math_view (MathView.create p)) ~font_size ~log_verbosity)) []
-;;
+
+let add_configuration_path = GtkMathView.add_configuration_path
+