22 |
*/ |
*/ |
23 |
package gzz.potion.potions; |
package gzz.potion.potions; |
24 |
import gzz.*; |
import gzz.*; |
25 |
|
import gzz.view.*; |
26 |
|
import gzz.client.*; |
27 |
import gzz.potion.*; |
import gzz.potion.*; |
28 |
|
import gzz.zzutil.*; |
29 |
import gzz.vob.linebreaking.HChain; |
import gzz.vob.linebreaking.HChain; |
30 |
import java.util.*; |
import java.util.*; |
31 |
|
|
32 |
public class Types { |
public class Types { |
33 |
public static Type CELL = new SimpleType("which cell?"); |
public static Type CELL = new SimpleType("which cell?"); |
34 |
public static Type CONNECTION = new SimpleType("which connection?"); |
public static Type CONNECTION = new SimpleType("which connection?"); |
35 |
public static Type PLACE = new SimpleType("which place?"); |
|
36 |
|
public static Type PLACE = new SimpleType("where?") { |
37 |
|
public FunctionExpression readDir(int win, int axis, int dir, |
38 |
|
Map context) { |
39 |
|
Fallback.Win w = (Fallback.Win) |
40 |
|
context.get(ViewContext.class); |
41 |
|
|
42 |
|
Place p = new Place(w.cursor, w.dims[axis], dir); |
43 |
|
return new ConstantExpression(p, "XXX"); |
44 |
|
} |
45 |
|
}; |
46 |
|
|
47 |
public static class SimpleType implements Type { |
public static class SimpleType implements Type { |
48 |
protected String question; |
protected String question; |