]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/hello-unicode/hello-unicode.factor
Add hello-unicode demo
[factor.git] / extra / hello-unicode / hello-unicode.factor
diff --git a/extra/hello-unicode/hello-unicode.factor b/extra/hello-unicode/hello-unicode.factor
new file mode 100644 (file)
index 0000000..a4e9726
--- /dev/null
@@ -0,0 +1,20 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: ui.gadgets.panes ui.gadgets.borders ui io io.styles ;
+IN: hello-unicode
+
+: <hello-gadget> ( -- gadget )
+    [
+        { { font-size 24 } } [
+            "Hello" print
+            "Grüß dich" print
+            "здравствуйте" print
+            "こんいちは" print
+            "안녕하세요" print
+            "שָׁלוֹם " print
+        ] with-style
+    ] make-pane 10 <border> ;
+
+: hello-unicode ( -- ) <hello-gadget> "გამარჯობა" open-window ;
+
+MAIN: hello-unicode
\ No newline at end of file