/[papo]/gnue/common/src/cursing/Control.py
ViewVC logotype

Diff of /gnue/common/src/cursing/Control.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by styxman, Fri Nov 15 15:32:55 2002 UTC revision 1.1.2.1 by anthonyl, Tue Mar 4 22:09:33 2003 UTC
# Line 16  Line 16 
16  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
17  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
18  #  #
19  # Copyright 2002 Free Software Foundation  # Copyright 2002-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # Control.py  # Control.py
# Line 35  class Control(GraphicObject): Line 35  class Control(GraphicObject):
35      apply (GraphicObject.__init__, (self, Parent.SCREEN),      apply (GraphicObject.__init__, (self, Parent.SCREEN),
36         properties)         properties)
37      self.NAME = CName      self.NAME = CName
38      self.FOCUSCOLOR = 2      self.SetColor('DIALOG','BACKGROUND')
     self.COLOR = 1  
39      self.X = -1      self.X = -1
40      self.Y = -1      self.Y = -1
41      self.VISIBLE = 1      self.VISIBLE = 1
# Line 50  class Control(GraphicObject): Line 49  class Control(GraphicObject):
49      self.Methods["LOSTFOCUS"] = None      self.Methods["LOSTFOCUS"] = None
50      self.Methods["ACTION"] = None      self.Methods["ACTION"] = None
51    
52    def DetermineAndSetColor(self, HasFocus):  ##  def DetermineAndSetColor(self, HasFocus):
53      if self.active:  ##    if self.active:
54        if HasFocus :  ##      if HasFocus :
55          self.SetColor(self.FOCUSCOLOR)  ##        self.SetColor(self.FOCUSCOLOR)
56        else:  ##      else:
57          self.SetColor(self.COLOR)  ##        self.SetColor(self.COLOR)
58      else:  ##    else:
59        pass  ##      pass
60        ##self.SetColor(4)  ##      ##self.SetColor(4)
61    
62    def CreateProperty(self, Property, Value):    def CreateProperty(self, Property, Value):
63      self.__dict__[Property] = Value      self.__dict__[Property] = Value
# Line 84  class Control(GraphicObject): Line 83  class Control(GraphicObject):
83    
84    def DeActivate(self, state):    def DeActivate(self, state):
85      if self.active != state:      if self.active != state:
       if state :  
         self.SetColor(self.PRIOR_COLOR)  
       else:  
         self.PRIOR_COLOR = self.LOLIGHT_COLOR  
         self.SetColor(4)  
       self.LoLight()  
86        self.active = state        self.active = state
87        self.Paint(0,0,0)        self.Paint(0,0,0)
88        self.ExecMethod("REFRESH",None,None,None)        self.ExecMethod("REFRESH",None,None,None)
89    
90    
91    def SetActiveState( self, state):    def SetActiveState( self, state):
     """Wrapper for DeActivate -- which is non-intuitively named :)"""  
92      self.DeActivate( state)      self.DeActivate( state)
93    
94    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26