/[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.21 by mudyc, Wed Feb 12 13:37:56 2003 UTC revision 1.22 by mudyc, Wed Feb 12 17:39:36 2003 UTC
# Line 61  def setPan(cell, x, y): Line 61  def setPan(cell, x, y):
61      cy = cx.N(d.pan)      cy = cx.N(d.pan)
62      cy.setText(str(y))      cy.setText(str(y))
63    
64  def newNote(span, comment):  def newNote(span, comment, transX=-150, transY=-100, commentY=30):
65      paper = space.getHomeCell().h(d.d1, 1).N(d.d1)      paper = space.getHomeCell().h(d.d1, 1).N(d.d1)
66      paper.setText('New paper')      paper.setText('New paper')
67      note = paper.N(d.contains)      note = paper.N(d.contains)
68      setPan(note, 0,0)      setPan(note, transX,transY)
69      space.getCellTexter().setEnfilade(      space.getCellTexter().setEnfilade(
70              note, pagespanNodes.makeEnf(span))              note, pagespanNodes.makeEnf(span))
71      note = note.N(d.contains)      note = note.N(d.contains)
72      note.setText(comment)      note.setText(comment)
73      setPan(note, -20,-30)      setPan(note, transX, commentY)
74    
75  xulinks = 1  xulinks = 1
76    
# Line 107  if xulinks: Line 107  if xulinks:
107      pg0 = pagescrolls[0]      pg0 = pagescrolls[0]
108      wholepage = pg0.getCurrent().subSpan(0,1)      wholepage = pg0.getCurrent().subSpan(0,1)
109      span = wholepage.subArea(50, 50, 400, 150)      span = wholepage.subArea(50, 50, 400, 150)
110      newNote(span, 'Give\n a good\n  comment\n   over\n    here')      newNote(span, 'Give a good comment\nover here')
111    
112    
113      scrollblockLinker.xuIndex = xuindexer      scrollblockLinker.xuIndex = xuindexer

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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