Example #1
0
func Init(e, d bool, n uint, s string) {
	//
	if initialisiert {
		Graph.Terminate()
	} else {
		scr.Switch(scr.WVGApp)
		initialisiert = true
	}
	Ecke = node.New(n)
	Ecke1 = node.New(n)
	tempEcke = node.New(n)
	tempEcke1 = node.New(n)
	Kante = edge.New()
	tempKante = edge.New()
	Graph = gra.New(d, Ecke, Kante)
	edge.WithValues = e
	Dateiname := ""
	str.RemAllSpaces(&s)
	if str.Empty(s) {
		Dateiname = "temp"
	} else {
		Dateiname = s
	}
	//  sel.DateinameEditieren (Dateiname)
	Graph.Name(Dateiname + "." + "gra")
}
Example #2
0
func main() {
	//
	cF, cB := col.Black, col.LightWhite
	col.ScreenF, col.ScreenB = cF, cB
	scr.Switch(scr.TXT)
	/*
	   if scr.Switchable (scr.WXGA) {
	     scr.Switch (scr.WXGA)
	     scr.SwitchFontsize (font.Huge)
	   } else if scr.Switchable (scr.WSVGA) {
	     scr.Switch (scr.WSVGA)
	     scr.SwitchFontsize (font.Big)
	   } else {
	     scr.Cls ()
	   }
	*/
	help = make([]string, 1)
	help[0] = "Bedienungsanleitung siehe Handbuch S. 18 - 23"
	actualDay = day.New()
	actualDay.Actualize()
	period = day.Yearly
	day.WeekdayF, day.WeekdayB = cF, cB
	day.HolidayB = cB
	day.WeekdayNameF, day.WeekdayNameB = col.Magenta, cB
	//  errh.DocAvail = true
	scr.MouseCursor(true)
	for !editiert() {
	}
	cal.Terminate()
	ker.Terminate()
}
Example #3
0
func initialize() {
	//
	if !initialized {
		initialized = true
		scr.Switch(scr.XGA) // (scr.MaxMode())
		C.glViewport(0, 0, C.GLsizei(scr.NX()), C.GLsizei(scr.NY()))
	}
}
Example #4
0
func main() {
	//
	scr.Switch(scr.TXT)
	var today, birthday *Imp
	today = New()
	today.Actualize()
	birthday = New()
	birthday.SetColours(col.LightWhite, col.Blue)
	scr.Colour(col.Yellow)
	scr.Write("Ihr Geburtsdatum:", 12, 0)
	birthday.Edit(12, 18)
	if birthday.Empty() {
		birthday.Actualize()
	} else {
		scr.Write(" war ein ", 12, 26)
		birthday.SetFormat(WD)
		birthday.Write(12, 35)
		errh.Error2("Sie sind heute", birthday.Distance(today), "Tage alt.", 0)
	}
	scr.Colours(col.ScreenF, col.ScreenB)
	scr.Cls()
	errh.Hint(" vor-/rückwärts: Pfeiltasten               fertig: Esc ")
	var (
		c kbd.Comm
		t uint
	)
	neu := true
loop:
	for {
		if neu {
			birthday.WriteYear(0, 0)
			neu = false
		}
		switch c, t = kbd.Command(); c {
		case kbd.Esc:
			break loop
		case kbd.Down:
			if t == 0 {
				birthday.Inc(Yearly)
			} else {
				birthday.Inc(Decadic)
			}
			neu = true
		case kbd.Up:
			if t == 0 {
				birthday.Dec(Yearly)
			} else {
				birthday.Dec(Decadic)
			}
			neu = true
		case kbd.PrintScr:
			birthday.PrintYear(0, 0)
			prt.GoPrint()
		}
	}
	ker.Terminate()
}
Example #5
0
func init() {
	//
	//  var x World = New(); if x == nil {} // ok
	if !scr.Switchable(scr.WVGApp) {
		errh.Error("Bildschirmauflösung kleiner als 1024 x 576", 0)
		ker.Terminate()
		os.Exit(0)
	} else {
		scr.Switch(scr.WVGApp)
	}
	help[0] = "Hilfe ist noch nicht implementiert" // TODO
	files.Cd0()
}
Example #6
0
func main() { // just to get all stuff compiled
	//
	var _ chanm.ChannelModel = chanm.New(nil)
	t := integ.String(0)
	_ = real.String(0.0)
	var _ lint.LongInteger = lint.New(0)
	var _ brat.Rational = brat.New()
	var _ Object = date.New()
	var _ buf.Buffer = bpqu.New(0, 1)
	var _ pset.PersistentSet = pset.New(persaddr.New())
	var _ acc.Account = acc.New()
	var _ schol.Scholar = schol.New()
	eye.Touch()
	fuday.Touch()
	gra1.Touch()
	fig.Touch()
	var _ asem.AddSemaphore = asem.New(2)
	var _ barr.Barrier = barr.New(2)
	var _ rw.ReaderWriter = rw.New()
	var _ lr.LeftRight = lr.New()
	var _ lock2.Locker2 = lock2.NewPeterson()
	var _ lockp.LockerP = phil.NewLockNaiv()
	var _ barb.Barber = barb.NewSem()
	var _ smok.Smokers = smok.NewNaiv()
	var _ lock.Locker = dlock.New(nil)
	puls.Touch()
	var _ conn.Connection = conn.New()
	rob.Touch()
	var _ Indexer = audio.New()
	scr.Switch(scr.MaxMode()) // >= scr.PAL
	xx, yy := scr.NColumns(), scr.NLines()
	cf, cl, cb := v.Colours()
	circ(cb, xx/2, yy)
	circ(cl, xx-yy, yy)
	circ(cf, yy, yy)
	t = ""
	errh.MurusLicense("murus", v.String(), "1986-2013  Christian Maurer   http://murus.org", cf, cl, cb, &t)
	col.ScreenB = cb
	done := make(chan bool)
	go drive(cf, cl, cb, done)
	<-done
	ker.Terminate()
}
Example #7
0
func init() {
	//
	scr.Switch(scr.TXT)
	cF, cB = col.LightMagenta, col.Black
	// scr.Colours (cF, cB)
	lengthF, timeF = col.Red, col.LightBlue
	trackTimeF, ctrlF = col.Colour3(191, 191, 255), col.Colour3(63, 111, 255)
	for c := cdker.Controller(0); c < cdker.NCtrl; c++ {
		ctrlText[c] = cdker.Ctrltext[c]
		str.Center(&ctrlText[c], wr)
		lv[c] = l0 + 3*uint(c)
	}
	timeText = [2]string{"tracktime", "total time"}
	str.Center(&timeText[0], wr)
	str.Center(&timeText[1], wr)
	lt = [2]uint{l1 + 2, l1 + 2 + 3}
	bx = box.New()
	bx.Wd(wr)
	bx.Colours(col.HintF, col.HintB)
	bx.Colours(trackTimeF, cB)
	bx.Write(" track", l1, cr+wr-6-2)
	cw, lh := scr.NX1(), scr.NY1()
	bx.Colours(cF, cB)
	bx.Wd(wr)
	for c := cdker.Controller(0); c < cdker.NCtrl; c++ {
		ctrlBar[c] = pbar.New(true)
		ctrlBar[c].Def(cdker.MaxVol)
		ctrlBar[c].SetColours(ctrlF, cB)
		ctrlBar[c].Locate(cr*cw, lv[c]*lh, wr*cw, lh)
		bx.Write(ctrlText[c], lv[c]+1, cr)
	}
	for i := 0; i < 2; i++ {
		timeBar[i] = pbar.New(true)
		timeBar[i].SetColours(ctrlF, cB)
		timeBar[i].Locate(cr*cw, lt[i]*lh, wr*cw, lh)
		bx.Write(timeText[i], lt[i]+1, cr)
	}
	scr.MouseCursor(true)
	scr.WarpMouse(lv[cdker.All]+1, cr+wr/4)
}
Example #8
0
func init() {
	//
	Aktionstext = [nAktionen]string{
		"LinksDrehen", "RechtsDrehen",
		"Laufen1", "Zuruecklaufen1",
		"Legen1", "Leeren1", "Schieben1",
		"Markieren", "Entmarkieren",
		"Mauern1", "Entmauern1"}
	farbeV, farbeH = col.Black, col.LightWhite
	randfarbe = col.White
	mauerfarbe = col.LightRed // ziegelrot
	schrittweise = true

	Hilfe = [...]string{
		"               Roboter auf der Stelle drehen:  Pfeiltasten              ",
		"         Roboter einen Schritt laufen lassen:  Pfeiltasten              ",
		"                                                                        ",
		"einen Klotz auf der Stelle ablegen/aufnehmen:  Einfüge-/Entfernungstaste",
		" Klotz(-haufen) einen Schritt weiterschieben:  Eingabetaste (Enter)     ",
		"                  Klotz(-haufen) wegschießen:  Umschalt- + Eingabetaste ",
		"                                                                        ",
		"       Mauer setzen und einen Schritt laufen:  Anfangstaste (Pos1)      ",
		"    Mauer vor Roboter abreißen, weiterlaufen:  Endetaste                ",
		"                                                                        ",
		"            Markierung auf der Stelle setzen:  Tabulatortaste, F5-Taste ", // oder Bild abwärts
		"         Markierung auf der Stelle entfernen:  Tabulatortaste, F6-Taste ", // oder Bild aufwärts
		"                 alle Markierungen entfernen:  Umschalt- + F6-Taste     ",
		"                                                                        ",
		"            jeweils letzten Zug zurücknehmen:  Rücktaste (<-)           ",
		"alle Züge zurücknehmen, d.h. ganz zum Anfang:  Umschalt- + Rücktaste    ",
		"                                                                        ",
		"                      Roboterwelt ausdrucken:  Drucktaste               ",
		"                                                                        ",
		"                              Editor beenden:  Schlusstaste (Esc)       ",
		"                                                                        "}
	Sokobanhilfe = [...]string{
		Hilfe[0],
		"",
		"laufen: Pfeiltasten           Zug zurücknehmen: <-           fertig: Esc",
		"",
		"            Bedienungshinweise für Sokoban folgen irgendwann            "}

	for reihe := 1; reihe < zellengroesse-1; reihe++ {
		bild[nichts][reihe] = "x                              x"
	}
	bild[nichts][0] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
	bild[nichts][zellengroesse-1] = bild[nichts][0]
	/*
	   bild [einRoboter] = [zellengroesse]string {
	     "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	     "x             ++++             x",
	     "x            ++++++            x",
	     "x           +oo++oo+           x",
	     "x           +oo++oo+           x",
	     "x           ++++++++           x",
	     "x            +oooo+            x",
	     "x             ++++             x",
	     "x             +oo+             x",
	     "x           +oooooo+           x",
	     "x         +oooooooooo+         x",
	     "x        +ooo+oooo+ooo+        x",
	     "x       +ooo +oooo+ ooo+       x",
	     "x      +ooo  +oooo+  ooo+      x",
	     "x      +ooo  +oooo+   ooo+     x",
	     "x      +oo   +oooo+    oo+     x",
	     "x     +oo    +oooo+    oo+     x",
	     "x     +oo   ++++++++   oo+     x",
	     "x    o+o    +oooooo+  o+o      x",
	     "x    o+o    +oooooo+  o+o      x",
	     "x          +ooo  ooo+          x",
	     "x         +ooo    ooo+         x",
	     "x         +ooo    ooo+         x",
	     "xkkkkkkkk +ooo    ooo+   mmmm  x",
	     "xkkkkkkkk +ooo    ooo+  mmmmmm x",
	     "xkkkkkkkk +oo     oo+  mmm  mmmx",
	     "xkkkkkkkk +oo     oo+  mm    mmx",
	     "xkkkkkkkk +oo     oo+  mm    mmx",
	     "xkkkkkkkk +oo     oo+  mmm  mmmx",
	     "xkkkkkkkooooo     ooooo mmmmmm x",
	     "xkkkkkkkooooo     ooooo  mmmm  x",
	     "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
	*/
	bild[einRoboter] = [zellengroesse]string{
		"xxxxxxxxxxxooxxxxxxxxxxxxxxxxxxx",
		"x          oo                  x",
		"x          oo                  x",
		"x          oo ++++             x",
		"x          oo++++++            x",
		"x          o++++++++           x",
		"x      oooo++oo++oo++oooo      x",
		"x        oo+ooo++ooo+oo        x",
		"x         o++oo++oo++o         x",
		"x         ++++++++++++         x",
		"x        ++++oo++oo++++        x",
		"x        +++++oooo+++++        x",
		"x             ++++             x",
		"x       +oo++++++++++oo+       x",
		"x      +ooo+oooooooo+ooo+      x",
		"x      +ooo+oooooooo+ooo+      x",
		"x     +ooo++oooooooo++ooo+     x",
		"x     +oo+ +oooooooo+ +oo+     x",
		"x    +ooo+ +oooooooo+ +ooo+    x",
		"x   +ooo+  ++++++++++  +ooo+   x",
		"x   oooo   oooooooooo   oooo   x",
		"xkkko+o+kkkoooooooooo   +o+o   x",
		"xkkko+o+kkk+oooooooo+   +o+o   x",
		"xkkko+o+kkk+oo++++oo+   +o+om  x",
		"xkkkkkkkkkk+oo+  +oo+   mmmmmm x",
		"xkkkkkkkkkk+oo+  +oo+  mmm  mmmx",
		"xkkkkkkkkkk+oo+  +oo+  mm    mmx",
		"xkkkkkkkkkk+oo+  +oo+  mm    mmx",
		"xkkkkkkkkoooooo  oooooommm  mmmx",
		"xkkkkkkkooooooo  ooooooommmmmm x",
		"xkkkkkkoooooooo  oooooooommmm  x",
		"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

	bild[klotz] = [zellengroesse]string{
		"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
		"x                              x",
		"x           oo                 x",
		"x          o  oooo             x",
		"x         o       oooo         x",
		"x        o   mmmmmm   oooo     x",
		"x       o  mmmmmmmmmm     ooo  x",
		"x      o  mmmmm  mmmmm     oo  x",
		"x     o   mmmm     mmmm   o o  x",
		"x    o     mmmmm  mmmmm  o  o  x",
		"x   oo      mmmmmmmmmm  o   o  x",
		"x   oooooo    mmmmmm   o  o o  x",
		"x   oo o ooooo        o     o  x",
		"x   o o o o o oooo   o  o   o  x",
		"x   oo o o o o o oooo     o o  x",
		"x   o o o o o o o o o o     o  x",
		"x   oo o o o o o o oo   o   o  x",
		"x   o o o o o o o o o     o o  x",
		"x   oo o o o o o o oo o     o  x",
		"x   o o o o o o o o o   o   o  x",
		"x   oo o o o o o o oo     o o  x",
		"x   o o o o o o o o o o     o  x",
		"x   oo o o o o o o oo   o  o   x",
		"x   o o o o o o o o o     o    x",
		"x   oo o o o o o o oo o  o     x",
		"x   ooo o o o o o o o   o      x",
		"x     oooo o o o o oo  o       x",
		"x         ooooo o o o o        x",
		"x             oooo ooo         x",
		"x                 ooo          x",
		"x                              x",
		"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

	bild[marke] = [zellengroesse]string{
		"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x            oooooo            x",
		"x          oooooooooo          x",
		"x         ooooo  ooooo         x",
		"x         oooo     oooo        x",
		"x          ooooo  ooooo        x",
		"x           oooooooooo         x",
		"x             oooooo           x",
		"x                              x",
		"x                              x",
		"x                              x",
		"x                              x",
		"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

	bild[mauer] = [zellengroesse]string{
		"oooooooooooooooooooooooooooooooo",
		"           o               o    ",
		"           o               o    ",
		"           o               o    ",
		"oooooooooooooooooooooooooooooooo",
		"   o               o            ",
		"   o               o            ",
		"   o               o            ",
		"oooooooooooooooooooooooooooooooo",
		"           o               o    ",
		"           o               o    ",
		"           o               o    ",
		"oooooooooooooooooooooooooooooooo",
		"   o               o            ",
		"   o               o            ",
		"   o               o            ",
		"oooooooooooooooooooooooooooooooo",
		"           o               o    ",
		"           o               o    ",
		"           o               o    ",
		"oooooooooooooooooooooooooooooooo",
		"   o               o            ",
		"   o               o            ",
		"   o               o            ",
		"oooooooooooooooooooooooooooooooo",
		"           o               o    ",
		"           o               o    ",
		"           o               o    ",
		"oooooooooooooooooooooooooooooooo",
		"   o               o            ",
		"   o               o            ",
		"   o               o            "}

	farbe = [MaxRobo + 1]col.Colour{
		col.FlashRed, col.FlashGreen, col.FlashBlue, col.DarkYellow,
		col.LightCyan, col.FlashMagenta, col.Orange, col.Pink,
		col.Red, col.Green, col.Blue, col.Brown,
		col.Cyan, col.Magenta, col.DarkOrange, col.DeepPink,
		col.LightWhite}

	scr.Switch(scr.WVGApp)
}
Example #9
0
func init() {
	//
	v.Want(13, 1, 19)
	Text[Fußweg] = "F"
	Farbe[Fußweg] = col.Colour3(170, 170, 170)
	Text[U1] = "U1"
	Farbe[U1] = col.Colour3(83, 177, 71)
	Text[U2] = "U2"
	Farbe[U2] = col.Colour3(241, 89, 35)
	Text[U3] = "U3"
	Farbe[U3] = col.Colour3(22, 166, 150)
	Text[U4] = "U4"
	Farbe[U4] = col.Colour3(255, 212, 2)
	Text[U5] = "U5"
	Farbe[U5] = col.Colour3(131, 90, 67)
	Text[U55] = "U55"
	Farbe[U55] = col.Colour3(131, 90, 67)
	Text[U6] = "U6"
	Farbe[U6] = col.Colour3(129, 114, 173)
	Text[U7] = "U7"
	Farbe[U7] = col.Colour3(6, 158, 211)
	Text[U8] = "U8"
	Farbe[U8] = col.Colour3(0, 97, 159)
	Text[U9] = "U9"
	Farbe[U9] = col.Colour3(234, 133, 28)
	Text[S1] = "S1"
	Farbe[S1] = col.Colour3(229, 76, 255) // ab hier alte Farben
	Text[S2] = "S2"
	Farbe[S2] = col.Colour3(0, 179, 0)
	Text[S25] = "S25"
	Farbe[S25] = Farbe[S2]
	Text[S3] = "S3"
	Farbe[S3] = col.Colour3(0, 115, 242)
	Text[S41] = "S41"
	Farbe[S41] = col.Colour3(54, 38, 208)
	Text[S42] = "S42"
	Farbe[S42] = col.Colour3(91, 76, 208)
	Text[S4] = "S4"
	Farbe[S4] = Farbe[S41]
	Text[S45] = "S45"
	Farbe[S45] = col.Colour3(92, 128, 38)
	Text[S46] = "S46"
	Farbe[S47] = Farbe[S45]
	Text[S47] = "S47"
	Farbe[S47] = Farbe[S45]
	Text[S5] = "S5"
	Farbe[S5] = col.Colour3(254, 89, 0)
	Text[S7] = "S7"
	Farbe[S7] = col.Colour3(102, 88, 243)
	Text[S75] = "S75"
	Farbe[S75] = Farbe[S7]
	Text[S8] = "S8"
	Farbe[S8] = col.Colour3(75, 243, 0)
	Text[S85] = "S85"
	Farbe[S85] = Farbe[S8]
	Text[S9] = "S9"
	Farbe[S9] = col.Colour3(127, 0, 77)
	/*
	   if true { // zu Testzwecken
	     T, M, sch:= env.Par (1); scr.Mode (), false
	     if len (T) == 1 {
	       sch = true
	       switch T[0] {
	       case 'v': M = VGA
	       case 'x': M = XGA
	       case 'w': M = WXGA
	       case 's': M = SXGA
	       case 'u': M = UXGA
	       default: sch = false
	       }
	     }
	     if sch && scr.Switchable (M) {
	       scr.Switch (M)
	     }
	   }
	*/
	M := scr.MaxMode()
	scr.Switch(M)
	//  f, l, b:= v.Colours(); t:= ""; errh.MurusLicense ("sunetz", "19. Januar 2013", "Christian Maurer", f, l, b, &t)
	if M <= scr.XGA {
		scr.SwitchFontsize(font.Tiny)
	} else {
		scr.SwitchFontsize(font.Small)
	}
	col.ScreenF, col.ScreenB = col.Black, col.LightWhite
	scr.Cls()
}
Example #10
0
func main() {
	//
	h := [...]string{
		// 0         1         2         3         4         5         6         7
		// 012345678901234567890123456789012345678901234567890123456789012345678901234567
		"   Art (Farbe) für neue Figur auswählen: (Umschalt- +) Leer- oder Rolltaste   ",
		//  "                 Schriftgröße auswählen: Alt- + Leer- oder Rolltaste          ",
		"                    neue Figur erzeugen: linke Maustaste,                     ",
		"                                         Streckenzüge, Polygone und Kurven    ",
		"                                         mit rechter Maustaste abschließen,   ",
		"                                         Texteingabe mit Eingabetaste beenden ",
		"                           Figur ändern: Alt- + linke Maustaste, die 'Punkte' ",
		"                                         mit rechter Maustaste verschieben,   ",
		"                                         mit linker Maustaste abschließen     ",
		"                           Figur färben: Umschalt-, Alt- + linke Maustaste    ",
		"             (alle) Figur(en) markieren: (Umschalt- +) F5-Taste oder          ",
		"                                         (Alt- +) mittlere Maustaste          ",
		"          (alle) Figur(en) entmarkieren: (Umschalt- +) F6-Taste oder          ",
		"                                         Umschalt- + (Alt- +) mittl. Maustaste",
		"           markierte Figur(en) kopieren: Umschalt- + linke Maustaste          ",
		"      (markierte) Figur(en) verschieben: (Umschalt- +) rechte Maustaste       ",
		"          (markierte) Figur(en) löschen: (Umschalt- +) Entfernungtaste oder   ",
		"                                         (Umschalt-,) Alt- + rechte Maustaste ",
		"     letzte gelöschte Figur zurückholen: Rücktaste (<-)                       ",
		"          letzte erzeugte Figur löschen: Umschalt- + Rücktaste (<-)           ",
		"letzte gelöschte mark. Fig. zurückholen: Alt- + Rücktaste (<-)                ",
		"Hintergrundfarbe umschalten (auswählen): (Umschalt- +) F4-Taste               ",
		" Figuren aus eBoard holen und markieren: F7-Taste                             ",
		"    markierte Figuren in eBoard ablegen: F8-Taste                             ",
		"                      eBoard ausdrucken: Drucktaste                           ",
		"                           ePen beenden: Abbruchtaste (Esc)                   ",
		"                                                                              ",
		"                  Steuerungstaste (Strg) wirkt wie Umschalttaste              "}
	help := make([]string, len(h))
	for i := 0; i < len(h); i++ {
		str.Set(&help[i], h[i])
	}
	scr.Switch(scr.SXGA)
	actColour = col.ScreenF
	paperColour = col.ScreenB
	//  fo = scr.Normal
	figure = fig2.New()
	newFigure := fig2.New()
	newFigure.SetColour(actColour)
	figures, copiedFigures, image = seq.New(newFigure), seq.New(newFigure), seq.New(newFigure)
	cuttedFigures, depot = seq.New(newFigure), seq.New(newFigure)
	stack = stk.New(newFigure)
	name, filename := names()
	if filename == "" {
		return
	}
	origname := filename
	load(figures, filename)
	//  extract (paperColour)
	write()
	var x0, y0 int // kbd.Push
	var movable bool
	var Schub int
loop:
	for {
		scr.MouseCursor(true)
		//    control(); write()
		c, cmd, d := kbd.Read()
		if cmd == kbd.None {
			switch c {
			case ' ':
				cmd = kbd.Roll
			}
		}
		xm, ym := scr.MousePosGr()
		switch d {
		case 0:
			Schub = 8
		case 1:
			Schub = int(scr.NY() / 40)
		default:
			Schub = int(scr.NX() / 8)
		}
		switch cmd {
		case kbd.Esc:
			break loop
		case kbd.Enter:
			// actualize ?
		case kbd.Back:
			switch d {
			case 0:
				ins(top())
			case 1:
				delLast()
			default:
				getMarked()
			}
		case kbd.Left:
			kick(spc.Right, Schub)
		case kbd.Right:
			Schub = -Schub
			kick(spc.Right, Schub)
		case kbd.Up:
			kick(spc.Top, Schub)
		case kbd.Down:
			Schub = -Schub
			kick(spc.Top, Schub)
		case kbd.Del:
			switch d {
			case 0:
				if deleted(xm, ym) {
					push()
				}
			default:
				delMarked()
			}
		case kbd.Tab:
			// free for use
		case kbd.Help:
			scr.SwitchFontsize(font.Normal)
			errh.WriteHelp(help)
		case kbd.LookFor:
			// wird für die Auswahl des eBoards verwendet - NEIN, sondern:
			load(figures, filename)
			write()
		case kbd.Act:
			//      inject (paperColour)
			store(figures, filename)
		case kbd.Cfg:
			paperColour = sel.Colour()
			bgColour(paperColour)
		case kbd.Mark:
			switch d {
			case 0:
				mark(xm, ym, true)
			case 1:
				markAll(true)
			default:
				showMarked()
			}
		case kbd.Demark:
			switch d {
			case 0:
				mark(xm, ym, false)
			case 1:
				markAll(false)
			default:
				showMarked()
			}
		case kbd.Deposit:
			writeMarked()
		case kbd.Paste:
			readMarked()
		case kbd.PrintScr:
			print(name)
		case kbd.Roll:
			switch d {
			case 0:
				newFigure.Select()
			case 1:
				actColour = sel.Colour()
				newFigure.SetColour(actColour)
			case 2:
				scr.SwitchFontsize(font.Normal)
				//        fo = sel.Size (actColour)
				//        newFigure.SetFont (fo)
			}
		case kbd.Here:
			switch d {
			case 0:
				generate(newFigure)
			case 1:
				copyMarked()
			case 2:
				change(xm, ym)
			case 3:
				setColours(xm, ym, actColour)
			}
		case kbd.There:
			movable = underMouse(uint(xm), uint(ym)) && d <= 1
			x0, y0 = xm, ym // kbd.Push
			switch d {
			case 0:
				if movable {
					cut(xm, ym)
				}
			case 1:
				if movable {
					cutMarked()
				}
			case 2:
				if deleted(xm, ym) {
					push()
				}
			default:
				delMarked()
				write()
			}
		case kbd.Push:
			if movable {
				switch d {
				case 0:
					move(xm-x0, ym-y0)
				case 1:
					moveMarked(xm-x0, ym-y0)
				}
				x0, y0 = scr.MousePosGr()
			}
		case kbd.Thither:
			if movable {
				switch d {
				case 0:
					join()
				case 1:
					joinMarked()
				}
			}
		case kbd.This:
			switch d {
			case 0:
				mark(xm, ym, true)
			case 1:
				mark(xm, ym, false)
			case 2:
				markAll(true)
			case 3:
				markAll(false)
			}
			invMarked()
		case kbd.Thus:
			invMarked()
		}
	}
	markAll(false)
	_, filename = names()
	if filename == "" {
		filename = origname
	}
	//  inject (paperColour)
	store(figures, filename) // -> Terminieren
	ker.Terminate()
}