22 |
import gzz |
import gzz |
23 |
import traceback |
import traceback |
24 |
|
|
25 |
|
screensize = (1024, 768) # assuming XGA projector. |
26 |
|
|
27 |
|
# center = little above physical center |
28 |
|
screenctr = (0.9 * screensize[0]/2, screensize[1]/2) |
29 |
|
|
30 |
|
def enf2span(enf): |
31 |
|
list = enf.getList() |
32 |
|
return list[0] |
33 |
|
|
34 |
def getFont(): |
def getFont(): |
35 |
global font |
global font |
36 |
try: |
try: |
37 |
a=font |
a=font |
38 |
except: |
except: |
39 |
font = GL.createFont("gfx/fonts/a010013l.pfb", 32); |
font = GL.createFont("gfx/fonts/a010013l.pfb", 16); |
40 |
return font |
return font |
41 |
|
|
42 |
globalspan = None |
globalspan = None |
49 |
return pagespanview.CellPDFView(cell) |
return pagespanview.CellPDFView(cell) |
50 |
|
|
51 |
|
|
52 |
|
def background(rgb): |
53 |
|
return gzz.vob.SolidBgVob(java.awt.Color(float(rgb[0]), float(rgb[1]), float(rgb[2]))) |
54 |
|
|
55 |
fps_text = GLRen.createHorizText2(getFont(), "FOO", 1, 1, 1, 1) |
fps_text = GLRen.createHorizText2(getFont(), "FOO", 1, 1, 1, 1) |
56 |
GL.setDebugVar("JNI.fps", 1) |
GL.setDebugVar("JNI.fps", 1) |
57 |
# Show the intended screen size |
# Show the intended screen size |
58 |
def bg(vs): |
def bg(vs): |
59 |
putnoc(vs, background((0.3,0.5,0.4))) |
vs.map.put(background((0.3,0.5,0.4))) |
60 |
putnoc(vs, getDListNocoords(""" |
vs.map.put(GLCache.getCallList(""" |
61 |
Disable TEXTURE_2D |
Disable TEXTURE_2D |
62 |
LineWidth 2 |
LineWidth 2 |
63 |
Color 0 0 0 |
Color 0 0 0 |
145 |
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex)) |
vs.matcher.add(link_end_cs, "link"+str(self.link)+str(1-self.linkindex)) |
146 |
|
|
147 |
print "lineconn!" |
print "lineconn!" |
148 |
putnoc(vs, getDListNocoords(""" |
vs.map.put(GLCache.getCallList(""" |
149 |
PushAttrib ENABLE_BIT |
PushAttrib ENABLE_BIT |
150 |
Disable TEXTURE_2D |
Disable TEXTURE_2D |
151 |
LineWidth 5 |
LineWidth 5 |
153 |
Color 0 0 0 0.6 |
Color 0 0 0 0.6 |
154 |
""")) |
""")) |
155 |
vs.map.put(lineconn, main_end_cs, link_end_cs) |
vs.map.put(lineconn, main_end_cs, link_end_cs) |
156 |
putnoc(vs, getDListNocoords(""" |
vs.map.put(GLCache.getCallList(""" |
157 |
PopAttrib |
PopAttrib |
158 |
""")) |
""")) |
159 |
|
|
309 |
self.cursor = cell |
self.cursor = cell |
310 |
globalx, globaly = nx, ny |
globalx, globaly = nx, ny |
311 |
|
|
312 |
content = space.cellTexter.getEnfilade(cell, None) |
content = cell.space.cellTexter.getEnfilade(cell, None) |
313 |
globalspan = enf2span(content) |
globalspan = enf2span(content) |
314 |
globalforw = xuindexer.getForwardIndex().getMatches(content) |
globalforw = xuindexer.getForwardIndex().getMatches(content) |
315 |
globalback = xuindexer.getBackwardIndex().getMatches(content) |
globalback = xuindexer.getBackwardIndex().getMatches(content) |
399 |
def getDefaultName(self): |
def getDefaultName(self): |
400 |
return "XuBuoy" |
return "XuBuoy" |
401 |
def render(self, vs, cs, context): |
def render(self, vs, cs, context): |
402 |
self._getview(win).scene(vs) |
view = self._getview(context) |
403 |
|
view.moveToCell(context.cursor) |
404 |
|
view.scene(vs) |
405 |
|
|
406 |
|
|