Libraries
-
complex
-
-
controller
- The main controller for the application. The controller receives
Operation instances from the view in response to button presses,
and manipulates the Model.
-
controller.operations
- The calculator operations. This is split into its own library so that
it's encapsulated from the controller internals. Operations are split
into various types, viz:
-
controller.states
- The states of the controller, reflecting the input mode of the calculator.
There are three main states: Resting (the state it's usually in,
waiting for something to do), DigitEntry and ProgramEntry. There
are a large number of additional states, such as argument input,
or running a program. The full hierarchy looks like this:
-
jrpn15.back_panel
- The back panel of the calculator.
-
jrpn15.linalg
-
-
jrpn15.main
-
-
jrpn15.matrix
-
-
jrpn15.model15c
-
-
jrpn15.more_math
-
-
jrpn15.runners
-
-
jrpn15.tests
-
-
jrpn16.back_panel
- The back panel of the calculator.
-
jrpn16.main
-
-
jrpn16.tests
-
-
main
-
-
model
- The model for the calculator, centered around Model. It retains the
state of the calculator, most of which is saved persistently. It
also functions as a helper to the controller, by providing states
using the state pattern for calculator modes, like the DisplayMode
and the SignMode. The overall structure looks like this:
-
view.back_panel
- The back panel of the calculator.
-
view.buttons
- Buttons for the keyboard. When pressed, buttons consult the Model to see
if a shift key has been pressed, and dispatch an appropriate
Operation to the Controller.
-
view.isw
-
-
view.lcd_display
- Widget to draw the LCD Display, using a
CustomPainter
and
direct drawing commands. The main eleven-digit display doesn't
use a font; the individual segments are drawn.
-
view.main_screen
- The main screen of the calculator. It uses ScreenPositioner to
exactly position widgets, and scale them to the screen size.