2 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>,
3 * Stefano Zacchiroli <zack@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.
28 let win = GWindow.window ~title:"LablGtkSourceView test" ()
29 let vbox = GPack.vbox ~packing:win#add ()
31 GSourceView.source_view ~packing:vbox#add ~height:400 ~width:300
32 ~show_line_numbers:true
35 ignore (win#connect#destroy (fun _ -> GMain.quit ()));
36 ignore (source_view#connect#move_cursor (fun _ _ ~extend ->
37 prerr_endline "move_cursor"));
38 ignore (source_view#connect#undo (fun _ -> prerr_endline "undo"));
39 source_view#set_auto_indent true;
40 source_view#set_insert_spaces_instead_of_tabs true;
41 source_view#set_tabs_width 2;
42 source_view#set_margin 30;
43 source_view#set_show_margin true;
44 source_view#set_smart_home_end true;