/[gzz]/gzz/test/gzz/view/cellvobfactory.test
ViewVC logotype

Diff of /gzz/test/gzz/view/cellvobfactory.test

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

revision 1.4 by tjl, Fri Nov 1 19:53:53 2002 UTC revision 1.5 by benja, Sun Nov 10 23:08:55 2002 UTC
# Line 8  not get broken as easily. Line 8  not get broken as easily.
8    
9  import gzz  import gzz
10  from gzz.impl import ModularSpace  from gzz.impl import ModularSpace
11  from gzz.view import CellVobFactory, TextCellContentView, ViewContext  from gzz.view import CellVobFactory, TextCellContentView, ViewContext, MockViewContext
12  from gzz.vob import *  from gzz.vob import *
13  from test.tools.gfx import *  from test.tools.gfx import *
14  from test.tools import tools  from test.tools import tools
# Line 20  cell = space.N() Line 20  cell = space.N()
20  tv = TextCellContentView(win.getGraphicsAPI().getTextStyle(  tv = TextCellContentView(win.getGraphicsAPI().getTextStyle(
21                  "sans", 0, 20))                  "sans", 0, 20))
22    
 class VC(ViewContext):  
     def getAccursed(self):  
         return cell  
       
     def getCellContentView(self):  
         return tv  
   
     def getCursorColors(self, cell):  
         return None  
   
     def isMarked(self, cell):  
         return 0  
       
     def getCursorOffset(self, *args):  
         return 0  
   
23  bgc = (0, 0, 255)  bgc = (0, 0, 255)
24    
25  def checkbox(x, y, w, h, color):  def checkbox(x, y, w, h, color):
# Line 57  def testSingle_solidbgvob(): Line 41  def testSingle_solidbgvob():
41      box = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, 200, 50)      box = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, 200, 50)
42            
43      cvf = CellVobFactory()      cvf = CellVobFactory()
44      context = VC()      context = MockViewContext()
45        context.c, context.ccv = cell, tv
46      cvf.place(cell, vs, box, context)      cvf.place(cell, vs, box, context)
47    
48      render(vs)      render(vs)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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