4 (with-html-output-to-string
11 (defun htm-input-button (name id tosend
)
14 (concatenate 'string
"uinput(\"" tosend
"\")")))
17 (name infixp
&key
(id "fn1") (input name
))
22 'string
"(" input
" "))))
25 (name id infix multi-param-p
26 &optional
(fntext name
))
32 (if multi-param-p
"(" " "))
34 'string
"(" fntext
" "))))
36 (defun htm-linalg-buttons (infix)
40 nil
"transpose" "inverse"
43 nil
("cat") ("vcat") ("crop") ("vcrop"))))
44 (with-output-to-string (strm)
53 (format nil
"fn~A" (length args
))
55 (t (destructuring-bind
56 (name &optional id
) args
60 (format nil
"fn~A" (length name
)))
66 ; (show-a-button "ok" elem "sendCalc()" 25 "white" "green"))
67 ;(show-a-button "clear" elem "cleartext()" 45 "white" "darkred"))
69 ;-- BEGIN SPECIAL BUTTON CREATORS --
71 ;V Use the button operation as a name.V
72 (defun simple-input-button (name &optional
(id "fn1"))
73 (htm-input-button name id name
))
75 (defun clear-button ()
76 (htm-button "clear" "clear" "cleartext()"))
80 (htm-button "ok" "ok" "sendCalc()"))
83 (defun memory-buttons (infix)
88 (if infix
"recall(\\\"" "(recall \\\""))
91 (if infix
"store(\\\"" "(store \\\""))))
93 ;-- END SPECIAL BUTTON CREATORS --
95 (defun htm-standard-math-buttons (infixp)
99 (with-output-to-string (strm)
103 (princ-to-string (+ i x
))
110 (opern-button "!" nil
:input
"factorial"))
112 (htm-fnbut "√" "fn1" infixp nil
"sqrt")
115 (opern-button "^" nil
:input
"expt"))
116 (simple-input-button "(")
117 (simple-input-button ")")
118 "<br />" (htm-3digits 7)
119 (opern-button "/" infixp
)
120 "<br />" (htm-3digits 4)
121 (opern-button "×" infixp
:input
"*")
122 "<br />" (htm-3digits 1)
123 (opern-button "-" infixp
)
125 (simple-input-button "0" "zerodigit")
126 (simple-input-button "." "digit")
127 (opern-button "+" infixp
)
129 (memory-buttons infixp
))))