summaryrefslogtreecommitdiff
path: root/appl/wm/ftree/items.m
diff options
context:
space:
mode:
Diffstat (limited to 'appl/wm/ftree/items.m')
-rw-r--r--appl/wm/ftree/items.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/appl/wm/ftree/items.m b/appl/wm/ftree/items.m
new file mode 100644
index 00000000..7af34d12
--- /dev/null
+++ b/appl/wm/ftree/items.m
@@ -0,0 +1,30 @@
+Items: module {
+ PATH: con "/dis/lib/ftree/items.dis";
+
+ Item: adt {
+ name: string; # tag held in common by all canvas items in this Item.
+ r: Rect; # relative to parent's Item when stored in children
+ attach: Point; # attachment point relative to r.min
+
+ eq: fn(i: self Item, j: Item): int;
+ addpt: fn(i: self Item, p: Point): Item;
+ subpt: fn(i: self Item, p: Point): Item;
+ };
+
+ Expander: adt {
+ titleitem: Item;
+ expanded: int;
+ children: array of Item;
+ win: ref Tk->Toplevel;
+ cvs: string;
+ spotid: int;
+
+ new: fn(win: ref Tk->Toplevel, cvs: string): ref Expander;
+ make: fn(e: self ref Expander, it: Item): Item;
+ event: fn(e: self ref Expander, it: Item, ev: string): Item;
+ childrenchanged: fn(e: self ref Expander, it: Item): Item;
+ };
+
+ init: fn();
+ maketext: fn(win: ref Tk->Toplevel, cvs: string, name: string, text: string): Item;
+};