]> gitweb.factorcode.org Git - factor.git/commitdiff
Add hello-unicode demo
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 22 Jan 2009 01:37:48 +0000 (19:37 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 22 Jan 2009 01:37:48 +0000 (19:37 -0600)
extra/hello-unicode/authors.txt [new file with mode: 0644]
extra/hello-unicode/hello-unicode-tests.factor [new file with mode: 0644]
extra/hello-unicode/hello-unicode.factor [new file with mode: 0644]
extra/hello-unicode/summary.txt [new file with mode: 0644]
extra/hello-unicode/tags.txt [new file with mode: 0644]

diff --git a/extra/hello-unicode/authors.txt b/extra/hello-unicode/authors.txt
new file mode 100644 (file)
index 0000000..4e80dac
--- /dev/null
@@ -0,0 +1,3 @@
+Slava Pestov
+Daniel Ehrenberg
+Doug Coleman
diff --git a/extra/hello-unicode/hello-unicode-tests.factor b/extra/hello-unicode/hello-unicode-tests.factor
new file mode 100644 (file)
index 0000000..bf9d572
--- /dev/null
@@ -0,0 +1,4 @@
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test hello-unicode ;
+IN: hello-unicode.tests
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
diff --git a/extra/hello-unicode/summary.txt b/extra/hello-unicode/summary.txt
new file mode 100644 (file)
index 0000000..d24c076
--- /dev/null
@@ -0,0 +1 @@
+Modern "Hello world" which demonstrates various Unicode scripts
diff --git a/extra/hello-unicode/tags.txt b/extra/hello-unicode/tags.txt
new file mode 100644 (file)
index 0000000..cb5fc20
--- /dev/null
@@ -0,0 +1 @@
+demos