Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/abacus_window.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-06-04 23:18:35 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-06-04 23:18:35 (GMT)
commitc5b28bdb50886988890ba2221585c1112319f427 (patch)
tree5381b472174e3e4da10c5363c60f7aa0cf169999 /abacus_window.py
parent4fc632b114344b600c8adc260b9babe0fbc715c2 (diff)
added custom toolbar 0.86+ only
Diffstat (limited to 'abacus_window.py')
-rw-r--r--abacus_window.py16
1 files changed, 16 insertions, 0 deletions
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 """