125 |
private Object content; |
private Object content; |
126 |
private CellPlacementHook hook; |
private CellPlacementHook hook; |
127 |
|
|
|
private AbstractViewContext avc; |
|
|
private AbstractViewContext buoy_avc; |
|
128 |
private PPDims d; |
private PPDims d; |
129 |
private GraphicsAPI.Window window; |
private GraphicsAPI.Window window; |
130 |
|
|
131 |
public PPCanvasCursor(Cell c, Object content, CellPlacementHook hook, |
public PPCanvasCursor(Cell c, Object content, CellPlacementHook hook, |
132 |
AbstractViewContext avc, PPDims d, GraphicsAPI.Window w) { |
PPDims d, GraphicsAPI.Window w) { |
133 |
this.current = c; |
this.current = c; |
134 |
this.content = content; |
this.content = content; |
135 |
this.hook = hook; |
this.hook = hook; |
|
this.avc = avc; |
|
|
this.buoy_avc = new AbstractViewContext(); |
|
|
this.buoy_avc.setAccursed(avc.getAccursed()); |
|
136 |
this.d = d; |
this.d = d; |
137 |
this.window = w; |
this.window = w; |
138 |
} |
} |
153 |
c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); |
c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); |
154 |
vs.matcher.add(into, c2fCS, "C2F"); |
vs.matcher.add(into, c2fCS, "C2F"); |
155 |
setZoomPan(vs, into); |
setZoomPan(vs, into); |
156 |
SinglePaper.i(avc, d, window, current).render(vs, into, c2fCS); |
SinglePaper.i(d, window, current).render(vs, into, c2fCS, hook); |
|
|
|
|
Cell paper = current.h(d.contains); |
|
|
for (Cell c = paper.s(d.contains); c != null; c = c.s(d.contains) ) { |
|
|
if (c == current) continue; |
|
|
buoy_avc.setAccursed(c); |
|
|
hook.placed(c, vs, into, (ViewContext)avc); |
|
|
} |
|
157 |
} |
} |
158 |
|
|
159 |
public void keystroke(String s) { |
public void keystroke(String s) { |
196 |
panx = m_state[0] - (e.getX() - m_state[0])/zoom; |
panx = m_state[0] - (e.getX() - m_state[0])/zoom; |
197 |
pany = m_state[1] - (e.getY() - m_state[1])/zoom; |
pany = m_state[1] - (e.getY() - m_state[1])/zoom; |
198 |
*/ |
*/ |
199 |
avc.setAccursed(avc.getAccursed().h(d.contains)); |
current = current.h(d.contains); |
200 |
} |
} |
201 |
|
|
202 |
return true; |
return true; |