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

Diff of /gnue/common/src/cursing/VButton.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  # VButton.py  # VButton.py
# Line 39  class VButton(Button): Line 39  class VButton(Button):
39      apply(Button.__init__, (self, Parent, ButtonName, Y, X, H, Caption),properties)      apply(Button.__init__, (self, Parent, ButtonName, Y, X, H, Caption),properties)
40      self.W = 1      self.W = 1
41      self.H = H      self.H = H
42      self.COLOR = sio.C_SCROLL_BUTTON      self.SetColor('SCROLL_BUTTON','SCROLL_BUTTON_FOCUS')
     self.FOCUSCOLOR = sio.C_SCROLL_BUTTON_FOCUS  
43    
44    
45    def Paint(self, HaveFocus, v2,v3):    def Paint(self, HaveFocus, v2,v3):
# Line 48  class VButton(Button): Line 47  class VButton(Button):
47      if Container == None:      if Container == None:
48        raise "Container is Nothing in def Paint!"        raise "Container is Nothing in def Paint!"
49      if HaveFocus:      if HaveFocus:
50        self.SetColor(sio.C_SCROLL_BUTTON_FOCUS)        color = self.FOCUSCOLOR
       self.HiLight()  
51      else:      else:
52        self.SetColor(sio.C_SCROLL_BUTTON)        color = self.COLOR
53        self.LoLight()      tROW, tCOL = self._ABSY, self._ABSX
     tROW, tCOL = self.Y, self.X  
54      tCaption = self.CAPTION      tCaption = self.CAPTION
55      tW = self.H      tW = self.H
56      tAW = tW - 2      tAW = tW - 2
# Line 73  class VButton(Button): Line 70  class VButton(Button):
70        tCaption = (" " * leadingSpaces) + tCaption + (" " * spaces)        tCaption = (" " * leadingSpaces) + tCaption + (" " * spaces)
71      tCaption = tCaption      tCaption = tCaption
72      for i in range(0,len(tCaption)):      for i in range(0,len(tCaption)):
73        Container.PutAt(tROW + i, tCOL, tCaption[i])        Container.PutAt(tROW + i, tCOL, tCaption[i], color)
74    
75    

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