diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch) | |
tree | d3bb9f5d25a2dc09ca81adecf39621d871534297 /kturtle/data | |
download | tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kturtle/data')
-rw-r--r-- | kturtle/data/Makefile.am | 12 | ||||
-rw-r--r-- | kturtle/data/README.data | 27 | ||||
-rw-r--r-- | kturtle/data/ad.logo | 125 | ||||
-rw-r--r-- | kturtle/data/arrow.logo | 23 | ||||
-rw-r--r-- | kturtle/data/canvascolors.logo | 33 | ||||
-rw-r--r-- | kturtle/data/curly.logo | 13 | ||||
-rw-r--r-- | kturtle/data/flower.logo | 26 | ||||
-rw-r--r-- | kturtle/data/kde.logo | 120 | ||||
-rw-r--r-- | kturtle/data/logohighlightstyle.en_US.xml | 141 | ||||
-rw-r--r-- | kturtle/data/logokeywords.en_US.xml | 241 | ||||
-rw-r--r-- | kturtle/data/randomname.logo | 18 | ||||
-rw-r--r-- | kturtle/data/square.logo | 6 | ||||
-rw-r--r-- | kturtle/data/squaresss.logo | 22 | ||||
-rw-r--r-- | kturtle/data/timestables.logo | 15 | ||||
-rw-r--r-- | kturtle/data/triangle.logo | 6 | ||||
-rw-r--r-- | kturtle/data/trianglesss.logo | 24 |
16 files changed, 852 insertions, 0 deletions
diff --git a/kturtle/data/Makefile.am b/kturtle/data/Makefile.am new file mode 100644 index 00000000..2b523eda --- /dev/null +++ b/kturtle/data/Makefile.am @@ -0,0 +1,12 @@ +txt_DATA = ad.logo curly.logo square.logo triangle.logo \ +arrow.logo flower.logo squaresss.logo trianglesss.logo \ +canvascolors.logo randomname.logo timestables.logo kde.logo +txtdir = $(kde_datadir)/kturtle/examples/en_US + +xml_DATA = logohighlightstyle.en_US.xml +xmldir = $(kde_datadir)/katepart/syntax + +keywords_DATA = logokeywords.en_US.xml +keywordsdir = $(kde_datadir)/kturtle/data + +EXTRA_DIST = $(txt_DATA) $(xml_DATA) $(keywords_DATA) diff --git a/kturtle/data/README.data b/kturtle/data/README.data new file mode 100644 index 00000000..8bce26c0 --- /dev/null +++ b/kturtle/data/README.data @@ -0,0 +1,27 @@ +Dear Reader, + +this is your captain speaking... + +KTurtle currently has 3 types of 'data' (as we call it), namely: +- examples (which are *.logo files) +- logokeyword.*.xml files +- logohighlightstyle.*.xml files + +In this kdeedu/kturtle/data directory we only store the 'en_US' (default) versions of this data. +This means that here we store: +- the English logo examples (a, hopefully ever growing, bunch of *.logo files) +- the definition used to translate these examples in "logokeyword.en_US.xml" +- and the accompanying highlight style in "logoheighlightstyle.en_US.xml" + +The makefile system makes sure every part gets installed to the right place. +(if you dont believe me see the Makefile.am in this dir) + +For the other localizations a dir like this, containing these files for an other language, can be found in the kde-i18n module of kde. +On kdecvs this is: kde-i18n/*/data/kdeedu/kturtle (for Dutch this would be: kde-i18n/nl/data/kdeedu/kturtle) + +If the localization of KTurtle to you favorite language does not exist yet, you might concider making it. In the documentation of KTurtle you can find some pointers on how to start. Also make sure to see the contents of the kdeedu/kturtle/scripts directory since it contains Rafael Beccar's nifty tranlaton perl scripts that can make translating KTurtle human resource friendly. If you face difficulty translating feel free to contact one of the KTrutle developers. + + +Thanks for reading, + +Cies Breijs. diff --git a/kturtle/data/ad.logo b/kturtle/data/ad.logo new file mode 100644 index 00000000..8604d02f --- /dev/null +++ b/kturtle/data/ad.logo @@ -0,0 +1,125 @@ +# KTurtle advertisement :) + +reset +canvassize 400,190 +penwidth 10 + + +learn K x,y [ + dir 0 + go x,y + bw 75 + go x+40,y + dir -140 + fw 60 + bw 10 + tl 85 + fw 50 +] + +learn T x,y [ + go x,y + dir 90 + fw 50 + bw 25 + dir 180 + fw 70 +] + +learn u x,y [ + go x,y + dir 180 + fw 47 + tl 45 + fw 7 + tl 45 + fw 20 + tl 45 + fw 7 + tl 45 + fw 47 +] + +learn r x,y [ + go x,y + dir 180 + fw 55 + go x,y+15 + dir 45 + penup + fw 4 + pendown + fw 10 + tr 45 + fw 10 +] + +learn t x,y [ + dir 180 + go x,y + fw 67 + tl 45 + fw 7 + tl 45 + fw 10 + go x,y+30 + dir 90 + fw 10 +] + +learn l x,y [ + dir 180 + go x,y + fw 77 +] + +learn e x,y [ + go x,y+30 + dir 90 + fw 50 + tl 90 + fw 15 + tl 45 + fw 15 + tl 45 + fw 20 + tl 45 + fw 15 + tl 45 + fw 25 + tl 45 + fw 15 + tl 45 + fw 25 +] + + +K 50,30 +T 108,35 +u 167,50 +r 220,50 +t 256,30 +l 289,30 +e 305,50 + +go 12,115 +fontsize 25 +print "Educative Programming Environment" + +hide +wait 1 +show + +go 120,145 +dir 80 +penwidth 5 +pencolor 255,0,0 +fw 130 + +wait 0.5 +go 180,135 +print "play" + +go 238,160 +wait 0.5 +dir 0
\ No newline at end of file diff --git a/kturtle/data/arrow.logo b/kturtle/data/arrow.logo new file mode 100644 index 00000000..7eddd453 --- /dev/null +++ b/kturtle/data/arrow.logo @@ -0,0 +1,23 @@ +# draw a red arrow + +reset + +canvassize 200, 200 +canvascolor 0, 0, 0 +pencolor 255, 0, 0 +penwidth 5 +clear + +go 20,20 +direction 135 + +forward 200 +turnleft 135 +forward 100 +turnleft 135 +forward 141 +turnleft 135 +forward 100 +turnleft 45 + +go 40, 100 diff --git a/kturtle/data/canvascolors.logo b/kturtle/data/canvascolors.logo new file mode 100644 index 00000000..709bf839 --- /dev/null +++ b/kturtle/data/canvascolors.logo @@ -0,0 +1,33 @@ +# color demo + +canvascolor 255,255,255 +hide + +repeat 5 [ + +for c = 0 to 255 [ + canvascolor 255-c,255,255 +] +for c = 0 to 255 [ + canvascolor 0,255-c,255 +] +for c = 0 to 255 [ + canvascolor c,0,255 +] +for c = 0 to 255 [ + canvascolor 255,c,255-c +] +for c = 0 to 255 [ + canvascolor 255,255-c,0 +] +for c = 0 to 255 [ + canvascolor 255,0,c +] +for c = 0 to 255 [ + canvascolor 255-c,0,255-c +] +for c = 0 to 255 [ + canvascolor c,c,c +] + +]
\ No newline at end of file diff --git a/kturtle/data/curly.logo b/kturtle/data/curly.logo new file mode 100644 index 00000000..f24ebab3 --- /dev/null +++ b/kturtle/data/curly.logo @@ -0,0 +1,13 @@ +# curly.logo + +reset +penup +forward 50 +pendown + +repeat 4 [ + for x = 1 to 100 [ + forward 10 + turnright 100 - x + ] +]
\ No newline at end of file diff --git a/kturtle/data/flower.logo b/kturtle/data/flower.logo new file mode 100644 index 00000000..04a26ff0 --- /dev/null +++ b/kturtle/data/flower.logo @@ -0,0 +1,26 @@ +# flower + +reset +canvassize 170, 170 +canvascolor 255, 55, 140 +go 45, 120 +pencolor 160, 0, 255 +penwidth 3 + +repeat 8 [ + repeat 4 [ + forward 20 + turnright 30 + ] + repeat 7 [ + forward 10 + turnright 15 + ] + repeat 9 [ + forward 3 + turnright 10 + ] +] + +go 145, 145 +direction 0
\ No newline at end of file diff --git a/kturtle/data/kde.logo b/kturtle/data/kde.logo new file mode 100644 index 00000000..34c6f550 --- /dev/null +++ b/kturtle/data/kde.logo @@ -0,0 +1,120 @@ +# The KDE Logo for a KDE logo +# interpreter. +# Copyright 2005 Andy Teijelo <[email protected]> +# GNU General Public License version 2 + +reset +canvassize 620, 480 +canvascolor 10,50,200 +pencolor 255,255,255 +penwidth 3 + +go 294,280 + +turnright 81 +forward 50 +turnleft 81 +forward 90 +turnright 145 +forward 120 +turnleft 72 +forward 55 +turnleft 108 +forward 116 +turnright 73 +forward 112 +turnleft 115 +forward 55 +turnleft 65 +forward 113 +turnright 142 +forward 92 +turnleft 96 +forward 50 +turnleft 84 +forward 209 + +go 358,322 + +direction -112.5 + +repeat 4 +[ + repeat 2 + [ + forward 6 + turnright 3.75 + ] + + turnleft 63 + forward 43 + turnright 39 + forward 3 + turnright 39 + forward 32 + turnright 39 + forward 3 + turnright 39 + forward 43 + turnleft 63 + + repeat 2 + [ + forward 6 + turnright 3.75 + ] +] + +forward 4 +turnright 112.5 +forward 25 + +turnright 58 +repeat 21 +[ + forward 13.5 + turnleft 10 +] + +forward 9 +turnright 117 +forward 34 +turnleft 60 +forward 8 +turnright 62 + +forward 25 +turnright 39 +forward 3 +turnright 39 +forward 32 +turnright 39 +forward 3 +turnright 39 +forward 43 +turnleft 63 + +repeat 2 +[ + forward 6 + turnright 3.75 +] + +go 320,395 +direction 90 + +penwidth 5 + +repeat 4 +[ + forward 160 + repeat 6 + [ + forward 4 + turnleft 15 + + ] + forward 160 +] + +go 320,440
\ No newline at end of file diff --git a/kturtle/data/logohighlightstyle.en_US.xml b/kturtle/data/logohighlightstyle.en_US.xml new file mode 100644 index 00000000..330fc496 --- /dev/null +++ b/kturtle/data/logohighlightstyle.en_US.xml @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language> +<!-- Logo syntax highlightning v0.2 by Cies Breijs --> +<language name="en_US" version="0.2" kateversion="2.1" section="Logo" extensions="*.logo;*.lgo;*.LOGO;*.Logo" mimetype="text/x-logosrc;text/x-logo;application/x-logo" priority="9" casesensitive="0"> + + +<highlighting> + <list name="metafunctions"> + <item> learn </item> + </list> + + <list name="statements"> + <item> run </item> + <item> clear </item> + <item> ccl </item> + <item> go </item> + <item> gox </item> + <item> gx </item> + <item> goy </item> + <item> gy </item> + <item> forward </item> + <item> fw </item> + <item> backward </item> + <item> bw </item> + <item> direction </item> + <item> dir </item> + <item> turnleft </item> + <item> tl </item> + <item> turnright </item> + <item> tr </item> + <item> center </item> + <item> penwidth </item> + <item> pw </item> + <item> penup </item> + <item> pu </item> + <item> pendown </item> + <item> pd </item> + <item> pencolor </item> + <item> pc </item> + <item> canvascolor </item> + <item> cc </item> + <item> canvassize </item> + <item> cs </item> + <item> show </item> + <item> ss </item> + <item> hide </item> + <item> sh </item> + <item> press </item> + <item> sp </item> + <item> change </item> + <item> sc </item> + <item> message </item> + <item> inputwindow </item> + <item> print </item> + <item> fonttype </item> + <item> fontsize </item> + <item> random </item> + <item> wrapon </item> + <item> wrapoff </item> + <item> reset </item> + </list> + + <list name="controllers"> + <item> while </item> + <item> foreach </item> + <item> in </item> + <item> for </item> + <item> to </item> + <item> do </item> + <item> repeat </item> + <item> rpt </item> + <item> if </item> + <item> else </item> + <item> return </item> + <item> break </item> + <item> wait </item> + </list> + + <list name="boolops"> + <item> and </item> + <item> or </item> + <item> not </item> + </list> + + <contexts> + <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> + + <keyword attribute="MetaFunctions" String="metafunctions" context="#stay"/> + <keyword attribute="Statements" String="statements" context="#stay"/> + <keyword attribute="Execution Controllers" String="controllers" context="#stay"/> + <keyword attribute="Boolean Operators" String="boolops" context="#stay"/> + + <RegExpr attribute="Expressers" String="([!=><][=]|[><])" context="#stay"/> + <RegExpr attribute="Normal" String="[a-zA-Z_][a-zA-Z_0-9]+" context="#stay"/> + <RegExpr attribute="Number" String="([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*" context="#stay"/> + <RegExpr attribute="Comment" String="#.*$" context="#stay"/> + <RegExpr attribute="Operator" String="[+*/\(\)-]" context="#stay"/> + <RegExpr attribute="Scopes" String="[\[\]]" context="#stay"/> + <DetectChar attribute="String" char=""" context="String"/> + </context> + + <context name="String" attribute="String" lineEndContext="#stay"> + <HlCStringChar attribute="String" context="#stay"/> + <RegExpr attribute="Operator" String="%[a-zA-Z]" context="#stay"/> + <DetectChar attribute="String" char=""" context="#pop"/> + </context> + + </contexts> + + <itemDatas> + <itemData name="Normal Text" defStyleNum="dsNormal"/> + <itemData name="Normal" defStyleNum="dsNormal"/> + <itemData name="MetaFunctions" defStyleNum="dsKeyword" color="#00bb00" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Statements" defStyleNum="dsKeyword" color="#006600" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Execution Controllers" defStyleNum="dsKeyword" color="#006600" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Expressers" defStyleNum="dsKeyword" color="#1e99cc" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Boolean Operators" defStyleNum="dsKeyword" color="#9922cc" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Scopes" defStyleNum="dsKeyword" color="#00bb00" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Number" defStyleNum="dsFloat" color="#0000ff" selColor="#00eeff" bold="0" italic="0"/> + <itemData name="Comment" defStyleNum="dsComment" color="#999922" selColor="#888888" bold="0" italic="0"/> + <itemData name="String" defStyleNum="dsString" color="#800000" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Raw String" defStyleNum="dsString" color="#800000" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Operator" defStyleNum="dsOthers" color="#888888" selColor="#ffffff" bold="0" italic="0"/> + </itemDatas> +</highlighting> + + +<general> + + <folding indentationsensitive="0" /> + + <comments> + <comment name="singleLine" start="#" /> + </comments> + + <keywords casesensitive="0" /> + +</general> + + +</language> diff --git a/kturtle/data/logokeywords.en_US.xml b/kturtle/data/logokeywords.en_US.xml new file mode 100644 index 00000000..44001590 --- /dev/null +++ b/kturtle/data/logokeywords.en_US.xml @@ -0,0 +1,241 @@ +<?xml version="1.0"?> +<!DOCTYPE logokeywords> + +<logokeywords lang="en_US" ver="0.01"> + +<!-- scope --> + <command name="begin"> + <keyword>[</keyword> + </command> + + <command name="end"> + <keyword>]</keyword> + </command> + + + +<!-- +TO THE TRANSLATORS: + +Translate the terms between the KEYWORD tags to the appropriate term in your language. +You might want to checkout what terms other Logo languages have chosen in the past (google is your friend). +Make sure to see the scripts and the README file in the kdeedu/kturtle/scripts directory, they help you! +If you did not read it allready: there is a chapter on how to translate KTurtle in the KTurtle documentation. + +Thanks for your efford, we love you! +--> + + + + +<!-- execution controllers --> + <command name="while"> + <keyword>while</keyword> + </command> + + <command name="if"> + <keyword>if</keyword> + </command> + + <command name="else"> + <keyword>else</keyword> + </command> + + <command name="for"> + <keyword>for</keyword> + </command> + + <command name="to"> + <keyword>to</keyword> + </command> + + <command name="return"> + <keyword>return</keyword> + </command> + + <command name="break"> + <keyword>break</keyword> + </command> + + <command name="foreach"> + <keyword>foreach</keyword> + </command> + + <command name="in"> + <keyword>in</keyword> + </command> + + <command name="do"> + <keyword>do</keyword> + </command> + + <command name="repeat"> + <keyword>repeat</keyword> + <alias>rpt</alias> + </command> + + <command name="wait"> + <keyword>wait</keyword> + </command> + + +<!-- boolean operators --> + <command name="and"> + <keyword>and</keyword> + </command> + + <command name="or"> + <keyword>or</keyword> + </command> + + <command name="not"> + <keyword>not</keyword> + </command> + + +<!-- the meta command --> + <command name="learn"> + <keyword>learn</keyword> + </command> + + +<!-- normal keywords --> + <command name="run"> + <keyword>run</keyword> + </command> + + <command name="clear"> + <keyword>clear</keyword> + <alias>ccl</alias> + </command> + + <command name="go"> + <keyword>go</keyword> + </command> + + <command name="gox"> + <keyword>gox</keyword> + <alias>gx</alias> + </command> + + <command name="goy"> + <keyword>goy</keyword> + <alias>gy</alias> + </command> + + <command name="forward"> + <keyword>forward</keyword> + <alias>fw</alias> + </command> + + <command name="backward"> + <keyword>backward</keyword> + <alias>bw</alias> + </command> + + <command name="direction"> + <keyword>direction</keyword> + <alias>dir</alias> + </command> + + <command name="turnleft"> + <keyword>turnleft</keyword> + <alias>tl</alias> + </command> + + <command name="turnright"> + <keyword>turnright</keyword> + <alias>tr</alias> + </command> + + <command name="center"> + <keyword>center</keyword> + </command> + + <command name="setpenwidth"> + <keyword>penwidth</keyword> + <alias>pw</alias> + </command> + + <command name="penup"> + <keyword>penup</keyword> + <alias>pu</alias> + </command> + + <command name="pendown"> + <keyword>pendown</keyword> + <alias>pd</alias> + </command> + + <command name="setfgcolor"> + <keyword>pencolor</keyword> + <alias>pc</alias> + </command> + + <command name="setbgcolor"> + <keyword>canvascolor</keyword> + <alias>cc</alias> + </command> + + <command name="resizecanvas"> + <keyword>canvassize</keyword> + <alias>cs</alias> + </command> + + <command name="spriteshow"> + <keyword>show</keyword> + <alias>ss</alias> + </command> + + <command name="spritehide"> + <keyword>hide</keyword> + <alias>sh</alias> + </command> + + <command name="spritepress"> + <keyword>press</keyword> + <alias>sp</alias> + </command> + + <command name="spritechange"> + <keyword>change</keyword> + <alias>sc</alias> + </command> + + <command name="message"> + <keyword>message</keyword> + </command> + + <command name="inputwindow"> + <keyword>inputwindow</keyword> + </command> + + <command name="print"> + <keyword>print</keyword> + </command> + + <command name="fonttype"> + <keyword>fonttype</keyword> + </command> + + <command name="fontsize"> + <keyword>fontsize</keyword> + </command> + + <command name="random"> + <keyword>random</keyword> + </command> + + <command name="wrapon"> + <keyword>wrapon</keyword> + </command> + + <command name="wrapoff"> + <keyword>wrapoff</keyword> + </command> + + <command name="reset"> + <keyword>reset</keyword> + </command> + +</logokeywords> diff --git a/kturtle/data/randomname.logo b/kturtle/data/randomname.logo new file mode 100644 index 00000000..db6b9e1e --- /dev/null +++ b/kturtle/data/randomname.logo @@ -0,0 +1,18 @@ +# prints your name at random + +reset +canvassize 255,255 +hide + +name = inputwindow "What's your name?" + +repeat 50 [ + x = random 0, 255 + y = random 0, 255 + s = random 10, 51 + + go x, y + fontsize s + pencolor x,y,s*5 + print name +]
\ No newline at end of file diff --git a/kturtle/data/square.logo b/kturtle/data/square.logo new file mode 100644 index 00000000..9c90ef07 --- /dev/null +++ b/kturtle/data/square.logo @@ -0,0 +1,6 @@ +# draw a square + +repeat 4 [ + forward 100 + turnleft 90 +] diff --git a/kturtle/data/squaresss.logo b/kturtle/data/squaresss.logo new file mode 100644 index 00000000..e3700b8c --- /dev/null +++ b/kturtle/data/squaresss.logo @@ -0,0 +1,22 @@ +# draw many squares + +learn square X [ + repeat 4 [ + forward X + turnleft 90 + ] +] + +reset +canvassize 400, 400 +go 150,200 +penwidth 5 +hide + +repeat 12 [ + penup + forward 30 + pendown + square 80 + turnright 30 +] diff --git a/kturtle/data/timestables.logo b/kturtle/data/timestables.logo new file mode 100644 index 00000000..9c2cc3e7 --- /dev/null +++ b/kturtle/data/timestables.logo @@ -0,0 +1,15 @@ +# print times-tables + +reset +canvassize 300,250 +hide +penup +go 10, 0 + +n = inputwindow "Enter the number for which i'll print the times-table" + +for x = 0 to 10 [ + backward 20 + r = x * n + print x," * ",n," = ",r +] diff --git a/kturtle/data/triangle.logo b/kturtle/data/triangle.logo new file mode 100644 index 00000000..605cd7ef --- /dev/null +++ b/kturtle/data/triangle.logo @@ -0,0 +1,6 @@ +# draw a triangle + +repeat 3 [ + forward 100 + turnleft 120 +] diff --git a/kturtle/data/trianglesss.logo b/kturtle/data/trianglesss.logo new file mode 100644 index 00000000..99fa65a0 --- /dev/null +++ b/kturtle/data/trianglesss.logo @@ -0,0 +1,24 @@ +# draw triangle wheels + +reset + +learn triangle X [ + repeat 3 [ + forward X + turnleft 120 + ] +] + +for r = 1 to 30 [ + clear + repeat 18 [ + triangle r*r*5 + tr 20 + ] + wait 1 +] + +wait 3 +clear + +print " I'm tired..." |