## calculation-pane.api
#
# API for the app widget which displays a pane
# showing the user an arithmetic problem like
#
# 25
# + 36
# ----
#
# Compiled by:
#
src/lib/x-kit/tut/arithmetic-game/arithmetic-game-app.libstipulate
include package threadkit; # threadkit is from
src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkgherein
# This api is implemented in:
#
#
src/lib/x-kit/tut/arithmetic-game/calculation-pane.pkg #
api Calculation_Pane {
Calculation_Pane;
Right_Or_Wrong = RIGHT
| WRONG;
Difficulty = SINGLE
| EASY | MEDIUM | HARD;
Math_Op = ADD
| SUBTRACT | MULTIPLY;
math_ops: List( (Math_Op, Bool) );
math_op_to_string: Math_Op -> String;
make_calculation_pane: (widget::Root_Window, Null_Or(Mailslot(Int))) -> Calculation_Pane;
start_game: Calculation_Pane -> (Difficulty, Math_Op) -> Void;
reset: Calculation_Pane -> Void;
as_widget: Calculation_Pane -> widget::Widget;
right_or_wrong'_of: Calculation_Pane -> threadkit::Mailop( Right_Or_Wrong );
};
end;