@@ -713,6 +713,9 @@ def do_postclose(self):
713713 def SetPort (self ):
714714 # Convinience method
715715 SetPort (self .wid )
716+
717+ def GetWindow (self ):
718+ return self .wid
716719
717720 def do_inDrag (self , partcode , window , event ):
718721 where = event [3 ]
@@ -753,13 +756,13 @@ def do_inGrow(self, partcode, window, event):
753756 def do_resize (self , width , height , window ):
754757 l , t , r , b = self .wid .GetWindowPort ().portRect # jvr, forGrowIcon
755758 self .SetPort () # jvr
756- InvalWindowRect ((r - SCROLLBARWIDTH + 1 , b - SCROLLBARWIDTH + 1 , r , b )) # jvr
759+ self . wid . InvalWindowRect ((r - SCROLLBARWIDTH + 1 , b - SCROLLBARWIDTH + 1 , r , b )) # jvr
757760 window .SizeWindow (width , height , 1 ) # changed updateFlag to true jvr
758761 self .do_postresize (width , height , window )
759762
760763 def do_postresize (self , width , height , window ):
761764 SetPort (window )
762- InvalWindowRect (window .GetWindowPort ().portRect )
765+ self . wid . InvalWindowRect (window .GetWindowPort ().portRect )
763766
764767 def do_inContent (self , partcode , window , event ):
765768 #
@@ -853,12 +856,12 @@ def scrollbars(self, wantx=1, wanty=1):
853856 rect = x0 - 1 , y1 - (SCROLLBARWIDTH - 1 ), x1 - (SCROLLBARWIDTH - 2 ), y1 + 1
854857 self .barx = NewControl (self .wid , rect , "" , 1 , vx , 0 , 32767 , 16 , 0 )
855858 if not self .barx_enabled : self .barx .HiliteControl (255 )
856- ## InvalWindowRect(rect)
859+ ## self.wid. InvalWindowRect(rect)
857860 if wanty :
858861 rect = x1 - (SCROLLBARWIDTH - 1 ), y0 - 1 , x1 + 1 , y1 - (SCROLLBARWIDTH - 2 )
859862 self .bary = NewControl (self .wid , rect , "" , 1 , vy , 0 , 32767 , 16 , 0 )
860863 if not self .bary_enabled : self .bary .HiliteControl (255 )
861- ## InvalWindowRect(rect)
864+ ## self.wid. InvalWindowRect(rect)
862865
863866 def do_postclose (self ):
864867 self .barx = self .bary = None
@@ -893,11 +896,11 @@ def do_postresize(self, width, height, window):
893896 self .bary .SizeControl (SCROLLBARWIDTH , (b - t )- (SCROLLBARWIDTH - 3 )) # jvr
894897 if self .barx :
895898 self .barx .ShowControl () # jvr
896- ValidWindowRect ((l , b - SCROLLBARWIDTH + 1 , r - SCROLLBARWIDTH + 2 , b )) # jvr
899+ self . wid . ValidWindowRect ((l , b - SCROLLBARWIDTH + 1 , r - SCROLLBARWIDTH + 2 , b )) # jvr
897900 if self .bary :
898901 self .bary .ShowControl () # jvr
899- ValidWindowRect ((r - SCROLLBARWIDTH + 1 , t , r , b - SCROLLBARWIDTH + 2 )) # jvr
900- InvalWindowRect ((r - SCROLLBARWIDTH + 1 , b - SCROLLBARWIDTH + 1 , r , b )) # jvr, growicon
902+ self . wid . ValidWindowRect ((r - SCROLLBARWIDTH + 1 , t , r , b - SCROLLBARWIDTH + 2 )) # jvr
903+ self . wid . InvalWindowRect ((r - SCROLLBARWIDTH + 1 , b - SCROLLBARWIDTH + 1 , r , b )) # jvr, growicon
901904
902905
903906 def do_rawcontrolhit (self , window , control , pcode , local , event ):
0 commit comments