From c5b28bdb50886988890ba2221585c1112319f427 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 04 Jun 2010 23:18:35 +0000 Subject: added custom toolbar 0.86+ only --- (limited to 'abacus_window.py') diff --git a/abacus_window.py b/abacus_window.py index 9de0271..06cb8be 100644 --- a/abacus_window.py +++ b/abacus_window.py @@ -205,6 +205,7 @@ class Abacus(): self.binary = Binary(self) self.hex = Hex(self) self.fraction = Fractions(self) + self.custom = None self.chinese.show() self.japanese.hide() @@ -562,6 +563,21 @@ class AbacusGeneric(): self.beads[i+ii].move_down() +class Custom(AbacusGeneric): + """ A custom-made abacus """ + + def __init__(self, abacus, rods, top, bottom, factor, base): + """ Specify parameters that define the abacus """ + self.abacus = abacus + self.name = 'custom' + self.num_rods = rods + self.bot_beads = bottom + self.top_beads = top + self.base = base + self.top_factor = factor + self.create() + + class Nepohualtzintzin(AbacusGeneric): """ A Mayan abacus """ -- cgit v0.9.1