summaryrefslogtreecommitdiff
path: root/gui.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'gui.rkt')
-rw-r--r--gui.rkt11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui.rkt b/gui.rkt
index 98b4f77..0c465f2 100644
--- a/gui.rkt
+++ b/gui.rkt
@@ -71,13 +71,22 @@
(lambda (x) (setup-num-btn x bottom-op-panel))
'(0 "." ^ ))
+ (new button%
+ [parent top-op-panel]
+ [label "←"]
+ [callback
+ (lambda (button event)
+ (define str (send msg get-label))
+ (send msg set-label (substring str 0 (- (string-length str) 1))))])
+
(new button%
[parent bottom-op-panel]
[label "="]
[callback
(lambda (button event)
+ (define ^ expt)
(send msg set-label (~a
- (full-eval (full-parse (send msg get-label))))))])
+ (eval (full-parse (send msg get-label))))))])
(send frame show #t))