"""Test the whole path through Box and CellVobFactory to screen: do we get the right box in the right place? Once this test works well, the basic vanishing view should not get broken as easily. """ import gzz from gzz.impl import ModularSpace from gzz.view import CellVobFactory, TextCellContentView, ViewContext from gzz.vob import * from test.tools.gfx import * from test.tools import tools from java.awt import Color space = ModularSpace(*tools.spaceArgList()) cell = space.N() tv = TextCellContentView(win.getGraphicsAPI().getTextStyle( "sans", 0, 20)) 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 def testSingle(): vs = getvs() vs.map.put(SolidBgVob(Color.blue)) box = Box() box.set(vs, vs.orthoCS(0, "A", 0, 100, 100, 1, 1), 200, 50) cvf = CellVobFactory() context = VC() cvf.place(cell, vs, box, context) render(vs) # : vim: set syntax=python :