summaryrefslogtreecommitdiff
path: root/Userland/Applications/Calculator/Keypad.h
diff options
context:
space:
mode:
authorSamuel Eisenhandler <sgeisenhandler@gmail.com>2023-02-02 23:10:13 -0500
committerSam Atkins <atkinssj@gmail.com>2023-02-05 08:07:45 +0000
commitc5360b1a5f29bc210cff9dbda0952ee56ce3f942 (patch)
tree9cf3a80ee447541ecd4b636f95d6f4a098470db1 /Userland/Applications/Calculator/Keypad.h
parentf58668031db222b2b4a2e8c5897745d0158b4bab (diff)
downloadserenity-c5360b1a5f29bc210cff9dbda0952ee56ce3f942.zip
Calculator: Treat constants and pasted numbers as input
Constants and pasted numbers leave Keypad in the External state which causes subsequent operations to be performed without an argument.
Diffstat (limited to 'Userland/Applications/Calculator/Keypad.h')
-rw-r--r--Userland/Applications/Calculator/Keypad.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/Calculator/Keypad.h b/Userland/Applications/Calculator/Keypad.h
index af32de260f..3ef3be3a9d 100644
--- a/Userland/Applications/Calculator/Keypad.h
+++ b/Userland/Applications/Calculator/Keypad.h
@@ -27,6 +27,7 @@ public:
Crypto::BigFraction value() const;
void set_value(Crypto::BigFraction);
+ void set_typed_value(Crypto::BigFraction);
void set_to_0();
void shrink(unsigned);
@@ -56,6 +57,7 @@ private:
enum class State {
External,
+ TypedExternal,
TypingInteger,
TypingDecimal
};