More junk cleaned up that shouldn't have been committed

This commit is contained in:
Samuel D. Crow
2021-03-11 21:53:10 -06:00
parent e991daeb45
commit 301018f1fd
160 changed files with 0 additions and 20217 deletions

View File

@@ -1,23 +0,0 @@
##
## GCC Options
##
SH=$(shell finddir B_SYSTEM_HEADERS_DIRECTORY)
UH= $(shell finddir B_USER_HEADERS_DIRECTORY)
GCC = gcc
GCC_OPT = $(DBG) $(OPT) -I. $(addprefix -I,$(SH)) $(addprefix -I,$(UH)) -DHAVE_CONFIG -DUNIX $(HAIKUOPT) -I/boot/system/non-packaged/develop/headers/yab
GPP = g++
GPP_OPT = $(DBG) $(OPT) -I. -DHAVE_CONFIG -DUNIX $(HAIKUOPT) -I/boot/system/non-packaged/develop/headers/yab
yab: YabMain.o main.o flex.o
$(GPP) $(GPP_OPT) -o $(TARGET) YabMain.o main.o flex.o $(LIBPATH) $(LIB)
YabMain.o: YabMain.cpp
$(GPP) $(GPP_OPT) -c YabMain.cpp -o YabMain.o
flex.o: flex.c
$(GCC) $(GCC_OPT) -c flex.c -o flex.o
main.o: main.c
$(GCC) $(GCC_OPT) -c main.c -o main.o
clean:
rm -f core *.o yabasic.output

View File

@@ -1,40 +0,0 @@
##
## yab Haiku BuildFactory Makefile
##
## (c) Jan Bungeroth 2009 - 2011
## Artistic License.
##
##
## Haiku stuff
##
HAIKUTAB = YabTabView.o
HAIKUOPT = -DHAIKU
##
## Use our own column list view
##
COLUMN = column/ColumnListView.o
##
## enable debug
##
# DBG = -g
#
##
## enable optimization
##
OPT = -O
#
##
## Libraries
##
##LIBPATH = -L/boot/home/config/lib
##LIBPATH = -L/boot/system/lib
LIBPATHS = $(shell findpaths B_FIND_PATH_DEVELOP_LIB_DIRECTORY)
LIBPATH=$(addprefix -L,$(LIBPATHS))
LIB = -lyab1 -lbe -lroot -ltranslation -ltracker -lmedia -lz

View File

