]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtksourceview/test/test.ml
snapshot
[helm.git] / helm / DEVEL / lablgtksourceview / test / test.ml
index 4979ad02d486f144c122b7c87e3425fa2078b8ee..08c942bc5a65b74fb7e19801b9b7c3929640e743 100644 (file)
@@ -27,21 +27,21 @@ open Printf
 
 let win = GWindow.window ~title:"LablGtkSourceView test" ()
 let vbox = GPack.vbox ~packing:win#add ()
+let source_buffer = GSourceView.source_buffer ~check_brackets:true ()
 let source_view =
-  GSourceView.source_view ~packing:vbox#add ~height:400 ~width:300
+  GSourceView.source_view
+    ~source_buffer
+    ~auto_indent:true ~insert_spaces_instead_of_tabs:true ~tabs_width:2
     ~show_line_numbers:true
+    ~margin:30 ~show_margin:true
+    ~smart_home_end:true
+    ~packing:vbox#add ~height:400 ~width:300
     ()
 let _ =
   ignore (win#connect#destroy (fun _ -> GMain.quit ()));
   ignore (source_view#connect#move_cursor (fun _ _ ~extend ->
     prerr_endline "move_cursor"));
   ignore (source_view#connect#undo (fun _ -> prerr_endline "undo"));
-  source_view#set_auto_indent true;
-  source_view#set_insert_spaces_instead_of_tabs true;
-  source_view#set_tabs_width 2;
-  source_view#set_margin 30;
-  source_view#set_show_margin true;
-  source_view#set_smart_home_end true;
   win#show ();
   GMain.Main.main ()