+ def SetCurrent(self, current):
+ """Set current image"""
+ running = self.Running()
+ if not running:
+ #FIXME: need to make sure value is within range!!!
+ self.current = current
+ self.Draw(wx.ClientDC(self))
+
+
+ def SetRest(self, rest):
+ """Set rest image"""
+ self.rest = rest
+
+
+ def SetSequence(self, sequence = None):
+ """Order to display images"""
+
+ # self.sequence can be changed, but it's not recommended doing it
+ # while the throbber is running. self.sequence[0] should always
+ # refer to whatever frame is to be shown when 'resting' and be sure
+ # that no item in self.sequence >= self.frames or < 0!!!
+
+ running = self.Running()
+ self.Stop()
+
+ if sequence is not None:
+ #FIXME: need to make sure values are within range!!!
+ self.sequence = sequence
+ else:
+ self.sequence = range(self.frames)
+
+ if running:
+ self.Start()
+
+
+ def Increment(self):
+ """Display next image in sequence"""
+ self.current += 1
+ self.Wrap()
+
+
+ def Decrement(self):
+ """Display previous image in sequence"""
+ self.current -= 1
+ self.Wrap()
+
+
+ def Next(self):
+ """Display next image in sequence according to direction"""
+ self.current += self.direction
+ self.Wrap()
+
+
+ def Previous(self):
+ """Display previous image in sequence according to direction"""
+ self.current -= self.direction
+ self.Wrap()
+
+