# Simple but usefull Tcl/shade shell for RISC OS Forthmacs
# Thanks to C.T.Stretch (ct.stretch@ulst.ac.uk)
# for porting Tcl and inventing shade
#  Hanno Schwalm for RISC OS Forthmacs interface 17.02.97

source {Forthmacs:risc_os.Tcl.setup}
w_init Forth

w_box progInfo create "About this program"\
 {hlist {sprite !Forth}
  {vlist {info Name "RISC OS Forthmacs"}
         {info Purpose "Forth programming environment"}	{info Author " Hanno Schwalm & Mitch Bradley"}
         {info Version "3.1/2.82 - 10.01.98"}		{display "Licence" Licence 31}
  }}

w_box optionbox create " Forthmacs Runtime Options "\
 {vlist {box Options
    {vlist {option "Forth debugger"  debugflag}   {option "ARM tracer"      traceflag}
	   {option "Opimizer (inline)" optimizerflag} {option "bubblesort find" bubbleflag}
           {option "Profiler"        profileflag} {option "Clock"           clockflag}
           {option "RS-232 tools"    serialflag}  {option "Block interface" blockflag}
           }}
 {box "Memory model"
   {hlist {radio "Small" binsizevar} {radio "Large" binsizevar}}} {hlist {action " OK " {}}}}

w_box docbox create "Forthmacs Formatter"\
 {vlist
   {box "Formatter output"
    {vlist	{radio "ASCII" docdriver}
		{radio "HTML"  docdriver}
		{radio "LaTeX" docdriver}
		{radio "StrongHelp" docdriver}}}
    {hlist {action " OK " {binary makedocs}}}}	


w_box searchbox create "Online help"\
  {hlist {write "Forth word" searchname}
         {default " OK " {search $searchname}}}

w_box registerbox create "Registered User"\
 {vlist {write "User Name" licencename }
	{write "Date mmddyy" licencedate }
        {default " OK " {makelicence $licencename $licencedate}}}

w_bar -menu {Forthmacs
 {Info			-sub {Infos
   {Info			-dbox progInfo}
   {"Copyrights of Fonts"	-click {showfile Forthmacs:risc_os.Tcl.Fontlegal}}
   {Copyrights			-click {showfile Forthmacs:docs.ascii.copyright}}}}
 {"Online help"		-dbox searchbox}
 {Options		-dbox optionbox}
 {Programs		-sub {Programs
   {Forth			-click {binary Forth}}
   {Kernel			-click {binary Kernel}}
   {"Font Forth"		-click {binary fForth}}
   {WimpForth			-click {binary wForth}}}}
 {Documents		-sub {Dokuments
   {"Port Notes"		-sub {"Port Notes"
     {Readme			-click {showfile Forthmacs:risc_os.readme}}
     {"Version history"		-click {showfile Forthmacs:risc_os.versions}}}}
   {"HTML manual"		-click {system "Filer_Run Forthmacs:docs.html.AA_Manual"}}
   {Manual		-sub {"Ascii manual pages"
     {Copyrights		-click {showfile Forthmacs:docs.ascii.copyright}}
     {"General Information"	-click {showfile Forthmacs:docs.ascii.convention}}
     {"Forth tutorial"		-click {showfile Forthmacs:docs.ascii.tutorial}}
     {"Implementation details"	-click {showfile Forthmacs:docs.ascii.RO_impleme}}
     {"Keyboard interface"	-click {showfile Forthmacs:docs.ascii.typing}}
     {"Assembler tutorial"	-click {showfile Forthmacs:docs.ascii.armastut}}
     {"Assembler manual"	-click {showfile Forthmacs:docs.ascii.armassem}}
     {"Trap handling"		-click {showfile Forthmacs:docs.ascii.armtraps}}
     {"User interface"		-click {showfile Forthmacs:docs.ascii.Menu-Spot}}
 }}}}
 {Developer	-sub {Developer
    {Target		-sub {Target
      {Kernel			-click {compiler kernel}}
      {Forth			-click {compiler utils}}
      {"Font Forth"		-click {compiler fonts}}
      {Search			-click {compiler search}}
      {SWL-Tools		-click {compiler SWL-Tools}}} -grey meta}
    {Archive		-sub {Archive
      {Backup			-click {binary backup}}
      {"All Archives"		-click {binary MkTarget}}
      {Workdisc			-click {archive WorkDisc}}
      {Metacompiler		-click {archive Metacomp}}} -grey develop}
    {Registering		-dbox registerbox -grey develop}
    {"Make Docs"		-dbox docbox -grey docs}
 }}
 {Quit				-click {doexit}}
} -drag  {runforth $w_file} -click {clickproc %b}

system "set ForthmacsTcl running"
