/[gzz]/gzz/gfx/demo/buoyoing.py
ViewVC logotype

Diff of /gzz/gfx/demo/buoyoing.py

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

revision 1.17 by mudyc, Tue Feb 11 19:40:13 2003 UTC revision 1.18 by mudyc, Wed Feb 12 10:57:43 2003 UTC
# Line 53  vs = w.createVobScene() Line 53  vs = w.createVobScene()
53  vs.put(background((.8, .4, .9)))  vs.put(background((.8, .4, .9)))
54  w.renderStill(vs, 0)  w.renderStill(vs, 0)
55    
56    def setPan(cell, x, y):
57        cx = cell.N(d.pan)
58        cx.setText(str(x))
59        cy = cx.N(d.pan)
60        cy.setText(str(y))
61    
62  def newNote(span, comment):  def newNote(span, comment):
63      paper = space.getHomeCell().h(d.d1, 1).N(d.d1)      paper = space.getHomeCell().h(d.d1, 1).N(d.d1)
64      paper.setText('New paper')      paper.setText('New paper')
65      note = paper.N(d.contains)      note = paper.N(d.contains)
66      note.setText(comment)      note.setText(comment)
67      x = note.N(d.pan)      setPan(note, 0,0)
     x.setText("0")  
     y = x.N(d.pan)  
     y.setText("0")  
68      space.getCellTexter().setEnfilade(      space.getCellTexter().setEnfilade(
69              note, pagespanNodes.makeEnf(span))              note, pagespanNodes.makeEnf(span))
70    
# Line 100  if xulinks: Line 102  if xulinks:
102      # try out some notes..      # try out some notes..
103      pg0 = pagescrolls[0]      pg0 = pagescrolls[0]
104      wholepage = pg0.getCurrent().subSpan(0,1)      wholepage = pg0.getCurrent().subSpan(0,1)
105      span = wholepage.subArea(1, 1, 40, 40)      span = wholepage.subArea(1, 1, 100, 100)
106      newNote(span, 'Foobar')      newNote(span, 'Give\n a good\n  comment\n   over\n    here')
107    
108    
109      scrollblockLinker.xuIndex = xuindexer      scrollblockLinker.xuIndex = xuindexer

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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