]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/nihongo.ml
* new semantics with 2 continuations
[helm.git] / helm / DEVEL / lablgtk / lablgtk_20000829-0.1.0 / examples / nihongo.ml
1 (* $Id$ *)
2
3 (* ¤³¤ì¤ò¼Â¹Ô¤¹¤ëÁ°¤ËLC_CTYPE=ja_JP.EUC¤Ê¤É¤È»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤ *)
4
5 (* cut-and-paste ¤âÂбþ¤·¤Æ¤¤¤Þ¤¹¤¬¡¢edit¤Ï¤¦¤Þ¤¯¤¤¤­¤Þ¤»¤ó *)
6
7 open GMain
8
9 let window = GWindow.window ()
10 let box = GPack.vbox ~packing: window#add ()
11 let text = GEdit.text ~editable: true ~packing: box#add ()
12 let font = Gdk.Font.load_fontset
13     "-*-fixed-medium-r-normal--24-*-c-120-iso8859-1, \
14      -*-fixed-medium-r-normal--24-*-jisx0208.1983-0, \
15      -*-fixed-medium-r-normal--24-*-jisx0201.1976-0"
16 let button = GButton.button ~label: "½ªÎ»" ~packing: box#add ()
17 let label = GMisc.label ~text:"¤³¤ì¤Ë¤Ï±Æ¶Á¤·¤Ê¤¤" ~packing: box#add ()
18
19 let _ =
20   window#connect#destroy ~callback:Main.quit;
21   text#misc#realize ();
22   text#insert "¤³¤ó¤Ë¤Á¤Ï" ~font;
23   let style = button#misc#style#copy in
24   button#misc#set_style style;
25   style#set_font font;
26   style#set_bg [`NORMAL,`NAME "green"; `PRELIGHT,`NAME "red"];
27   button#connect#clicked ~callback:Main.quit
28
29 let _ =
30   window#show ();
31   Main.main ()