Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/button.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-06-20 22:12:14 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-06-20 22:12:14 (GMT)
commit0a4db4aa9d53e17b60c42f1ee3b6a238ed741a83 (patch)
tree2ec84f646aa33af20c9f98b98d2ea2765fda4912 /button.py
parentb2dc1cbdffc307e723ac09ca54e8d5811cc8c87f (diff)
ui overhaul continues
git-svn-id: http://mediamods.com/public-svn/camera-activity/Camera.activity@102 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'button.py')
-rwxr-xr-xbutton.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/button.py b/button.py
deleted file mode 100755
index d83dc41..0000000
--- a/button.py
+++ /dev/null
@@ -1,55 +0,0 @@
-from polygon import Polygon
-
-class Button:
-
- def __init__(self, poly, offX, offY):
- self._poly = poly
- self._offX = offX
- self._offY = offY
-
- self._enabled = True
- self._pressed = False
- self._toggle = False
-
- self._listeners = []
-
- self._actionCommand = None
-
- self._img = None
-
-
- def addActionListener(self, listen):
- self._listeners.append(listen)
-
-
- def removeActionListener(self, listen):
- self._listeners.remove(listen)
-
-
- def setActionCommand(self, command):
- self._actionCommand = command
-
-
- def getActionCommand(self):
- return self._actionCommand
-
-
- def setImage(self, img):
- self._img = img
-
-
- def contains( self, mx, my ):
- x = mx - self._offX
- y = my - self._offY
-
- contains = self._poly.contains( x, y )
- return contains
-
-
- def doPressed( self ):
- for i in range ( 0, len(self._listeners) ):
- self._listeners[i].fireButton( self._actionCommand )
-
-
- def isImg( self ):
- return self._img != None \ No newline at end of file