[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/cursing ColorScheme.py Control....
From: |
Jason Cater |
Subject: |
gnue/common/src/cursing ColorScheme.py Control.... |
Date: |
Thu, 12 Dec 2002 15:35:10 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/12/12 15:35:09
Modified files:
common/src/cursing: ColorScheme.py Control.py Dialog.py
FocusedLabel.py Frame.py Menu.py MenuBar.py
MenuItem.py Notebook.py ScreenContainer.py
VScrollBar.py
Log message:
ported cursing changes from 0.4.x branch
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/ColorScheme.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/Control.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/Dialog.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/FocusedLabel.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/Frame.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/Menu.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/MenuBar.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/MenuItem.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/Notebook.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/ScreenContainer.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/cursing/VScrollBar.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gnue/common/src/cursing/ColorScheme.py
diff -c gnue/common/src/cursing/ColorScheme.py:1.2
gnue/common/src/cursing/ColorScheme.py:1.3
*** gnue/common/src/cursing/ColorScheme.py:1.2 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/ColorScheme.py Thu Dec 12 15:35:08 2002
***************
*** 40,46 ****
pair = 2
self._cache = {}
for raw in text.upper().split(';'):
- GDebug.printMesg(1,raw)
attr, raw2 = raw.split('=')
try:
fgcolor, bgcolor = raw2.split(',')
--- 40,45 ----
***************
*** 82,88 ****
self.__dict__['CP_%s'%attr] = (mod, pr)
self.__dict__['C_%s'%attr] = v | mod
! GDebug.printMesg(1,'C_%s = %s' % (attr, v|mod))
pair += 1
--- 81,87 ----
self.__dict__['CP_%s'%attr] = (mod, pr)
self.__dict__['C_%s'%attr] = v | mod
! GDebug.printMesg(5,'C_%s = %s' % (attr, v|mod))
pair += 1
***************
*** 94,100 ****
'TITLEBAR=REVERSE;'
'MENUBAR=REVERSE;'
'MENUBAR_FOCUS=BOLD;'
! 'LABEL=NORMAL;'
'DIALOG=NONE;'
'DIALOG_TITLE=REVERSE;'
'TEXTBOX_FOCUS=REVERSE;'
--- 93,99 ----
'TITLEBAR=REVERSE;'
'MENUBAR=REVERSE;'
'MENUBAR_FOCUS=BOLD;'
! 'LABEL=NONE;'
'DIALOG=NONE;'
'DIALOG_TITLE=REVERSE;'
'TEXTBOX_FOCUS=REVERSE;'
***************
*** 139,151 ****
self.loadColors (
'BACKGROUND=WHITE,BLUE;'
'TITLEBAR=WHITE,BLUE;'
! 'MENUBAR=BOLD-YELLOW,BLUE;'
'MENUBAR_FOCUS=BLUE,WHITE;'
'LABEL=BLACK,WHITE;'
'DIALOG=BLACK,WHITE;'
! 'DIALOG_TITLE=BOLD-YELLOW,WHITE;'
! 'TEXTBOX_FOCUS=BLACK,CYAN;'
! 'TEXTBOX=BLUE,WHITE;'
'BUTTON=BLUE,WHITE;'
'BUTTON_FOCUS=WHITE,CYAN;'
'SCROLL_BUTTON=BLACK,WHITE;'
--- 138,150 ----
self.loadColors (
'BACKGROUND=WHITE,BLUE;'
'TITLEBAR=WHITE,BLUE;'
! 'TEXTBOX_FOCUS=BLACK,CYAN;'
! 'TEXTBOX=BLUE,WHITE;'
! 'MENUBAR=BLACK,WHITE;'
'MENUBAR_FOCUS=BLUE,WHITE;'
'LABEL=BLACK,WHITE;'
'DIALOG=BLACK,WHITE;'
! 'DIALOG_TITLE=BLACK,WHITE;'
'BUTTON=BLUE,WHITE;'
'BUTTON_FOCUS=WHITE,CYAN;'
'SCROLL_BUTTON=BLACK,WHITE;'
***************
*** 155,161 ****
'SCROLL_SLIDER_FOCUS=BLACK,CYAN;'
'STATUSBAR=BLACK,WHITE;'
'STATUSBAR_FIELD=BLUE,WHITE;'
! 'DROPSHADOW=RED,RED' )
class WhiteOnRed(ColorScheme):
--- 154,160 ----
'SCROLL_SLIDER_FOCUS=BLACK,CYAN;'
'STATUSBAR=BLACK,WHITE;'
'STATUSBAR_FIELD=BLUE,WHITE;'
! 'DROPSHADOW=WHITE,BLACK' )
class WhiteOnRed(ColorScheme):
Index: gnue/common/src/cursing/Control.py
diff -c gnue/common/src/cursing/Control.py:1.5
gnue/common/src/cursing/Control.py:1.6
*** gnue/common/src/cursing/Control.py:1.5 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/Control.py Thu Dec 12 15:35:08 2002
***************
*** 49,63 ****
self.Methods["LOSTFOCUS"] = None
self.Methods["ACTION"] = None
! def DetermineAndSetColor(self, HasFocus):
! if self.active:
! if HasFocus :
! self.SetColor(self.FOCUSCOLOR)
! else:
! self.SetColor(self.COLOR)
! else:
! pass
! ##self.SetColor(4)
def CreateProperty(self, Property, Value):
self.__dict__[Property] = Value
--- 49,63 ----
self.Methods["LOSTFOCUS"] = None
self.Methods["ACTION"] = None
! ## def DetermineAndSetColor(self, HasFocus):
! ## if self.active:
! ## if HasFocus :
! ## self.SetColor(self.FOCUSCOLOR)
! ## else:
! ## self.SetColor(self.COLOR)
! ## else:
! ## pass
! ## ##self.SetColor(4)
def CreateProperty(self, Property, Value):
self.__dict__[Property] = Value
***************
*** 83,94 ****
def DeActivate(self, state):
if self.active != state:
- if state :
- self.SetColor(self.PRIOR_COLOR)
- else:
- self.PRIOR_COLOR = self.LOLIGHT_COLOR
- self.SetColor(4)
- self.LoLight()
self.active = state
self.Paint(0,0,0)
self.ExecMethod("REFRESH",None,None,None)
--- 83,88 ----
Index: gnue/common/src/cursing/Dialog.py
diff -c gnue/common/src/cursing/Dialog.py:1.9
gnue/common/src/cursing/Dialog.py:1.10
*** gnue/common/src/cursing/Dialog.py:1.9 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/Dialog.py Thu Dec 12 15:35:08 2002
***************
*** 60,65 ****
--- 60,67 ----
self.C2 = c2
self.DROPSHADOW = dropshadow
self.BORDER = border
+ self._ChildOffsetX = 2
+ self._ChildOffsetY = 1
# need to add some sanity checks for bad params here:
#if r1 > 0 and r1 <= SIOInstance.MAXROW:
***************
*** 82,108 ****
pass
def AddDialogControl(self, TheControl):
! """
! Make sure the control is visible in the limited area of the
! dialog box
! """
! cRow = TheControl.Y
! cRow = cRow + self.BORDER
! cCol = TheControl.X
! cCol = cCol + self.BORDER
! TheControl.Y = cRow
! TheControl.X = cCol
! ScreenContainer.AddControl(self,TheControl)
return TheControl
- def AddControl(self,control):
- return self.AddDialogControl(control)
-
def _PaintBorder(self):
if not self.BORDER:
return
- self.LoLight()
_paintBorder( self, self._Y,self._X, self._DialogHeight + 2,
self._DialogWidth + 2, self.INSET, caption=self.CAPTION,
color = self.COLOR,
--- 84,96 ----
pass
def AddDialogControl(self, TheControl):
! self.AddControl(TheControl)
return TheControl
def _PaintBorder(self):
if not self.BORDER:
return
_paintBorder( self, self._Y,self._X, self._DialogHeight + 2,
self._DialogWidth + 2, self.INSET, caption=self.CAPTION,
color = self.COLOR,
Index: gnue/common/src/cursing/FocusedLabel.py
diff -c gnue/common/src/cursing/FocusedLabel.py:1.4
gnue/common/src/cursing/FocusedLabel.py:1.5
*** gnue/common/src/cursing/FocusedLabel.py:1.4 Thu Nov 7 11:37:03 2002
--- gnue/common/src/cursing/FocusedLabel.py Thu Dec 12 15:35:08 2002
***************
*** 57,63 ****
global BACKWARDS
ch = Container.GetChar()
if self.PARENT.BreakOrder(ch) :
! return
if ch in (Container.TokDownArrow, Container.TokNextField,
Container.TokUpArrow):
BACKWARDS = 0
if ch == Container.TokUpArrow:
--- 57,63 ----
global BACKWARDS
ch = Container.GetChar()
if self.PARENT.BreakOrder(ch) :
! return
if ch in (Container.TokDownArrow, Container.TokNextField,
Container.TokUpArrow):
BACKWARDS = 0
if ch == Container.TokUpArrow:
***************
*** 71,90 ****
self.ExecMethod("SYSGOTFOCUS", None, None, None)
def Paint(self, HasFocus, v2, v3):
Container = self.PARENT.Screen()
if self.active:
if HasFocus :
! self.SetColor(2)
else:
! self.SetColor(1)
! self.LoLight()
Y = self._ABSY
X = self._ABSX
caption = self.CAPTION
! Container.PrintAt(Y,X,caption)
! if self.active :
! self.SetColor(1)
! self.LoLight()
def GotFocus(self, v1, v2, v3):
self.Paint(1, None, None)
--- 71,89 ----
self.ExecMethod("SYSGOTFOCUS", None, None, None)
def Paint(self, HasFocus, v2, v3):
+ GDebug.printMesg(0,'Workin it')
Container = self.PARENT.Screen()
if self.active:
if HasFocus :
! color = self.FOCUSCOLOR
else:
! color = self.COLOR
! else:
! color = self.COLOR
Y = self._ABSY
X = self._ABSX
caption = self.CAPTION
! Container.PrintAt(Y,X,caption, color)
def GotFocus(self, v1, v2, v3):
self.Paint(1, None, None)
***************
*** 93,97 ****
def LostFocus(self, v1, v2, v3):
self.Paint(0, None, None)
return 1
!
--- 92,96 ----
def LostFocus(self, v1, v2, v3):
self.Paint(0, None, None)
return 1
!
Index: gnue/common/src/cursing/Frame.py
diff -c gnue/common/src/cursing/Frame.py:1.10
gnue/common/src/cursing/Frame.py:1.11
*** gnue/common/src/cursing/Frame.py:1.10 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/Frame.py Thu Dec 12 15:35:08 2002
***************
*** 56,62 ****
self.C1 = c1
self.C2 = c2
self._ChildOffsetX = border
! self._ChildOffsetY = border
self.DROPSHADOW = dropshadow
self.BORDER = border
--- 56,62 ----
self.C1 = c1
self.C2 = c2
self._ChildOffsetX = border
! self._ChildOffsetY = border
self.DROPSHADOW = dropshadow
self.BORDER = border
***************
*** 92,98 ****
if not self.BORDER:
return
- self.LoLight()
_paintBorder( self, self._Y,self._X, self._DialogHeight + 2,
self._DialogWidth + 2, self.INSET, caption=self.CAPTION,
color=self.SCREEN.colors.C_DIALOG,
--- 92,97 ----
***************
*** 112,118 ****
def Paint(self, *args, **parms):
if self.VISIBLE:
! self._PaintBorder()
self._PaintDropShadow()
ScreenContainer.Paint(self,*args, **parms)
--- 111,123 ----
def Paint(self, *args, **parms):
if self.VISIBLE:
! if self.BORDER:
! self._PaintBorder()
! else:
! GDebug.printMesg(0,'PAINTING %s' % self)
!
! for l in range(self.H):
! self.SCREEN.PrintAt(self.Y+l, self.X, " " * self.W, self.COLOR)
self._PaintDropShadow()
ScreenContainer.Paint(self,*args, **parms)
Index: gnue/common/src/cursing/Menu.py
diff -c gnue/common/src/cursing/Menu.py:1.5 gnue/common/src/cursing/Menu.py:1.6
*** gnue/common/src/cursing/Menu.py:1.5 Thu Oct 17 19:35:01 2002
--- gnue/common/src/cursing/Menu.py Thu Dec 12 15:35:09 2002
***************
*** 35,50 ****
import sio
class Menu(FocusedLabel):
! def __init__(self,Parent,MenuName,Y,X,DisplayName = "",
! statusbarlink=None, **properties):
self.maxLengthFixed = 0
DisplayName = self.__FixDisplay(DisplayName)
apply(FocusedLabel.__init__, (self,Parent,MenuName,Y,X,DisplayName),
properties)
self.PARENT = Parent
! self.STATUSBARLINK = statusbarlink
self.SetMethod("CLICK",self.ShowOff)
self.items = []
self.maxLength = 0
def Run(self,v1,v2,v3):
if v1 :
--- 35,51 ----
import sio
class Menu(FocusedLabel):
! def __init__(self,Parent,MenuName,Y,X,DisplayName = "",
! statusBarLink=None, **properties):
self.maxLengthFixed = 0
DisplayName = self.__FixDisplay(DisplayName)
apply(FocusedLabel.__init__, (self,Parent,MenuName,Y,X,DisplayName),
properties)
self.PARENT = Parent
! self.STATUSBARLINK = statusBarLink
self.SetMethod("CLICK",self.ShowOff)
self.items = []
self.maxLength = 0
+ self.SetColor(Parent.SCREEN.colors.C_MENUBAR,
Parent.SCREEN.colors.C_MENUBAR_FOCUS)
def Run(self,v1,v2,v3):
if v1 :
***************
*** 77,84 ****
return 1
self.ExecMethod("SYSGOTFOCUS", None, None, None)
def ShowOff(self,arg1, arg2,arg3):
! MenuHeight = len(self.items) + 2
MenuWidth = self.maxLength
X = self.X
Y = self.Y + 1
--- 78,92 ----
return 1
self.ExecMethod("SYSGOTFOCUS", None, None, None)
+ def ShowStatusBarText(self, text):
+ try:
+ # Voodoo-ery
+
self.STATUSBARLINK.STATUSBAR.SetText(self.STATUSBARLINK.STATUSBAR_INDEX, text)
+ except (AttributeError, TypeError):
+ pass
+
def ShowOff(self,arg1, arg2,arg3):
! MenuHeight = len(self.items)
MenuWidth = self.maxLength
X = self.X
Y = self.Y + 1
***************
*** 87,111 ****
self.myscreen = Screen.CaptureScreen( Y, X, Y + MenuHeight ,
X + MenuWidth )
MenuWin = Dialog(Parent, Y, X, Y + MenuHeight, X + MenuWidth )
count = 1
self.EXITFORM = 0
for i in range(len(self.items)):
text = ''
if self.items[i][0] == -1:
! text = (self.maxLength - 4) * chr(tiHLINE)
else:
newTitle = self.items[i][1]
text = self.__FixDisplay(newTitle)
! item = MenuItem(MenuWin,str(self.items[i][0]),count,2,text,
! self.items[i][2], self.STATUSBARLINK)
item.ITEMID = self.items[i][0]
count += 1
item.SetMethod("CLICK",self.ItemSelected)
! MenuWin.AddDialogControl(item)
! item.DeActivate(self.items[i][2])
! MenuWin.SetColor(sio.C_MENUBAR)
! MenuWin.INSET = 1
! MenuWin.RunDialog()
Parent.Paint()
Parent.Screen().Refresh()
--- 95,121 ----
self.myscreen = Screen.CaptureScreen( Y, X, Y + MenuHeight ,
X + MenuWidth )
MenuWin = Dialog(Parent, Y, X, Y + MenuHeight, X + MenuWidth )
+ MenuWin.SetColor(Screen.colors.C_MENUBAR)
count = 1
self.EXITFORM = 0
for i in range(len(self.items)):
text = ''
if self.items[i][0] == -1:
! text = (self.maxLength - 2) * chr(tiHLINE)
else:
newTitle = self.items[i][1]
text = self.__FixDisplay(newTitle)
! item = MenuItem(MenuWin,str(self.items[i][0]),count-1,0,text,
! self.items[i][2])
item.ITEMID = self.items[i][0]
count += 1
item.SetMethod("CLICK",self.ItemSelected)
! item.SetMethod("GOTFOCUS",self.ItemFocused)
! MenuWin.AddControl(item)
! item.DeActivate(self.items[i][3])
! ## MenuWin.INSET = 1
! MenuWin.DROPSHADOW=0
! r =MenuWin.RunDialog()
Parent.Paint()
Parent.Screen().Refresh()
***************
*** 132,155 ****
Y = self.Y+ 1
Parent = self.PARENT
Screen = Parent.SCREEN
! Screen.RestoreScreen(Y,X, Y + MenuHeight , X + MenuWidth ,
! self.myscreen )
if(self.GetMethod("CHOSEN") <> None):
apply(self.GetMethod("CHOSEN"),(self,control.ITEMID,control.TITLE))
def DeActivateItem(self,itemId,state):
for i in range(0,len(self.items)):
if self.items[i][0] == itemId:
! self.items[i][2] = state
return
def AddItem(self, itemId, itemCaption, itemDescription = "", initialState =
1):
self.items.append( [ itemId, itemCaption, itemDescription, initialState ]
)
! if not self.maxLengthFixed and self.maxLength < len(itemCaption)+4:
! self.maxLength = len(itemCaption)+4
def InsertSeperator(self):
! self.items.append( [ -1, '', 0 ])
def ChangeTitle(self,newTitle):
newLen = len(newTitle)
--- 142,172 ----
Y = self.Y+ 1
Parent = self.PARENT
Screen = Parent.SCREEN
! # Screen.RestoreScreen(Y,X, Y + MenuHeight , X + MenuWidth ,
! # self.myscreen )
! self.ShowStatusBarText("")
if(self.GetMethod("CHOSEN") <> None):
apply(self.GetMethod("CHOSEN"),(self,control.ITEMID,control.TITLE))
+ def ItemFocused(self,control, arg2,arg3):
+ GDebug.printMesg(0,'I got that focused feeling!')
+ self.ShowStatusBarText(control.DESCRIPTION)
+ return 1
+
+
def DeActivateItem(self,itemId,state):
for i in range(0,len(self.items)):
if self.items[i][0] == itemId:
! self.items[i][3] = state
return
def AddItem(self, itemId, itemCaption, itemDescription = "", initialState =
1):
self.items.append( [ itemId, itemCaption, itemDescription, initialState ]
)
! if not self.maxLengthFixed and self.maxLength < len(itemCaption)+2:
! self.maxLength = len(itemCaption)+2
def InsertSeperator(self):
! self.items.append( [ -1, '','', 0 ])
def ChangeTitle(self,newTitle):
newLen = len(newTitle)
***************
*** 166,170 ****
def GetWidth(self):
return self.maxLength
!
--- 183,187 ----
def GetWidth(self):
return self.maxLength
!
Index: gnue/common/src/cursing/MenuBar.py
diff -c gnue/common/src/cursing/MenuBar.py:1.8
gnue/common/src/cursing/MenuBar.py:1.9
*** gnue/common/src/cursing/MenuBar.py:1.8 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/MenuBar.py Thu Dec 12 15:35:09 2002
***************
*** 36,51 ****
def __init__(self, Root, Y, X, W, **properties):
Frame.__init__(self, Root, Y, X, Y+1, X + W - 1,
border=0, dropshadow=0, **properties)
self.rootwin = Root
self.CANGETFOCUS = 0
self.Y = Y
self.X = X
! self.H = 2
! self.W = 0
self.STATUSBAR = None
self.STATUSBAR_INDEX = 0
self.Controls = []
self.SetColor('MENUBAR')
def NewMenu(self,Name,Caption):
newEntry = Menu(self.rootwin, Name, 0,0, Caption, self)
--- 36,53 ----
def __init__(self, Root, Y, X, W, **properties):
Frame.__init__(self, Root, Y, X, Y+1, X + W - 1,
border=0, dropshadow=0, **properties)
+ GDebug.printMesg(0,'WIDTH=%s' % W)
self.rootwin = Root
self.CANGETFOCUS = 0
self.Y = Y
self.X = X
! self.H = 1
! self.W = W
self.STATUSBAR = None
self.STATUSBAR_INDEX = 0
self.Controls = []
self.SetColor('MENUBAR')
+ self.VISIBLE = 1
def NewMenu(self,Name,Caption):
newEntry = Menu(self.rootwin, Name, 0,0, Caption, self)
***************
*** 53,63 ****
return newEntry
def SetStatusBar(self, statusbar, index=0):
self.STATUSBAR = statusbar
self.STATUSBAR_INDEX = index
def _AddMenu(self,menu):
! newX = 0
if len(self.Controls) > 0:
newX = self.Controls[-1:][0].X
newX += len(self.Controls[-1:][0].CAPTION) + 2
--- 55,66 ----
return newEntry
def SetStatusBar(self, statusbar, index=0):
+ GDebug.printMesg(0,'SETTING STATUSBAR')
self.STATUSBAR = statusbar
self.STATUSBAR_INDEX = index
def _AddMenu(self,menu):
! newX = 1
if len(self.Controls) > 0:
newX = self.Controls[-1:][0].X
newX += len(self.Controls[-1:][0].CAPTION) + 2
***************
*** 67,77 ****
self.AddControl(menu)
! # def Paint(self, HasFocus, v2, v3):
# Container = self.PARENT.Screen()
# color = self.COLOR
! # Y = self._ABSY
! # X = self._ABSX
# caption = self.CAPTION
# Container.PrintAt(Y,X," " * self.W, color)
--- 70,82 ----
self.AddControl(menu)
! # def Paint(self, *args, **parms):
# Container = self.PARENT.Screen()
# color = self.COLOR
! # #Y = self._ABSY
! # #X = self._ABSX
! # Y = self.Y
! # X = self.X
# caption = self.CAPTION
# Container.PrintAt(Y,X," " * self.W, color)
Index: gnue/common/src/cursing/MenuItem.py
diff -c gnue/common/src/cursing/MenuItem.py:1.6
gnue/common/src/cursing/MenuItem.py:1.7
*** gnue/common/src/cursing/MenuItem.py:1.6 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/MenuItem.py Thu Dec 12 15:35:09 2002
***************
*** 68,85 ****
else:
self.ExecMethod("SYSGOTFOCUS",None,None,None)
! def Paint(self, HasFocus, v2, v3):
! Container = self.PARENT.Screen()
! if self.active:
! if HasFocus :
! color = self.FOCUSCOLOR
! if self.STATUSBARLINK and self.STATUSBARLINK.STATUSBAR:
!
self.STATUSBARLINK.STATUSBAR.SetText(self.STATUSBARLINK.STATUSBAR_INDEX,
self.DESCRIPTION)
! else:
! color = self.COLOR
! Y = self._ABSY
! X = self._ABSX
! caption = self.CAPTION
! Container.PrintAt(Y,X,caption, color)
--- 68,87 ----
else:
self.ExecMethod("SYSGOTFOCUS",None,None,None)
! # def Paint(self, HasFocus, v2, v3):
! # Container = self.PARENT.Screen()
! # if self.active:
! # if HasFocus :
! # color = self.FOCUSCOLOR
! # if self.STATUSBARLINK and self.STATUSBARLINK.STATUSBAR:
! #
self.STATUSBARLINK.STATUSBAR.SetText(self.STATUSBARLINK.STATUSBAR_INDEX,
self.DESCRIPTION)
! # else:
! # color = self.COLOR
! # else:
! # color = self.COLOR
! # Y = self._ABSY
! # X = self._ABSX
! # caption = self.CAPTION
! # Container.PrintAt(Y,X,caption, color)
Index: gnue/common/src/cursing/Notebook.py
diff -c gnue/common/src/cursing/Notebook.py:1.2
gnue/common/src/cursing/Notebook.py:1.3
*** gnue/common/src/cursing/Notebook.py:1.2 Mon Nov 11 00:59:59 2002
--- gnue/common/src/cursing/Notebook.py Thu Dec 12 15:35:09 2002
***************
*** 66,72 ****
self._CurrentFrame = page
def _AddButton(self,page):
! ctrl =
newX = 0
if len(self.Controls) > 0:
newX = self.Controls[-1:][0].X
--- 66,72 ----
self._CurrentFrame = page
def _AddButton(self,page):
! ## ctrl =
newX = 0
if len(self.Controls) > 0:
newX = self.Controls[-1:][0].X
Index: gnue/common/src/cursing/ScreenContainer.py
diff -c gnue/common/src/cursing/ScreenContainer.py:1.10
gnue/common/src/cursing/ScreenContainer.py:1.11
*** gnue/common/src/cursing/ScreenContainer.py:1.10 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/ScreenContainer.py Thu Dec 12 15:35:09 2002
***************
*** 68,74 ****
self.STARTPOINT = 0
self.breakUp = 0
- ## GDebug.printMesg(1,dir (SIOInstance.colors))
self.SetColor(SIOInstance.colors.C_BACKGROUND)
self.nextCtl = None
self.eventX = -1
--- 68,73 ----
***************
*** 147,157 ****
instance. Effectively repainting the entire container iteratively.
"""
if not self.VISIBLE:
! return
!
if captureRefresh:
self.SCREEN.AutoRefresh = 0
- self.LoLight()
for Control in self.Controls:
Control.ExecMethod("SYSPAINT", None, None, None)
--- 146,155 ----
instance. Effectively repainting the entire container iteratively.
"""
if not self.VISIBLE:
! return
!
if captureRefresh:
self.SCREEN.AutoRefresh = 0
for Control in self.Controls:
Control.ExecMethod("SYSPAINT", None, None, None)
***************
*** 187,192 ****
--- 185,194 ----
if myCsi == None:
myCsi = 0
+ GDebug.printMesg(0, 'I am a running fewl; s/I/%s/' % self)
+ GDebug.printMesg(0, self._CurrentFrame)
+ GDebug.printMesg(0, self.Controls)
+
# event loop runs forever
while 1:
activate = 0
***************
*** 383,389 ****
def __PaintBorder(self, caption=None):
- self.LoLight()
DialogWidth = self.Width()
DialogHeight = self.Height()
_paintBorder( self, 0,0, DialogHeight, DialogWidth, caption=caption)
--- 385,390 ----
Index: gnue/common/src/cursing/VScrollBar.py
diff -c gnue/common/src/cursing/VScrollBar.py:1.6
gnue/common/src/cursing/VScrollBar.py:1.7
*** gnue/common/src/cursing/VScrollBar.py:1.6 Sun Nov 17 17:53:27 2002
--- gnue/common/src/cursing/VScrollBar.py Thu Dec 12 15:35:09 2002
***************
*** 79,85 ****
Screen.AutoRefresh = 0
# clear the bar region in reverse standard-color
for i in range(0, int(self.WorkingArea)):
! Screen.PutAt( self.start + i,self._ABSX, '|',
Screen.colors.C_BACKGROUND)
# correct position
if Pos >= (self.WorkingArea + self.start):
Pos = (self.start + self.WorkingArea)
--- 79,85 ----
Screen.AutoRefresh = 0
# clear the bar region in reverse standard-color
for i in range(0, int(self.WorkingArea)):
! Screen.PutAt( self._ABSY + self.start + i,self._ABSX, '|',
Screen.colors.C_BACKGROUND)
# correct position
if Pos >= (self.WorkingArea + self.start):
Pos = (self.start + self.WorkingArea)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/cursing ColorScheme.py Control....,
Jason Cater <=