User:Woozle/software/design specs/FerretCalc

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search

I actually have a working version of this written in Gambas, but it had some bugs, I think?

Screenshot at 2018-01-31 20-49-07.png

If nothing else, maybe the operations (+,=) should go to the right of the numbers (ideally, that should be a user preference).

Size, color of "tape" font should be adjustable.

Operation Spec

Visible Components

The main window consists of two main parts:

  • the operation area, shown on the left:
    • ED - entry display (black rectangle at the top) - interactively shows entry of the current value to be applied
    • virtual keypad (buttons below that)
  • the results area, shown on the right:
    • OD - operation display (black rectangle at the top) - shows the value to be operated on, and what binary operation (+,-,x, etc.) will be done on it
    • OH - operation history, aka "the tape" - shows values, what operations were done on them, and what the resulting value was for each, in chronological order (newest at the bottom)

Keyboard

The graphical keyboard acts just like any virtual keyboard: items clicked act as if they had been typed on a physical keyboard. Preferably, typing a key on the physical keyboard should cause some visible action on the virtual keyboard, but this is optional.

Digits and operations entered on either (physical or virtual) keyboard appear on the entry display (top left black box), shifting from right to left (i.e. text is entered left-to-right by stays right-aligned).

Specialized Keys

  • Operator keys (+,-,x...): when one of these is pressed, the value in the ED is moved to the OD, the operation selected is shown in the OD, and the ED is cleared.
  • The = (equals) key causes the value in the ED to be applied to the value shown in the OD, using the operator shown in the OD. The ED value is appended to the OH, along with the operation shown in the OD. The resulting (calculated) value is appended to the OH as well (along with the "=" operation, and preferably a clear visual indicator which ultimately should be user-configurable). Each "append" means a new line in the OH.
  • The physical-keyboard [Enter] key acts just like the [=] key.
  • The [C] key clears the current number entry but not the current operation.
    • Example: typing 10+20[C] leaves you with "10 +" in the operation display
  • The [CO] key clears the current operation but not the previous value.
    • Example: typiing 10+20[CE] clears the operation display and leaves you with "10" in the entry display
  • The [CA] key clears all (everything) from entry and operation displays, allowing you to start a fresh operation.