func (x *Imp) Defined(s string) bool { // x.text = s str.Norm(&x.text, length) x.marked = false return true }
func (x *Imp) String() string { // s := "" if x.prefix > 0 { s = nat.String(uint(x.prefix)) s = "0" + s } if x.number > 0 { t := nat.String(x.number) n := len(t) switch n { case 4, 5: t = t[0:n-2] + " " + t[n-2:] case 6, 7: t = t[0:n-4] + " " + t[n-4:n-2] + " " + t[n-2:] case 8, 9: t = t[0:n-5] + " " + t[n-5:n-3] + " " + t[n-3:] } if x.prefix == 0 { s = t } else { s = s + " " + t } } str.Norm(&s, width) return s }
func (x *Imp) Defined(s string) bool { // if uint(len(s)) > x.length { return false } str.Set(&(x.content), s) str.Norm(&(x.content), x.length) return true }
func New(s string) *Imp { // x := new(Imp) str.Set(&x.text, s) x.text += " " str.Norm(&x.text, scr.NColumns()) x.isMenu = true x.execute = Null return x }
func EditActual(Z, S uint) { // actual.Write(Z, S) bx.Edit(&actual.text, Z, S) str.Move(&actual.text, true) str.RemSpaces(&actual.text) str.Norm(&actual.text, length) actual.Write(Z, S) file.Seek(0) file.Put(actual.text) }
func (x *Imp) String() string { // if x.r == x.invalid { return str.Clr(x.wd) } s := real.String(x.r) str.Move(&s, true) str.RemSpaces(&s) str.Norm(&s, x.wd) str.Move(&s, false) return s }
func New(t byte, s [NFormats][]string) *Imp { // x := new(Imp) x.typ, x.s = t, s x.num = uint(len(s[Short])) m := [NFormats]uint{uint(0), uint(0)} for f := Short; f < NFormats; f++ { for i, t := range s[f] { str.Set(&s[f][i], t) w := uint(len(s[f][i])) if m[f] < w { m[f] = w } } for i, _ := range s[f] { str.Norm(&s[f][i], m[f]) } // TODO gefährlich } x.wd = m x.cF, x.cB = col.ScreenF, col.ScreenB x.f = Short return x }
func (x *Imp) Decode(b []byte) { // x.text = string(b) str.Norm(&x.text, length) x.marked = false }