Example #1
0
func New(o Object) *Imp {
	//
	x := new(Imp)
	switch o.(type) {
	case *enum.Imp:
		x.Object, x.typ = enum.New(enum.Enum(o.(*enum.Imp).Typ())), Enumerator
	case *tval.Imp:
		x.Object, x.typ = tval.New(), TruthValue
	case *char.Imp:
		x.Object, x.typ = char.New(), Character
	case *text.Imp:
		x.Object, x.typ = text.New(o.(*text.Imp).Len()), Text
	case *bnat.Imp:
		x.Object, x.typ = bnat.New(o.(*bnat.Imp).Startval()), Natural
	case *breal.Imp:
		x.Object, x.typ = breal.New(4), Real
	case *clk.Imp:
		x.Object, x.typ = clk.New(), Clocktime
	case *day.Imp:
		x.Object, x.typ = day.New(), Calendarday
	case *euro.Imp:
		x.Object, x.typ = euro.New(), Euro
	case *cntry.Imp:
		x.Object, x.typ = cntry.New(), Country
	case *pers.Imp:
		x.Object, x.typ = pers.New(), Person
	case *phone.Imp:
		x.Object, x.typ = phone.New(), PhoneNumber
	case *addr.Imp:
		x.Object, x.typ = addr.New(), Address
	default:
		ker.Panic("atom.New: parameter does not characterize an atom.Atomtype")
	}
	return x
}
Example #2
0
func New() *Imp {
	//
	x := new(Imp)
	for n := uint(0); n < max; n++ {
		x.lang[n] = enum.New(enum.Subject)
		x.from[n], x.to[n] = bnat.New(11), bnat.New(11)
	}
	x.cF, x.cB = col.ScreenF, col.ScreenB
	return x
}
Example #3
0
func New() *Imp {
	//
	x := new(Imp)
	x.Imp = mol.New()
	a := atom.New(enum.New(enum.Composer))
	a.SetColours(col.Yellow, col.Black)
	x.Ins(a, 0, 11)
	a = atom.New(text.New(lenWerk))
	a.SetColours(col.LightRed, col.Black)
	x.Ins(a, 1, 11)
	a = atom.New(text.New(lenOrch)) // Orchester
	x.Ins(a, 2, 11)
	a = atom.New(text.New(lenName)) // Dirigent
	a.SetColours(col.Cyan, col.Black)
	x.Ins(a, 3, 11)
	a = atom.New(text.New(lenName)) // Solist
	a.SetColours(col.LightBlue, col.Black)
	x.Ins(a, 4, 11)
	a = atom.New(text.New(lenName)) // Solist
	a.SetColours(col.LightBlue, col.Black)
	x.Ins(a, 5, 11)
	a = atom.New(enum.New(enum.RecordLabel))
	a.SetColours(col.LightCyan, col.Black)
	x.Ins(a, 6, 11)
	a = atom.New(enum.New(enum.AudioMedium))
	x.Ins(a, 7, 11)
	a = atom.New(enum.New(enum.SparsCode))
	x.Ins(a, 8, 11)

	var m *masks.Imp = masks.New()
	m.Ins("Komponist:", 0, 0)
	m.Ins("     Werk:", 1, 0)
	m.Ins("Orchester:", 2, 0)
	m.Ins(" Dirigent:", 3, 0)
	m.Ins(" Solist 1:", 4, 0)
	m.Ins(" Solist 2:", 5, 0)
	m.Ins("    Firma:", 6, 0)
	m.Ins("   Platte:", 7, 0)
	m.Ins("       ad:", 8, 0)
	x.SetMask(m)

	return x
}
Example #4
0
func New() *Imp {
	//
	x := new(Imp)
	x.surname = text.New(lenName)
	x.firstName = text.New(lenFirstName)
	x.fm = tval.New()
	x.fm.SetFormat("m", "w")
	x.bd = day.New()
	x.ti = enum.New(enum.Title)
	x.fmt = LongB
	return x
}
Example #5
0
func New() *Imp {
	//
	x := new(Imp)
	x.person = pers.New()
	x.placeOfBirth = text.New(lenPlace)
	x.nationality = cntry.New()
	x.address = addr.New()
	x.legalGuardian = pers.New()
	x.legalGuardian.SetFormat(pers.LongT)
	x.addressLG = addr.New()
	x.langSeq = langs.New()
	x.religion = enum.New(enum.Religion)
	x.format = Short
	x.SetColours(col.LightCyan, col.Black)
	return x
}
Example #6
0
func Selected(l, c uint) *Imp {
	//
	cF, cH := col.ScreenF, col.ScreenB
	col.Contrast(&cH)
	n := uint(0)
	z, s := scr.MousePos()
	x := new(Imp)
	sel.Select1(name, uint(NAtomtypes), M, &n, z, s, cF, cH)
	if n < uint(NAtomtypes) {
		x.typ = Atomtype(n)
	} else {
		return nil
	}
	switch x.typ {
	case Enumerator:
		e := enum.Title // TODO e per select-menue aussuchen
		x.Object = enum.New(e)
	case TruthValue:
		x.Object = tval.New()
	case Character:
		x.Object = char.New()
	case Text:
		n := uint(10) // TODO n editieren
		x.Object = text.New(n)
	case Natural:
		n := uint(10) // TODO n editieren
		x.Object = bnat.New(n)
	case Real:
		n := uint(6) // TODO n editieren
		x.Object = breal.New(n)
	case Clocktime:
		x.Object = clk.New()
	case Calendarday:
		x.Object = day.New()
	case Euro:
		x.Object = euro.New()
	case Country:
		x.Object = cntry.New()
	case Person:
		x.Object = pers.New()
	case PhoneNumber:
		x.Object = phone.New()
	case Address:
		x.Object = addr.New()
	}
	return New(x)
}