graphics/SFC_Objects.py
changeset 478 dc403c47af54
parent 383 25ffba02b6a8
child 537 a31bf722aa82
--- a/graphics/SFC_Objects.py	Tue Dec 08 16:29:16 2009 +0100
+++ b/graphics/SFC_Objects.py	Tue Dec 08 17:10:30 2009 +0100
@@ -73,6 +73,12 @@
             self.Action.Flush()
             self.Action = None
     
+    def SetForced(self, forced):
+        if self.Forced != forced:
+            self.Forced = forced
+            if self.Visible:
+                self.Parent.UpdateRefreshRect(self.GetRedrawRect())
+    
     def SetValue(self, value):
         self.PreviousValue = self.Value
         self.Value = value
@@ -520,7 +526,12 @@
     def Draw(self, dc):
         Graphic_Element.Draw(self, dc)
         if self.Value:
-            dc.SetPen(wx.GREEN_PEN)
+            if self.Forced:
+                dc.SetPen(wx.CYAN_PEN)
+            else:
+                dc.SetPen(wx.GREEN_PEN)
+        elif self.Forced:
+            dc.SetPen(wx.Pen(wx.BLUE))
         else:
             dc.SetPen(wx.BLACK_PEN)
         dc.SetBrush(wx.WHITE_BRUSH)
@@ -587,6 +598,12 @@
             self.Condition.Flush()
             self.Condition = None
     
+    def SetForced(self, forced):
+        if self.Forced != forced:
+            self.Forced = forced
+            if self.Visible:
+                self.Parent.UpdateRefreshRect(self.GetRedrawRect())
+        
     def SetValue(self, value):
         self.PreviousValue = self.Value
         self.Value = value
@@ -935,8 +952,15 @@
     def Draw(self, dc):
         Graphic_Element.Draw(self, dc)
         if self.Value:
-            dc.SetPen(wx.GREEN_PEN)
-            dc.SetBrush(wx.GREEN_BRUSH)
+            if self.Forced:
+                dc.SetPen(wx.CYAN_PEN)
+                dc.SetBrush(wx.CYAN_BRUSH)
+            else:
+                dc.SetPen(wx.GREEN_PEN)
+                dc.SetBrush(wx.GREEN_BRUSH)
+        elif self.Forced:
+            dc.SetPen(wx.Pen(wx.BLUE))
+            dc.SetBrush(wx.BLUE_BRUSH)
         else:
             dc.SetPen(wx.BLACK_PEN)
             dc.SetBrush(wx.BLACK_BRUSH)