41 |
private AbstractViewContext avc; |
private AbstractViewContext avc; |
42 |
private Space space; |
private Space space; |
43 |
private GraphicsAPI.Window win; |
private GraphicsAPI.Window win; |
44 |
|
|
45 |
|
public PPCanvasNode(PPDims d, Space s, GraphicsAPI.Window w) { |
46 |
|
this(d, s, new AbstractViewContext(), w); |
47 |
|
} |
48 |
|
|
49 |
public PPCanvasNode(PPDims d, Space s, AbstractViewContext avc, GraphicsAPI.Window w) { |
public PPCanvasNode(PPDims d, Space s, AbstractViewContext avc, GraphicsAPI.Window w) { |
50 |
this.d = d; |
this.d = d; |
51 |
this.space = s; |
this.space = s; |
66 |
|
|
67 |
|
|
68 |
public boolean ownsCell(Cell c) { |
public boolean ownsCell(Cell c) { |
69 |
// XXX |
|
70 |
// how can I check that this is PP cell? |
// If it's a note, there must be a cell in |
71 |
|
// a negative dir which is canvas or another note. |
72 |
|
if (c.s(d.contains, -1) != null) return true; |
73 |
|
|
74 |
pa("Just guessing that this is PP..."); |
// If it's a canvas(paper) there must |
75 |
|
// be at least homeCell in negative direction |
76 |
|
if (c.s(d.d1, -1) != null) return true; |
77 |
|
|
78 |
|
// If it's a clone, there must be at least a note |
79 |
|
// or another clone in negative dir |
80 |
|
if (c.s(d.clone, -1) != null) return true; |
81 |
|
|
82 |
return true; |
return false; |
83 |
} |
} |
84 |
|
|
85 |
public Object getSize(Cell c, Object content, float[] wh) { |
public Object getSize(Cell c, Object content, float[] wh) { |