File: clibox.go

package info (click to toggle)
mumax3 3.10-9
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 7,596 kB
  • sloc: makefile: 181; ansic: 155; sh: 77
file content (18 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package gui

import "fmt"

type clibox struct {
	data
}

func (e *clibox) update(id string) []jsCall {
	return []jsCall{} // We never set the value of the CLI box, only the user does
}

// Command-line interface textbox where user types commands.
func (d *Page) CliBox(id string, value interface{}, extra ...string) string {
	e := &clibox{data: data{value}}
	d.addElem(id, e)
	return fmt.Sprintf(`<input type=%v class=TextBox id=%v  %v />`, "text", id, cat(extra))
}