Commit 8ad9d8c5 authored by Cies Breijs's avatar Cies Breijs

re-import of the totally rewritten kturtle code...

read about what changed here:
http://websvn.kde.org/trunk/KDE/kdeedu/kturtle/KDE3_TO_KDE4_CHANGELOG?view=auto

if you have any questions feel free to contect me: cies at kde dot nl

it feels good to be back in kde trunk.
_cies.



svn path=/trunk/KDE/kdeedu/kturtle/; revision=587357
parent eb466c8e
Cies Breijs <cies # showroommama.nl>
Main developer and initiator
Walter Schreppers <Walter.Schreppers # ua.ac.be>
Author of "wsbasic" (wsbasic.sf.net) the base for the interpreter of KTurtle
Anne-Marie Mahfouf <annemarie.mahfouf # free.fr>
Big contributor, supporter and fan
== mainwindow ==
* the toolbar has no handle, and i cant set one. probably because of the LocalToolBar subclassing
*
== editor ==
== canvas ==
* 'dashing' when it should produce straight lines, i.e.: "fw 100"
\ No newline at end of file
project (kturtle)
add_subdirectory (src)
add_subdirectory (data)
add_subdirectory (icons)
This diff is collapsed.
This diff is collapsed.
See README for specific instuction on how to build KTurtle!
The following is default stuff:
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
= KDE3 TO KDE4 CHANGELOG =
This document describes what changed from the kde3 version of KTurtle (<= v0.7) to the kde4 (>= v0.8) version.
Since I (Cies Breijs) was working on the rewrite of the interpreter of KTurtle when the porting of kde3 to qt4 started, I descided to remove KTurtle from kde trunk to avoid dubble efford. In the end the rewrite of the interpreter resulted in a total rewrite for KTurtle. To know all that changed read on for the change log.
KTurtle is my first programming project; it basically learnt me C++/Qt/KDE development. I started off by massaging GPLed code of other project into what I wanted it to do. Gradually I learn alot about software design and this rewrite tries to set everything straight.
A lot of stuff still has to be done: not all features in the kde3 version of kturtle are in this version, work has started on a unittest framework (but it is by no means complete), the interpreter has not been very well tested yet, the documentation is still missing and there are rough edges all over the place. Yet I felt it the code is mature enough to back in kde trunk.
I break up the change log by (groups of) classes:
== interpreter ==
* syntax heavily changed (no longer called 'logo' because of complaint of logo-purists)
* the interpreter is now fully statefull (instead of doing ugly callbacks)
* the tokenizer can be (and is) re-used for syntaxt highlighting and F2 context help
* almost 1/3 of interpreter code is generated (see: definitions.rb and generate.rb)
* code generation alows a central place for command definition (in stead of over many files); so not repeating onself
* more sophiticated error handling
* classes have better responsibilities
* the translator is now a singleton
* fully unicode ready (QString everywhere)
* dummy command 'echoer' allows the GUIless unittests
* a lot of testing has to be done (crashes occur, bad working functions, insufficient error messages)
== canvas ==
* from QCanvas to QGraphicsView (antialiassing, vectorbased)
* the turtle figure is now vector based (not keeping many rotations in .PNGs)
* quite some functionality (most notably the 'wrapping' mode) are still missing
* two annoying bugs: 1) i cant get rid of the scrollbars, 2) some glitches while drawing
== editor ==
* no longer uses katepart, no based on the QTextEdit framework
* close coupling with the interpreter (syntax highlighting re-uses the tokenizer!)
* some functions are still missing (like find/replace, and a proper context menu)
* highlighting the currently executed command (or the current error) has yet to been implemented
== main/mainwindow ==
* this should contain most of the kde specific stuff (the rest should be pure-Qt)
* F2 context help is now done using the tokenizer
* there is now a way to invoke KTurtle from the command line (for unittests), try: "kturtle --help"
= KTurtle MANIFESTO =
KTurtle is an educatinal programming environment that aims to make programming as easy and touchable as possible.
== Why not use an existing programming language to teach? ==
Specific features:
* highlighting during (step) execution
* intergrated error messages and help
* fully translatable (language itself, error messages, GUI, manual... everything)
* yet still RealCoding(tm), no clicky clicky stuff
SUBDIRS = src data
EXTRA_DIST = AUTHORS COPYING INSTALL NEWS TODO COPYING ChangeLog kturtle.lsm
include ../admin/Doxyfile.am
27th December 2003
First import in kdenonbeta
Hi,
you are reading the README of the 'KTurtle' project that is initiated
and maintained by Cies Breijs (cies-AT-showroommama-DOT-nl). In this
README I will tell you how to get KTurtle running on your computer.
1. Requirements
You need to have KDE 3.2 or higher. I don't know if it will work with different
KDE versions since I did not test it. If it does not work please see
the Questions section below.
2. Compiling
The simplest way to compile this package is:
1) `cd' to the directory containing the package's source code and type
`./configure --prefix=<PATH>' to configure the package for your
system.
Make sure to replace <PATH> by the path wher your KDE apps are
installed. This is mostly '/usr', but sometimes (for SuSE) '/opt/kde'.
If you dont know what to do try: `./configure --prefix=/usr'. If you don't give a --prefix the default path /usr/local will be used, resulting that KTurtle will no be with your other apps, and may not run smoothly.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for. If the
configure script exits with an error it will probably hint you
what it needs in order to succeed.
2) Type `make' to compile the package.
'make' also takes a while, and it also has the possibility to exit
with errors. Although the errors messages 'make' produces are mostly
not as clear as the error messages from 'configure', they are a hint
to what went wrong. Please see the Questions section below if you
dont know what to do with these messages.
If it succeeded a binary named 'kturtle' is made and can be find in the
'src' directory within the directory containing the package's source
code.
Before you can run KTurtle you need to install it.
3. Installing
NOTE: you often need 'root' privilliges to do the following!
1) Type `make install' to install the programs and any data files and
documentation.
2) You can remove the program binaries and object files from the
source code directory by typing `make clean'.
If you want to uninstall KTurtle you should type 'make uninstall' when
in the source code directory.
Please note that 'make install' will install KTurtle to the path that is provided to the './configure' command with the '--prefix' flag!
4. Running
Under normal circumstances should be able to run KTurtle from the
commandline by typing 'kturtle'.
If it does not work please go to the source code directory of KTurtle
and type:
cd src
./kturlte
If this does not work please follow instuction form the Question section.
5. Questions
Check out the FAQ in the source code directory of KTurtle to see if your
question has allready been asked.
You can also mail questions to the mail address you find in the
beginning of this document. Or visit the KTurtle website:
http://kturlte.sf.net , or http://edu.kde.org/kturtle
and post it in the forum.
Thanks for reading!
Cies.
== mainwindow ==
* make the errordialog (hook it up with the highlighting stuff)
* make a docked window for inspecting the variables
---
* make settings menu (or not: maybe keep all in other menu's) [fonttype, fontsize, language]
* make fullscreen mode (hide all GUI elemets but the canvas during execution)
* connect statusTips and whatIsThis
* get WhatIsThis (et al) help in
* make commandline -%U work, and have an option for the unittesting
* do reordering (in stead of duping) when adding already existing recent file items
== interpreter ==
* make shure recursion over several functions is possible (index learns at execution init time)
* make all errors translatable (use i18n(...))
---
* verbosity/debugmsg levels
* ruby managed unittest suite using the echoer (make the echoer more clever --> maybe put into the executer)
* investivate the efficiency of the echoer
--> maybe hook feedback mechanism directly on the executer / the parser's AST
* make more unittests (redesign the unittest framework using the to-be-created commandline invoke method)
* finish all functions
* finish and test function learning system
== canvas ==
* fucking scrollbars!
* fix 'dashed' drawing bug
---
* context menu for save and print
* add wrapping functionality
* make state of all things available to the executer
== editor ==
* connect editor to context help (F2) action
* make some effects for executing/error
---
* highlight the current line like kate
* fill tools menu
* connect the editor to some statusbar fields
* reimplement context menu for cut/copy/paste, undo/redo, show/hide, and context help
* make a syntax highlighting nicer
== PR ==
* update the e.k.o/kturtle website with some news items and some text
* create a mailinglist/newsgroup (google?)
--> invite everyone that was ever interested into it
* funk up the project page
---
* make wikipedia page nicer (screenshots, etc.)
* realease a pre-release
* maybe: team up with kdelibs-windows team for an early windows version
* a wiki for childrens and teachers manual + translations + translators info [or docbook; KDE translated]
== maybe someday's ==
* refactor the generators ruby code
* totally hide the implementation of the editor class (use proxies for signal/slots)
install (
FILES
arrow.turtle
colors.turtle
curly.turtle
flower.turtle
triangle.turtle
DESTINATION
${DATA_INSTALL_DIR}/kturtle/examples/en_US
)
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
\ No newline at end of file
# 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
# 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
# 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
# draw a triangle
repeat 3 {
forward 100
turnleft 120
}
\ No newline at end of file
Reading Package Lists...
Building Dependency Tree...
Correcting dependencies... Done
The following extra packages will be installed:
alsa-headers libasound2-dev libaudio-dev libaudiofile-dev libfontconfig1-dev
libfreetype6-dev libglib2.0-dev libjpeg62-dev liblcms1-dev libmad0-dev
libogg-dev libpng12-dev libqt3-headers libvorbis-dev libxcursor-dev
pkg-config qt3-dev-tools xlibmesa3-gl xlibmesa3-glu zlib1g-dev
Suggested packages:
libasound2-doc libglib2.0-doc libgnome-dev libglide3
Recommended packages:
libqt3-mt-dev libqt3-dev
The following packages will be REMOVED:
arts gideon gideon-data gideon-plugins kaddressbook kalarm kalarmd kandy
kappfinder karm kate kcontrol kde-cvs-snapshot kdeartwork kdeartwork-misc
kdeartwork-style kdeartwork-theme-desktop kdeartwork-theme-window kdebase
kdebase-bin kdebase-data kdebase-kio-plugins kdelibs kdelibs-bin kdelibs-data
kdelibs4 kdelibs4-doc kdepim kdepim-kfile-plugins kdepim-libs kdeprint
kdesktop kdm kfind kgpgcertmanager khelpcenter kicker kitchensync klipper
kmail kmailcvt kmenuedit knode knotes konqueror konqueror-nsplugins konsole
kontact korganizer korn kpager kpersonalizer kpilot kscreensaver ksmserver
ksplash ksync ksysguard ksysguardd ktip ktnef kwin libarts1 libarts1-dev
libartsc0 libkcal2 libkdenetwork2 libkgantt0 libkonq4 libmimelib1
x-window-system-core xlibmesa-dri xlibmesa-gl xlibmesa-glu
The following NEW packages will be installed:
alsa-headers libasound2-dev libaudio-dev libaudiofile-dev libfontconfig1-dev
libfreetype6-dev libglib2.0-dev libjpeg62-dev liblcms1-dev libmad0-dev
libogg-dev libpng12-dev libqt3-headers libvorbis-dev libxcursor-dev
pkg-config qt3-dev-tools xlibmesa3-gl xlibmesa3-glu zlib1g-dev
0 upgraded, 20 newly installed, 74 to remove and 9 not upgraded.
1 not fully installed or removed.
Need to get 10.1MB of archives.
After unpacking 284MB disk space will be freed.
Do you want to continue? [Y/n] Abort.
kde4_install_icons (${ICON_INSTALL_DIR})
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Cies Breijs</author>
<email>cies # showroommama ! nl</email>
<version>0.01</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
</keywords>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
<ignoreparts/>
<secondaryLanguages/>
</general>
<kdevautoproject>
<general>
<activetarget>src/kturtle</activetarget>
<useconfiguration>default</useconfiguration>
</general>
<run>
<mainprogram>src/kturtle</mainprogram>
<directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory>
<programargs/>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars/>
</run>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>GccOptions</ccompiler>
<cxxcompiler>GppOptions</cxxcompiler>
<f77compiler>G77Options</f77compiler>
<cxxflags>-O2 -g0</cxxflags>
</optimized>
<debug>
<configargs>--enable-debug=full</configargs>
<builddir>debug</builddir>
<ccompiler>GccOptions</ccompiler>
<cxxcompiler>GppOptions</cxxcompiler>
<f77compiler>G77Options</f77compiler>
<cxxflags>-O0 -g3</cxxflags>
</debug>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>false</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
</make>
</kdevautoproject>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
<group pattern="*.ui" name="User Interface" />
<group pattern="*.png" name="Icons" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns></hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
<showvcsfields>true</showvcsfields>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>gtk</toc>
<toc>gnustep</toc>
<toc>python</toc>
<toc>php</toc>
<toc>perl</toc>
</ignoretocs>
<projectdoc>
<userdocDir>/home/cies/src/kturtle/html/</userdocDir>
<apidocDir>/home/cies/src/kturtle/html/</apidocDir>
</projectdoc>
<ignoreqt_xml/>
<ignoredoxygen/>
<ignorekdocs/>
<ignoredevhelp/>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs/>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
</display>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes>
<type ext="ui" />