2 * Stefano Zacchiroli <zack@cs.unibo.it>
3 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
5 * This file is part of lablgtksourceview, the OCaml binding for the
6 * GtkSourceView widget.
8 * lablgtksourceview is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * lablgtksourceview is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with lablgtksourceview; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 * For details, send a mail to the authors.
32 open OgtkSourceViewProps
35 let get_bool = function
39 class source_view_signals obj_param =
41 inherit widget_signals_impl (obj_param : [> Gtk_sourceview.source_view] obj)
42 (* inherit OgtkTextProps.text_view_sigs *)
43 inherit GText.view_signals obj_param
44 inherit source_view_sigs
47 class source_view (obj: Gtk_sourceview.source_view obj) =
49 inherit GText.view_skel obj
50 method connect = new source_view_signals obj
51 method show_line_numbers =
52 get_bool (self#misc#get_property "show_line_numbers")
53 method set_show_line_numbers b =
54 self#misc#set_property "show_line_numbers" (`BOOL b)
58 SourceView.make_params [] ~cont:(
59 GtkText.View.make_params ~cont:(
60 GContainer.pack_container ~create:(fun pl ->
61 new source_view (SourceView.create pl))))