@@ -1,522 +0,0 @@
#!yab
//////////////////////////////////////
// BuildFactory v 2.4
//////////////////////////////////////
// find out in which directory we are
if (peek("isbound")) then
This_dir$ = peek$("directory")+"/"
else
This_dir$ = trim$(system$("pwd"))+"/"
fi
if (system("test -e \""+This_dir$+"yab\"")) then
YAB$ = "yab"
else
YAB$ = This_dir$+"yab"
fi
/////////////////////////////////////////////////////////////
// if yab gives us its version, we know that it exists.
// Otherwise we tell the user to make sure that there is one
/////////////////////////////////////////////////////////////
if (system(YAB$+" -version")) then
print "Please make sure you have a yab binary in"
print "\t"+left$(This_dir$, len(This_dir$)-1)
print "or"
print "\t/home/config/bin"
print "or"
print "\t/system/bin\n"
exit 1
fi
// set some global variables here
AppName$ = "BuildFactory"
VERSION$ = " 2.4.1"
TMP_folder$ = "/boot/var/tmp/BUILD_FACTORY_TMP/"
Lib_path$ = "/boot/home/config/settings/yab/"
dim Library$(1)
dim Is_in_lib_path(1)
dim Found_sub$(1)
/////////////////////////////////////////////////////////////
// Program starts here
//
if (not open(1,"flex.c")) then
system("yab flex-bison.yab") // make flex.c and modify it for BuildFactory
else
close #1
endif
if (peek("argument") < 2) then
UsageAdvise(1)
fi
// in- and outputfiles
Output_file$ = peek$("argument")
Input_file$ = peek$("argument")
appsig$ = peek$("argument")
run_from_ide$ = peek$("argument")
if appsig$="" appsig$=getappsig$(Input_file$)
if appsig$="" appsig$="application/x-vnd.yab-app"
SetAppSig(appsig$)
Input_dir$ = left$(Input_file$, rinstr(Input_file$, "/"))
Library$(0) = right$(Input_file$, len(Input_file$)-rinstr(Input_file$, "/"))
if (trim$(Input_dir$) = "") Input_dir$ = This_dir$
// create the temp folder
if (system("test -d \""+TMP_folder$+"\"")) then
if (system("mkdir -p \""+TMP_folder$+"\"")) then
print "-- Error while creating temp folder!"
UsageAdvise(1)
fi
fi
// We clean up all the files including the libs, if existing
for NL = 0 to num_lib
if (Is_in_lib_path(NL)) then
lib$ = Lib_path$+Library$(NL)
else
lib$ = Input_dir$+Library$(NL)
fi
num_lib = CleanUpCode(lib$)
next NL
// writing all the libs into the mainfile
// because the BuildFactory can not handle libs
err = JoinFiles(Output_file$+"_bf.yab")
// here it comes - the BuildFactory
BuildFactory(Output_file$+"_bf.yab")
// cleaning up
RmErr = RemoveTemp()
system ("RdefApply parts/YAB.bf.rdef "+Output_file$)
system ("addattr -t mime BEOS:APP_SIG "+appsig$+" "+Output_file$)
system ("addattr -t mime BEOS:TYPE application/x-vnd.be-elfexecutable "+Output_file$)
system ("chmod a+x "+Output_file$)
// check if the BuildFactory was envoked by the yab-ide.
// if so, copy the output file to the inmputfile's directory and open the directory.
// the IDE will delete the output file from the BuildFactory directory.
if run_from_ide$ = "yab-ide" then
system ("cp "+Output_file$+" "+Input_dir$)
system ("open "+Input_dir$)
endif
print "--------"
print "-- Info:"
print "\tNumber of libs:\t\t", num_lib
print "\tNumber of subs:\t\t", num_sub
print "\tNumber of lines:\t", num_line
exit
//
// programm ends here
/////////////////////////////////////////////////////////////
///////////////////////////////////////////
// joining all files to one
///////////////////////////////////////////
sub JoinFiles(the_file$)
local in_file, out_file
out_file = OpenWriteFile(the_file$)
for NL = 0 to num_lib
// contents of each file is written to our joined temp file
in_file = OpenReadFile(TMP_folder$+Library$(NL))
while (not eof(in_file))
print #out_file LineInput$(in_file)
num_line = num_line + 1
wend
close in_file
next NL
close out_file
return
end sub
///////////////////////////////////////////
// here we are cleaning up the files
///////////////////////////////////////////
sub CleanUpCode(the_file$)
local the_filename$, out_file$
local in_file, out_file
local Current_line$
the_filename$ = right$(the_file$, len(the_file$)-rinstr(the_file$, "/"))
out_file$ = TMP_folder$+the_filename$
out_file = OpenWriteFile(out_file$)
in_file = OpenReadFile(the_file$)
if (min(out_file, in_file) = 0) return -1
print "\t-- removing not needed stuff ..."
while (not eof(in_file))
Current_line$ = LineInput$(in_file)
if (double_sub) then
if (upper$(left$(Current_line$, 7)) = "END SUB") double_sub = false
continue
fi
// remove empty lines and commented lines and stuff
if (Current_line$ = "") continue
if (left$(Current_line$, 2) = "//") continue
if (left$(Current_line$, 1) = "#") continue
if (upper$(left$(Current_line$, 11)) = "EXPORT SUB ") then
Current_line$ = trim$(right$(Current_line$, len(Current_line$)-6))
fi
Current_line$ = CheckOnLineComments$(Current_line$)
if (upper$(left$(Current_line$, 4)) = "SUB ") then
curr_sub$ = right$(Current_line$, len(Current_line$)-4)
curr_sub$ = left$(curr_sub$, instr(curr_sub$, "("))
for NS = 0 to num_sub
if (Found_sub$(NS) = curr_sub$) then
double_sub = true
break
fi
next NS
if (double_sub) then
continue
else
num_sub = num_sub + 1
dim Found_sub$(num_sub+1)
Found_sub$(num_sub) = curr_sub$
fi
fi
if (upper$(left$(Current_line$, 6)) = "IMPORT") then
found_lib = FindLibraries(Current_line$)
continue
fi
if (upper$(Current_line$) = "ENDIF") Current_line$ = "fi"
print #out_file Current_line$
wend
close in_file
close out_file
return found_lib
end sub
////////////////////////////////////////////
// search for comments behind a needed line
// if found, remove it. Exept there is a "
////////////////////////////////////////////
sub CheckOnLineComments$(the_line$)
D = instr(the_line$, "//")
if (D) then
local is_comment
local A : local B
local C : local E
for B = 1 to len(the_line$)
A = asc(mid$(the_line$, B, 1))
if (B > D) then
if (A = 34 and is_comment) then
C = true
break
fi
else
E = asc(mid$(the_line$, B+1, 1))
if (E = 34 and not A = 92) then
if (is_comment) then
is_comment = false
else
is_comment = true
fi
fi
fi
next B
if (not C) the_line$ = left$(the_line$, D-1)
fi
return trim$(the_line$)
end sub
/////////////////////////////////////////////////
// search for libraries, to prepare them as well
/////////////////////////////////////////////////
sub FindLibraries(the_line$)
local Library$
Library$ = right$(the_line$, len(the_line$)-7)
if (upper$(right$(Library$, 4)) <> ".YAB") then
Library$ = Library$+".yab"
fi
num_lib = num_lib + 1
dim Library$(num_lib+1)
dim Is_in_lib_path(num_lib+1)
if (system("test -e \""+Input_dir$+Library$+"\"")) then
if (system("test -e \""+Lib_path$+Library$+"\"")) then
print "-- Could not find lib\n\t"+Library$
num_lib = num_lib - 1
return num_lib
else
Is_in_lib_path(num_lib) = true
fi
fi
Library$(num_lib) = Library$
print "-- Found lib: "+Library$
return num_lib
end sub
/////////////////////////////////////////////////////////////
// open the inputfile for reading
/////////////////////////////////////////////////////////////
sub OpenReadFile(the_file$)
local READ_FILE
READ_FILE = 22
if (not open(#READ_FILE,the_file$,"r")) then
print "-- Could not open "+the_file$
print "-- for reading!"
exit
fi
return READ_FILE
end sub
/////////////////////////////////////////////////////////////
// open the outputfile for writing
/////////////////////////////////////////////////////////////
sub OpenWriteFile(the_file$)
local WRITE_FILE
WRITE_FILE = 23
if (not open(#WRITE_FILE,the_file$,"w")) then
print "-- Could not open "+the_file$
print "-- for writing!"
exit
fi
return WRITE_FILE
end sub
/////////////////////////////////////////
// read in one line from the given file
/////////////////////////////////////////
sub LineInput$(n)
local tmp : local tmp$
// while (tmp <> 10)
// tmp = peek(n)
// if (tmp < 0) continue
// tmp$ = tmp$ + chr$(tmp)
// wend
// line input allows for final lines without a newline "\n"
line input #n tmp$
return trim$(tmp$)
end sub
/////////////////////////////////////////////////////////////
// Remove our tempfolder
/////////////////////////////////////////////////////////////
sub RemoveTemp()
if (not system("test -d \""+TMP_folder$+"\"")) then
RmErr = system("rm -rf \""+TMP_folder$+"\"")
fi
return RmErr
end sub
/////////////////////////////////////////////////////////////
// tell the user how to use this app
/////////////////////////////////////////////////////////////
sub UsageAdvise(n)
print "\n"+AppName$+VERSION$
print "Usage:"
print "\t"+AppName$+" outputfile inputfile < applicationsignature >\n"
print "\tFilenames may have no spaces!\n"
print "\tapplicationsignature default is: application/x-vnd.yab-app\n"
RemoveTemp()
exit n
end sub
/////////////////////////////////////////////////////////////
// set the application signature in YabMain.cpp
/////////////////////////////////////////////////////////////
sub SetAppSig(sig$)
app_sig$="\n\tBString tmp(\""+sig$+"\");\n"
open #1, This_dir$+"parts/YabMain.cpp.appsig","w"
print #1 app_sig$
close #1
cmd$="cat "+This_dir$+"parts/YabMain.cpp.start "+This_dir$+"parts/YabMain.cpp.appsig "+This_dir$+"parts/YabMain.cpp.end > "+This_dir$+"YabMain.cpp"
system(cmd$)
end sub
/////////////////////////////////////////////////////////////
// set the application signature to match the mimetype declared in the file.
/////////////////////////////////////////////////////////////
sub getappsig$(infil$)
local x,a$,i,ii
open #22,infil$,"r"
for i=1 to 2
line input #22 a$
a$=lower$(a$)
ii = instr(a$,"mimetype")
if ii<>0 then
a$=right$(a$,len(a$) - (ii+8))
a$=trim$(a$)
a$=right$(a$,len(a$)-1)
a$=left$(a$,len(a$)-1)
close #22
return a$
endif
next
close #22
return ""
end sub
////////////////////////////////////////
////////////////////////////////////////
// the BuildFactory starts here
////////////////////////////////////////
////////////////////////////////////////
sub BuildFactory(f$)
handle = open(f$, "r")
if(not handle) then
print "Error: Could not open file "+f$
exit(1)
endif
print "Reading file "+f$+"..."
print
while(not eof(handle))
numRead = numRead + 1
dim line$(numRead)
line$(numRead) = GetLine$(handle)
wend
close(handle)
print "Dumping file..."
print
DumpProg(f$)
// times have changed :)
hasZeta = false
print "This yab version was compiled on "+peek$("os")+"."
realOS$ = upper$(system$("uname -o"))
realOS$ = left$(realOS$, len(realOS$)-1)
print "This system is running "+realOS$
print "Writing Automakefile and global.h..."
print
system("cp AutoHeader.mak Automakefile")
handle = open("Automakefile", "a")
if(not handle) then
print "Error: Could not write file Automakefile"
exit(1)
endif
print #handle "TARGET = "+left$(f$, len(f$)-7)
close(handle)
system("cat AutoFooter.mak >> Automakefile")
print "Starting make (ignore warnings)..."
print
system("make -f Automakefile clean")
system("make -f Automakefile")
system("make -f Automakefile clean")
system("rm -f program.h Automakefile "+f$)
print
print "Finished"
print
return
end sub
sub GetFirstCommand$(line$)
local t$: local ret$
local i
t$ = ltrim$(line$)
for i=1 to len(t$)
if(mid$(t$,i,1) = " " or mid$(t$,i,1) = "\t" or mid$(t$,i,1) = "\n" or mid$(t$,i,1) = "(") break
ret$ = ret$ + mid$(t$,i,1)
next i
return ret$
end sub
sub DumpProg(fileName$)
local handle
local t$
local i
if(val(system$("wc -c "+fileName$)) < 100) then
print "WARNING: File too small, filling up program with comments"
handle = open(fileName$, "a")
if(handle) then
print #handle "rem ~~ This comment was added by the ~~"
print #handle "rem ~~ BuildFactory because your program ~~"
print #handle "rem ~~ was too small. ~~"
close(handle)
else
print "ERROR: Could not add comments, is "+fileName$+" write-protected?"
exit(1)
endif
endif
system("yab-compress "+fileName$)
handle = open("program.h", "a")
if(handle) then
print #handle "#define PROGLEN ";
t$ = system$("wc -c "+fileName$)
i = 1
while(mid$(t$,i,1) = " ")
i = i + 1
wend
if(i>1) t$ = right$(t$,len(t$)-i+1)
t$ = left$(t$, instr(t$, " ")-1)
print #handle t$
close(handle)
endif
return
end sub
sub GetLine$(handle)
local tmp$
local retString$
while(tmp$<>chr$(10) and tmp$<>chr$(13) and not eof(handle))
tmp$ = chr$(peek(handle))
retString$ = retString$ + tmp$
wend
return retString$
end sub

View File

@@ -1,64 +0,0 @@
-- English -- Englisch -- -- German below -- Deutsch unten --
Some rules you have to know:
Names of sub functions are only to be used once. This is for all affected files.
If there are subs with the same name, only the first one will be taken over while
the second will simply be ignored!
In libraries only subs and export subs are to be entered. Additional code not within
a sub or export sub are senseless later on, because libraries are simply added at the
end of the main file, so that one big file is generated.
So such additional lines are between the subs and are never read.
All libraries that are imported with import are recognized. Also libraries that were
imported from within libraries.
Libraries have to be placed either in the folder of the main file or in the yab lib
folder "/boot/home/config/settings/yab"!
The BuildFactory is to be used as follows:
yab BuildFactory Outputfile Inputfile.yab < applicationsig >
from within the folder of the BuildFactory. The Outputfile is also placed there at the end.
The Inputfile has to have its relative or complete path included of course.
The file which contains the total of the code is also stored in the folder of the BuildFactory,
for the case the created binary gives out error messages with line number. Those are of course
regarded to this certain file.
-- German -- Deutsch --
Ein paar Regeln, die man befolgen muss:
Namen für sub-Funktionen dürfen nur einmal vergeben werden. Das gilt für
den Umfang aller Dateien. Sollten zwei subs mit gleichem Namen vorkommen,
wird nur das erste eingebaut, während das zweite einfach ignoriert wird!
In libraries dürfen nur subs und export subs vorkommen. Zusätzliche
Funktionen, die nicht in einer Sub-Funktion stehen machen später keinen
Sinn, dadurch dass die libs einfach hinten an die Hauptdatei angefügt
werden, so dass eine einzige Datei entsteht.
Also sind zusätzliche Funktionen zwischen den subs und werden nie gelesen.
Alle libraries, die mit import importiert werden, werden beachtet. Auch
Libraries, die aus Libraries heraus importiert werden.
Libraries haben entweder in dem Verzeichnis der Hauptdatei oder in dem
yab-lib-Ordner "/boot/home/config/settings/yab/" zu liegen!
Aufgerufen muss die BuildFactory wie folgt:
yab BuildFactory.yab OutputFile InputFile.yab < applicationsig >
aus dem Verzeichnis der BuildFactory heraus. Dort landet auch das
OutputFile. Zu dem InputFile.yab muss natürlich ein relativer oder
vollständiger Pfad angegeben werden.
Die Datei, in dem der gesamte Source zusammengefasst ist, wird ebenfalls in
dem Verzeichnis der BuildFactory abgelegt, für den Fall, dass das erzeugte
Binary Fehler mit Zeilenangabe ausgibt. Diese beziehen sich dann natürlich
auf jene Datei.

View File

@@ -1,152 +0,0 @@
#!yab
doc This program modifies flex.c and main.c for the Buildfactory
doc It accomplishes the seteps documented in HowToMakeABuildFactory.txt.
doc The BuildFactory calls this program if flex.c is missing.
doc Note that bison.h comes with the yab devel package, so we
doc don't need to generate it ourselves anymore.
doc
doc by Jim Saxton, 2015, Artistic license
system("flex -i -I -L -s -t yabasic.flex >flex.c")
system("perl -i -n -e 'if (!/^\#include\s+<unistd.h>\s+$$/) {print if $$i;$$i++}' flex.c")
system ("mv flex.c tmpflex.c")
open #1, "tmpflex.c", "r"
open #2, "outflex.c", "w"
while (a$<>"#include <stdlib.h>")
line input #1 a$
print #2 a$
wend
print #2 "#include <zlib.h>"
print #2 "#include "+chr$(34)+"program.h"+chr$(34)
print #2 "static int isparsed = 0;"
systype$=system$("getarch")
systype$=trim$(systype$)
if systype$="x86_64" then
while (a$<>"#define YY_BUF_SIZE 32768")
line input #1 a$
if (a$<>"#define YY_BUF_SIZE 32768") print #2 a$
wend
print #2 "#define YY_BUF_SIZE PROGLEN"
endif
while (a$<>"#define YY_BUF_SIZE 16384")
line input #1 a$
if (a$<>"#define YY_BUF_SIZE 16384") print #2 a$
wend
print #2 "#define YY_BUF_SIZE PROGLEN"
found=0
while (found=0)
line input #1 a$
if (!instr(a$,"while ( (result = fread")) and (!instr(a$,"while ( (result = (int) fread")) then
print #2 a$
else
found=1
endif
wend
print #2 " while ( (result = zread(buf, 1, max_size, yyin))==0 && ferror(yyin)) "+chr$(92)
found=0
while (found=0)
line input #1 a$
if (!instr(a$,"int ret_val;")) then
print #2 a$
else
found=1
endif
wend
print #2 a$
print #2 " if(isparsed) return EOB_ACT_END_OF_FILE;"
while (! eof(#1))
line input #1 a$
print #2 a$
wend
print #2 "int zread(char* dest, size_t memb_size, size_t num_memb, FILE *file)"
print #2 "{"
print #2 " long destlen = PROGLEN;"
print #2 " if(isparsed==1)"
print #2 " return 0;"
print #2 " isparsed = 1;"
print #2 " uncompress(dest,&destlen,myProg,sizeof(myProg));"
print #2 " return destlen;"
print #2 "}"
system("mv outflex.c flex.c")
system("rm tmpflex.c")
close #1
close #2
// fix main.c
system ("mv main.c tmpmain.c")
open #1, "tmpmain.c", "r"
open #2, "outmain.c", "w"
found=0
while (found = 0)
line input #1 a$
if (not instr(a$, "int isbound(void)")) then
print #2 a$
else
found=1
print #2 a$
end if
wend
print #2 "{"
print #2 " FILE *interpreter;"
print #2 " if (!interpreter_path || !interpreter_path[0]) {"
print #2 " error(FATAL,"+chr$(34)+"interpreter_path is not set !"+chr$(34)+");"
print #2 " return 0;"
print #2 " }"
print #2 " if (!(interpreter=fopen(interpreter_path,"+chr$(34)+"r"+chr$(34)+"))) {"
print #2 " sprintf(string,"+chr$(34)+"Couldn't open '%s' to check, if it is bound: %s"+chr$(34)+",interpreter_path,my_strerror(errno));"
print #2 " error(WARNING,string);"
print #2 " return 0;"
print #2 " }"
print #2 " return 1;"
print #2 "}"
print #2 ""
print #2 ""
found = 0
while (found = 0)
line input #1 a$
if (not instr(a$, "static int mybind(char *bound)")) then
found = 0
else
found = 1
print #2 a$
end if
wend
while (not eof(1))
line input #1 a$
print #2 a$
wend
close #1
close #2
system("mv outmain.c main.c")
system("rm tmpmain.c")

View File

@@ -1,38 +0,0 @@
resource vector_icon {
$"6E6369660E0500020006023C43C6B9E5E23A85A83CEE414268F44A445900C6D7"
$"F5FF6B94DD03EC66660200060238C5F1BB105D3DFDC23B9CD045487847B50700"
$"FFFFFFFFC1CCFF020006023B3049396B0ABA90833C646E4A101543299500FFFF"
$"FFFFEBEFFF020006023C71E33A0C78BA15E43C7D2149055549455700E3EDFFFF"
$"9EC2FF03FFACAC0200060239D53438FFCBBBC1973C666F4ADC3246DC6C00C1CC"
$"FFFFFFFFFF03003CB0020006023C0AE63B3927BC611E3D03FF4C25624A1A9600"
$"A3043CFFFF90AF03C93B3B030D296402000602BD498B3E1159BF219BBE7D2F4C"
$"1B8F4A331300BD0F0FFFE98484040174100A08325E385E40564E5E545E605058"
$"4C3E510A062E2C2E3E3E454A3C4A2A3A250A042E2C2E3E3E453E320A042E2C3E"
$"324A2A3A250A043E323E454A3C4A2A0A0338423C4D3C440A0622422254325C3E"
$"513E402E3A0A0422422254325C32490A04224232493E402E3A0A043249325C3E"
$"513E400A063E423E544E5C5A505A3F4A390A04C222C20F4E495A3F523C0A043E"
$"42C222C20F523C4A390A054151C08BC8834E5C4E49C22AC2130A053E423E54C0"
$"8BC8834151C22AC2130A044E494E5C5A505A3F110A0D0100000A0001061815FF"
$"01178400040A00010618001501178600040A010107000A080109000A0B010520"
$"20210A050108000A00010A1001178400040A02010D000A0A010E000A0902040F"
$"000A06010B000A0C010C000A0001011001178400040A030102000A040103000A"
$"07010400"
};
resource app_signature "application/x-vnd.yab-IDE";
resource app_version {
major = 2,
middle = 2,
minor = 6,
variety = B_APPV_FINAL,
internal = 0,
short_info = "yab IDE",
long_info = "An integrated development environment for yab."
};
resource app_flags 1;

View File

@@ -1,23 +0,0 @@
resource vector_icon {
$"6E6369660E0500020006023C43C6B9E5E23A85A83CEE414268F44A445900C6D7"
$"F5FF6B94DD03EC66660200060238C5F1BB105D3DFDC23B9CD045487847B50700"
$"FFFFFFFFC1CCFF020006023B3049396B0ABA90833C646E4A101543299500FFFF"
$"FFFFEBEFFF020006023C71E33A0C78BA15E43C7D2149055549455700E3EDFFFF"
$"9EC2FF03FFACAC0200060239D53438FFCBBBC1973C666F4ADC3246DC6C00C1CC"
$"FFFFFFFFFF03003CB0020006023C0AE63B3927BC611E3D03FF4C25624A1A9600"
$"A3043CFFFF90AF03C93B3B030D296402000602BD498B3E1159BF219BBE7D2F4C"
$"1B8F4A331300BD0F0FFFE98484040174100A08325E385E40564E5E545E605058"
$"4C3E510A062E2C2E3E3E454A3C4A2A3A250A042E2C2E3E3E453E320A042E2C3E"
$"324A2A3A250A043E323E454A3C4A2A0A0338423C4D3C440A0622422254325C3E"
$"513E402E3A0A0422422254325C32490A04224232493E402E3A0A043249325C3E"
$"513E400A063E423E544E5C5A505A3F4A390A04C222C20F4E495A3F523C0A043E"
$"42C222C20F523C4A390A054151C08BC8834E5C4E49C22AC2130A053E423E54C0"
$"8BC8834151C22AC2130A044E494E5C5A505A3F110A0D0100000A0001061815FF"
$"01178400040A00010618001501178600040A010107000A080109000A0B010520"
$"20210A050108000A00010A1001178400040A02010D000A0A010E000A0902040F"
$"000A06010B000A0C010C000A0001011001178400040A030102000A040103000A"
$"07010400"
};

View File

@@ -1,3 +0,0 @@
BString tmp("application/x-vnd.yab-app");

View File

@@ -1,43 +0,0 @@
for(int i=1; i<argc; i++)
{
if(argv[i][0]!='-')
{
BFile file(argv[i], B_READ_ONLY);
if(file.InitCheck()==B_OK)
{
char readData[1024];
int pos;
file.Read(readData,1024);
BString tmpString(readData);
pos = tmpString.IFindFirst("MIMETYPE");
if(pos!=B_ERROR)
{
int quote1, quote2;
quote1 = tmpString.FindFirst("\"",pos);
if(quote1!=B_ERROR)
{
quote2 = tmpString.FindFirst("\"",quote1+1);
if(quote2!=B_ERROR)
{
tmp.SetTo("");
tmpString.CopyInto(tmp,quote1+1,quote2-quote1-1);
}
}
}
}
break;
}
}
strcpy(t,tmp.String());
return (const char*)t;
}
int main(int argc, char** argv)
{
int ret;
YabInterface *yabInterface = new YabInterface(argc, argv, readSignature(argc, argv));
yabInterface->Run();
ret = yabInterface->GetErrorCode();
delete yabInterface;
return ret;
}

View File

@@ -1,8 +0,0 @@
#include <File.h>
#include <String.h>
#include <stdio.h>
#include "YabInterface.h"
char t[1024];
const char* readSignature(int argc, char** argv)
{

View File

@@ -1,12 +0,0 @@
config.h
bison.h
function.c
global.h
main.c
RdefApply
yabasic.bison
yabasic.flex
yabasic.h
YabInterface.h
YabList.h
YabMain.cpp

View File

@@ -1,50 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <zlib.h>
unsigned long file_size(char *filename)
{
unsigned long size;
FILE *pFile = fopen(filename, "rb");
fseek (pFile, 0, SEEK_END);
size = ftell(pFile);
fclose (pFile);
return size;
}
int main(int argc, char *argv[])
{
unsigned long filesize;
char *buffer;
FILE *fi, *fo;
char *dest;
unsigned long destlen;
unsigned long i;
if(argc != 2) {
printf("Usage: yab-compress <file.yab>\n\n");
return 1;
}
filesize = file_size(argv[1]);
buffer = (char*)malloc(filesize);
dest = (char*)malloc(filesize);
// read source file into buffer
fi = fopen(argv[1], "r");
fread(buffer, sizeof(char), filesize, fi);
fclose(fi);
// compress buffer
compress(dest, &destlen, buffer, filesize);
// write compressed buffer to output
fo = fopen("program.h", "w");
fprintf(fo, "const char myProg[] = {");
for(i=0; i < destlen; i++)
fprintf(fo, "%i,", dest[i]);
fprintf(fo, "' ' };\n");
fclose(fo);
return 0;
}

View File

@@ -1,215 +0,0 @@
1 de x-vnd.yab-IDE 2612525067
File Datei
New... Neu...
Open... Öffnen...
Close Schließen
Save Speichern
Save As... Speichern als...
Save As Template... Als Vorlage speichern...
Page Setup... Seiteneinrichtung...
Print... Drucken...
Quit Beenden
Edit Bearbeiten
Undo Rückgängig
Cut Ausschneiden
Copy Kopieren
Paste Einfügen
Select All Alles auswählen
Find Suchen
Find Again Weitersuchen
Find and Replace Suchen und ersetzen
Program Programm
Run Ausführen
Run in Terminal Im Terminal ausführen
Set Run Parameters... Parameter setzen...
Build Factory... Build-Factory...
Tools Werkzeuge
Pattern Editor... Muster erstellen...
Color Selection... Farbe auswählen...
ASCII Table... ASCII Tabelle...
View Ansicht
Next File Nächste Datei
Previous File Vorherige Datei
Full Screen Vollbild
Maximize Editor Editor maximieren
Auto Indent Automatisch einrücken
Auto Completion Automatisch ergänzen
Refresh Colors Farben wiederherstellen
Reformat Sourcecode Quelltext formatieren
Undo Reformat Formatierung zurücksetzen
Options... Einstellungen...
Introduction to the IDE... Einführung zur IDE...
yab Help... yab Hilfe...
Yabasic Manual... Yabasic Handbuch...
Online Resources Webseiten online
yab Homepage... yab Homepage...
yab Forums... yab Foren...
Yabasic Homepage... Yabasic Homepage...
Team Maui... Team Maui...
About... Über yab-IDE...
New Neu
Open Öffnen
Build Factory Build Factory
Pattern Editor Muster erstellen
Options Einstellungen
yab Help yab Hilfe
Go to Line: Gehe zu Zeile:
Files Dateien
Help Hilfe
Filename Dateiname
Command Befehl
yab Output yab Ausgabe
Immediate Sofort ausführen
Execute Ausführen
Find: Suche:
Replace: Ersetze:
Case Sensitive Groß-/Kleinschreibung beachten
Replace All Alles ersetzen
Suspecting user input, therefore starting in a terminal. Eine Benutzereingabe wird erwartet, Programm startet deshalb im Terminal.
Ok Ok
File: Datei:
(not saved) (nicht gespeichert)
Line Zeile
Please wait... Bitte warten...
Loading Program Lade Programm
Running Ausführung
Running Program Ausführung
Error! Program could not be killed. Fehler! Programm konnte nicht beendet werden.
Oops Oops
Close terminal to break program Terminal schließen um Programm zu beenden
yab-IDE Set Run Parameters yab-IDE Parameter setzen
Set Run Parameters Parameter setzen
yab Parameters: yab Parameter:
Program Parameters: Programm Parameter:
yab-IDE New Program yab-IDE Neues Programm
New yab Program Neues yab Programm
Please select one of the available templates for your program: Bitte eine der verfügbaren Vorlagen auswählen:
Name: Name:
Browse... Wählen...
Advanced Options Weitere Optionen
Remove Template Vorlage löschen
Project Directory Projektverzeichnis
Could not open template: Vorlage konnte nicht geladen werden:
Opening an empty file instead. Öffne eine leere Datei stattdessen.
Really delete template Vorlage wirklich löschen
Yes Ja
Cancel Abbrechen
This standard template can not be deleted! Diese Standardvorlage kann nicht gelöscht werden!
Template successfully removed. Vorlage erfolgreich gelöscht.
Error while deleting template! Fehler beim Löschen der Vorlage!
Empty Leere Datei
Basic Template Einfache Vorlage
Editor Template Vorlage für einen Editor
Command Line Template Kommandozeilenvorlage
Create an empty file. Erstelle eine leere Datei.
Create a new program with a bare Erstelle ein neues Programm
window. mit einem leeren Fenster.
Create a new program with menus Erstelle ein neues Programm mit
and an editor. Menüs und einem Editor.
Erstelle ein neues
Create a new command line program. Kommandozeilenprogramm.
yab-IDE Save As Template yab-IDE Als Vorlage speichern
Save As Template Als Vorlage speichern
Save your code as a template for other programs: Quellcode als Vorlage speichern
Template Name Vorlagenname
Description (not more than 30 characters per line) Beschreibung (nicht mehr als 30 Zeichen pro Zeile)
Drop image here Bilddatei hierher ziehen
Could not load image! Bilddatei konnte nicht geladen werden
Error while saving template! Fehler beim Speichern der Vorlage!
File could not be saved! Datei konnte nicht gespeichert werden!
Sorry, you can not open more than Achtung, es können nicht mehr als
files at once!\n\nPlease close one or more other files first. Dateien auf einmal geöffnet werden!\n\nBitte zunächst eine oder mehrere andere Dateien schließen.
File is already open. Datei ist bereits geöffnet.
Error while loading file:\n\n Fehler beim Laden der Datei:\n\n
File \" Datei \"
\" not saved!\n\nSave the file now? \" ist nicht gespeichert\n\nDatei jetzt speichern?
Error while printing! Fehler beim Drucken!
Some files are not saved!\n\nDo you really want to quit? Es gibt nicht gesicherte Dateien!\n\nSoll yab-IDE dennoch beendet werden?
Program is not saved.\n\nSave it now? Programm ist nicht gesichert.\n\nJetzt speichern?
Save Always Immer speichern
Save Now Jetzt speichern
Reformating did not close all open loops and conditions.\nReformating currently does not support loops and conditions opened and closed by a colon (:).\nE.g. while(loop):wend\n\nYou can undo the reformating before doing any further changes. Das Formatieren hat nicht alle Schleifen und Konditionen schließen können.\nDas Formatieren unterstützt momentan keine Verschachtelungen mit Doppelpunkten (:).\nZ.B.. while(loop):wend\n\nDas Formatieren kann rückgängig gemacht werden, solange der Text nicht geändert wird.
Do not show this warning again Diese Warnung nicht mehr zeigen
Changes made since reformating will be lost! Änderungen seit dem letzten Formatieren gehen verloren!
The operation \"Replace All\" can not be reverted!\n\nDo you want to continue? \"Alles ersetzen\" kann nicht rückgängig gemacht werden\n\nDennoch fortfahren?
yab-IDE Build Factory yab-IDE Build-Factory
Target file name: Zieldatei:
Use the Haiku tab view instead of the ZETA native tab view Verwende Haiku-Tabviews anstatt ZETA-eigenen Tabviews
Create Binary Kompiliere Zieldatei
The compiler GCC was not found!\n\nPlease install the development tools from your ZETA CD. Der GCC-Compiler wurde nicht gefunden!\n\nBitte die Entwicklungsprogramme von der ZETA CD nachinstallieren.
The compiler GCC was not found!\n\nPlease install the development tools. Der GCC-Compiler wurde nicht gefunden!\n\nBitte die Entwicklungsprogramme nachinstallieren.
Visit Download Site GCC jetzt herunterladen
Warning: Although you are using the BeOS yab, the resulting binary will be ZETA only! Achtung: Obwohl gerade BeOS yab verwendet wird, wird die Zieldatei nur auf ZETA laufen!
Build Factory Output\n\n Build-Factory Ausgabe\n\n
Please wait, processing... (this may take a while)\n\n Bitte warten... (die Bearbeitung kann einige Zeit dauern)\n\n
Build was successful Die Erstellung war erfolgreich
Build failed! Die Erstellung ist fehlgeschlagen!
yab-IDE Pattern Editor yab-IDE Muster erstellen
Insert Pattern Muster einfügen
yab-IDE Color Selection yab-IDE Farbauswahl
Color Selection Farbauswahl
Default Colors: Standardfarben:
Black Schwarz
Darken 4 Dunkler 4
Darken 3 Dunkler 3
Darken 2 Dunkler 2
Darken 1 Dunkler 1
Default Background Standardhintergrund
Lighten 1 Heller 1
Lighten 2 Heller 2
White Weiß
Red Rot
Brown Braun
Yellow Gelb
Green Grün
Cyan Türkis
Light Blue Hellblau
Blue Blau
Magenta Violett
Light Magenta Hellviolett
Insert Color Farbe einfügen
yab-IDE ASCII Table yab-IDE ASCII Tabelle
ASCII Table ASCII Tabelle
yab-IDE Options yab-IDE Einstellungen
Editor Editor
General Allgemein
Environment Arbeitsumgebung
Directories Verzeichnisse
Language Sprachen
Number of spaces per tab: Anzahl Leerzeichen pro Tab:
Ask about saving before running a program Frage nach Speicherung vor der Programmausführung
Show warning when reformating sourcecode did not close all loops and conditions Zeige Warnung wenn die Formatierung nicht alle Schleifen und Konditionen schließen konnte
Show warning before undo reformating Zeige Warnung vor dem Zurücksetzem der Formatierung
Show warning before applying Replace All Zeige Warnung vor der Anwendung von Alles ersetzen
Select font for editor: Schriftart für den Editor wählen:
Font Family Schriftart
Font Style Schriftstil
Font Size Schriftgröße
My hovercraft is full of eels. Mein Luftkissenfahrzeug ist voller Aale.
Factory Settings Standardeinstellungen
Enable auto completion Automatisches Ergänzen
Number of characters for starting completion: Anzahl Startzeichen für die Ergänzung:
New Entry: Neuer Eintrag:
Add New Entry Neuen Eintrag hinzufügen
Remove Entry Eintrag löschen
Note: You have to restart the IDE to update the Achtung: Die IDE muß neugestartet werden
autocompletion when removing entries. damit gelöschte Einträge nicht mehr erscheinen.
Note: Only change the directories, when you know what you are doing! Achtung: Verzeichnisse nur ändern, wenn man weiß was man tut!
Default yab Binary Standard yab-Interpreter
Default yab Directory Standard yab-Verzeichnis
Use the automatic localization Die automatische Lokalisierung verwenden
Supported Languages Unterstützte Sprachen
Entry already exists. Eintrag existiert bereits
Restart yab-IDE to change localization yab-IDE neustarten um die Lokalisierung zu ändern
Could not find yab 1.0 directory!\n\nPlease do a proper installation. Das Verzeichnis von yab 1.0 konnte nicht gefunden werden!\n\nBitte yab sauber installieren.
Could not find yab binary!\n\nPlease do a proper installation. Der Interpreter von yab 1.0 konnte nicht gefunden werden!\n\nBitte yab sauber installieren.
New yab directory set to:\n\n Neues yab-Verzeichnis gesetzt zu:\n\n
\n\nRestart the IDE using the new directory. \n\nyab-IDE neustarten um die Lokalisierung zu ändern.
Invalid directory:\n\n Ungültiges Verzeichnis:\n\n
yab binary set to:\n\n yab-Interpreter gesetzt zu:\n\n
Invalid file:\n\n Ungültige Datei:\n\n
Export As HTML... Exportieren als HTML...
Open Project Folder... Öffne Projektordner...
Help Hilfe
Short Command Help... Kurzanleitung...

View File

@@ -1,214 +0,0 @@
1 english x-vnd.yab-IDE 1378724574
File File
New... New...
Open... Open...
Close Close
Save Save
Save As... Save As...
Save As Template... Save As Template...
Page Setup... Page Setup...
Print... Print...
Quit Quit
Edit Edit
Undo Undo
Cut Cut
Copy Copy
Paste Paste
Select All Select All
Find Find
Find Again Find Again
Find and Replace Find and Replace
Program Program
Run Run
Run in Terminal Run in Terminal
Set Run Parameters... Set Run Parameters...
Build Factory... Build Factory...
Tools Tools
Pattern Editor... Pattern Editor...
Color Selection... Color Selection...
ASCII Table... ASCII Table...
View View
Next File Next File
Previous File Previous File
Full Screen Full Screen
Maximize Editor Maximize Editor
Auto Indent Auto Indent
Auto Completion Auto Completion
Refresh Colors Refresh Colors
Reformat Sourcecode Reformat Sourcecode
Undo Reformat Undo Reformat
Options... Options...
Introduction to the IDE... Introduction to the IDE...
yab Help... yab Help...
Yabasic Manual... Yabasic Manual...
Online Resources Online Resources
yab Homepage... yab Homepage...
yab Forums... yab Forums...
Yabasic Homepage... Yabasic Homepage...
Team Maui... Team Maui...
About... About...
New New
Open Open
Build Factory Build Factory
Pattern Editor Pattern Editor
Options Options
yab Help yab Help
Go to Line: Go to Line:
Go to Line Go to Line
Files Files
Help Help
Filename Filename
Command Command
yab Output yab Output
Immediate Immediate
Execute Execute
Find: Find:
Replace: Replace:
Case Sensitive Case Sensitive
Replace All Replace All
Suspecting user input, therefore starting in a terminal. Suspecting user input, therefore starting in a terminal.
Ok Ok
File: File:
(not saved) (not saved)
Line Line
Please wait... Please wait...
Loading Program Loading Program
Running Running
Running Program Running Program
Error! Program could not be killed. Error! Program could not be killed.
Oops Oops
Close terminal to break program Close terminal to break program
yab-IDE Set Run Parameters yab-IDE Set Run Parameters
Set Run Parameters Set Run Parameters
yab Parameters: yab Parameters:
Program Parameters: Program Parameters:
yab-IDE New Program yab-IDE New Program
New yab Program New yab Program
Please select one of the available templates for your program: Please select one of the available templates for your program:
Name: Name:
Browse... Browse...
Advanced Options Advanced Options
Remove Template Remove Template
Project Directory Project Directory
Could not open template: Could not open template:
Opening an empty file instead. Opening an empty file instead.
Really delete template Really delete template
Yes Yes
Cancel Cancel
This standard template can not be deleted! This standard template can not be deleted!
Template successfully removed. Template successfully removed.
Error while deleting template! Error while deleting template!
Empty Empty
Basic Template Basic Template
Editor Template Editor Template
Command Line Template Command Line Template
Create an empty file. Create an empty file.
Create a new program with a bare Create a new program with a bare
window. window.
Create a new program with menus Create a new program with menus
and an editor. and an editor.
Create a new command line program. Create a new command line program.
yab-IDE Save As Template yab-IDE Save As Template
Save As Template Save As Template
Save your code as a template for other programs: Save your code as a template for other programs:
Template Name Template Name
Description (not more than 30 characters per line) Description (not more than 30 characters per line)
Drop image here Drop image here
Could not load image! Could not load image!
Error while saving template! Error while saving template!
File could not be saved! File could not be saved!
Sorry, you can not open more than Sorry, you can not open more than
files at once!\n\nPlease close one or more other files first. files at once!\n\nPlease close one or more other files first.
File is already open. File is already open.
Error while loading file:\n\n Error while loading file:\n\n
File \" File \"
\" not saved!\n\nSave the file now? \" not saved!\n\nSave the file now?
Error while printing! Error while printing!
Some files are not saved!\n\nDo you really want to quit? Some files are not saved!\n\nDo you really want to quit?
Program is not saved.\n\nSave it now? Program is not saved.\n\nSave it now?
Save Always Save Always
Save Now Save Now
Reformating did not close all open loops and conditions.\nReformating currently does not support loops and conditions opened and closed by a colon (:).\nE.g. while(loop):wend\n\nYou can undo the reformating before doing any further changes. Reformating did not close all open loops and conditions.\nReformating currently does not support loops and conditions opened and closed by a colon (:).\nE.g. while(loop):wend\n\nYou can undo the reformating before doing any further changes.
Do not show this warning again Do not show this warning again
Changes made since reformating will be lost! Changes made since reformating will be lost!
The operation \"Replace All\" can not be reverted!\n\nDo you want to continue? The operation \"Replace All\" can not be reverted!\n\nDo you want to continue?
yab-IDE Build Factory yab-IDE Build Factory
Target file name: Target file name:
Use the Haiku tab view instead of the ZETA native tab view Use the Haiku tab view instead of the ZETA native tab view
Create Binary Create Binary
The compiler GCC was not found!\n\nPlease install the development tools from your ZETA CD. The compiler GCC was not found!\n\nPlease install the development tools from your ZETA CD.
The compiler GCC was not found!\n\nPlease install the development tools. The compiler GCC was not found!\n\nPlease install the development tools.
Visit Download Site Visit Download Site
Warning: Although you are using the BeOS yab, the resulting binary will be ZETA only! Warning: Although you are using the BeOS yab, the resulting binary will be ZETA only!
Build Factory Output\n\n Build Factory Output\n\n
Please wait, processing... (this may take a while)\n\n Please wait, processing... (this may take a while)\n\n
Build was successful Build was successful
Build failed! Build failed!
yab-IDE Pattern Editor yab-IDE Pattern Editor
Insert Pattern Insert Pattern
yab-IDE Color Selection yab-IDE Color Selection
Color Selection Color Selection
Default Colors: Default Colors:
Black Black
Darken 4 Darken 4
Darken 3 Darken 3
Darken 2 Darken 2
Darken 1 Darken 1
Default Background Default Background
Lighten 1 Lighten 1
Lighten 2 Lighten 2
White White
Red Red
Brown Brown
Yellow Yellow
Green Green
Cyan Cyan
Light Blue Light Blue
Blue Blue
Magenta Magenta
Light Magenta Light Magenta
Insert Color Insert Color
yab-IDE ASCII Table yab-IDE ASCII Table
ASCII Table ASCII Table
yab-IDE Options yab-IDE Options
Editor Editor
General General
Environment Environment
Directories Directories
Language Language
Number of spaces per tab: Number of spaces per tab:
Ask about saving before running a program Ask about saving before running a program
Show warning when reformating sourcecode did not close all loops and conditions Show warning when reformating sourcecode did not close all loops and conditions
Show warning before undo reformating Show warning before undo reformating
Show warning before applying Replace All Show warning before applying Replace All
Select font for editor: Select font for editor:
Font Family Font Family
Font Style Font Style
Font Size Font Size
My hovercraft is full of eels. My hovercraft is full of eels.
Factory Settings Factory Settings
Enable auto completion Enable auto completion
Number of characters for starting completion: Number of characters for starting completion:
New Entry: New Entry:
Add New Entry Add New Entry
Remove Entry Remove Entry
Note: You have to restart the IDE to update the Note: You have to restart the IDE to update the
autocompletion when removing entries. autocompletion when removing entries.
Note: Only change the directories, when you know what you are doing! Note: Only change the directories, when you know what you are doing!
Default yab Binary Default yab Binary
Default yab Directory Default yab Directory
Use the automatic localization Use the automatic localization
Supported Languages Supported Languages
Entry already exists. Entry already exists.
Restart yab-IDE to change localization Restart yab-IDE to change localization
Could not find yab 1.0 directory!\n\nPlease do a proper installation. Could not find yab 1.0 directory!\n\nPlease do a proper installation.
Could not find yab binary!\n\nPlease do a proper installation. Could not find yab binary!\n\nPlease do a proper installation.
New yab directory set to:\n\n New yab directory set to:\n\n
\n\nRestart the IDE using the new directory. \n\nRestart the IDE using the new directory.
Invalid directory:\n\n Invalid directory:\n\n
yab binary set to:\n\n yab binary set to:\n\n
Invalid file:\n\n Invalid file:\n\n
Export As HTML... Export As HTML...
Open Project Folder... Open Project Folder...

View File

@@ -1,214 +0,0 @@
1 nl x-vnd.yab-IDE 1378724574
File Bestand
New... Nieuw...
Open... Openen...
Close Sluiten
Save Opslaan
Save As... Opslaan als...
Save As Template... Als sjabloon opslaan...
Page Setup... Pagina instellingen...
Print... Afdrukken...
Quit Afsluiten
Edit Bewerken
Undo Ongedaan maken
Cut Knippen
Copy Kopiëren
Paste Plakken
Select All Alles selecteren
Find Zoek
Find Again Verder zoeken
Find and Replace Zoeken en vervangen
Program Toepassing
Run Uitvoeren
Run in Terminal In Terminal uitvoeren
Set Run Parameters... Parameter zetten...
Build Factory... Build-Factory...
Tools Werktuigen
Pattern Editor... Patroon aanmaken...
Color Selection... Kleur kiezen...
ASCII Table... ASCII lijst...
View Venster
Next File Volgend bestand
Previous File Vorig bestand
Full Screen Volledig scherm
Maximize Editor Editor maximaliseren
Auto Indent Automatisch inspringen
Auto Completion Automatisch aanvullen
Refresh Colors Kleuren verversen
Reformat Sourcecode Broncode herformateren
Undo Reformat Formatering ongedaan maken
Options... Instellingen...
Introduction to the IDE... Inleiding tot de IDE...
yab Help... yab help...
Yabasic Manual... Yabasic handboek...
Online Resources Website's online
yab Homepage... yab Homepage...
yab Forums... yab forums...
Yabasic Homepage... Yabasic Homepage...
Team Maui... Team Maui...
About... Over yab-IDE...
New Nieuw
Open Openen
Build Factory Build Factory
Pattern Editor Patroon aanmaken
Options Instellingen
yab Help yab help
Go to Line: Ga naar lijn:
Go to Line Ga naar lijn
Files Bestanden
Help Help
Filename Bestandsnaam
Command Commando
yab Output yab output
Immediate Onmiddelijk uitvoeren
Execute Uitvoeren
Find: Zoek:
Replace: Vervang:
Case Sensitive Hoofdlettergevoelig
Replace All Alles vervangen
Suspecting user input, therefore starting in a terminal. Eem gebruikers ingave wordt verwacht, de toepassing word gestart in een Terminal.
Ok Ok
File: Bestand:
(not saved) (niet opgeslagen)
Line Lijn
Please wait... Even wachten...
Loading Program Toepassing laden
Running Draait
Running Program In uitvoering
Error! Program could not be killed. Fout! Toepassing kan niet gestopt worden.
Oops Oeps
Close terminal to break program Terminal sluiten om toepassing te sluiten
yab-IDE Set Run Parameters yab-IDE parameter zetten
Set Run Parameters Parameter zetten
yab Parameters: yab Parameter:
Program Parameters: Toepassing parameter:
yab-IDE New Program yab-IDE nieuwe toepassing
New yab Program Nieuwe yab toepassing
Please select one of the available templates for your program: Gelieve een van de beschikbare sjablonen te kiezen:
Name: Naam:
Browse... Bladeren...
Advanced Options Geavanceerd
Remove Template Sjabloon wissen
Project Directory Projectmap
Could not open template: Sjabloon kon niet geladen worden:
Opening an empty file instead. Open een leeg bestand in de plaats.
Really delete template Sjabloon wissen
Yes Ja
Cancel Annuleren
This standard template can not be deleted! Dit standaard sjabloon kan niet verwijderd worden!
Template successfully removed. Sjabloon verwijderd.
Error while deleting template! Fout bij het verwijderen sjabloon!
Empty Leeg bestand
Basic Template Eenvoudig sjabloon
Editor Template Sjabloon voor een Editor
Command Line Template Sjabloon voor commandline
Create an empty file. Leeg bestand aanmaken.
Create a new program with a bare Nieuwe toepassing aanmaken
window. met een leeg venster.
Create a new program with menus Nieuwe toepassing maken met
and an editor. menu's een een editor.
Nieuwe commandline
Create a new command line program. toepassing aanmaken.
yab-IDE Save As Template yab-IDE Opslaan als sjabloon
Save As Template Als sjabloon opslaan
Save your code as a template for other programs: Broncode als sjabloon opslaan
Template Name Sjabloonnaam
Description (not more than 30 characters per line) Beschrijving (niet meer dan 30 karakters per lijn)
Drop image here Afbeelding hier slepen
Could not load image! Afbeelding kon niet geladen worden
Error while saving template! Fout bij het opslaan van sjabloon!
File could not be saved! Bestand kon niet opgeslagen worden!
Sorry, you can not open more than Opgelet je kan niet meer dan
files at once!\n\nPlease close one or more other files first. bestanden openen in een keer!\n\nGelieve eerst een of meerdere bestanden te sluiten.
File is already open. Bestand is al open.
Error while loading file:\n\n Fout bij het laden van het bestand:\n\n
File \" Bestand \"
\" not saved!\n\nSave the file now? \" is niet opgeslagen\n\nBestand nu opslaan?
Error while printing! Fout bij het afdrukken!
Some files are not saved!\n\nDo you really want to quit? Enkele bestanden zijn niet opgeslagen!\n\nWil je werkelijk afsluiten?
Program is not saved.\n\nSave it now? Toepassing is niet opgeslagen.\n\nNu opslaan?
Save Always Altijd opslaan
Save Now Nu opslaan
Reformating did not close all open loops and conditions.\nReformating currently does not support loops and conditions opened and closed by a colon (:).\nE.g. while(loop):wend\n\nYou can undo the reformating before doing any further changes. Herformateren heeft niet alle loops en condities kunnen sluiten.\nHerformateren ondersteun momenteel geen loops en conditie's tussen duppelpunten (:).\nBv. while(loop):wend\n\nJe kan de herformatering ongedaan maken zolang de tekst niet veranderd wordt.
Do not show this warning again Deze waarschuwing niet meer tonen
Changes made since reformating will be lost! Aanpassingen sinds de laatste herformatering zullen verloren gaan!
The operation \"Replace All\" can not be reverted!\n\nDo you want to continue? De operatie \"Alles vervangen\" kan niet teruggedraaid worden!\n\nToch verdergaan?
yab-IDE Build Factory yab-IDE Build-Factory
Target file name: Doelbestand:
Use the Haiku tab view instead of the ZETA native tab view Gebruik de Haiku tabview in plaats van de ZETA eigen tabvies
Create Binary Compileer bin
The compiler GCC was not found!\n\nPlease install the development tools from your ZETA CD. De GCC compiler is niet gevonden!\n\nGelieve de ontwikkel toepassingen van de ZETA CD te installeren.
The compiler GCC was not found!\n\nPlease install the development tools. De GCC compiler is niet gevonden!\n\nGelieve de ontwikkel toepassingen te installeren.
Visit Download Site GCC nu downloaden
Warning: Although you are using the BeOS yab, the resulting binary will be ZETA only! Waarschuwing: Ondanks dat je BeOS yab gebruikt, zal de toepassing enkel op ZETA draaien!
Build Factory Output\n\n Build-Factory Output\n\n
Please wait, processing... (this may take a while)\n\n Even geduld... (de bewerking kan een tijdje duren)\n\n
Build was successful Aanmaken gelukt
Build failed! Aanmaken mislukt!
yab-IDE Pattern Editor yab-IDE patroon aanmaken
Insert Pattern Patroon invoegen
yab-IDE Color Selection yab-IDE kleurkiezer
Color Selection Kleurselectie
Default Colors: Standaardkleuren:
Black Zwart
Darken 4 Donker 4
Darken 3 Donker 3
Darken 2 Donker 2
Darken 1 Donker 1
Default Background Standaard achtergrond
Lighten 1 Lichter 1
Lighten 2 Lichter 2
White Wit
Red Rood
Brown Bruin
Yellow Geel
Green Groen
Cyan Cyaan
Light Blue Licht blauw
Blue Blauw
Magenta Magenta
Light Magenta Licht Magenta
Insert Color Kleur invoegen
yab-IDE ASCII Table yab-IDE ASCII tabel
ASCII Table ASCII tabel
yab-IDE Options yab-IDE Instellingen
Editor Editor
General Algemeen
Environment Omgeving
Directories Mappen
Language Talen
Number of spaces per tab: Aantal spaties per tab:
Ask about saving before running a program Vraag naar opslaan voor het draaien van de toepassing
Show warning when reformating sourcecode did not close all loops and conditions Toon waarschuwing als herformatering niet alle loops en condities sluiten kon
Show warning before undo reformating Toon waarschuwing voor het ongedaan maken van de herformatering
Show warning before applying Replace All Toon waarschuwing voor het toepassen \"Alles vervangen\"
Select font for editor: Selecteer een font voor de editor:
Font Family Font
Font Style Stijl
Font Size Grootte
My hovercraft is full of eels. Mijn hoovercraft zit vol met vissen.
Factory Settings Standaardinstellingen
Enable auto completion Auto-aanvullen inschakelen
Number of characters for starting completion: Aantal karakters voor het starten van het aanvullen:
New Entry: Nieuwe ingang:
Add New Entry Nieuwe ingang toevoegen
Remove Entry Ingang wissen
Note: You have to restart the IDE to update the Aandacht: de IDE moet herstart worden
autocompletion when removing entries. zodat gewiste ingangen niet meer verscheinen.
Note: Only change the directories, when you know what you are doing! Aandacht: Verander enkel de mappen als je weet wat je doet!
Default yab Binary Standaard yab-Interpreter
Default yab Directory Standaard yab-map
Use the automatic localization Gebruik Haiku's taalsysteem
Supported Languages Ondersteunde talen
Entry already exists. Ingang bestaat reeds
Restart yab-IDE to change localization yab-IDE herstarten om de localisering door te voeren
Could not find yab 1.0 directory!\n\nPlease do a proper installation. Kon de map yab 1.0 niet vinden!\n\nGelieve yab goed te installeren.
Could not find yab binary!\n\nPlease do a proper installation. Kon de interpreter van yab 1.0 niet vinden!\n\nGelieve yab goed te installeren.
New yab directory set to:\n\n Nieuwe yab map gezet naar:\n\n
\n\nRestart the IDE using the new directory. \n\nyab-IDE herstarten om de localisering door te voeren.
Invalid directory:\n\n Ongeldige map:\n\n
yab binary set to:\n\n yab-Interpreter insteld naar:\n\n
Invalid file:\n\n Ongeldig bestand:\n\n
Export As HTML... Als HTML opslaan...
Open Project Folder... Projectmap openen...

View File

@@ -1,61 +0,0 @@
#!yab
doc Draw some nice 3D curves
doc Original by Martin Lehmann for QBasic
doc
doc change the function func for different curves
doc try smaller values of i for a lower resolution
doc try z = 1 for less dots
doc
doc Note: this demo shows one thing: yab is slow :)
doc The cleanup of the drawing takes alot of time too,
doc you can simply break the program if you don't want to wait
doc
window open 100,100 to 739,579, "Win", "3D Curve"
bitmap 640,480, "DoubleBuffer"
canvas 0,0 to 639,479, "MyCanvas", "Win"
i = 128 // resolution
z = 0.5 // dot frequency
xk = 40
yk = 30
draw set "highcolor", 0,0,0, "DoubleBuffer"
draw rect 0,0 to 639,479, "DoubleBuffer"
draw bitmap 0,0, "DoubleBuffer", "copy", "MyCanvas"
for t = -144 to 144 step(288/i)
if(t=0) t=0.1
r = int(0.5 + sqrt(20736 - t^2))
for j = -r to r step z
p = func(sqrt(j^2 + t^2) * 0.0327) * 20
x = int(1.7 * (j + (t/2.25) + 160)) + xk
y = int(1.8 * (199 - (p - t/2.25 + 90))) + yk
draw set "highcolor", 255-r,j+r,255-p, "DoubleBuffer"
draw line x,y to x,y, "DoubleBuffer"
draw set "highcolor", 0,0,0, "DoubleBuffer"
draw line x,y+1 to x,480, "DoubleBuffer"
next j
draw bitmap 0,0, "DoubleBuffer", "copy", "MyCanvas"
next t
while(not instr(message$, "Quit"))
wend
window close "Win"
// Choose one of the functions below, comment out all others
sub func(n)
// return cos(n) + cos(2*n) +cos(5*n)
// return -abs(1/n)
// return -abs(1/(n + j))
// return sin(n) + sin(2*n) +sin(5*n)
// return cos(sin(n))
return cos(2*n) + cos((n+j)/16)
// return sqrt(abs(0.5*(16 - n^2))) + 1/(n*4)
// return cos(4*n) + 20/(n^2 + 3)
// return cos(1/n) + cos(2/n) + cos(5/n) - 3
// return cos(sin(j/n))
// return 1/sqrt(n) - 3
end sub

View File

@@ -1,207 +0,0 @@
#!yab
dir$ = attribute get$ "", ""
dir$=dir$+"/"
// This example demonstrates all widgets
// open the window
window open 100,100 to 640,500, "Win", "yab Demo"
window set "Win", "Flags", "Not-Resizable, Not-Zoomable"
// set the title
view 10,10 to 530,50, "Title", "Win"
draw set "bgcolor", 50,50,200, "Title"
draw set "lowcolor", 50,50,200, "Title"
draw set "highcolor", 255,255,255, "Title"
if(peek$("os") = "Haiku") then
draw set "DejaVu Sans,Condensed Bold,32", "Title"
else
draw set "Zurich,Bold,32", "Title"
endif
draw text 10,32, "yab Widgets and Views", "Title"
// make the tabview
tabview 10,60 to 530,390, "Box", "top", "Win"
tabview add "Box", "Widgets"
tabview add "Box", "Views and More"
// button
button 10,10 to 100,30, "Button", "Button", "Box1"
tooltip "Button", "BUTTON"
// button image
button image 10,40, "ButtonImage", dir$+"img/button_pressed.png", dir$+"img/button_norm.png", "", "Box1"
tooltip "ButtonImage", "BUTTON IMAGE"
// checkbox
checkbox 10,70, "Check", "Checkbox", true, "Box1"
tooltip "Check", "CHECKBOX"
// checkbox image
checkbox image 10,92, "CheckImage", dir$+"img/checkbutton_enabledOn.png", dir$+"img/checkbutton_enabledOff.png", "", "", true, "Box1"
tooltip "CheckImage", "CHECKBOX IMAGE"
// radiobutton
radiobutton 10,130, "Radio1", "1. Radiobutton", true, "Box1"
tooltip "Radio1", "RADIOBUTTON"
radiobutton 10,150, "Radio2", "2. Radiobutton", false, "Box1"
tooltip "Radio2", "RADIOBUTTON"
// dropbox
dropbox 10,175 to 120,195, "Drop", "Dropbox", "Box1"
dropbox add "Drop", "Foo"
dropbox add "Drop", "Bar"
tooltip "Drop", "DROPBOX"
// listbox
listbox 10,210 to 100,290, "List", 1, "Box1"
listbox add "List", "Foo"
listbox add "List", "Bar"
tooltip "List", "LISTBOX"
// columnbox
columnbox 130,10 to 270,150, "Column", 1, "", "Box1"
columnbox column "Column", " ", 1, 30,30,30, "align-center"
columnbox column "Column", "Column", 2, 90,90,90, "align-center"
columnbox add "Column", 1,1, 20, "__Mime__=application/x-vnd.yab-app"
columnbox add "Column", 1,2, 20, "__Mime__=application/x-vnd.Be-elfexecutable"
columnbox add "Column", 2,1, 20, "Foo"
columnbox add "Column", 2,2, 20, "Bar"
columnbox add "Column", 2,3, 20, "Baz"
tooltip "Column", "COLUMNBOX"
// treebox
treebox 130,160 to 270,290, "Tree", 1, "Box1"
treebox add "Tree", "Root"
treebox add "Tree", "Root", "Foo", true
treebox add "Tree", "Root", "Bar", true
tooltip "Tree", "TREEBOX"
// text
text 300,10, "Text", "Text (cannot be flushed)", "Box1"
tooltip "Text", "TEXT"
// texturl
texturl 300,30, "TextURL", "Team MAUI", "http://www.team-maui.org", "Box1"
tooltip "TextURL", "TEXTURL"
// textcontrol
textcontrol 300,50 to 500,70, "TextCtrl", "TextControl", "", "Box1"
tooltip "TextCtrl", "TEXTCONTROL"
// spincontrol
spincontrol 300,80, "Spin", "Spincontrol", 0,100,1, "Box1"
tooltip "Spin", "SPINCONTROL"
// calendar
calendar 300,120, "Cal", "DDMMYYYY.", "01.01.1970", "Box1"
tooltip "Cal", "CALENDAR"
// textedit
textedit 300,150 to 500,215, "TextEd", 3, "Box1"
textedit add "TextEd", "Simply edit your text..."
tooltip "TextEd", "TEXTEDIT"
// slider
slider 300,225 to 500,245, "Slider", "Slider", 1, 23, "Box1"
tooltip "Slider", "SLIDER"
// statusbar
statusbar 300,265 to 500,290, "Status", "Start", "Finish", "Box1"
statusbar set "Status", "Start", "Finish", 66
tooltip "Status", "STATUSBAR"
// view
view 10,10 to 100,100, "View", "Box2"
draw set "bgcolor", "jan-favorite-color", "View"
draw text 20,35, "Plain View", "View"
tooltip "View", "VIEW"
// canvas
canvas 10,110 to 100,195, "Canvas", "Box2"
draw text 20,35, "Canvas", "Canvas"
tooltip "Canvas", "CANVAS"
// boxview
boxview 10,205 to 100,290, "Boxview", "Boxview", 2, "Box2"
tooltip "Boxview", "BOXVIEW"
// tabview
tabview 120,10 to 260,100, "Tab", "top", "Box2"
tabview add "Tab", "First"
tabview add "Tab", "Second"
tooltip "Tab", "TABVIEW"
// splitview
splitview 120,110 to 260,195, "Split", true, false, "Box2"
draw set "bgcolor", "Panel-Background-Color, Darken-1-Tint", "Split1"
draw set "bgcolor", "Panel-Background-Color, Lighten-1-Tint", "Split2"
tooltip "Split", "SPLITVIEW"
// colorcontrol
colorcontrol 120,203, "Color", "Box2"
tooltip "Color", "COLORCONTROL"
// popupmenu (only button, code in messageloop)
button 120,270 to 245,290, "Popup", "Popupmenu", "Box2"
tooltip "Popup", "POPUPMENU"
// filepanel (only button, code in messageloop)
button 255,270 to 350,290, "File", "Filepanel", "Box2"
tooltip "File", "FILEPANEL"
// menu
view 280,10 to 500,100, "Menu", "Box2"
menu "Menu", "Foo", "", "Menu"
menu "Menu", "--", "", "Menu"
menu "Menu", "Bar", "", "Menu"
draw set "bgcolor", "Panel-Background-Color, Darken-1-Tint", "Menu"
draw text 20,35, "View with menu", "Menu"
tooltip "Menu", "MENU"
// scrollbar
view 280,110 to 500-peek("scrollbarwidth"),195-peek("scrollbarwidth"), "ScrollView", "Box2"
scrollbar "Scroll", 3, "ScrollView"
scrollbar set "Scroll", "horizontal-range", 0,100
scrollbar set "Scroll", "vertical-range", 0,50
if(peek$("os") = "Haiku") then
draw set "DejaVu Sans,Condensed Bold,32", "ScrollView"
else
draw set "Zurich,Bold,32", "ScrollView"
endif
draw text 130,90, "Foobar", "ScrollView"
tooltip "Scroll", "SCROLLBAR"
// stackview
stackview 420,205 to 500,260, "StackView", 2, "Box2"
button 360,270 to 425,290, "Stack1", "Stack1", "Box2"
button 435,270 to 500,290, "Stack2", "Stack2", "Box2"
draw set "bgcolor", 200,200,255, "StackView1"
draw text 10,20, "First view", "StackView1"
draw set "bgcolor", 200,255,255, "StackView2"
draw text 10,20, "Second view", "StackView2"
tooltip "StackView", "STACKVIEW"
// messageloop
while(not quitting)
msg$ = message$
if(instr(msg$, "Popup")) then
// popupmenu
select$ = popupmenu 120,270, "Foo|--|Bar", "Box2"
elsif(instr(msg$, "File")) then
// filepanel
select$ = filepanel "Load-File", "Example Filepanel", "/boot/home"
elsif(instr(msg$, "Stack1")) then
// set stackview
stackview set "StackView", 1
elsif(instr(msg$, "Stack2")) then
// set stackview
stackview set "StackView", 2
elsif(instr(msg$, "Quit")) then
// exit
quitting = true
endif
wend
window close "Win"

View File

@@ -1,62 +0,0 @@
import fileblock
x=openfile("/boot/home/test.file", 150,3)
if x < 1 error "cannot open file"
ok=Field(x,1,"name",50)
ok=ok+Field(x,2,"address",50)
ok=ok+Field(x,3,"phonenumber",50)
if (!ok = 3 ) error "bad field"
// werite some blocks
for z=1 to 20
lset(x,"name", "Some dude")
lset(x,"address", "Some address")
rset(x,"phonenumber","123-456-7890")
y=write_block(-1, x) // -1 appends the data to the file.
next
// over-write a block with new data
lset(x,"name", "Some other dude")
lset(x,"address", "Some kewl address")
rset(x,"phonenumber","098-765-4321")
write_block(6, x)
// read back the over-written block
read_block(6, x)
// get the data from the read operation
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
// show the data
print name$
print address$
print trim$(phone$)
// over write the block again
lset(x,"name", "")
lset(x,"address", "")
rset(x,"phonenumber","")
write_block(6, x)
//read back the over-written block
recno = read_block(6, x) // returns the read block that will next be read if called with -1 recordnumber
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
print name$
print address$
print phone$
print recno
//read the next block
recno = read_block(-1, x)
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
print name$
print address$
print phone$
print recno

View File

@@ -1,64 +0,0 @@
#!yab
window open 100,100 to 380,410,"MainView","BoxWorld.yab"
window set "MainView", "flags", "not-zoomable, not-h-resizable, not-v-resizable"
layout "none", "MainView"
view 0,0 to 110,30, "CheckboxView","MainView"
checkbox 10,10, "checkbox1", "Please select", 0, "CheckboxView"
view 0,31 to 110,120, "RadioView1","MainView"
radiobutton 10,10, "Radio11", "Radio 11", 0, "RadioView1"
radiobutton 10,30, "Radio12", "Radio 12", 0, "RadioView1"
radiobutton 10,50, "Radio13", "Radio 13", 1, "RadioView1"
view 0,130 to 110,190,"RadioView2","MainView"
radiobutton 10,10, "Radio21", "Radio 21", 1, "RadioView2"
radiobutton 10,30, "Radio22", "Radio 22", 0, "RadioView2"
view 0,195 to 110,280,"RadioView3","MainView"
radiobutton 10,5, "Radio31", "Radio 31", 0, "RadioView3"
radiobutton 10,25, "Radio32", "Radio 32", 0, "RadioView3"
radiobutton 10,45, "Radio33", "Radio 33", 1, "RadioView3"
radiobutton 10,65, "Radio34", "Radio 34", 0, "RadioView3"
view 0, 285 to 280, 310, "CommandView","MainView"
layout "leftright", "MainView"
listbox 120,10 to 255,110, "List1", 1, "MainView"
layout "standard", "MainView"
listbox 120,120 to 255,230, "List2", 3, "MainView"
listbox add "List1","Hello"
listbox add "List1","World"
for i=1 to 20
listbox add "List2","Number "+str$(i)
next i
dropbox 120,250 to 265,270, "drop1", "MyDrop:", "MainView"
dropbox add "drop1", "Hello World"
dropbox add "drop1", "Foo Bar"
dropbox add "drop1", "--"
dropbox add "drop1", "Acme Ltd"
dropbox add "drop1", "Bobejaan"
alert "BoxWorld shows how to use Radiobuttons, Checkboxes, Listboxes and Dropboxes.","Ok","idea"
inloop = true
while(inloop)
a$ = message$
if(a$<>"") then
print a$
draw flush "CommandView"
draw text 5,15, left$(a$,len(a$)-1), "CommandView"
endif
if(instr(a$,"_QuitRequested|")) inloop = false
wend
window close "MainView"

View File

@@ -1,64 +0,0 @@
#!yab
window open 400,400 to 550,500, "MainView1", "ButtonWorld1"
window open 600,400 to 750,500, "MainView2", "ButtonWorld2"
mainview1 = true
layout "left, right", "MainView1"
button 30,10 to 120,30, "EmptyAlert_", "Empty Alert", "MainView1"
layout "bottom, right", "MainView1"
button 30,40 to 120,60, "InfoAlert_", "Info Alert", "MainView1"
button 30,70 to 120,90, "IdeaAlert_", "Idea Alert", "MainView1"
button 30,10 to 120,30, "WarningAlert_", "Warning Alert", "MainView2"
button 30,40 to 120,60, "StopAlert_", "Stop Alert", "MainView2"
button 30,70 to 120,90, "Quit_", "Quit", "MainView2"
alert "ButtonWorld demonstrates how Buttons and Alerts can be used easily!", "Ok", "idea"
inloop = true
while(inloop)
msg$ = message$
switch msg$
case "EmptyAlert_|":
alert "This is an empty alert!", "Dooh", "none"
break
case "InfoAlert_|"
alert "This is an info alert!", "Dooh", "info"
break
case "IdeaAlert_|"
alert "This is an idea alert!", "Dooh", "idea"
break
case "WarningAlert_|"
alert "This is a warning alert!", "Dooh", "warning"
break
case "StopAlert_|"
alert "This is a stop alert!", "Dooh", "stop"
break
case "Quit_|"
inloop = false
if (mainview1) window close "MainView1"
window close "MainView2"
break
case "MainView1:_QuitRequested|"
window close "MainView1"
mainview1 = false
break
case "MainView2:_QuitRequested|"
window close "MainView2"
break
end switch
if(window count<1) inloop = false
wend

View File

@@ -1,202 +0,0 @@
#!yab
sleep .01
This_dir$ = getdir$("Calc.yab")
//localize
window open 100,50 to 320,320, "Calc", "CalcView"
draw set "bgcolor", 100, 150, 220, "Calc"
draw set "lowcolor", 100, 190, 100, "Calc"
draw set "highcolor", 255, 255, 255, "Calc"
window set "Calc", "minimumto", 220, 260
window set "Calc", "maximumto", 220, 260
layout "all", "Calc"
menu "File", "Reset", "R", "Calc"
menu "File", "--", "", "Calc"
menu "File", "Quit", "Q", "Calc"
menu "Help", "Help...", "H", "Calc"
menu "Help", "--", "", "Calc"
menu "Help", "About...", "", "Calc"
button 20,70 to 55,105,"b7", "7", "Calc"
button 65,70 to 100,105,"b8", "8", "Calc"
button 110,70 to 145,105,"b9", "9", "Calc"
button 155,70 to 190,105,"b/", "/", "Calc"
button 20,115 to 55,150,"b4", "4", "Calc"
button 65,115 to 100,150,"b5", "5", "Calc"
button 110,115 to 145,150,"b6", "6", "Calc"
button 155,115 to 190,150,"b*", "*", "Calc"
button 20,160 to 55,195,"b1", "1", "Calc"
button 65,160 to 100,195,"b2", "2", "Calc"
button 110,160 to 145,195,"b3", "3", "Calc"
button 155,160 to 190,195,"b-", "-", "Calc"
button 20,205 to 55,240,"b0", "0", "Calc"
button 65,205 to 100,240,"b.", ".", "Calc"
button 110,205 to 145,240,"bC", "C", "Calc"
button 155,205 to 190,240,"b+/=", "+=", "Calc"
draw text 20,50,"0","Calc"
display$ = "0"
result = 0
type$ = "+"
dim msgbuffer$(1)
inloop = true
while(inloop)
msgnumber = split(message$, msgbuffer$(), "|")
for i=0 to msgnumber
switch msgbuffer$(i)
case "b."
case "b0"
case "b1"
case "b2"
case "b3"
case "b4"
case "b5"
case "b6"
case "b7"
case "b8"
case "b9"
if(len(display$)<10) display$ = display$ + right$(msgbuffer$(i),1)
while(left$(display$,1)="0")
display$ = right$(display$,len(display$)-1)
wend
if(display$="") display$="0"
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, display$,"Calc"
break
case "b-"
result = calculate(result, type$, val(display$))
type$ = "-"
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, str$(result),"Calc"
display$="0"
break
case "b+/="
result = calculate(result, type$, val(display$))
type$ = "+"
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, str$(result),"Calc"
display$="0"
break
case "b*"
result = calculate(result, type$, val(display$))
type$ = "*"
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, str$(result),"Calc"
display$="0"
break
case "b/"
result = calculate(result, type$, val(display$))
type$ = "/"
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, str$(result),"Calc"
display$="0"
break
case "bC"
case "Calc:File:Reset"
result=0
draw rect 20,30 to 170,60, "Calc"
draw flush "Calc"
draw text 20,50, str$(result),"Calc"
display$="0"
type$ = "+"
break
case "Calc:File:Quit"
case "Calc:_QuitRequested"
window close "Calc"
break
case "Calc:Help:Help..."
alert "Calc demonstrates how to program\n a calculator in yab.\n\n", "Ok", "info"
break
case "Calc:Help:About..."
window open 250,100 to 570,291, "About", "About"
window set "About", "look", "bordered"
window set "About", "feel", "modal-app"
draw set "BGColor", 255,255,255, "About"
window set "About", "minimumto", 320, 191
window set "About", "maximumto", 320, 191
err = draw image 0,0, This_dir$+"img/image.png", "About"
if(err>0) then
alert "Error loading image.png!"+str$(err), "Close", "warning"
window close "About"
else
button 20,163 to 300,183,"b", "Close", "About"
endif
break
case translate$("b")
case translate$("About:_QuitRequested")
window close "About"
break
default
break
end switch
next i
if(window count = 0) inloop = false
sleep 0.1
wend
sub calculate(a,type$,b)
ret = 0
switch(type$)
case "+"
ret = a + b
break
case "-"
ret = a - b
break
case "*"
ret = a * b
break
case "/"
ret = a / b
break
end switch
return ret
end sub
//////////////////////////////////////////////////////////////////
sub getdir$( programname$)
// find out in which directory we are in
////////////////////////////////////////////////////////////////
local path$
local catch
catch=0
if (!peek("isbound")) then
path$=system$("ps")
x=instr(path$,"/"+programname$)
path$=left$(path$,x)
for x=len(path$)-1 to 1 step -1
if (instr(path$," ",x) and catch=0) catch=x+1
next
path$=right$(path$,len(path$)-catch)
path$=trim$(path$)
if path$="/" then
path$ = trim$(system$("pwd"))+"/"
else
path$="/"+path$
endif
else
path$=trim$(peek$("directory") )
path$=path$+"/"
end if
return path$
end sub

View File

@@ -1,43 +0,0 @@
#!yab
dim Part$(1)
window open 100, 100, 240, 300, "A", "Checkboxes"
window set "A", "flags", "not-h-resizable, not-v-resizable, not-zoomable"
// create the checkboxes
// with layout for left top
layout "left, top", "A"
for NP = 1 to 5
Y = Y+25
checkbox 10, Y, "CheckMe:"+str$(NP), "OFF", 0, "A"
next NP
button 10, 170 to 130, 190, "Button_", "Check them", "A"
while (not instr(msg$, "Quit"))
msg$ = message$
if (split(msg$, Part$(), ":|") < 3) dim Part$(3)
// if one of the checkboxes was used
if (msg$ = "CheckMe:"+Part$(2)+":"+Part$(3)+"|") then
option set "CheckMe:"+Part$(2), "label", Part$(3)
fi
// if the button was pressed
if (msg$ = "Button_|") then
if (check$ = "ON") then
check$ = "OFF"
option set "Button_", "label", "Check them"
else
check$ = "ON"
option set "Button_", "label", "Uncheck them"
fi
for NP = 1 to 5
checkbox set "CheckMe:"+str$(NP), (check$ = "ON")
option set "CheckMe:"+str$(NP), "label", check$
// sleep 0.05
next NP
fi
wend
exit

View File

@@ -1,34 +0,0 @@
#!yab
window open 100,100 to 200,150, "MainView", "Clock"
window set "MainView", "flags", "Not-Zoomable"
window set "MainView", "minimumto", 100,50
window set "MainView", "maximumto", 100,50
layout "left, top, right", "MainView"
view 0,0 to 100,50, "clockview", "MainView"
inloop = true
while(inloop)
msg$ = message$
if(msg$<>"") print msg$
if(instr(msg$,"_QuitRequested")) inloop = false
if(instr(msg$,"Quit")) inloop = false
draw_time_and_date()
sleep 0.01
wend
window close "MainView"
exit
sub time_and_date()
zeit$ = left$(time$,2) + ":" + mid$(time$,4,2) + ":" + mid$(time$,7,2)
datum$ = mid$(date$,14,3) + ", " + mid$(date$,6,2) + "." + mid$(date$,3,2) + "." + mid$(date$,11,2)
end sub
sub draw_time_and_date()
time_and_date()
draw flush "clockview"
draw text 10,20, datum$ ,"clockview"
draw text 10,35, zeit$ + " ","clockview"
wait 0.25
end sub

View File

@@ -1,26 +0,0 @@
#!yab
DOCU ColorDemo, Color select and show
DOCU by Stargater
window open 100,100 to 420,420, "MainView", "ColorDemo"
window set "MainView", "flags", "not-zoomable, not-h-resizable, not-v-resizable"
view 20,20 to 300,220, "ViewColor", "MainView"
r = 140
g = 140
b = 240
draw set "bgcolor", r,g,b, "ViewColor"
colorcontrol 10,240, "Colorcontrol", "MainView"
colorcontrol set "Colorcontrol", 140,140,240
while(not instr(message$,"_QuitRequested"))
r = colorcontrol get "Colorcontrol", "red"
g = colorcontrol get "Colorcontrol", "green"
b = colorcontrol get "Colorcontrol", "blue"
draw set "bgcolor", r,g,b, "ViewColor"
wend
window close "MainView"

View File

@@ -1,197 +0,0 @@
#!yab
window open 100,100 to 700,500, "MainView", "DrawWorld"
// MainView
draw set "highcolor", 0,0,0, "MainView"
draw set "lowcolor", 235,235,235, "MainView"
draw set "bgcolor", 235,235,235, "MainView"
draw set 0, "HighSolidFill"
if(peek$("os") = "Haiku") then
draw set "DejaVu Sans,Condensed Bold,48", "MainView"
else
draw set "Zurich,Bold,48", "MainView"
endif
draw text 175,50, "DrawWorld", "MainView"
button 510,370 to 590,390, "NextButton", "Next", "MainView"
// Our drawing pad
view 100,60 to 500,390, "DrawView", "MainView"
draw set "highcolor", 0,0,0, "DrawView"
draw set "lowcolor", 255,255,255, "DrawView"
draw set "bgcolor", 255,255,255, "DrawView"
// Dot and line
draw set "Zurich,Bold,18", "DrawView"
draw text 135,20, "Dot and Line", "DrawView"
xold = 40
yold = 260
for a=10 to 720 step 10
x = 10+a*180/360
y = 230+60*sin(a*pi/180)
draw line xold,yold to x,y, "DrawView"
xold = x + 30
yold = y + 30
next a
for a = 0 to 720 step 10
x = 10+a*180/360
y = 100+60*sin(a*pi/180)
draw dot x,y, "DrawView"
next a
while(not instr(msg$,"NextButton"))
msg$ = message$
if(instr(msg$, "Quit")) then
window close "MainView"
end
endif
sleep 0.1
wend
msg$ = ""
draw rect 0,0 to 400,330, "DrawView"
draw flush "DrawView"
draw set 1, "HighSolidFill"
// Circle and ellipse
draw set "Zurich,Bold,18", "DrawView"
draw text 135,20, "Circle and Ellipse", "DrawView"
// draw set 1, "LowSolidFill"
draw circle 70,70, 36, "DrawView"
draw set "highcolor", 0,0,245, "DrawView"
draw dot 70,70, "DrawView"
draw line 72,70 to 105,70, "DrawView"
draw line 105,70 to 100,65, "DrawView"
draw line 105,70 to 100,75, "DrawView"
draw text 85,68, "r", "DrawView"
draw set "highcolor", 0,0,0, "DrawView"
draw ellipse 210,70, 72, 36, "DrawView"
draw set "highcolor", 0,0,245, "DrawView"
draw dot 210,70, "DrawView"
draw line 212,70 to 282,70, "DrawView"
draw line 282,70 to 277,65, "DrawView"
draw line 282,70 to 277,75, "DrawView"
draw line 210,68 to 210,34, "DrawView"
draw line 210,34 to 215,39, "DrawView"
draw line 210,34 to 205,39, "DrawView"
draw text 235,68, "rx", "DrawView"
draw text 192,57, "ry", "DrawView"
for i = 0 to 255 step 5
draw set "highcolor", i,0,0, "DrawView"
draw ellipse i+90, 230, 72-i/5, 36+i/5, "DrawView"
next i
draw set "highcolor", 0,0,0, "DrawView"
while(not instr(msg$,"NextButton"))
msg$ = message$
if(instr(msg$, "Quit")) then
window close "MainView"
end
endif
sleep 0.1
wend
msg$ = ""
draw rect 0,0 to 400,330, "DrawView"
draw flush "DrawView"
draw set "lowcolor", 255,255,255, "DrawView"
draw set 1, "HighSolidFill"
// Bezier curve
draw set "Zurich,Bold,18", "DrawView"
draw text 135,20, "Bezier Curve", "DrawView"
draw set "highcolor", 50,50,250, "DrawView"
draw circle 30,100, 3, "DrawView"
draw circle 70,60, 3, "DrawView"
draw circle 100,40, 3, "DrawView"
draw circle 140,90, 3, "DrawView"
draw line 30,100 to 70,60, "DrawView"
draw line 70,60 to 100,40, "DrawView"
draw line 100,40 to 140,90, "DrawView"
draw set "highcolor", 0,0,0, "DrawView"
draw curve 30,100, 70,60, 100,40, 140,90, "DrawView"
draw set "highcolor", 50,50,250, "DrawView"
draw circle 170,100, 3, "DrawView"
draw circle 190,40, 3, "DrawView"
draw circle 250,40, 3, "DrawView"
draw circle 265,90, 3, "DrawView"
draw line 170,100 to 190,40, "DrawView"
draw line 190,40 to 250,40, "DrawView"
draw line 250,40 to 265,90, "DrawView"
draw set "highcolor", 0,0,0, "DrawView"
draw curve 170,100, 190,40, 250,40, 265,90, "DrawView"
draw set "highcolor", 50,50,250, "DrawView"
draw circle 350,40, 3, "DrawView"
draw circle 300,10, 3, "DrawView"
draw circle 290,200, 3, "DrawView"
draw circle 350,140, 3, "DrawView"
draw line 350,40 to 300,10, "DrawView"
draw line 300,10 to 290,200, "DrawView"
draw line 290,200 to 350,140, "DrawView"
draw set "highcolor", 0,0,0, "DrawView"
draw set 0, "HighSolidFill"
draw curve 350,40, 300,10, 290,200, 350,140, "DrawView"
draw set 1, "HighSolidFill"
draw curve 10,300, 120,100, 170,100, 390,300, "DrawView"
while(not instr(msg$,"NextButton"))
msg$ = message$
if(instr(msg$, "Quit")) then
window close "MainView"
end
endif
sleep 0.1
wend
msg$ = ""
draw rect 0,0 to 400,330, "DrawView"
draw flush "DrawView"
// Pattern
draw set "Zurich,Bold,18", "DrawView"
draw text 165,20, "Pattern", "DrawView"
draw text 47,40, "HighSolidFill", "DrawView"
draw text 247,40, "LowSolidFill", "DrawView"
draw text 43,190, "CheckeredFill", "DrawView"
draw text 247,190, "Userdefined", "DrawView"
draw set "highcolor", 50,50,250, "DrawView"
draw set "lowcolor", 250,50,50, "DrawView"
draw set 0, "HighSolidFill"
draw rect 40,50 to 160,130, "DrawView"
draw set 0, "LowSolidFill"
draw rect 240,50 to 360,130, "DrawView"
draw set 0, "CheckeredFill"
draw rect 40,200 to 160,280, "DrawView"
pattern$ = "255239171199001199171239"
draw set 0, pattern$
draw rect 240,200 to 360,280, "DrawView"
draw set 0, "255255255255255255255255"
draw rect 40,50 to 160,130, "DrawView"
draw set "highcolor", 0,0,0, "DrawView"
draw set "lowcolor", 255,255,255, "DrawView"
while(not instr(msg$,"NextButton"))
msg$ = message$
if(instr(msg$, "Quit")) then
window close "MainView"
end
endif
sleep 0.1
wend
window close "MainView"

View File

@@ -1,33 +0,0 @@
#!yab
window open 100,100 to 300,300, "WView", "DropWorld"
text 20,5, "Txt1", "Drop any file here:", "WView"
view 20,20 to 180,180, "DropView", "WView"
draw set "highcolor", 0,0,0, "DropView"
draw set "lowcolor", 255,255,0, "DropView"
pattern$ = "240225195135015030060120"
draw set 0, pattern$
draw rect 0,0 to 160,160, "DropView"
draw set 0, "lowsolid"
view dropzone "DropView"
dim msg$(1)
inloop = true
while(inloop)
n = split(message$, msg$(), "|:")
for i = 0 to n
if(msg$(i) = "_Dropped") then
draw rect 20,181 to 290,200, "WView"
draw flush "WView"
draw text 20,195, msg$(i+1), "WView"
endif
if(msg$(i) = "_QuitRequested") inloop = false
next i
if(msg$<>"") print msg$
sleep 0.1
wend
window close "WView"

View File

@@ -1,18 +0,0 @@
#!yab
sleep .01
window open 100,100 to 400, 200, "WView", "EvenMoreControls"
layout "none", "WView"
colorcontrol 10,10, "CC", "WView"
colorcontrol set "CC", 213,123,43
textcontrol 10,70 to 150,90, "TC", "Enter Password:","","WView"
textcontrol set "TC",1
inloop = true
while(inloop)
msg$ = message$
if(msg$<>"") print msg$
if(instr(msg$,"Quit")) inloop = false
wend
window close "WView"

View File

@@ -1,58 +0,0 @@
#!yab
SCREEN_W = peek("desktopwidth")
SCREEN_H = peek("desktopheight")
W = 400
H = 200
X = (SCREEN_W/2) - (W/2)
Y = (SCREEN_H/2) - (H/2)
THE_TEXT$ = "HELLO"
screenshot 0, 0 to SCREEN_W-1, SCREEN_H-1, "BMP_screen_"
window open -10-W, 0 to -10, H, "Main_", "PAPA"
window set "Main_", "look", "modal"
window set "Main_", "flags", "not-h-resizable, not-v-resizable, not-zoomable"
canvas 0, 0 to W, H, "CV_main_", "Main_"
if(peek$("os") = "Haiku") then
draw set "DejaVu Sans,Condensed Bold,122", "CV_main_"
else
draw set "Swis721 BT, Bold, 122", "CV_main_"
endif
th = draw get "max-text-height", "CV_main_"
tw = draw get "text-width", THE_TEXT$, "CV_main_"
tx = (W/2)-(tw/2)
ty = (H/3)*2
draw bitmap -X, -Y, "BMP_screen_", "copy", "CV_main_"
draw text tx, ty, THE_TEXT$, "CV_main_"
window set "Main_", "moveto", X, Y
dim m$(1)
while (not instr(msg$, "Quit"))
msg$ = message$
if (X <> window get "Main_", "position-x") then
X = window get "Main_", "position-x"
Moved = true
fi
if (Y <> window get "Main_", "position-y") then
Y = window get "Main_", "position-y"
Moved = true
fi
if (Moved) then
draw bitmap -X, -Y, "BMP_screen_", "copy", "CV_main_"
draw text tx, ty, THE_TEXT$, "CV_main_"
Moved = false
fi
wend
exit

View File

@@ -1,53 +0,0 @@
#!yab
import Filebox
dir$ = "/boot/home/"
window open 100,100 to 500,500, "Demo",dir$
Filebox(10,10,350,390,"Filebox", 1, "Demo")
FileboxDirectory("Filebox", dir$, false)
button 360,10,390,30, "DirUp", "..", "Demo"
dim msg$(1)
inloop = true
while(inloop)
n = split(message$, msg$(), "|")
for i=1 to n
print msg$(i)
// Quit
if(msg$(i) = "Demo:_QuitRequested") inloop = false
// Button pressed and we are not in the root directory
if(msg$(i) = "DirUp" and dir$<>"/") then
t = len(dir$)-1
while(mid$(dir$,t,1)<>"/")
t = t - 1
wend
dir$ = left$(dir$,t)
WINDOW SET "Demo", "Title", dir$
FileboxDirectory("Filebox", dir$, false)
endif
// An item is invoked
if(instr(msg$(i),"Filebox:_Invoke:")) then
position = val(right$(msg$(i),len(msg$(i))-16))
// if the item is a directory, then update the filebox else print the filename
if(FileboxIsDirectory("Filebox", position,dir$)) then
dir$ = dir$ + FileboxName$("Filebox", position) + "/"
WINDOW SET "Demo", "Title", dir$
FileboxDirectory("Filebox", dir$, false)
else
print dir$+FileboxName$("Filebox", position)
endif
endif
next i
sleep 0.01
wend
window close "Demo"

View File

@@ -1,444 +0,0 @@
#!yab
// Set Backgroundcolors as variables.
bgr = 216 : bgg = 216 : bgb = 226
window open 100, 100 to 610, 400, "MainView" ,"GUI - World"
window set "MainView", "flags", "not-h-resizable"
draw set "bgcolor", bgr, bgg, bgb, "MainView"
draw set "lowcolor", bgr, bgg, bgb, "MainView"
draw set "highcolor", 0, 0, 0, "MainView"
draw set "Zurich, Bold, 16", "MainView"
draw text 10, 20, "GUI - World", "MainView"
listbox 200, 5 to 505, 235, "SourceView", 1, "MainView"
view 5, 241 to 505, 265, "LineView", "MainView"
draw set "bgcolor", bgr-16, bgg-16, bgb-16, "LineView"
draw set "lowcolor", bgr-16, bgg-16, bgb-16, "LineView"
draw set "highcolor", 155, 0, 0, "LineView"
draw set "Zurich, Bold, 14", "LineView"
view 0, 270 to 510, 300, "ButtonView", "MainView"
draw set "bgcolor", bgr, bgg, bgb, "ButtonView"
button 10, 0 to 70, 20, "Quit_", "Quit", "ButtonView"
button 205, 0 to 500, 20, "Step_", "Next step", "ButtonView"
layout "left, top", "MainView"
view 5, 25 to 190, 240, "StatusView", "MainView"
draw set "bgcolor", bgr, bgg, bgb, "StatusView"
draw set "Zurich, Roman, 10", "StatusView"
NextStep(0)
option set "Step_", "focus", true
dim choice$(1)
inloop = true
while (inloop)
msg$ = message$
if (split(msg$, choice$(), ":|") > 2) btn$ = choice$(3)
if (msg$ <> "") print msg$
switch msg$
case "Step_|"
stp = stp+1
NextStep(stp)
L = 0
option set "Step_", "focus", true
break
case "SourceView:_Invoke:"+btn$+"|"
if (L = 0) stp = stp-1
L = 1
NextStep(val(btn$))
break
case "Quit_|":
case "MainView:_QuitRequested|":
inloop = false
break
end switch
sleep 0.01
wend
exit
sub NextStep(n)
draw flush "StatusView"
m = n
if (n = 0) then
draw text 5, 20, "With GUI-World you can", "StatusView"
draw text 5, 35, "create a window with a few", "StatusView"
draw text 5, 50, "contents, as examples.", "StatusView"
draw text 5, 75, "The currently executed line will be", "StatusView"
draw text 5, 90, "shown down above the buttons.", "StatusView"
draw text 5, 115, "The complete source will be", "StatusView"
draw text 5, 130, "collected in the right list.", "StatusView"
draw text 5, 200, "Click on 'Next step' to start ...", "StatusView"
ShowLine("Welcome to GUI-World!")
fi
if (n = 1) then
draw text 5, 20, "At first, we need to create the window.", "StatusView"
draw text 5, 35, "We will create a window", "StatusView"
draw text 5, 60, "with a size of 400, 300 (x, y)", "StatusView"
draw text 5, 75, "at the position 200x200", "StatusView"
draw text 5, 90, "of your monitor.", "StatusView"
draw text 5, 110, "The name of the window is ''New App''.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("window open 200, 200 to 600, 500, ''View1'', ''New App''")
fi
if (n = 2) then
if (L = 0) window open 200, 450 to 600, 750, "View1", "New App"
if (L = 0) listbox add "SourceView", "window open 200, 200 to 600, 500, ''View1'', ''New App''"
draw text 5, 20, "The window should be opened now.", "StatusView"
draw text 5, 45, "It has no function yet,", "StatusView"
draw text 5, 60, "so we'll change that.", "StatusView"
draw text 5, 85, "But first let us define the", "StatusView"
draw text 5, 100, "background color of the window.", "StatusView"
draw text 5, 125, "We'll choose white for background.", "StatusView"
draw text 5, 140, "Red 255 + Green 255 + Green 255", "StatusView"
draw text 5, 155, " = white.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw set ''bgcolor'', 255, 255, 255, ''View1''")
fi
if (n = 3) then
if (L = 0) draw set "bgcolor", 255, 255, 255, "View1"
if (L = 0) listbox add "SourceView", "draw set ''bgcolor'', 255, 255, 255, ''View1''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Ok, white. But still no function!!", "StatusView"
draw text 5, 45, "We can now drop in some widgets,", "StatusView"
draw text 5, 60, "such as buttons, checkboxes, etc.", "StatusView"
draw text 5, 85, "Let's start with a simple button.", "StatusView"
draw text 5, 100, "The button will be named 'Quit'", "StatusView"
draw text 5, 115, "and will appear down-right.", "StatusView"
draw text 5, 140, "Its ID is 'Button1' so it would return", "StatusView"
draw text 5, 155, "'Button1' if is pressed.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("button 330, 270 to 390, 270, ''Button1'', ''Quit'', ''View1''")
fi
if (n = 4) then
if (L = 0) button 330, 270 to 390, 270, "Button1", "Quit", "View1"
if (L = 0) listbox add "SourceView", "button 330, 270 to 390, 270, ''Button1'', ''Quit'', ''View1''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Creating views.", "StatusView"
draw text 5, 45, "For further widgets, we should create", "StatusView"
draw text 5, 60, "extra views inside the View1", "StatusView"
draw text 5, 85, "The name of the view is 'View2'", "StatusView"
draw text 5, 100, "and we want it in the upper-left corner", "StatusView"
draw text 5, 115, "inside the Window (View1).", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("view 5, 5 to 150, 60, ''View2'', ''View1''")
fi
if (n = 5) then
if (L = 0) view 5, 5 to 150, 60, "View2", "View1"
if (L = 0) listbox add "SourceView", "view 5, 5 to 150, 60, ''View2'', ''View1''"
draw text 5, 60, "We'd like to change the background", "StatusView"
draw text 5, 75, "color of that new view...", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw set ''bgcolor'', 216, 230, 250, ''View2''")
fi
if (n = 6) then
if (L = 0) draw set "bgcolor", 216, 230, 250, "View2"
if (L = 0) listbox add "SourceView", " draw set ''bgcolor'', 216, 230, 250, ''View2''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Radiobuttons.", "StatusView"
draw text 5, 45, "Now we drop a radiobutton", "StatusView"
draw text 5, 60, "in the new view.", "StatusView"
draw text 5, 85, "Note that we have to use the", "StatusView"
draw text 5, 100, "coordinates of 'View2' for everything", "StatusView"
draw text 5, 115, "we want to put into it!", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("radiobutton 5, 10, ''rb1'', ''Radiobutton 1'', 0, ''View2''")
fi
if (n = 7) then
draw text 5, 20, "Our radiobutton should", "StatusView"
draw text 15, 45, "appear at 5, 10 on 'View2',", "StatusView"
draw text 15, 60, "be named 'RadioButton 1'", "StatusView"
draw text 15, 75, "have the ID 'rb1'", "StatusView"
draw text 15, 90, "not be activated (activated = 0)", "StatusView"
draw text 5, 115, "It will return the ID and if", "StatusView"
draw text 5, 130, "not activated = 0", "StatusView"
draw text 5, 145, "activated = 1", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
fi
if (n = 8) then
if (L = 0) radiobutton 5, 10, "rb1", "Radiobutton 1", 0, "View2"
if (L = 0) listbox add "SourceView", "radiobutton 5, 10, ''rb1'', ''Radiobutton 1'', 0, ''View2''"
draw text 5, 20, "What about another one?", "StatusView"
draw text 5, 45, "This time activated.", "StatusView"
draw text 5, 60, "Because they are on the same view,", "StatusView"
draw text 5, 85, "you can switch between them.", "StatusView"
draw text 5, 100, "Just try it out...", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on...", "StatusView"
ShowLine("radiobutton 5, 30, ''rb2'', ''Radiobutton 2'', 1, ''View2''")
fi
if (n = 9) then
if (L = 0) radiobutton 5, 30, "rb2", "Radiobutton 2", 1, "View2"
if (L = 0) listbox add "SourceView", "radiobutton 5, 30, ''rb2'', ''Radiobutton 2'', 1, ''View2''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Checkbuttons.", "StatusView"
draw text 5, 45, "Let's make checkbuttons!", "StatusView"
draw text 5, 60, "This time placed on 'View1' again.", "StatusView"
draw text 5, 85, "It is named 'Checkbox 1',", "StatusView"
draw text 5, 100, "has the ID 'cb1' and is", "StatusView"
draw text 5, 115, "not activated.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("checkbox 10, 70, ''cb1'', ''Checkbox 1'', 0, ''View1''")
fi
if (n = 10) then
if (L = 0) checkbox 10, 70, "cb1", "Checkbox 1", 0, "View1"
if (L = 0) listbox add "SourceView", "checkbox 10, 60, ''cb1'', ''Checkbox 1'', 0, ''View1''"
draw text 5, 20, "And another one for switching...", "StatusView"
draw text 5, 45, "This time activated.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("checkbox 10, 90, ''cb2'', ''Checkbox 2'', 1, ''View1''")
fi
if (n = 11) then
if (L = 0) checkbox 10, 90, "cb2", "Checkbox 2", 1, "View1"
if (L = 0) listbox add "SourceView", "checkbox 10, 60, ''cb2'', ''Checkbox 2'', 1, ''View1''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Textcontrol - Input from the user.", "StatusView"
draw text 5, 45, "This shows a text inputfield with a", "StatusView"
draw text 5, 60, "short text before it.", "StatusView"
draw text 5, 85, "It has the ID 'tc1' and returns it, if", "StatusView"
draw text 5, 100, "a user pressed enter after typing", "StatusView"
draw text 5, 115, "in the textfield.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("textcontrol 10, 120 to 180, 130, ''tc1'', ''Tell me:'', ''Text...'', ''View1''")
fi
if (n = 12) then
if (L = 0) textcontrol 10, 120 to 180, 130, "tc1", "Tell me:", "Text...", "View1"
if (L = 0) listbox add "SourceView", "textcontrol 10, 120 to 180, 130, ''tc1'', ''Tell me:'', ''Text...'', ''View1''"
draw text 5, 20, "And now a listbox.", "StatusView"
draw text 5, 45, "It's a list, where dropboxs can be added to.", "StatusView"
draw text 5, 60, "It has the ID 'list1' and returns it,", "StatusView"
draw text 5, 85, "followed by the chosen dropbox.", "StatusView"
draw text 5, 100, "The '1' in here affects the scrollbars", "StatusView"
draw text 15, 115, "0 = no scrollbar", "StatusView"
draw text 15, 130, "1 = vertikal scrollbar", "StatusView"
draw text 15, 145, "2 = horizontal scrollbar", "StatusView"
draw text 15, 160, "3 = both scrollbars", "StatusView"
draw text 5, 185, "We'll take just the vertikal one.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("listbox 200, 10 to 380, 260, ''list1'', 1, ''View1''")
fi
if (n = 13) then
if (L = 0) listbox 200,10 to 380,260,"list1",1, "View1"
if (L = 0) listbox add "SourceView", "listbox 200, 10 to 380, 260, ''list1'', 1, ''View1''"
draw text 5, 20, "Add items to the list.", "StatusView"
draw text 5, 45, "Now let's put some items into it.", "StatusView"
draw text 5, 60, "We will add 3 entries in the list.", "StatusView"
draw text 5, 85, "Look on the line and then watch out", "StatusView"
draw text 5, 100, "what happens.", "StatusView"
draw text 5, 125, "At first we enter 'Hello World'.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("listbox add ''list1'', ''Hello world!'''")
fi
if (n = 14) then
if (L = 0) listbox add "list1", "Hello world!"
if (L = 0) listbox add "SourceView", "listbox add ''list1'', ''Hello world!''"
draw text 5, 20, "Just another entry.", "StatusView"
draw text 5, 60, "Now we enter 'How are you?'.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("listbox add ''list1'', ''How are you?''")
fi
if (n = 15) then
if (L = 0) listbox add "list1", "How are you?"
if (L = 0) listbox add "SourceView", "listbox add ''list1'', ''How are you?''"
draw text 5, 20, "The third and last entry.", "StatusView"
draw text 5, 45, "Last but not least, we enter", "StatusView"
draw text 5, 60, "'I am fine' to the listbox.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
if (L = 0) ShowLine("listbox add ''list1'', ''I am fine!''")
fi
if (n = 16) then
if (L = 0) listbox add "list1", "I am fine!"
if (L = 0) listbox add "SourceView", "''dropbox add ''list1'', ''I am fine!''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Selfexplaining...", "StatusView"
draw text 5, 45, "You see everything what differs them", "StatusView"
draw text 5, 60, "is the text for the entry.", "StatusView"
draw text 5, 85, "So it is important, where you place", "StatusView"
draw text 5, 100, "the entries in the sourcecode.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("...")
fi
if (n = 17) then
if (L = 0) draw set "highcolor", 0, 0, 0, "View1"
if (L = 0) listbox add "SourceView", "draw set ''highcolor'', 0, 0, 0, ''View1''"
draw text 5, 20, "Change highcolor.", "StatusView"
draw text 5, 45, "If you'd like to draw something", "StatusView"
draw text 5, 60, "e.g. a rectangle, you should control", "StatusView"
draw text 5, 75, "the background color of the view", "StatusView"
draw text 5, 90, "which shall appear in.", "StatusView"
draw text 5, 115, "We chose black (0, 0, 0).", "StatusView"
draw text 5, 130, "(see sourcecode)", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw set ''highcolor'', 0, 0, 0, ''View1''")
fi
if (n = 18) then
draw text 5, 20, "Now we set the color, we can draw.", "StatusView"
draw text 5, 45, "A rectangle will now be drawn", "StatusView"
draw text 5, 60, " with the previously chosen color", "StatusView"
draw text 5, 75, "in the window.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw rect 10, 150 to 180, 190, ''View1''")
fi
if (n = 19) then
if (L = 0) draw rect 10, 150 to 180, 190, "View1"
if (L = 0) listbox add "SourceView", "draw rect 10, 150 to 180, 190, ''View1''"
if (L = 0) listbox add "SourceView", ""
draw text 5, 20, "Draw text on the rectangle.", "StatusView"
draw text 5, 45, "Now we'll do some writing but", "StatusView"
draw text 5, 60, "first we should control the color.", "StatusView"
draw text 5, 85, "The highcolor is the color the", "StatusView"
draw text 5, 100, "text will be in.", "StatusView"
draw text 5, 125, "We chose red here.", "StatusView"
draw text 5, 205, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw set ''highcolor'', 255, 0, 0, ''View1''")
fi
if (n = 20) then
if (L = 0) draw set "highcolor", 255, 0, 0, "View1"
if (L = 0) draw set "lowcolor", 0, 0, 0, "View1"
if (L = 0) listbox add "SourceView", "draw set ''highcolor'', 255, 0, 0, ''View1''"
draw text 5, 20, "Font -type and -size.", "StatusView"
draw text 5, 45, "Next we have to define the", "StatusView"
draw text 5, 60, "fonttype and its size.", "StatusView"
draw text 5, 85, "You can see the font-idents best", "StatusView"
draw text 5, 100, "in GoBe productive or something", "StatusView"
draw text 5, 115, "like that.", "StatusView"
draw text 5, 200, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw set ''Zurich, Bold, 24'', ''View1''")
fi
if (n = 21) then
if (L = 0) draw set "Zurich, Bold, 24", "View1"
if (L = 0) listbox add "SourceView", "draw set ''Zurich, Bold, 24'', ''View1''"
draw text 5, 20, "Let's go writing.", "StatusView"
draw text 5, 45, "The text shall appear in red", "StatusView"
draw text 5, 60, "right on the rectangle.", "StatusView"
draw text 5, 85, "We will write the word", "StatusView"
draw text 5, 100, "'easy", "StatusView"
draw text 5, 115, "", "StatusView"
draw text 5, 200, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("draw text 40, 180, ''easy'', ''View1''")
fi
if (n = 22) then
if (L = 0) draw text 40, 180, "easy", "View1"
if (L = 0) listbox add "SourceView", "draw text 40, 180, ''easy'', ''View1''"
draw text 5, 20, "Dropboxes.", "StatusView"
draw text 5, 45, "If you want to provide the user a selection", "StatusView"
draw text 5, 60, "on a small room, take a dropbox!", "StatusView"
draw text 5, 85, "This dropbox has the ID ''db1'' and returns", "StatusView"
draw text 5, 100, "it, if there are entries in it, together with", "StatusView"
draw text 5, 115, "that entry.", "StatusView"
draw text 5, 200, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("dropbox 10, 200 to 180, 220, ''db1'', ''Choose'', ''View1''")
fi
if (n = 23) then
if (L = 0) dropbox 10, 200 to 180, 220, "db1", "Choose", "View1"
if (L = 0) listbox add "SourceView", "dropbox 10, 200 to 180, 220, ''db1'', ''Choose'', ''View1''"
draw text 5, 20, "Add items to the dropbox.", "StatusView"
draw text 5, 45, "Adding items to a dropbox is the same", "StatusView"
draw text 5, 60, "procedure as for listboxes.", "StatusView"
draw text 5, 85, "We give the ID of the dropbox", "StatusView"
draw text 5, 100, "which is 'db1' and the name, the", "StatusView"
draw text 5, 115, "dropbox should have, followed by the", "StatusView"
draw text 5, 130, "view the dropbox is on.", "StatusView"
draw text 5, 155, "We'll make three entries again and", "StatusView"
draw text 5, 170, "start with that line below. ", "StatusView"
draw text 5, 200, "Click on 'Next step' to go on ...", "StatusView"
ShowLine("dropbox add ''db1'', ''yab interpreter''")
fi
if (n = 24) then
if (L = 0) dropbox add "db1", "yab interpreter"
if (L = 0) listbox add "SourceView", "dropbox add ''db1'', ''yab interpreter''"
ShowLine("dropbox add ''db1'', ''yet another''")
sleep 0.5
if (L = 0) dropbox add "db1", "yet another"
if (L = 0) listbox add "SourceView", "dropbox add ''db1'', ''yet another''"
ShowLine("dropbox add ''db1'', ''basic''")
sleep 0.5
if (L = 0) dropbox add "db1", "basic"
if (L = 0) listbox add "SourceView", "dropbox add ''db1'', ''basic''"
draw text 5, 20, "That's it for today, man!", "StatusView"
draw text 5, 45, "More help do you get from the file", "StatusView"
draw text 5, 60, "DONE_AND_TODO", "StatusView"
draw text 5, 85, "", "StatusView"
draw text 5, 100, "To be continued...", "StatusView"
draw text 5, 115, "", "StatusView"
draw text 5, 200, "Click on 'Next step' to go insane...", "StatusView"
ShowLine("Nothing more to tell ...")
fi
if (n = 25) then
draw text 5, 20, "That's it for today, man!", "StatusView"
draw text 5, 45, "More help do you get from the file", "StatusView"
draw text 5, 60, "DONE_AND_TODO", "StatusView"
draw text 5, 85, "", "StatusView"
draw text 5, 100, "To be continued...", "StatusView"
draw text 5, 115, "", "StatusView"
draw text 5, 200, "Click on 'Next step' to go insane...", "StatusView"
ShowLine("Nothing more to tell ...")
stp = stp-1
fi
return
end sub
sub ShowLine(CurrLine$)
draw flush "LineView"
draw text 10, 17, CurrLine$, "LineView"
return
end sub

View File

@@ -1,30 +0,0 @@
#!yab
window open 100,100 to 600,600, "Main", "IconWorld"
systempath$ = "/boot/system/apps/Mail"
draw text 70,30, "bitmap get \"BMP_icon\", \"path\", \"" + systempath$ +"\"", "Main"
bitmap get "BMP_icon", "path", systempath$
draw bitmap 10, 10, "BMP_icon", "alpha", "Main"
bitmap remove "BMP_icon"
draw text 70,70, "bitmap get \"BMP_icon\", \"mime16\", \"application/x-vnd.Be-MAIL\"", "Main"
bitmap get "BMP_icon", "mime16", "application/x-vnd.Be-MAIL"
draw bitmap 10, 60, "BMP_icon", "alpha", "Main"
bitmap remove "BMP_icon"
draw text 70,110, "bitmap get \"BMP_icon\", \"mime32\", \"application/x-vnd.Be-MAIL\"", "Main"
bitmap get "BMP_icon", "mime32", "application/x-vnd.Be-MAIL"
draw bitmap 10, 90, "BMP_icon", "alpha", "Main"
bitmap remove "BMP_icon"
draw text 70,150, "bitmap get 62, \"BMP_icon\", \"" + systempath$ + "\"", "Main"
bitmap get 62, "BMP_icon", systempath$
draw bitmap 10, 130, "BMP_icon", "alpha", "Main"
bitmap remove "BMP_icon"
while(not instr(message$, "Quit"))
wend
window close "Main"

View File

@@ -1,33 +0,0 @@
#!yab
dir$=attribute get$ "", ""
dir$=dir$+"/"
window open 200,200 to 520,391, "MainView", "ImageWorld"
button 50,163 to 270,183, "Ok_", "Ok", "MainView"
err = draw image 0,0, dir$+"img/image.png", "MainView"
if(err = 1) then
alert "Problem while loading image.png!", "Quit", "stop"
window close "MainView"
exit 1
endif
alert "This shows how to show Images in your windows.", "Ok", "idea"
inloop = true
while(inloop)
msg$ = message$
switch msg$
case "Ok_|":
case "MainView:_QuitRequested|":
inloop = false
break
end switch
wend
exit

View File

@@ -1,69 +0,0 @@
#!yab
// JDemo - just a smiley
// by DasJott
window open 300,100 to 800,500,"mainview","Smiley - DEMO"
window set "mainview", "flags","not-zoomable, not-h-resizable, not-v-resizable"
draw set "bgcolor", 0,0,0,"mainview"
draw set "highcolor",255,255,0,"mainview"
draw circle 250,200,180,"mainview"
// Eyes
draw set "highcolor",0,0,0,"mainview"
draw circle 170,110,20,"mainview"
view 310,90 to 350,130,"twinkleview","mainview"
draw set "bgcolor",255,255,0,"twinkleview"
draw set "highcolor",0,0,0,"twinkleview"
draw circle 20,20,20,"twinkleview"
// Smiling mouth
view 140,220 to 360,320,"mouthview","mainview"
draw set "bgcolor",255,255,0,"mouthview"
draw set "highcolor",0,0,0,"mouthview"
draw set 1, "HighSolidFill"
draw circle 110,-11, 110,"mouthview"
draw set 0, "HighSolidFill"
button 450,370 to 490,390,"Exit","Quit","mainview"
inloop = true
while (inloop = true)
msg$ = message$
if (t < 20) then
draw flush "twinkleview"
draw ellipse 20,20, 20, 20-t,"twinkleview"
fi
if (t > 20 and t < 41) then
draw flush "twinkleview"
draw ellipse 20,20, 20, t-20,"twinkleview"
fi
if (t = 100) t = 0
t = t+1
n = n+1
if(n = 200) then
draw flush "mouthview"
draw circle 110,-11, 110,"mouthview"
n = 0
sleep 1
fi
if(n = 0) then
draw flush "mouthview"
draw set 1, "HighSolidFill"
draw circle 110,-11, 110,"mouthview"
draw set 0, "HighSolidFill"
fi
if (msg$ = "Exit|") inloop = false
if (msg$ = "mainview:_QuitRequested|") inloop = false
wend
window close "mainview"

View File

@@ -1,115 +0,0 @@
#!yab
window open 200, 200 to 710, 600, "MainView" ,"YAB-Keyboard"
window set "MainView", "flags", "not-h-resizable, not-v-resizable"
view 10,10 to 500, 180, "TextView", "MainView"
draw set "bgcolor", 0, 50, 0, "TextView"
draw set "lowcolor", 0, 50, 0, "TextView"
draw set "highcolor", 245, 245, 245, "TextView"
draw set "Zurich, Bold, 20", "TextView"
button 10, 200 to 50, 240, "Button:Q", "Q", "MainView"
button 60, 200 to 100, 240, "Button:W", "W", "MainView"
button 110, 200 to 150, 240, "Button:E", "E", "MainView"
button 160, 200 to 200, 240, "Button:R", "R", "MainView"
button 210, 200 to 250, 240, "Button:T", "T", "MainView"
button 260, 200 to 300, 240, "Button:Z", "Z", "MainView"
button 310, 200 to 350, 240, "Button:U", "U", "MainView"
button 360, 200 to 400, 240, "Button:I", "I", "MainView"
button 410, 200 to 450, 240, "Button:O", "O", "MainView"
button 460, 200 to 500, 240, "Button:P", "P", "MainView"
button 20, 250 to 60, 290, "Button:A", "A", "MainView"
button 70, 250 to 110, 290, "Button:S", "S", "MainView"
button 120, 250 to 160, 290, "Button:D", "D", "MainView"
button 170, 250 to 210, 290, "Button:F", "F", "MainView"
button 220, 250 to 260, 290, "Button:G", "G", "MainView"
button 270, 250 to 310, 290, "Button:H", "H", "MainView"
button 320, 250 to 360, 290, "Button:J", "J", "MainView"
button 370, 250 to 410, 290, "Button:K", "K", "MainView"
button 420, 250 to 460, 290, "Button:L", "L", "MainView"
button 465, 250 to 500, 340, "Enter_", "Enter", "MainView"
button 30, 300 to 70, 340, "Button:Y", "Y", "MainView"
button 80, 300 to 120, 340, "Button:X", "X", "MainView"
button 130, 300 to 170, 340, "Button:C", "C", "MainView"
button 180, 300 to 220, 340, "Button:V", "V", "MainView"
button 230, 300 to 270, 340, "Button:B", "B", "MainView"
button 280, 300 to 320, 340, "Button:N", "N", "MainView"
button 330, 300 to 370, 340, "Button:M", "M", "MainView"
button 380, 300 to 415, 340, "Button:,", ",", "MainView"
button 425, 300 to 460, 340, "Button:.", ".", "MainView"
button 10, 350 to 60, 390, "About_", "About", "MainView"
button 70, 350 to 430, 390, "Spacebar_", "", "MainView"
button 440, 350 to 500, 390, "Clear_", "Clear all", "MainView"
a = 10 : b = 25
dim choice$(1)
inloop = true
while (inloop)
msg$ = message$
if (split(msg$, choice$(), ":|") >= 2) btn$ = choice$(2)
if (msg$ <> "") print msg$
switch msg$
case "MainView:_QuitRequested|"
inloop = false
break
case "Button:"+btn$+"|"
draw text a, b, btn$, "TextView"
if (btn$ = "J" ) then
a = a+10
elsif (btn$ = "I" or btn$ = "," or btn$ = ".") then
a = a+6
elsif (btn$ = "W") then
a = a+20
elsif (btn$ = "F" or btn$ = "T") then
a = a+12
elsif (btn$ = "M") then
a = a+18
elsif (btn$ = "N" or btn$ = "G" or btn$ = "Q" or btn$ = "O") then
a=a+15
else
a = a+14
fi
break
case "Enter_|"
a = 10 : b = b+25
break
case "Spacebar_|"
a = a+12
break
case "Clear_|"
draw flush "TextView"
a = 10 : b = 25
break
case "About_|"
ShowAbout()
break
end switch
sleep 0.01
wend
exit
sub ShowAbout()
for i = 0 to 215
msg$ = message$
draw flush "TextView"
draw text 200, 190-i, "This is:", "TextView"
draw text 160, 215-i, "YAB - Keyboard", "TextView"
if (msg$ = "About_|") break
sleep 0.01
next i
a = 10 : b = 25
draw flush "TextView"
return
end sub

View File

@@ -1,401 +0,0 @@
#!yab
// Main background colors:
r = 206 : g = 226 : b = 236
// Open main window:
window open 100, 250 to 600, 650, "MainView", "Loop-World"
window set "MainView", "flags","not-zoomable"
window set "MainView", "minimumto",500,400
window set "MainView", "maximumto",500,400
draw set "bgcolor", r, g, b, "MainView"
draw set "lowcolor", r-75, g-75, b-75, "MainView"
draw line 10, 365 to 490, 365, "MainView"
draw set "lowcolor", r+40, g+40, b+40, "MainView"
draw line 10, 366 to 490, 366, "MainView"
draw set "lowcolor", r, g, b, "MainView"
draw set "Swis721 BT, Bold, 14", "MainView"
draw text 10, 20, "Loop-World", "MainView"
draw text 200, 20, "Sourcecode:", "MainView"
// make views inside the main window:
view 0, 30 to 190, 360, "ExplainView", "MainView"
draw set "bgcolor", r, g, b, "ExplainView"
draw set "Swis721 BT, Roman, 10", "ExplainView"
view 200, 30 to 490, 360, "SourceView", "MainView"
draw set "bgcolor", r+39, g+39, b+39, "SourceView"
draw set "Swis721 BT, Roman, 10", "SourceView"
//draw text 10, 265, "Choose a kind of loop:", "MainView"
button 10, 370 to 60, 390, "For_Loop_", "for/next", "MainView"
button 65, 370 to 115, 390, "While_Loop_", "while", "MainView"
button 120, 370 to 170, 390, "Do_Loop_", "do/loop", "MainView"
button 175, 370 to 225, 390, "Sub_Loop_", "sub m(n)", "MainView"
button 230, 370 to 280, 390, "Other_Loop_", "Other", "MainView"
//button 285, 370 to 335, 390, "None_", "None", "MainView"
button 345, 370 to 395, 390, "None_", "Back", "MainView"
button 405, 370 to 490, 390, "Exec_", "Execute", "MainView"
dim SourceLine$(20)
ShowSource("none")
// mainloop of the program:
dim cmd$(1)
inloop = true
while (inloop)
msg$ = message$
if (split(msg$, cmd$(), ":|") > 2) item$ = cmd$(2)
if (msg$ <> "") print msg$
switch msg$
case "For_Loop_|"
if (CurrentSource$ = "For_Loop") break
ShowSource("For_Loop")
break
case "While_Loop_|"
if (CurrentSource$ = "While_Loop") break
ShowSource("While_Loop")
break
case "Do_Loop_|"
if (CurrentSource$ = "Do_Loop") break
ShowSource("Do_Loop")
break
case "Sub_Loop_|"
if (CurrentSource$ = "Sub_Loop") break
ShowSource("Sub_Loop")
break
case "Other_Loop_|"
if (CurrentSource$ = "Other_Loop") break
ShowSource("Other_Loop")
break
case "None_|"
if (CurrentSource$ = "none") break
ShowSource("none")
break
case "Exec_|"
if (DemoWin = true) break
if (CurrentSource$ = "none") break
ExecSource(CurrentSource$)
break
case "Quit_|"
case "MainView:_QuitRequested|"
inloop = false
break
end switch
sleep 0.01
wend
exit
sub ShowSource(CurrSource$)
CurrentSource$ = CurrSource$
draw flush "SourceView"
draw flush "ExplainView"
draw text 5, 10, "#!yab", "SourceView"
draw text 5, 35, "window open 100, 100 to 200, 200, ''MainView'', ''Loop''", "SourceView"
draw text 5, 50, "window set ''MainView'', ''minimumto'',100,100", "SourceView"
draw text 5, 65, "window set ''MainView'', ''maximumto'',100,100", "SourceView"
if (CurrSource$ = "none") then
draw text 5, 10, "Welcome to LoopWorld!", "ExplainView"
draw text 5, 35, "This program will show you the different", "ExplainView"
draw text 5, 50, "kinds of loops in yab.", "ExplainView"
draw text 5, 75, "On the left you see the sourcecode", "ExplainView"
draw text 5, 90, "that is used in the examples.", "ExplainView"
draw text 5, 105, "Please see GUI-World(2), if you want to", "ExplainView"
draw text 5, 120, "know more about that code, as I won't", "ExplainView"
draw text 5, 135, "explain that here in Loop-World.", "ExplainView"
draw text 5, 160, "Each loop will run about 10 seconds", "ExplainView"
draw text 5, 175, "and show its loop number and its", "ExplainView"
draw text 5, 190, "name in the window.", "ExplainView"
draw text 5, 205, "Therefore I will simply execute the", "ExplainView"
draw text 5, 220, "whole sourcecode shown right.", "ExplainView"
draw text 5, 245, "Select the loop you want to know more", "ExplainView"
draw text 5, 260, "about with the buttons down right.", "ExplainView"
draw text 5, 285, "Note: While each loop is running", "ExplainView"
draw text 5, 300, "this main window will be blocked !", "ExplainView"
z = 1
SourceLine$(1) = "// the loop will appear here."
fi
if (CurrSource$ = "For_Loop") then
draw text 5, 10, "The 'for next' loop.", "ExplainView"
draw text 5, 35, "The 'for next' loop works in a defined", "ExplainView"
draw text 5, 50, "range that must be set.", "ExplainView"
draw text 5, 75, "This loop is counting the range from", "ExplainView"
draw text 5, 90, "the first to the last number.", "ExplainView"
draw text 5, 105, "For each count it puts the number into", "ExplainView"
draw text 5, 120, "the given variable and executes the lines", "ExplainView"
draw text 5, 135, "down to 'next'.", "ExplainView"
draw text 5, 160, "", "ExplainView"
draw text 5, 175, "", "ExplainView"
draw text 5, 190, "", "ExplainView"
draw text 5, 205, "", "ExplainView"
draw text 5, 220, "", "ExplainView"
draw text 5, 245, "", "ExplainView"
draw text 5, 260, "", "ExplainView"
draw text 5, 285, "", "ExplainView"
draw text 5, 300, "", "ExplainView"
z = 7
SourceLine$(0) = ""
SourceLine$(1) = "for n = 1 to 10"
SourceLine$(2) = " draw flush ''MainView''"
SourceLine$(3) = " draw text 50, 50, str$(n), ''MainView''"
SourceLine$(4) = " draw text 10, 90, ''For_Loop'', ''MainView''"
SourceLine$(5) = " sleep 1"
SourceLine$(6) = "next n"
SourceLine$(7) = "exit"
fi
if (CurrSource$ = "While_Loop") then
draw text 5, 10, "The 'while wend' loop.", "ExplainView"
draw text 5, 35, "", "ExplainView"
draw text 5, 50, "", "ExplainView"
draw text 5, 75, "", "ExplainView"
draw text 5, 90, "", "ExplainView"
draw text 5, 105, "", "ExplainView"
draw text 5, 120, "", "ExplainView"
draw text 5, 135, "", "ExplainView"
draw text 5, 160, "", "ExplainView"
draw text 5, 175, "", "ExplainView"
draw text 5, 190, "", "ExplainView"
draw text 5, 205, "", "ExplainView"
draw text 5, 220, "", "ExplainView"
draw text 5, 245, "", "ExplainView"
draw text 5, 260, "", "ExplainView"
draw text 5, 285, "", "ExplainView"
draw text 5, 300, "", "ExplainView"
z = 9
SourceLine$(0) = ""
SourceLine$(1) = "n = 1"
SourceLine$(2) = "while (n < 11)"
SourceLine$(3) = " draw flush ''MainView''"
SourceLine$(4) = " draw text 50, 50, str$(n), ''MainView''"
SourceLine$(5) = " draw text 10, 90, ''While_Loop'', ''MainView''"
SourceLine$(6) = " n = n+1"
SourceLine$(7) = " sleep 1"
SourceLine$(8) = "wend"
SourceLine$(9) = "exit"
fi
if (CurrSource$ = "Do_Loop") then
draw text 5, 10, "The 'do loop' loop", "ExplainView"
draw text 5, 35, "", "ExplainView"
draw text 5, 50, "", "ExplainView"
draw text 5, 75, "", "ExplainView"
draw text 5, 90, "", "ExplainView"
draw text 5, 105, "", "ExplainView"
draw text 5, 120, "", "ExplainView"
draw text 5, 135, "", "ExplainView"
draw text 5, 160, "", "ExplainView"
draw text 5, 175, "", "ExplainView"
draw text 5, 190, "", "ExplainView"
draw text 5, 205, "", "ExplainView"
draw text 5, 220, "", "ExplainView"
draw text 5, 245, "", "ExplainView"
draw text 5, 260, "", "ExplainView"
draw text 5, 285, "", "ExplainView"
draw text 5, 300, "", "ExplainView"
z = 8
SourceLine$(0) = ""
SourceLine$(1) = "do"
SourceLine$(2) = " n = n+1"
SourceLine$(3) = " draw flush ''MainView''"
SourceLine$(4) = " draw text 50, 50, str$(n), ''MainView''"
SourceLine$(5) = " draw text 10, 90, ''Do_Loop'', ''MainView''"
SourceLine$(6) = " sleep 1"
SourceLine$(7) = "loop"
SourceLine$(8) = "exit"
fi
if (CurrSource$ = "Sub_Loop") then
draw text 5, 10, "The 'sub' loop.", "ExplainView"
draw text 5, 35, "", "ExplainView"
draw text 5, 50, "", "ExplainView"
draw text 5, 75, "", "ExplainView"
draw text 5, 90, "", "ExplainView"
draw text 5, 105, "", "ExplainView"
draw text 5, 120, "", "ExplainView"
draw text 5, 135, "", "ExplainView"
draw text 5, 160, "", "ExplainView"
draw text 5, 175, "", "ExplainView"
draw text 5, 190, "", "ExplainView"
draw text 5, 205, "", "ExplainView"
draw text 5, 220, "", "ExplainView"
draw text 5, 245, "", "ExplainView"
draw text 5, 260, "", "ExplainView"
draw text 5, 285, "", "ExplainView"
draw text 5, 300, "", "ExplainView"
z = 13
SourceLine$(0) = ""
SourceLine$(1) = "Counter(n)"
SourceLine$(2) = ""
SourceLine$(3) = "sub Counter(n)"
SourceLine$(4) = " if (n < 11) then"
SourceLine$(5) = " draw flush ''MainView''"
SourceLine$(6) = " draw text 50, 50, str$(n), ''MainView''"
SourceLine$(7) = " draw text 10, 90, ''Sub_Loop'', ''MainView''"
SourceLine$(8) = " sleep 1"
SourceLine$(9) = " Counter(n+1)"
SourceLine$(10) = " fi"
SourceLine$(11) = " return"
SourceLine$(12) = "end sub"
SourceLine$(13) = "exit"
fi
if (CurrSource$ = "Other_Loop") then
draw text 5, 10, "Other loops!", "ExplainView"
draw text 5, 35, "There are no other loops known", "ExplainView"
draw text 5, 50, "or known to be described.", "ExplainView"
draw text 5, 75, "If there is one it could be entered", "ExplainView"
draw text 5, 90, "very easily.", "ExplainView"
draw text 5, 105, "Just see the source, yabman! ;-)", "ExplainView"
z = 2
SourceLine$(0) = ""
SourceLine$(1) = "// there is no other loop, my friend."
SourceLine$(2) = "exit"
fi
for s = 0 to z
draw text 5, 80+s*15, SourceLine$(s), "SourceView"
next s
return
end sub
sub ExecSource(ExecLoop$)
DemoWin = true
window open 100, 100 to 200, 200, "DemoView", "Loop"
window set "DemoView", "minimumto", 100, 100
window set "DemoView", "maximumto", 100, 100
if (ExecLoop$ = "For_Loop") then
for n = 1 to 10
draw flush "DemoView"
draw text 50, 50, str$(n), "DemoView"
draw text 10, 90, ExecLoop$, "DemoView"
sleep 1
next n
window close "DemoView"
fi
if (ExecLoop$ = "While_Loop") then
n = 1
while (n < 11)
draw flush "DemoView"
draw text 50, 50, str$(n), "DemoView"
draw text 10, 90, ExecLoop$, "DemoView"
sleep 1
n = n+1
wend
window close "DemoView"
fi
if (ExecLoop$ = "Do_Loop") then
n = 0
do
msg$ = message$
if (msg$ = "QuitDemo_|") break
n = n+1
draw flush "DemoView"
draw text 50, 50, str$(n), "DemoView"
draw text 10, 90, ExecLoop$, "DemoView"
if (n = 11) then
draw text 5, 100, "You see that this loop won't be ended", "ExplainView"
draw text 5, 115, "by itself.", "ExplainView"
fi
if (n = 13) draw text 5, 130, "For this, we need a Quit-button!", "ExplainView"
if (n = 15) then
draw flush "SourceView"
draw text 5, 10, "#!yab", "SourceView"
draw text 5, 35, "window open 100, 100 to 200, 200, ''MainView'', ''Loop''", "SourceView"
draw text 5, 50, "window set ''MainView'', ''minimumto'',100,100", "SourceView"
draw text 5, 65, "window set ''MainView'', ''maximumto'',100,100''", "SourceView"
SourceLine$(0) = "button 30, 70 to 90, 90, ''Quit_'', ''Quit'', ''MainView''"
SourceLine$(1) = ""
SourceLine$(2) = "do"
SourceLine$(3) = " msg$ = message$"
SourceLine$(4) = " if (msg$ = ''Quit_'') break"
SourceLine$(5) = " n = n+1"
SourceLine$(6) = " draw flush ''MainView''"
SourceLine$(7) = " draw text 50, 50, str$(n), ''MainView''"
SourceLine$(8) = " draw text 10, 90, ''Do_Loop'', ''MainView''"
SourceLine$(9) = " sleep 1"
SourceLine$(10) = "loop"
SourceLine$(11) = "exit"
for s = 0 to 11
draw text 5, 80+s*15, SourceLine$(s), "SourceView"
next s
button 10, 10 to 90, 30, "QuitDemo_", "Quit", "DemoView"
draw text 5, 145, "Press the Quit button to exit that loop.", "ExplainView"
fi
sleep 1
loop
window close "DemoView"
fi
if (ExecLoop$ = "Sub_Loop") then
Counter(1)
window close "DemoView"
fi
if (ExecLoop$ = "Other_Loop") then
sleep 0.1
window close "DemoView"
fi
msg$ = ""
DemoWin = false
return
end sub
sub Counter(n)
if (n < 11) then
draw flush "DemoView"
draw text 50, 50, str$(n), "DemoView"
draw text 10, 90, "Sub_Loop", "DemoView"
sleep 1
Counter(n+1)
fi
return
end sub

View File

@@ -1,283 +0,0 @@
#!yab
// MessageWorld - shows the messages the widgets return
// by DasJott
// Main background colors
r = 206 : g = 226 : b = 246
// open main window
window open 100, 200 to 600, 450, "MainView", "MessageWorld - Select a widget to be explained"
window set "MainView", "maximumto", 500, 250
window set "MainView", "minimumto", 500, 250
draw set "bgcolor", r, g, b, "MainView"
// open view inside the main window
view 0, 0 to 500, 180, "ContentView", "MainView" // for the contents; widgets and text.
draw set "bgcolor", r+20, g+20, b+20, "ContentView"
draw text 210, 60, "MessageWorld", "ContentView"
draw text 150, 75, "Shows the messages the widgets return.", "ContentView"
draw text 149, 100, "Please select the widget to be explained.", "ContentView"
draw text 125, 125, "Please use each widget to get the message shown.", "ContentView"
draw text 135, 140, "The sourcecode is also shown for each widget.", "ContentView"
view 0, 181 to 500, 199, "MessageView", "MainView" // for the message display
draw set "bgcolor", r+20, g+20, b+20, "MessageView"
draw set "lowcolor", r+10, g+10, b+10, "MessageView"
draw set "highcolor", 255, 0, 0, "MessageView"
draw set "Swis721 BT, Roman, 12", "MessageView"
view 0, 200 to 500, 250, "SwitchView", "MainView" // for the buttons
draw set "bgcolor", r, g, b, "SwitchView"
//color the buttons
for cc = 0 to 25
draw set "highcolor", r+30-(2*cc), g+30-(2*cc), b+30-(2*cc), "SwitchView"
draw line 0, cc to 500, cc, "SwitchView"
next cc
for cc = 0 to 25
draw set "highcolor", r+30-(2*cc), g+30-(2*cc), b+30-(2*cc), "SwitchView"
draw line 0, 25+cc to 500, 25+cc, "SwitchView"
next cc
// draw lines between the buttons
draw set "highcolor", r-70, g-70, b-70, "SwitchView"
draw line 0, 0 to 500, 0, "SwitchView"
draw line 0, 25 to 500, 25, "SwitchView"
draw line 99, 0 to 99, 50, "SwitchView"
draw line 199, 0 to 199, 50, "SwitchView"
draw line 299, 0 to 299, 50, "SwitchView"
draw line 399, 0 to 399, 50, "SwitchView"
draw set "highcolor", r+35, g+35, b+35, "SwitchView"
draw line 0, 1 to 500, 1, "SwitchView"
draw line 0, 26 to 500, 26, "SwitchView"
draw line 100, 1 to 100, 50, "SwitchView"
draw line 200, 1 to 200, 50, "SwitchView"
draw line 300, 1 to 300, 50, "SwitchView"
draw line 400, 1 to 400, 50, "SwitchView"
draw set "highcolor", 0, 0, 0, "SwitchView"
draw text 10, 15, "Button", "SwitchView"
draw text 110, 15, "Menu", "SwitchView"
draw text 210, 15, "Listbox", "SwitchView"
draw text 310, 15, "Textcontrol", "SwitchView"
draw text 410, 15, "Checkbox", "SwitchView"
draw text 10, 40, "Radiobutton", "SwitchView"
draw text 110, 40, "Dropbox", "SwitchView"
draw text 210, 40, "Dropzone", "SwitchView"
draw text 310, 40, "Slider", "SwitchView"
draw text 410, 40, "Colorcontrol", "SwitchView"
// main program loop
Xmouse = 1000
dim cmd$(1)
dim mouse$(10)
// NEU!
if(ismousein("SwitchView")) then
outsideButton = false
else
outsideButton = true
fi
inloop = true
while (inloop)
msg$ = message$
if (split(msg$, cmd$(), ":|") > 2) item$ = cmd$(2)
mmsg$ = mouse message$("SwitchView")
n = split(mmsg$, mouse$(), ":")
if (msg$ <> "") then
draw flush "MessageView"
draw Text 10, 10, "Message: "+msg$, "MessageView"
fi
if (ismousein("SwitchView")) then
// NEU!
if(outsideButton) then
while(ismousein("SwitchView") and mouse$(3) = "1")
mmsg$ = mousemessage$("SwitchView")
n = split(mmsg$, mouse$(), ":")
sleep 0.1
wend
fi
if(ismousein("SwitchView")) then
outsideButton = false
Xmouse = val(mouse$(1))
Ymouse = val(mouse$(2))
BLmouse = val(mouse$(3))
else
outsideButton = true
fi
else
outsideButton = true
fi
if (BLmouse = 0) Fbl = 0
if (Ymouse < 25 and BLmouse = 1 and Ymouse > 0 and Fbl = 0) then
if (Xmouse < 100) then
VButton(0)
fi
if (Xmouse > 100 and Xmouse < 200) then
VButton(1)
fi
if (Xmouse > 200 and Xmouse < 300) then
VButton(2)
fi
if (Xmouse > 300 and Xmouse < 400) then
VButton(3)
fi
if (Xmouse > 400 and Xmouse < 500) then
VButton(4)
fi
Fbl = 1
fi
if (Ymouse > 25 and BLmouse = 1 and Fbl = 0) then
if (Xmouse < 100) then
VButton(5)
fi
if (Xmouse > 100 and Xmouse < 200) then
VButton(6)
fi
if (Xmouse > 200 and Xmouse < 300) then
VButton(7)
fi
if (Xmouse > 300 and Xmouse < 400) then
VButton(8)
fi
if (Xmouse > 400 and Xmouse < 500) then
VButton(9)
fi
Fbl = 1
fi
switch msg$
case "MainView:_QuitRequested|"
inloop = false
break
end switch
sleep 0.01
wend
exit
sub VButton(n)
draw flush "MessageView"
if(ck) then
view remove "CBView"
ck = false
endif
view remove "ContentView"
view 0, 0 to 500, 200, "ContentView", "MainView"
draw set "bgcolor", r+20, g+20, b+20, "ContentView"
draw set "lowcolor", r, g, b, "ContentView"
draw set "Swis721 BT, Bold, 16", "ContentView"
if (n = 0) then // Button
draw text 10, 25, "BUTTON x1,y1 TO x2,y2, ID$, Label$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
button 100, 50 to 400, 70, "Button_", "Testbutton", "ContentView"
draw text 60, 130, "button 100, 50 to 400, 70, \"Button_\", \"Testbutton\", \"MainView\"", "ContentView"
fi
if (n = 1) then // Menu
draw text 10, 25, "MENU Head$, Menu$, Shortcut$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
view 40, 50 to 460, 100, "MenuView", "ContentView"
draw text 60, 130, "view 40, 50 to 460, 100, \"MenuView\", \"MainView\"", "ContentView"
menu "File", "Open file", "", "MenuView"
menu "File", "Quit", "", "MenuView"
draw text 60, 145, "menu \"File\", \"Open file\", \"\", \"MenuView\"", "ContentView"
draw text 60, 160, "menu \"File\", \"Quit\", \"\", \"MenuView\"", "ContentView"
fi
if (n = 2) then // Listbox
draw text 10, 25, "LISTBOX x1,y1 TO x2,y2, ID$, ScrollbarType, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
listbox 40, 50 to 460, 100, "ListBox_", 1, "ContentView"
draw text 60, 130, "listbox 40, 50 to 460, 100, \"ListBox_\", 1, \"MainView\"", "ContentView"
listbox add "ListBox_", "First entry"
listbox add "ListBox_", "Second entry"
draw text 60, 145, "listbox add \"ListBox_\", \"First entry\"", "ContentView"
draw text 60, 160, "listbox add \"ListBox_\", \"Second entry\"", "ContentView"
fi
if (n = 3) then // Textcontrol
draw text 10, 25, "TEXTCONTROL x1,y1 TO x2,y2, ID$, Label$, Text$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
textcontrol 100, 50 to 400, 70, "Textcontrol-ID", "Label", "Text", "ContentView"
draw text 60, 130, "textcontrol 100, 50 to 400, 70, \"Textcontrol-ID\", \"Label\", \"Text\", \"MainView\"", "ContentView"
fi
if (n = 4) then // Checkbox
draw text 10, 25, "CHECKBOX x1,y1, ID$, Label$, IsActivated, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
view 100, 50 to 400, 100, "CBView", "ContentView"
draw text 60, 130, "view 100, 50 to 400, 100, \"CBView\", \"MainView\"", "ContentView"
checkbox 10, 8, "Checkbox1-ID", "Label1", 0, "CBView"
checkbox 10, 28, "Checkbox2-ID", "Label2", 1, "CBView"
draw text 60, 145, "checkbox 10, 8, \"Checkbox1-ID\", \"Label1\", 0, \"CBView\"", "ContentView"
draw text 60, 160, "checkbox 10, 28, \"Checkbox2-ID\", \"Label2\", 1, \"CBView\"", "ContentView"
ck = true
fi
if (n = 5) then // Radiobutton
draw text 10, 25, "RADIOBUTTON x1,y1, ID$, Label$, IsActivated, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
view 100, 50 to 400, 100, "RBView", "ContentView"
draw text 60, 130, "view 100, 50 to 400, 100, \"RBView\", \"MainView\"", "ContentView"
radiobutton 10, 8, "Radiobutton1-ID", "Label1", 0, "RBView"
radiobutton 10, 28, "Radiobutton2-ID", "Label2", 1, "RBView"
draw text 60, 145, "radiobutton 10, 8, \"Radiobutton1-ID\", \"Label1\", 0, \"RBView\"", "ContentView"
draw text 60, 160, "radiobutton 10, 28, \"Radiobutton2-ID\", \"Label2\", 1, \"RBView\"", "ContentView"
fi
if (n = 6) then // Dropbox
draw text 10, 25, "DROPBOX x1,y1 TO x2,y2, ID$, Label$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
dropbox 40, 50 to 460, 100, "DropBox_", "Label", "ContentView"
draw text 60, 130, "dropbox 40, 50 to 460, 100, \"DropBox_\", \"Label\", \"MainView\"", "ContentView"
dropbox add "DropBox_", "First entry"
dropbox add "DropBox_", "Second entry"
draw text 60, 145, "dropbox add \"DropBox_\", \"First entry\"", "ContentView"
draw text 60, 160, "dropbox add \"DropBox_\", \"Second entry\"", "ContentView"
fi
if (n = 7) then // Dropzone
draw text 10, 25, "VIEW DROPZONE View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
view 100, 50 to 400, 100, "DropView", "ContentView"
draw text 60, 130, "view 100, 50 to 400, 100, \"DropView\", \"MainView\"", "ContentView"
view dropzone "DropView"
draw text 60, 145, "view dropzone \"DropView\"", "ContentView"
fi
if (n = 8) then // Slider
draw text 10, 25, "SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, Option$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
slider 100, 50 to 400, 70, "Slider-ID", "Label", 0, 255, "horizontal", "ContentView"
draw text 60, 130, "slider 100, 50 to 400, 70, \"slider-ID\", \"Label\", 0, 255, \"horizontal\", \"MainView\"", "ContentView"
fi
if (n = 9) then // Colorcontrol
draw text 10, 25, "COLORCONTROL x,y, ID$, View$", "ContentView"
draw set "Swis721 BT, Roman, 12", "ContentView"
colorcontrol 100, 50, "ColCon-ID", "ContentView"
draw text 60, 130, "colorcontrol 100, 50, \"ColCon-ID\", \"MainView\"", "ContentView"
fi
draw text 10, 130, "Source:", "ContentView"
BLmouse = 0
return
end sub

View File

@@ -1,83 +0,0 @@
#!yab
// MouseWorld - shows mousemessages
// by DasJott
window open 100, 100 to 500, 400, "MainView", "Mouse-World"
window set "MainView", "flags","not-zoomable, not-h-resizable, not-v-resizable"
draw set "Zurich, Bold, 20", "MainView"
view 0, 20 to 100, 110, "MouseView", "MainView"
draw set "bgcolor", 255, 255, 255, "MouseView"
draw set "lowcolor", 255, 255, 255, "MouseView"
draw set "highcolor", 0, 0, 0, "MouseView"
draw text 60, 150, "Press the Quit button to Quit!", "MainView"
draw text 330, 290, "Haha!", "MainView"
dim cmd$(1)
dim mouse$(1)
inloop = true
while (inloop)
msg$ = message$
mmsg$ = mouse message$("MainView")
if (not mmsg$ = Fmmsg$) then
Fmmsg$ = mmsg$
n = split(mmsg$, mouse$(), ":")
Xmouse = val(mouse$(1))
Ymouse = val(mouse$(2))
BLmouse = val(mouse$(3))
BCmouse = val(mouse$(4))
BRmouse = val(mouse$(5))
ShowMouseMessage()
fi
if (Xmouse > 324 and Ymouse > 264) then
HideQbutton()
else
if (Qbutton = false) ShowQbutton()
fi
switch msg$
case "MainView:_QuitRequested|"
inloop = false
break
end switch
sleep 0.01
wend
window close "MainView"
sub ShowMouseMessage()
draw flush "MouseView"
draw text 10, 10, "Mouse X:", "MouseView"
draw text 10, 25, "Mouse Y:", "MouseView"
draw text 10, 40, "Mouse buttons:", "MouseView"
draw text 20, 55, "Button 1:", "MouseView"
draw text 20, 70, "Button 2:", "MouseView"
draw text 20, 85, "Button 3:", "MouseView"
draw text 60, 10, str$(Xmouse), "MouseView"
draw text 60, 25, str$(Ymouse), "MouseView"
draw text 70, 55, str$(BLmouse), "MouseView"
draw text 70, 70, str$(BRmouse), "MouseView"
draw text 70, 85, str$(BCmouse), "MouseView"
return
end sub
sub HideQbutton()
if(Qbutton) then
view remove "ButtonView"
endif
Qbutton = false
return
end sub
sub ShowQbutton()
view 325, 265 to 395, 295, "ButtonView", "MainView"
button 5, 5 to 65, 25, "Quit_", "Quit", "ButtonView"
Qbutton = true
return
end sub

View File

@@ -1,33 +0,0 @@
#!yab
doc Start Ping.yab first by double clicking it,
doc then start Pong.yab.
doc This demonstrates how yab sends messages to another yab application.
doc Note: don't start Ping.yab in the IDE as the IDE only allows one
doc running yab program at a time.
window open 100,100 to 300,300, "Ping", "Ping"
x = 20
y = 50
stepx = 5
stepy = 5
while(not instr(message$, "Quit"))
x = x + stepx
y = y + stepy
if(x <= 0 or x >= 400) stepx = -stepx
if(y <= 0 or y >= 200) stepy = -stepy
if(x >= 190) then
ret = message send "application/x-vnd.Pong.yab", str$(x) + ":" + str$(y)
if(ret <> 0) then
stepx = -stepx
if(x > 190) x = 190
endif
endif
draw flush "Ping"
draw circle x,y, 8, "Ping"
wend
window close "Ping"

View File

@@ -1,22 +0,0 @@
#!yab
# mimetype "application/x-vnd.Pong.yab"
doc See Ping.yab for more information.
window open 400,100 to 600,300, "Pong", "Pong"
dim msg$(1)
while(not finished)
n = token(message$, msg$(), ":|")
for i = 1 to n
if(instr(msg$(i), "Quit")) finished = true
if(instr(msg$(i), "_Scripting") and n>=i+2) then
x = val(msg$(i+1)) - 200
y = val(msg$(i+2))
draw flush "Pong"
draw circle x,y, 8, "Pong"
endif
next i
wend
window close "Pong"

View File

@@ -1,36 +0,0 @@
#!yab
DOCU SlideDemo, Object scale per Slidebar
DOCU by Stargater
WINDOW OPEN 100,100 to 500,600, "MainView" ,"SlideDemo"
WINDOW SET "MainView", "MaximumTo", 400,500
VIEW 0,0 to 500,400, "CircleView", "MainView"
DRAW SET "bgcolor",000,000,000,"CircleView"
DRAW SET "lowcolor",140,140,240,"CircleView"
SLIDER 20,430 to 380,430, "Slider", "Scale the Circle", 0, 190, "MainView"
SLIDER LABEL "Slider", "0", "190"
SLIDER COLOR "Slider", "barcolor", 140,140,240
SLIDER SET "Slider", 20
DRAW SET 0, "LowSolidFill"
DRAW CIRCLE 200,200, 20, "CircleView"
oldr=20
while(not instr(message$, "_QuitRequested"))
r = SLIDER GET "Slider"
if(oldr<>r) then
oldr = r
draw flush "CircleView"
DRAW CIRCLE 200,200, r, "CircleView"
endif
wend
window close "MainView"

View File

@@ -1,34 +0,0 @@
#!yab
window open 100,100 to 560,320, "WView", "SliderWorld"
layout "left,top","WView"
slider 20,10 to 350,40, "Slider1", "1. Slider with block thumb from 0.1 to 1", 1, 10, "WView"
slider 20,50 to 350,80, "Slider2", "2. Slider with triangle thumb from 1 to 100 ", 1.5, 100, "triangle", "WView"
slider label "Slider2", "Foo", "Bar"
slider set "Slider2", 20
slider 20,110 to 350,140, "Slider3", "3. Slider from 50 to 75,", 50, 75, "WView"
slider label "Slider3", "Foo", "Bar"
slider set "Slider3", "bottom", 25
//option set "Slider3", "enabled", false
slider 20,170 to 350,200, "Slider4", "4. Slider from -20 to 20, with colors", -20, 20, "WView"
slider color "Slider4", "barcolor", 240,140,140
slider color "Slider4", "fillcolor", 140,140,240
slider 360,20 to 440,200, "Slider5", "5. Slider vertical", 1, 100, "vertical", "WView"
slider set "Slider5", "left", 15
slider color "Slider5", "barcolor", 240,140,140
slider set "Slider5", 70
inloop = true
while(inloop)
msg$ = message$
if(msg$<>"") print msg$
if(instr(msg$,"Quit")) inloop = false
wend
window close "WView"

View File

@@ -1,311 +0,0 @@
#!yab
dir$=attribute get$ "",""
dir$=dir$+"/"
doc Simple game example
doc based on the popular Sokoban
doc graphics taken from Rocks'n'Diamonds
// Initialize the window, load the sprites and put up the canvas
window open 100,100 to 484,484, "Win", "Simple Sokoban Example"
window set "Win", "flags", "not-zoomable, not-h-resizable, not-v-resizable"
bitmap 32,32, "wall"
err = draw image 0,0 to 31,31, dir$+"img/wall.png", "wall"
bitmap 32,32, "front1"
err = err + draw image 0,0 to 31,31, dir$+"img/front.png", "front1"
bitmap 32,32, "bulb"
err = err + draw image 0,0 to 31,31, dir$+"img/bulb.png", "bulb"
bitmap 32,32, "target"
err = err + draw image 0,0 to 31,31, dir$+"img/target.png", "target"
bitmap 32,32, "final"
err = err + draw image 0,0 to 31,31, dir$+"img/final.png", "final"
bitmap 32,32, "background"
draw set "highcolor", 0,0,0, "background"
draw rect 0,0 to 31,31, "background"
if(err>0) then
alert "Could not load images", "Ok", "stop"
window close "Win"
exit(1)
endif
option set "Win", "focus", true
canvas 0,0 to 384,384, "Canvas", "Win"
draw set "highcolor", 0,0,0, "Canvas"
draw rect 0,0 to 384,384, "Canvas"
// Read in the demo level and show it
dim levelline$(12)
for i=1 to 12
read levelline$(i)
for j = 1 to 12
switch(mid$(levelline$(i), j, 1))
case " "
draw bitmap x,y, "background", "copy", "Canvas"
break
case "w"
draw bitmap x,y, "wall", "copy", "Canvas"
break
case "b"
draw bitmap x,y, "bulb", "copy", "Canvas"
break
case "t"
draw bitmap x,y, "target", "copy", "Canvas"
break
case "s"
draw bitmap x,y, "front1", "alpha", "Canvas"
mapx = j
mapy = i
mid$(levelline$(i), j, 1) = " "
break
end switch
x = x + 32
next j
x = 0
y = y + 32
next i
playerx = (mapx-1)*32
playery = (mapy-1)*32
// soundplay "rhythmloop.wav", true
// handle the movements
while(not quitting)
key$ = keyboard message$("Win")
switch(key$)
case "down"
if(instr(" t", mid$(levelline$(mapy+1), mapx, 1))) then
// soundplay "base.wav", false
WalkDown()
elseif(instr("bf", mid$(levelline$(mapy+1), mapx, 1)) and instr(" t", mid$(levelline$(mapy+2), mapx,1))) then
PushDown()
endif
sleep 0.10
break
case "up"
if(instr(" t", mid$(levelline$(mapy-1), mapx, 1))) then
// soundplay "base.wav", false
WalkUp()
elseif(instr("bf", mid$(levelline$(mapy-1), mapx, 1)) and instr(" t", mid$(levelline$(mapy-2), mapx,1))) then
PushUp()
endif
sleep 0.10
break
case "left"
if(instr(" t", mid$(levelline$(mapy), mapx-1, 1))) then
// soundplay "base.wav", false
WalkLeft()
elseif(instr("bf", mid$(levelline$(mapy), mapx-1, 1)) and instr(" t", mid$(levelline$(mapy), mapx-2,1))) then
PushLeft()
endif
sleep 0.10
break
case "right"
if(instr(" t", mid$(levelline$(mapy), mapx+1, 1))) then
// soundplay "base.wav", false
WalkRight()
elseif(instr("bf", mid$(levelline$(mapy), mapx+1, 1)) and instr(" t", mid$(levelline$(mapy), mapx+2,1))) then
PushRight()
endif
sleep 0.10
break
case "esc"
quitting = true
break
end switch
m$ = message$
if(m$ = "Win:_QuitRequested|" or m$ = "_QuitRequested") quitting = true
wend
window close "Win"
sub WalkDown()
mapy = mapy + 1
playery = playery + 32
draw bitmap playerx, playery, "front1","alpha", "Canvas"
if(mid$(levelline$(mapy-1), mapx,1) = " ") then
draw bitmap playerx, playery-32, "background","copy", "Canvas"
elseif(mid$(levelline$(mapy-1), mapx,1) = "t") then
draw bitmap playerx, playery-32, "target","copy", "Canvas"
elseif(mid$(levelline$(mapy-1), mapx,1) = "f") then
draw bitmap playerx, playery-32, "final","copy", "Canvas"
endif
return
end sub
sub WalkUp()
mapy = mapy - 1
playery = playery - 32
draw bitmap playerx, playery, "front1","alpha", "Canvas"
if(mid$(levelline$(mapy+1), mapx,1) = " ") then
draw bitmap playerx, playery+32, "background","copy", "Canvas"
elseif(mid$(levelline$(mapy+1), mapx,1) = "t") then
draw bitmap playerx, playery+32, "target","copy", "Canvas"
elseif(mid$(levelline$(mapy+1), mapx,1) = "f") then
draw bitmap playerx, playery+32, "final","copy", "Canvas"
endif
return
end sub
sub WalkLeft()
mapx = mapx - 1
playerx = playerx - 32
draw bitmap playerx, playery, "front1","alpha", "Canvas"
if(mid$(levelline$(mapy), mapx+1,1) = " ") then
draw bitmap playerx+32, playery, "background","copy", "Canvas"
elseif(mid$(levelline$(mapy), mapx+1,1) = "t") then
draw bitmap playerx+32, playery, "target","copy", "Canvas"
elseif(mid$(levelline$(mapy), mapx+1,1) = "f") then
draw bitmap playerx+32, playery, "final","copy", "Canvas"
endif
return
end sub
sub WalkRight()
mapx = mapx + 1
playerx = playerx + 32
draw bitmap playerx, playery, "front1","alpha", "Canvas"
if(mid$(levelline$(mapy), mapx-1,1) = " ") then
draw bitmap playerx-32, playery, "background","copy", "Canvas"
elseif(mid$(levelline$(mapy), mapx-1,1) = "t") then
draw bitmap playerx-32, playery, "target","copy", "Canvas"
elseif(mid$(levelline$(mapy), mapx-1,1) = "f") then
draw bitmap playerx-32, playery, "final","copy", "Canvas"
endif
return
end sub
sub PushDown()
local t$
t$ = mid$(levelline$(mapy+1), mapx, 1)
if(t$ = "b") then
mid$(levelline$(mapy+1), mapx, 1) = " "
draw bitmap playerx,playery+32, "background", "copy", "Canvas"
else
mid$(levelline$(mapy+1), mapx, 1) = "t"
draw bitmap playerx,playery+32, "target", "copy", "Canvas"
endif
t$ = mid$(levelline$(mapy+2), mapx, 1)
if(t$ = " ") then
mid$(levelline$(mapy+2), mapx, 1) = "b"
draw bitmap playerx,playery+64, "bulb", "copy", "Canvas"
// soundplay "roehr.wav", false
else
mid$(levelline$(mapy+2), mapx, 1) = "f"
draw bitmap playerx,playery+64, "final", "copy", "Canvas"
// soundplay "pong.wav", false
endif
WalkDown()
CheckFinished()
return
end sub
sub PushUp()
local t$
t$ = mid$(levelline$(mapy-1), mapx, 1)
if(t$ = "b") then
mid$(levelline$(mapy-1), mapx, 1) = " "
draw bitmap playerx,playery-32, "background", "copy", "Canvas"
else
mid$(levelline$(mapy-1), mapx, 1) = "t"
draw bitmap playerx,playery-32, "target", "copy", "Canvas"
endif
t$ = mid$(levelline$(mapy-2), mapx, 1)
if(t$ = " ") then
mid$(levelline$(mapy-2), mapx, 1) = "b"
draw bitmap playerx,playery-64, "bulb", "copy", "Canvas"
// soundplay "roehr.wav", false
else
mid$(levelline$(mapy-2), mapx, 1) = "f"
draw bitmap playerx,playery-64, "final", "copy", "Canvas"
// soundplay "pong.wav", false
endif
WalkUp()
CheckFinished()
return
end sub
sub PushLeft()
local t$
t$ = mid$(levelline$(mapy), mapx-1, 1)
if(t$ = "b") then
mid$(levelline$(mapy), mapx-1, 1) = " "
draw bitmap playerx-32,playery, "background", "copy", "Canvas"
else
mid$(levelline$(mapy), mapx-1, 1) = "t"
draw bitmap playerx-32,playery, "target", "copy", "Canvas"
endif
t$ = mid$(levelline$(mapy), mapx-2, 1)
if(t$ = " ") then
mid$(levelline$(mapy), mapx-2, 1) = "b"
draw bitmap playerx-64,playery, "bulb", "copy", "Canvas"
// soundplay "roehr.wav", false
else
mid$(levelline$(mapy), mapx-2, 1) = "f"
draw bitmap playerx-64,playery, "final", "copy", "Canvas"
// soundplay "pong.wav", false
endif
WalkLeft()
CheckFinished()
return
end sub
sub PushRight()
local t$
t$ = mid$(levelline$(mapy), mapx+1, 1)
if(t$ = "b") then
mid$(levelline$(mapy), mapx+1, 1) = " "
draw bitmap playerx+32,playery, "background", "copy", "Canvas"
else
mid$(levelline$(mapy), mapx+1, 1) = "t"
draw bitmap playerx+32,playery, "target", "copy", "Canvas"
endif
t$ = mid$(levelline$(mapy), mapx+2, 1)
if(t$ = " ") then
mid$(levelline$(mapy), mapx+2, 1) = "b"
draw bitmap playerx+64,playery, "bulb", "copy", "Canvas"
// soundplay "roehr.wav", false
else
mid$(levelline$(mapy), mapx+2, 1) = "f"
draw bitmap playerx+64,playery, "final", "copy", "Canvas"
// soundplay "pong.wav", false
endif
WalkRight()
CheckFinished()
return
end sub
sub CheckFinished()
local i
for i = 1 to 12
if(instr(levelline$(i), "b")) return
next i
// soundplay "halloffame.wav", false
alert "Solved! This was too easy ;)", "Ok", "info"
quitting = true
return
end sub
data " ww "
data "wwwwww www "
data "wtt w wwsww"
data "wtt www w"
data "wtt bb w"
data "wtt w w b w"
data "wttwww w b w"
data "wwww b wb w"
data " w bw b w"
data " w b b w"
data " w ww w"
data " wwwwwwwww"

View File

@@ -1,174 +0,0 @@
#!yab
############# Prologue #############
ProgramName$ = "Teditor"
AuthorName$ = "Joe Bloggs"
ProgramVersion$ = "V0.1"
ProgramBriefDescription$ = "My unbelievable first yab program."
ProgramLicense$ = "Public Domain"
ProgramAcknowledgements$ ="With thanks to Michel Clasquin-Johnson for writing Teditor and to  Marc-Oliver Ihm, Jan Bungeroth and Jim Saxton for creating yab!"
//*****Global Variables****
## Technically, yab does not require you to declare global variables, it just is a really, really good idea to do it anyway.
// set DEBUG = 1 to print out all messages on the console
DEBUG = 1
//change this to DEBUG = 0 when you are ready to bind the program for distribution
OpenWindow()
#######End of Prologue#######
############# Main Message Loop #############
dim msg$(1)
while(not leavingLoop)
nCommands = token(message$, msg$(),"|")
for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
switch(msg$(everyCommand))
case "_QuitRequested":
case "MainWindow:_QuitRequested":
case "MainWindow:File:Quit":
leavingLoop = true
break
case "MainWindow:File:Save":
SaveFile()
break
case "MainWindow:File:New":
NewFile()
break
case "MainWindow:File:Open":
OpenFile()
break
case "MainWindow:Edit:Undo/Redo":
textedit set "EditSpace", "undo"
break
case "MainWindow:Edit:Cut":
textedit set "EditSpace", "cut"
break
case "MainWindow:Edit:Copy":
textedit set "EditSpace", "copy"
break
case "MainWindow:Edit:Paste":
textedit set "EditSpace", "paste"
break
case "MainWindow:Edit:Select All":
textedit set "EditSpace", "select-all"
break
case "MainWindow:Help:About":
Alert ProgramName$ + " " + ProgramVersion$ + "\n" + "by " + AuthorName$ +"\n\n" + ProgramBriefDescription$ + "\n" + ProgramLicense$ + "\n" + ProgramAcknowledgements$, "OK", "none"
default:
break
end switch
next everyCommand
wend
CloseWindow()
end
#######End of Main Loop#######
sub CloseWindow()
//Close down the main window
NewFile()
window close "MainWindow"
end sub
sub MakeMenu()
//Create menu in MainWindow
menu "File", "New", "N", "MainWindow"
menu "File", "Open", "O", "MainWindow"
menu "File", "Save", "S", "MainWindow"
menu "File", "Quit", "Q", "MainWindow"
menu "Edit", "Undo/Redo", "Z", "MainWindow"
menu "Edit", "Cut", "X", "MainWindow"
menu "Edit", "Copy", "Z", "MainWindow"
menu "Edit", "Paste", "Z", "MainWindow"
menu "Edit", "Select All", "A", "MainWindow"
menu "Help", "About", "", "MainWindow"
end sub
sub NewFile()
local sos
if textedit get$ "EditSpace" <> "" then
sos = alert "Save Current Text First?", "Yes", "No", "", "none"
if sos = 1 SaveFile()
textedit clear "EditSpace"
endif
end sub
sub OpenFile()
local file2open$, anewline$
NewFile()
file2open$ = filepanel "load-file", "Open Which File?", "/boot/home"
if file2open$ <> "" then
open file2open$ for reading as #1
while(not(eof(1)))
line input #1 anewline$
textedit add "EditSpace", anewline$ + "\n"
wend
close #1
textedit set "EditSpace", "gotoline", 1
endif
end sub
sub OpenWindow()
//Setup the main window here
Window open 100,100 to 600,500, "MainWindow", "Teditor"
textedit 0,20 to 499, 399, "EditSpace", 3, "MainWindow"
textedit set "EditSpace", "wordwrap", 0
MakeMenu()
end sub
sub SaveFile()
local file2save$,filename$
file2save$ = textedit get$ "EditSpace"
if file2save$ <> "" then
filename$ = filepanel "save-file", "Save File As ...", "/boot/home"
if filename$= "" return
open filename$ for writing as #1
print #1 file2save$
close #1
endif
end sub

View File

@@ -1,17 +0,0 @@
#!yab
doc Place a description of your
doc program here.
doc
doc Author, date, license
print date$
print time$
print mid$(date$,3,10)+" "+time$
dim fields$(6)
a=split(date$,fields$(),"-")
print fields$(2),"-",fields$(3),"-",fields$(4)

View File

@@ -1,30 +0,0 @@
#!yab
window open 100,100 to 500,300, "A", "TreeDemo"
window set "A", "flags", "not-h-resizable, not-v-resizable"
treebox 10,10 to 380,190, "Tree1", 1, "A"
treebox add "Tree1", "Hello1"
treebox add "Tree1", "Hello1", "Test1", 1
treebox add "Tree1", "Test1", "foo", 0
treebox add "Tree1", "Test1", "bar", 0
treebox add "Tree1", "Hello2"
treebox add "Tree1", "Hello3"
treebox add "Tree1", "Hello3", "Test3",0
treebox add "Tree1", "Test3", "gugst",0
treebox add "Tree1", "gugst", "du",0
treebox add "Tree1", "Hello4"
print treebox get$ "Tree1", 1
inloop = true
while(inloop)
m$ = message$
if(m$<>"") print m$
if(instr(m$, "Quit")) inloop = false
wend
window close "A"
exit

View File

@@ -1,81 +0,0 @@
#!yab
window open 100,100 to 600,400, "Main", "Typewriter"
window set "Main", "minimumto",100,100
layout "all", "Main"
view 10,10 to 490,280, "Type", "Main"
option set "Type", "Focus", true
oldx = 100
oldy = 100
oldw = 500
oldh = 300
offsetx = 5
offsety = 15
draw set "highcolor", 255,255,255, "Type"
draw set "lowcolor", 0,100,0, "Type"
draw set "bgcolor", 0,100,0, "Type"
draw text 10,295, str$(oldx)+" "+str$(oldy)+" "+str$(oldw)+" "+str$(oldh), "Main"
while(not instr(message$, "_QuitRequested|"))
x = window get "Main", "position-x"
if(oldx<>x) then
oldx = x
Update()
endif
y = window get "Main", "position-y"
if(oldy<>y) then
oldy = y
Update()
endif
w = window get "Main", "width"
if(oldw<>w) then
oldw = w
Update()
endif
h = window get "Main", "height"
if(oldh<>h) then
oldh = h
Update()
endif
// option set "Type", "focus", true
TypeKey("Type")
wend
exit
sub TypeKey(view$)
local k$
local old$
k$ = keyboard message$(view$)
if(k$ = "") then
// sleep 0.001
else
if(k$ = "enter") then
offsety = offsety + 12
offsetx = 5
else
if(len(k$)=1) then
draw text offsetx,offsety, k$, "Type"
offsetx = offsetx + 10
endif
endif
old$ = k$
while(old$ = k$)
k$ = keyboard message$(view$)
wend
endif
return
end sub
sub Update()
draw flush "Main"
draw text 10,h-5, str$(x)+" "+str$(y)+" "+str$(w)+" "+str$(h), "Main"
return
end sub

View File

@@ -1,31 +0,0 @@
#!yab
dir$=attribute get$ "" , ""
dir$=dir$+"/"
window open 100,100 to 500,160, "Win", "Walk"
window set "Win", "flags", "not-zoomable, not-h-resizable, not-v-resizable"
bitmap 1152,256, "player"
err = draw image 0,0 to 1152,256, dir$+"img/player.png", "player"
for i=15 to 405 step 65
bitmap get i,196 to i+30,252, str$((i+50)/65), "player"
next i
canvas 0,0 to 400,400, "MyCanvas", "Win"
while(not quitting)
for a = 0 to 400 step (30/7)
DRAW SET "highcolor",255,255,255,"MyCanvas"
draw rect 0,0 to a+29,55, "MyCanvas"
draw bitmap a,0, str$(mod(a/(30/7),6) +1),"copy", "MyCanvas"
sleep 00.2
m$ = message$
if(m$ = "Win:_QuitRequested|" or m$ = "_QuitRequested|") then
quitting = true
break
endif
next a
wend
window close "Win"

View File

@@ -1,52 +0,0 @@
#!yab
window open 100,100 to 230,200, "win0", "Window0"
layout "V-Center, H-Center", "win0"
button 10,10 to 120,30, "NewWin_", "New Window", "win0"
button 10,40 to 120,60, "NumWin_", "Show Number...", "win0"
button 10,70 to 120,90, "Quit_", "Close All", "win0"
alert "WindowWorld demonstrates how Windows are created and closed!", "Ok", "idea"
dim msgpart$(1)
maxcount = 1
inloop = true
while(inloop = true)
msg$= message$
if (split(msg$, msgpart$(),":") = 2) item$ = msgpart$(1)
if (msg$ <> "") print msg$
switch msg$
case "NumWin_|"
alert "The number of open windows is "+str$(window count), "Ok", "info"
break
case "NewWin_|"
number$ = str$(maxcount)
i = maxcount * 10
window open 100+i,100+i to 230+i,200+i, "win"+number$, "Window"+number$
layout "v-center, h-center", "win"+number$
button 10,10 to 120,30, "NewWin_","New Window", "win"+number$
button 10,40 to 120,60, "NumWin_","Show Number...", "win"+number$
button 10,70 to 120,90, "Quit_","Close All", "win"+number$
maxcount = maxcount + 1
break
case "Quit_|"
inloop = false
break
case item$+":_QuitRequested|"
window close item$
break
end switch
if (window count < 1) inloop = false
wend
exit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

View File

@@ -1,122 +0,0 @@
// Filebox is a library to have an easy access to a list of files.
// This is easier than poking around with columnboxes yourself.
// Open a new filebox from (x1,y1) to (x2,y2)
// with the id ID$, the type of scrollbar ScrollbarType on View$
export sub Filebox(x1,y1,x2,y2, ID$, ScrollbarType, View$)
local myscrollbar
columnbox x1,y1 to x2,y2, ID$, ScrollbarType, "resizable", View$
columnbox column ID$, " ", 1, 20, 20, 20, "align-center"
if(scrollbarType=1 or scrollbarType=3) myscrollbar = peek("scrollbarwidth")
columnbox column ID$, "Name", 2, 1000, 21, x2-x1-24-myscrollbar, "align-left"
columnbox color ID$, "Selection-Active", 220,220,250
columnbox color ID$, "Row-Divider", 255,255,255
return
end sub
// Easy interface to a Filebox, simply name a directory
export sub FileboxDirectorySimple(ID$, dir$)
FileboxDirectory(ID$,dir$,false)
return
end sub
// return the name of the row position
export sub FileboxName$(ID$, position)
return columnbox get$ ID$, 2, position
end sub
// return true, if the row position is a directory
export sub FileboxIsDirectory(ID$, position,dir$)
local t$
t$ = columnbox get$ ID$, 2, position
print "t$ "+t$
//if(t$ = "__Path__="+path$+Name$"__Mime__=application/x-vnd.Be-directory") return true
if(system("test -d \""+ dir$+t$+"\"") = 0) system("addattr -t mime BEOS:TYPE application/x-vnd.Be-directory \""+dir$+t$+"\"") : return true
return false
end sub
// Give a directory and the following options:
// showDot: set this to true to show hidden (dot) files
export sub FileboxDirectory(ID$, dir$, showDot)
local t$
local i
local n
local arraysizeDir
local arraysizeFiles
dim directories$(1)
dim files$(1)
arraysizeDir = 0
arraysizeFiles = 0
columnbox clear ID$
if(showDot) then
t$ = system$("ls --format=single-column --color=none -aF \""+dir$+"\" |sort -f")
else
t$ = system$("ls --format=single-column --color=none -F \""+dir$+"\" |sort -f")
endif
dim splitdir$(1)
n = split(t$, splitdir$(), "\n")
for i=1 to n-1
//print dir$+splitdir$(i)
//print dir$+splitdir$(i)
if (right$(splitdir$(i),1)="/") then
//if(system("test -d \""+ dir$+splitdir$(i)+"\"") = 0) then
// comment the if clause out if you want to have the direcotries "." and ".." listed
// if(splitdir$(i)<>"." and splitdir$(i)<>"..") then
arraysizeDir = arraysizeDir + 1
dim directories$(arraysizeDir)
splitdir$(i) = left$(splitdir$(i),len( splitdir$(i))-1)
directories$(arraysizeDir-1) = splitdir$(i)
//endif
// handle files
else
arraysizeFiles = arraysizeFiles + 1
dim files$(arraysizeFiles)
if right$(splitdir$(i),1)="*" then
files$(arraysizeFiles-1) = left$(splitdir$(i), len(splitdir$(i)) -1)
elseif right$(splitdir$(i),1)="@" then
files$(arraysizeFiles-1) = left$(splitdir$(i), len(splitdir$(i)) -1)
else
files$(arraysizeFiles-1) = splitdir$(i)
endif
endif
next i
for i=0 to arraysizeDir-1
FileboxAdd(ID$, directories$(i), true,dir$)
next i
for i=0 to arraysizeFiles-1
FileboxAdd(ID$, files$(i), false,dir$)
next i
return
end sub
sub FileboxAdd(ID$, Name$, IsFolder, path$)
local maxpos
maxpos = (columnbox count ID$) + 1
a$=""
if(IsFolder) then
columnbox add ID$, 1, maxpos, 18, "__SmIC__="+path$+Name$
else
columnbox add ID$, 1, maxpos, 18, "__SmIC__="+path$+Name$
//else
//columnbox add ID$, 1, maxpos, 18, "__Mime__=application/octet-stream"
endif
columnbox add ID$, 2, maxpos, 20, Name$
columnbox select ID$, 1
columnbox select ID$, 0
return
end sub

View File

@@ -1,50 +0,0 @@
doc Toolbar.yab is a library to easily create a toolbar.
doc This is suitable for 16x16 icons
// Create a new toolbar.
//
// x1,y1 is the upper left starting point
// x2 is the right border of the toolbar
// note: the toolbar is always 30 pixels in height!
// id$ is the toolbar ID
// dir$ is the directory, where the icons can be found
// view$ is the view on which the Toolbar is created
//
// Note: this will change the layout of your view view$.
export sub ToolbarCreate(x1,y1,x2, id$, dir$, view$)
layout "left, right", view$
view x1,y1 to x2,y1+30, id$, view$
layout "left,right", id$
draw set "bgcolor", 222,219,222, id$
view 0,30 to x2,30, id$+"line", id$
draw set "bgcolor", 185,185,185, id$+"line"
layout "none", id$
position = 10
directory$ = dir$
toolbarview$ = id$
return
end sub
// Add an icon to the toolbar.
//
// id$ is the ID of the icon; this ID is send as a message, when the icon is clicked on
// pressed$ is the image of the pressed icon
// normal$ is the image of the normal icon
// disabled$ is the image of the disabled icon
export sub ToolbarAddIcon( id1$,id$, pressed$, normal$, disabled$)
button image position,7, id$, directory$+pressed$, directory$+normal$, directory$+disabled$, toolbarview$
tooltip id$, id$
position = position + 25
return
end sub
// Add a separator to the toolbar.
export sub ToolbarAddSeparator()
draw set "highcolor", 198,198,198, toolbarview$
draw line position-2,5 to position-2,25,toolbarview$
draw set "highcolor", 152,152,152, toolbarview$
draw line position-1,5 to position-1,25, toolbarview$
position = position + 5
return
end sub

View File

@@ -1,259 +0,0 @@
export sub openfile(fil$, recordlength, numberoffields)
// specify the record(block) length and number of fields for the file
// returns the filehandle number used for other subs
static numfiles
local x
x=open(fil$, "a")
if x=0 print"rror opening the file":return -1 // error opening the file
close x
numfiles=numfiles+1
dim f$(numfiles,50,2) // f$(numfile,1-50=fieldname$
dim f(numfiles,52)
f$(numfiles,0,0)=fil$
f(numfiles,51)=recordlength
f(numfiles,52)=numberoffields
return numfiles
end sub
export sub Field( filehandle,fieldnumber, fieldname$, fieldlength)
//specify the field name and length for the field numbered fieldnumber
// return 1 ok, 0 bad fieldnumber
if fieldnumber <= f(filehandle,52) then
f$(filehandle,fieldnumber,0)=fieldname$
f(filehandle,fieldnumber)=fieldlength
f$(filehandle,fieldnumber,1)=Blank$(f(filehandle,fieldnumber))
return 1
endif
return 0
end sub
export sub lset(filehandle,fieldname$,data$)
//sets data$ on the left end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing
local l
local x
local b$
local dt$
local a$
local lf
l=len(data$)
x=0
for x=1 to 50
b$=f$(filehandle,x,0)
if (b$ = fieldname$) then
lf=f(filehandle,x)
dt$=data$
if( l > lf )dt$=left$(dt$,lf)
a$=Blank$(lf-l)
if l<lf dt$=dt$+a$
f$(filehandle,x,1) = dt$
end if
next
end sub
export sub rset(filehandle,fieldname$,data$)
//sets data$ on the right end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing
local l
local x
local b$
local dt$
local a$
l=len(data$)
x=0
for x=1 to 50
b$=f$(filehandle,x,0)
if (b$ = fieldname$) then
lf=f(filehandle,x)
dt$=data$
if( l > lf )dt$=left$(dt$,lf)
a$=Blank$(lf-l)
if l<lf dt$=a$+dt$
f$(filehandle,x,1) = dt$
end if
next
end sub
export sub readfield$(File, fieldname$)
//returns the data held in fieldname$
local x
for x=1 to 50
if f$(File,x,0)=fieldname$ then
return f$(File,x,1)
end if
next
end sub
export sub write_block(recordnumber, filehandle)
// Writes all the fields to the file at this record location
// Uses seek recordnumber*recordlength before the write
// Clears the field data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.
local filename$
local x
local y
local a$
filename$=f$(filehandle,0,0)
x=open(filename$, "r+")
if x=0 print "error":return 0 // error opening the file
if recordnumber = -1 then
seek x, 0, "end" // append data to the file
else
seek x, ((f(filehandle,51) +1) * (recordnumber))
endif
printstring$=""
for y=1 to f(filehandle,52)
printstring$=printstring$+f$(filehandle,y,1)
next
l=len(printstring$)
for y=1 to l
a$=left$(printstring$,1)
printstring$=right$(printstring$,len(printstring$)-1)
poke x, a$
next
poke x ,"\n"
for y=1 to f(filehandle,52)
f$(filehandle,y,1)=Blank$(f(filehandle,y))
next
close x
end sub
export sub read_block(recordnumber, filehandle)
// Reads the data at this record, or the next record if recordnumber is -1
// Ffills the fields with the data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.
static rec
local filename$
local a$
local z
local y
a$=""
local File
filename$=f$(filehandle,0,0)
File=open(filename$, "rb")
if File=0 print "error":return -1 // error opening the file
if (recordnumber <> -1) then
rec = recordnumber
seek File, ((f(filehandle,51) +1) * (rec))
endif
for z=1 to f(filehandle,51)
y=peek(File)
a$=a$+chr$(y)
next
for y=0 to f(filehandle,52)
f$(filehandle,y,1)= left$(a$,f(filehandle,y))
a$=right$(a$,len(a$)-f(filehandle,y))
next
rec=rec+1
close File
return rec
end sub
export sub lof(filehandle) // alias for numberofrecords()
local x
local filename$
local ret
filename$=f$(filehandle,0,0)
x=open(filename$)
seek #x, 0, "end"
ret=tell(#x)
if ret=0 return ret
ret= ret/(f(filehandle,51)+1)
ret=int(ret)
close x
return ret
end sub
export sub numberofrecords(filehandle) // alias for lof()
local fh
local rtn
fh=filehandle
rtn=lof(fh)
return rtn
end sub
sub Blank$(num) // this is a local sub, not exported
local s$
local x
s$=""
for x=1 to num
s$=s$+" "
next
return s$
end sub

View File

@@ -1,108 +0,0 @@
////////////////////////////////////////////////////////
export sub new_popup(name$, view$, radio)
static size
size=size+1
dim popup$(size,12,1) // name, view, selections ( up to 10)
dim popup(size,2) //radio flag, 1=radio, 0=not radio
popup$(size,1,0)=name$
popup$(size,2,0)=view$
popup(size,1)=radio
return size
end sub
////////////////////////////////////////////////////////
export sub add_popup_selection$(popup,number,selection$)
popup$(popup,number+2,0)=selection$
return "ok"
end sub
////////////////////////////////////////////////////////
export sub popup_select$(x,selection$)
local i
for i=3 to 12
if popup$(x,i,0)=selection$ then
if popup(x,1)=1 then
popup(x,2)=i
return "ok"
else
if popup$(x,i,1)="√ " then
popup$(x,i,1)=""
else
popup$(x,i,1)="√ "
endif
return "ok"
endif
endif
next
return "error"
end sub
////////////////////////////////////////////////////////
export sub popupdisplay$(x,y,popup)
local i, MenuItems$
MenuItems$=""
if popup(popup,1)=1 then
for i=3 to 12
if popup$(popup,i,0)<>"" then
if popup(popup,2)=i then
MenuItems$=MenuItems$+"√ "+popup$(popup,i,0)+"|"
else
MenuItems$=MenuItems$+" "+popup$(popup,i,0)+"|"
endif
endif
next
endif
if popup(popup,1)=0 then
for i=3 to 10
if popup$(popup,i,0)<>"" then
MenuItems$=MenuItems$+popup$(popup,i,0)+"|"
endif
next
endif
if popup(popup,1)=3 then
for i=3 to 10
if popup$(popup,i,0)<>"" then
MenuItems$=MenuItems$+popup$(popup,i,1)+popup$(popup,i,0)+"|"
endif
next
endif
MenuItems$=left$(MenuItems$,len(MenuItems$)-1)
Selected$ = POPUPMENU x,y, MenuItems$, popup$(popup,2,0)
return Selected$
end sub
////////////////////////////////////////////////////////
export sub getselected$(x)
local return$
return$=""
//return popup$(x,popup(x,2),0)
if popup (x,1)=1 then
if popup(x,2) then
return "option"+str$(popup(x,2)-2)
else return ""
endif
endif
if popup (x,1)=3 then
for i=3 to 12
if popup$(x,i,1) ="√ " then
if return$="" then
return$="option"+str$(i-2)
else
return$=return$+"|option"+str$(i-2)
endif
endif
next
return return$
endif
end sub

View File

@@ -1,9 +0,0 @@
The files in this folder are yab libraries, to use them, copy to your project folder or to:
~/config/settings/yab
then use the import statement in your project.
Example:
import Toolbar

View File

@@ -1,49 +0,0 @@
#!yab
doc Place a description of your
doc program here.
doc
doc Author, date, license
// set DEBUG = 1 to print out all messages on the console
DEBUG = 0
OpenWindow()
// Main Message Loop
dim msg$(1)
while(not leavingLoop)
nCommands = token(message$, msg$(), "|")
for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
switch(msg$(everyCommand))
case "_QuitRequested"
case "MainWindow:_QuitRequested"
leavingLoop = true
break
default
end switch
next everyCommand
wend
CloseWindow()
end
// Setup the main window here
sub OpenWindow()
window open 100,100 to 600,500, "MainWindow", "Main Window"
return
end sub
// Close down the main window
sub CloseWindow()
window close "MainWindow"
return
end sub

View File

@@ -1,7 +0,0 @@
#!yab
doc Place a description of your
doc program here.
doc
doc Author, date, license

View File

@@ -1 +0,0 @@

View File

@@ -1,69 +0,0 @@
#!yab
doc Place a description of your
doc program here.
doc
doc Author, date, license
// set DEBUG = 1 to print out all messages on the console
DEBUG = 0
OpenWindow()
// Main Message Loop
dim msg$(1)
while(not leavingLoop)
nCommands = token(message$, msg$(), "|")
for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
switch(msg$(everyCommand))
case "_QuitRequested"
case "MainView:_QuitRequested":
case translate$("MainView:File:Quit")
leavingLoop = true
break
case translate$("MainView:Help:Help")
alert "The Help button was pressed", "Cool !", "idea"
break
default
end switch
next everyCommand
wend
CloseWindow()
end
// Setup the main window here
sub OpenWindow()
window open 100,100 to 600,500, "MainView", "Menu Template"
menu "File", "New", "N", "MainView"
menu "File", "Open...", "O", "MainView"
menu "File", "Save", "S", "MainView"
menu "File", "Save As...", "", "MainView"
menu "File", "--", "", "MainView"
menu "File", "Quit", "Q", "MainView"
menu "Edit", "Cut", "X", "MainView"
menu "Edit", "Copy", "C", "MainView"
menu "Edit", "Paste", "V", "MainView"
menu "View", "Options...", "", "MainView"
menu "Help", "Help", "H", "MainView"
menu "Help", "About", "A", "MainView"
return
end sub
// Close down the main window
sub CloseWindow()
window close "MainView"
return
end sub

View File

@@ -1,28 +0,0 @@
#
Empty
Templates/img/emptytemplate.png
Create an empty file.
#
Basic Template
Templates/img/basictemplate.png
Create a new program with a window.
#
Command Line Template
Templates/img/terminaltemplate.png
Create a new command line program.
#
Menu Template
Templates/img/menutemplate.png
Create a new program with a menu bar.
#
Toolbar Template
Templates/img/toolbartemplate.png
Create a new program with a toolbar.
#
#

View File

@@ -1,90 +0,0 @@
#!yab
// This file uses the toolbar.yab library located in ~/config/settings/yab
import Toolbar
doc Place a description of your
doc program here.
doc
doc Author, date, license
// set DEBUG = 1 to print out all messages on the console
DEBUG = 1
OpenWindow()
// Main Message Loop
dim msg$(1)
while(not leavingLoop)
nCommands = token(message$, msg$(), "|")
for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)
switch(msg$(everyCommand))
case "MainView:_QuitRequested"
case "_QuitRequested"
case translate$("MainView:File:Quit")
leavingLoop = true
break
case "Help"
case translate$("MainView:Help:Help")
alert "The Help button was pressed", "Cool !", "idea"
break
default
end switch
next everyCommand
wend
CloseWindow()
end
// Setup the main window here
sub OpenWindow()
window open 100,100 to 500,300, "MainView", "Toolbar Template"
window set "MainView","MinimumTo", 190,50
menu "File", "New", "N", "MainView"
menu "File", "Open...", "O", "MainView"
menu "File", "Save", "S", "MainView"
menu "File", "Save As...", "", "MainView"
menu "File", "--", "", "MainView"
menu "File", "Quit", "Q", "MainView"
menu "Edit", "Cut", "X", "MainView"
menu "Edit", "Copy", "C", "MainView"
menu "Edit", "Paste", "V", "MainView"
menu "View", "Options...", "", "MainView"
menu "Help", "Help", "H", "MainView"
menu "Help", "About", "A", "MainView"
// Toolbar Template uses /boot/home/yab_work/Programs/img for the image path.
MainDir$="/boot/home/yab_work/Programs/"
// Use your own path to your images.
ToolbarCreate(0,peek("menuheight"),400, "Toolbar", MainDir$+"img/", "MainView")
ToolbarAddIcon("ToolbarNew", "New", "newp.png", "newn.png", "newd.png")
ToolbarAddIcon("ToolbarOpen", "Open", "openp.png", "openn.png", "opend.png")
ToolbarAddIcon("ToolbarSave", "Save", "savep.png", "saven.png", "saved.png")
ToolbarAddSeparator()
ToolbarAddIcon("ToolbarCut", "Cut", "cutp.png", "cutn.png", "cutd.png")
ToolbarAddIcon("ToolbarCopy", "Copy", "copyp.png", "copyn.png", "copyd.png")
ToolbarAddIcon("ToolbarPaste", "Paste", "pastep.png", "pasten.png", "pasted.png")
ToolbarAddSeparator()
ToolbarAddIcon("ToolbarHelp", "Help", "helpp.png", "helpn.png", "helpd.png")
return
end sub
// Close down the main window
sub CloseWindow()
window close "MainView"
return
end sub

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,20 +0,0 @@
#!yab
f1 = open("Help_En.dat", "r")
f2 = open("Help_En_Index.dat", "w")
while(instr(a$, "& infotext") = 0)
line input #f1 a$
wend
while(not eof(f1))
line input #f1 a$
print #f2 a$
print #f2 tell(#f1)
while(left$(a$,1)<>"&" or left$(a$,10)="&exverbatim")
line input #f1 a$
print a$
wend
wend
close(f2)
close(f1)

File diff suppressed because it is too large Load Diff

View File

@@ -1,664 +0,0 @@
&Arithmetic
7516
&
7518
abs()
7524
acos()
7891
and()
8390
asin()
9180
atan()
9689
bin$()
10588
cos()
11194
dec()
11459
eor()
11978
euler
12755
exp()
13161
frac()
13783
int()
14464
log()
14864
max()
15523
min()
16315
mod()
16730
or()
17530
pi
18323
ran()
18779
sig()
19709
sin()
20439
sqr()
20964
sqrt()
21335
tan()
21687
xor()
22050
** or ^
23083
&
23900
and
23904
break
24354
case
25049
continue
25546
default
26215
do
27335
else
27879
elsif
28418
end
29888
endif
30580
false
31226
fi
31793
for
32107
gosub
33069
goto
33939
if
34875
label
36661
loop
37650
next
38137
not
38696
on gosub
39348
on goto
40683
on interrupt
42107
logical or
43393
pause
43796
repeat
45024
return
45797
sleep
47496
step
47871
switch
48411
then
49727
true
50535
until
50971
wait
51578
wend
51952
while
52450
:
53106
&
53743
arraydim()
53754
arraysize()
54644
data
57217
dim
58169
read
59686
redim
60415
restore
60854
&
61923
asc()
61929
chr$()
62752
glob()
63614
hex$()
64750
instr()
65240
left$()
66254
len()
67555
lower$()
67929
ltrim$()
68337
rtrim$()
68989
mid$()
69637
right$()
70905
split()
72224
str$()
75359
token()
80442
trim$()
83368
upper$()
83981
val()
84629
&
85343
at()
85348
clear screen
86721
close
87519
color
88057
colour
89255
eof
89487
getscreen$()
90078
inkey$
91310
input
92613
line input
94157
open
94999
print
98126
putscreen
101531
reverse
102510
screen
103373
seek()
103688
tell
105250
using
105911
#
106952
at()
108325
;
109688
&
110334
end sub
110342
export
110774
import
113025
local
114585
numparams
116045
return
117496
static
119198
sub
120196
&Attributes
122485
&
122487
attribute clear
122503
attribute get
122742
attribute get$
123473
attribute set
125131
bind()
125717
clipboard copy
126489
clipboard paste$
127191
compile
127813
date$
128369
doc
130094
docu$
131249
error
132071
execute$()
132762
execute()
133828
exit
134233
iscomputeron
134627
pause
135015
peek
136242
peek$
141795
poke
145412
rem
146650
sleep
147764
system$()
148123
system()
148712
thread get
149335
thread remove
150684
time$
151607
to
152776
//
153330
:
153834
&Bitmaps
154467
&
154469
bitmap
154476
bitmap color
154835
bitmap get
155187
bitmap image
158312
bitmap remove
158599
bitmap save
158827
screenshot
159224
159470
159480
draw bitmap
159494
draw circle
160360
draw curve
161019
draw dot
162004
draw ellipse
162585
draw flush
163324
draw get
164454
draw get$
166400
draw image
167813
draw line
169719
draw rect
170291
draw set
170947
draw text
174316
&
175486
ismousein()
175498
keyboard message$()
176224
message$
178113
message send
180446
mouse message$()
181496
mouse message$
183528
mouse set
184104
shortcut
184614
&Printing
187133
&
187135
printer
187143
printer setup
189516
&
190540
menu
190545
menu set
193960
popupmenu
196001
submenu
197649
submenu set
201954
&Boxview
203711
&
203713
boxview
203721
boxview set
205146
canvas
205377
layout
205815
&
207037
scrollbar
207047
scrollbar get
207267
scrollbar set
207546
&
208978
splitview
208988
splitview get
209926
splitview set
210156
&
210689
stackview
210699
stackview get
212813
stackview set
213104
&
213561
tabview
213569
tabview add
213871
tabview get
214768
tabview set
214967
&
215151
view
215156
view dropzone
215300
view get
215585
view remove
215860
&
216351
button
216358
button image
217673
calendar
219414
calendar get$
221081
calendar set
221574
checkbox
221999
checkbox image
223256
checkbox set
225483
colorcontrol
225782
colorcontrol get
227804
colorcontrol set
228412
columnbox
228748
columnbox add
233958
columnbox clear
235139
columnbox color
235507
columnbox column
236552
columnbox count
237711
columnbox get
238149
columnbox get$
238684
columnbox remove
239227
columnbox select
239584
&
240040
dropbox
240048
dropbox add
241253
dropbox clear
241527
dropbox count
241778
dropbox get$
242028
dropbox remove
242322
dropbox select
242881
listbox
243160
listbox add
246125
listbox clear
246603
listbox count
246898
listbox get
247294
listbox get$
247781
listbox remove
248199
listbox select
248538
listbox sort
249183
&
249892
option color
249905
option set
250115
radiobutton
251007
radiobutton set
252741
&
253145
slider
253152
slider color
253873
slider get
254296
slider label
254523
slider set
254774
spincontrol
255386
spincontrol get
255683
spincontrol set
255913
statusbar
256133
statusbar set
257602
text
258100
text set
259288
&
260410
textcontrol
260422
textcontrol clear
260947
textcontrol get$
261185
textcontrol set
261477
textedit
262535
textedit add
263198
textedit clear
263523
textedit color
263865
textedit get
264846
textedit get$
266538
textedit set
266977
&
270515
texturl
270523
texturl color
271131
tooltip
271511
tooltip color
273191
&
274474
treebox
274482
treebox add
274845
treebox clear
275370
treebox collapse
275633
treebox count
275931
treebox expand
276239
treebox get$
276522
treebox remove
276849
treebox select
277334
treebox sort
277637
&
277931
localize
277940
translate$()
281172
&Sound
281925
&
281927
beep
281932
bell
282166
sound play
282529
sound stop
283454
sound wait
283828
&Window
284233
&
284235
alert
284241
filepanel
286019
window open
289309
window close
292024
window count
292516
window get
293143
window set
294977

View File

@@ -1,174 +0,0 @@
alert
arraydim
arraysize
boxview
break
button
case
calendar
checkbox
chr$
circle
clear
clipboard
close
collapse
color
colorcontrol
column
columnbox
compile
continue
copy
count
curve
data
date$
default
draw
dropbox
dropzone
ellipse
else
elseif
elsif
end
endif
endsub
eof
eor
error
euler
execute
exit
expand
export
false
filepanel
flush
frac
getscreen$
glob
gosub
goto
hashmarks
hide
image
inkey$
input
instr
interrupt
ismousein
keyboard
label
layout
left$
len
let
line
listbox
load$
local
localize
log
loop
lower$
ltrim$
max
menu
message$
mid$
min
mod
mouse
new
next
not
open
option
paste$
pause
peek
peek$
pi
poke
popupmenu
print
printer
putscreen
radiobutton
ran
read
reading
rect
rect
redim
rem
remove
repeat
resize
restore
return
reverse
right$
rinstr
rtrim$
save$
screen
scrollbar
seek
select
set
setup
show
sig
sin
sleep
slider
sort
soundplay
spincontrol
split
split$
splitview
sqr
sqrt
stackview
static
step
str$
sub
submenu
subroutine
svg
switch
system
system$
tabview
tan
tell
text
text
textcontrol
textedit
texturl
then
time$
token
token$
tooltip
translate$
treebox
trim$
true
until
upper$
using
val
view
wait
wend
while
window
writing
xor

View File

@@ -1,153 +0,0 @@
EXECUTE
EXECUTE$
COMPILE
ENDSUB
ENDIF
END-IF
ENDWHILE
END-WHILE
ENDSWITCH
END-SWITCH
ENDSWITCH$
END-SWITCH$
EXPORT
ERROR
FOR
BREAK
SWITCH
CASE
DEFAULT
LOOP
DO
TO
AS
READING
WRITING
STEP
NEXT
WHILE
WEND
REPEAT
UNTIL
GOTO
GOSUB
SUB
SUBROUTINE
LOCAL
STATIC
ON
INTERRUPT
CONTINUE
LABEL
IF
THEN
ELSE
ELSIF
ELSEIF
ENDIF
FI
OPEN
CLOSE
SEEK
TELL
PRINT
USING
REVERSE
COLOR
COLOUR
INPUT
RETURN
DIM
REDIM
END
EXIT
READ
DATA
RESTORE
?
WINDOW
PRINTER
SETUP
PUTSCREEN
GETSCREEN$
NEW
WAIT
PAUSE
SLEEP
BELL
BEEP
LET
ARRAYDIM
ARRAYDIMENSION
ARRAYSIZE
BIND
SET
LOCALIZE
BUTTON
ALERT
MENU
CHECKBOX
RADIOBUTTON
TEXTCONTROL
LISTBOX
DROPBOX
ADD
REMOVE
TEXT
RECT
DRAW
FLUSH
FILEPANEL
LAYOUT
TEXTEDIT
SHOW
HIDE
COUNT
VIEW
BOXVIEW
TABVIEW
ELLIPSE
DOT
LINE
CURVE
CIRCLE
CLEAR
TEXT
RECT
SLIDER
HASHMARKS
OPTION
RESIZE
DROPZONE
COLORCONTROL
TREEBOX
SORT
TOOLTIP
COLUMNBOX
COLUMN
CLIPBOARD
COPY
SUBMENU
KEYBOARD
SELECT
CALENDAR
SCROLLBAR
COLLAPSE
EXPAND
SOUNDPLAY
SPLITVIEW
STACKVIEW
TEXTURL
SPINCONTROL
POPUPMENU
PASTE$
IMAGE
SVG
GET$
LOAD$
SAVE$
MOUSE
ISMOUSEIN
GET
TRANSLATE$
MESSAGE$

View File

@@ -1,54 +0,0 @@
@
SIN
ASIN
COS
ACOS
TAN
ATAN
EXP
LOG
SQRT
SQR
INT
FRAC
ABS
SIG
MOD
RAN
MIN
MAX
LEFT$
RIGHT$
MID$
LOWER$
UPPER$
LTRIM$
RTRIM$
TRIM$
INSTR
RINSTR
LEN
VAL
EOF
STR$
INKEY$
CHR$
ASC
HEX$
BIN$
DEC
AT
SCREEN
SYSTEM$
SYSTEM
DATE$
TIME$
PEEK
PEEK$
POKE
TOKEN
TOKEN$
SPLIT
SPLIT$
GLOB
DOCU$

View File

@@ -1,9 +0,0 @@
PI
EULER
TRUE
FALSE
AND
OR
NOT
EOR
XOR

View File

@@ -1,4 +0,0 @@
REM
DOC
//
DOCU

View File

@@ -1,28 +0,0 @@
^
*
<
>
=
!
-
+
*
/
:
(
)
,
.
;
#
"
1
2
3
4
5
6
7
8
9
0

View File

@@ -1,30 +0,0 @@
To update help:
edit Help_En.dat
Be sure that the data for the command is in the treebox adds section.
the command data sections needs:
&
command
Name:
command -- what is does:
Synopsis:
the command
Description:
what is does
Example:
example use
Related: related commands
&
Note: the & before and after the command information.
run GenerateIndex.yab from the data directory to make a new Help_En_Index.dat

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

Some files were not shown because too many files have changed in this diff Show More