Changes to mtcltk/mtk

Thomas Charles CONWAY conway at cs.mu.oz.au
Tue Nov 11 14:40:19 AEDT 1997


Hi

This all works with mercury-latest. I'll check it in now since it's
off the critical path.

-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			      Every sword has two edges.


extras/graphics/mtcltk.m:
	Fix the code to work with the changes to the handling of
	IO states in pragma c_code.

extras/graphics/mtk.m:
	Add several bits of functionality that were missing.

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing bytecode
cvs diff: Diffing bytecode/test
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/graphics
Index: extras/graphics/mtcltk.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/extras/graphics/mtcltk.m,v
retrieving revision 1.2
diff -u -r1.2 mtcltk.m
--- mtcltk.m	1997/07/27 15:06:14	1.2
+++ mtcltk.m	1997/11/11 01:08:04
@@ -130,13 +130,11 @@
 ").
 
 :- pragma c_header_code("
-	extern Word mtcltk_current_io_state;
 	extern Word mtcltk_mercury_initializer;
 	char *mtcltk_strdup(const char *str);
 ").
 
 :- pragma c_code("
-	Word mtcltk_current_io_state;
 	Word mtcltk_mercury_initializer;
 ").
 
@@ -161,9 +159,8 @@
 
     mtcltk_mercury_initializer = Closure;
 
-    mtcltk_current_io_state = IO0;
     Tk_Main(argc, argv, Tcl_AppInit);
-    IO = mtcltk_current_io_state;
+    IO = IO0;
 }").
 
 :- pred call_mercury_initializer(pred(tcl_interp, io__state, io__state),
@@ -211,8 +208,7 @@
     }
     Tcl_StaticPackage(interp, tk_str, Tk_Init, (Tcl_PackageInitProc *) NULL);
 
-    mtcltk_call_mercury_initializer(mtcltk_mercury_initializer,
-	(Word)interp, mtcltk_current_io_state, &mtcltk_current_io_state);
+    mtcltk_call_mercury_initializer(mtcltk_mercury_initializer, (Word)interp);
 
     Tcl_SetVar(interp, tcl_rcFileName_str, gwarsrc_str, TCL_GLOBAL_ONLY);
 
@@ -227,7 +223,6 @@
 {
 	int err;
 
-	mtcltk_current_io_state = IO0;
 	err = Tcl_Eval((Tcl_Interp *)Interp, (char *)Cmd);
 	switch (err) {
 		case TCL_OK:
@@ -241,7 +236,7 @@
 					""TCL_OK or TCL_ERROR"");
 	}
 	Result = mtcltk_strdup(((Tcl_Interp *)Interp)->result);
-	IO = mtcltk_current_io_state;
+	IO = IO0;
 }
 ").
 
@@ -294,8 +289,7 @@
 	}
 
 	mtcltk_call_mercury_closure((Word) clientData, (Word) interp,
-		args, &status, &interp->result,
-		mtcltk_current_io_state, &mtcltk_current_io_state);
+		args, &status, &interp->result);
 /*
 	fprintf(stderr, ""mercury result: `%s'\n"", interp->result);
 */
@@ -311,20 +305,18 @@
 			Closure::pred(in, in, out, out, di, uo) is det,
 			IO0::di, IO::uo), may_call_mercury,
 "{
-	mtcltk_current_io_state = IO0;
 	Tcl_CreateCommand((Tcl_Interp *)Interp, Name, mtcltk_do_callback,
 				(ClientData)Closure, NULL);
-	IO = mtcltk_current_io_state;
+	IO = IO0;
 }").
 
 :- pragma c_code(delete_command(Interp::in, Name::in, Result::out,
 			IO0::di, IO::uo),
 "{
 	int err;
-	mtcltk_current_io_state = IO0;
 	err = Tcl_DeleteCommand((Tcl_Interp *)Interp, Name);
 	Result = (err == 0 ? 0 : 1);
-	IO = mtcltk_current_io_state;
+	IO = IO0;
 }").
 
 :- pragma c_code("
Index: extras/graphics/mtk.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/extras/graphics/mtk.m,v
retrieving revision 1.2
diff -u -r1.2 mtk.m
--- mtk.m	1997/07/27 15:06:14	1.2
+++ mtk.m	1997/11/11 01:08:11
@@ -51,6 +51,8 @@
 	;	insert_width(int)
 	;	jump(bool)
 	;	justify(string)
+	;	label(string)
+	;	menu(widget)
 	;	multiple_select(bool)
 	;	orient(orientation)
 	;	outline_color(string)
@@ -62,6 +64,7 @@
 	;	scale_height(int)
 	;	scale_range(int, int)
 	;	scale_text(string)
+	;	screen(string)
 	;	scroll_region(int, int)
 	;	select_background(string)
 	;	select_border_width(int)
@@ -113,6 +116,8 @@
 	;	insert_width(ground)
 	;	jump(ground)
 	;	justify(ground)
+	;	label(ground)
+	;	menu(bound(menu(ground)))
 	;	multiple_select(ground)
 	;	orient(ground)
 	;	outline_color(ground)
@@ -124,6 +129,7 @@
 	;	scale_height(ground)
 	;	scale_range(ground, ground)
 	;	scale_text(ground)
+	;	screen(ground)
 	;	scroll_region(ground, ground)
 	;	select_background(ground)
 	;	select_border_width(ground)
@@ -188,6 +194,8 @@
 	;	wrap_length(ground)
 	)).
 
+:- inst canvas = bound(canvas(ground)).
+
 :- inst entry = bound(entry(ground)).
 
 :- inst entry_config = bound((
@@ -242,6 +250,8 @@
 	;	width(ground)
 	)).
 
+:- inst radiobutton = bound(radiobutton(ground)).
+
 :- inst scrollbar = bound(scrollbar(ground)).
 
 :- inst scrollbar_config = bound((
@@ -320,7 +330,8 @@
 	:- mode disable(in, in(button), di, uo) is det.
 
 :- pred canvas(tcl_interp, list(config), widget, widget, io__state, io__state).
-:- mode canvas(in, in(list_skel(config)), in(window), out, di, uo) is det.
+:- mode canvas(in, in(list_skel(config)), in(window), out(canvas),
+		di, uo) is det.
 
 	:- type canvas_item.
 
@@ -335,18 +346,44 @@
 			;	text(int, int)
 			.
 
-	:- pred create(tcl_interp, widget, canvas_item_type, list(config),
-			canvas_item, io__state, io__state).
-	:- mode create(in, in, in, in(list_skel(config)), out, di, uo) is det.
+	:- type item_config
+		--->	anchor(anchor)
+		;	background(string)
+		;	bitmap(string)
+		;	extent(int)
+		;	fill(string)
+		;	foreground(string)
+		;	outline(string)
+		;	start(int)
+		;	type(string)
+		;	width(int)
+		.
 
-	:- type deletion_spec
+	:- type item_spec
 			--->	item(canvas_item)
 			;	(all)
 			.
 
-	:- pred canvas_delete(tcl_interp, widget, deletion_spec, io__state, io__state).
+	:- pred create(tcl_interp, widget, canvas_item_type, list(item_config),
+			canvas_item, io__state, io__state).
+	:- mode create(in, in, in, in, out, di, uo) is det.
+
+	:- pred canvas_delete(tcl_interp, widget, item_spec,
+			io__state, io__state).
 	:- mode canvas_delete(in, in, in, di, uo) is det.
 
+	:- pred canvas_item_configure(tcl_interp, widget, canvas_item,
+			list(item_config), io__state, io__state).
+	:- mode canvas_item_configure(in, in, in, in, di, uo) is det.
+
+	:- pred canvas_item_coords(tcl_interp, widget, canvas_item, int, int,
+			io__state, io__state).
+	:- mode canvas_item_coords(in, in, in, in, in, di, uo) is det.
+
+	:- pred canvas_move(tcl_interp, widget, canvas_item, int, int,
+			io__state, io__state).
+	:- mode canvas_move(in, in, in, in, in, di, uo) is det.
+
 :- pred entry(tcl_interp, list(config), widget, widget, io__state, io__state).
 :- mode entry(in, in(list_skel(entry_config)), in(window), out(entry),
 		di, uo) is det.
@@ -397,6 +434,7 @@
 
 	:- type menu_item
 		--->	command
+		;	separator
 		.
 
 	:- pred add_menu_item(tcl_interp, widget, menu_item, list(config),
@@ -404,6 +442,19 @@
 	:- mode add_menu_item(in, in(menu), in, in(list_skel(config)),
 			di, uo) is det.
 
+:- type radio_group.
+
+:- pred new_radio_group(tcl_interp, radio_group, io__state, io__state).
+:- mode new_radio_group(in, out, di, uo) is det.
+
+:- pred set_radio_group(tcl_interp, radio_group, string, io__state, io__state).
+:- mode set_radio_group(in, in, in, di, uo) is det.
+
+:- pred radiobutton(tcl_interp, list(config), widget, radio_group, string,
+		widget, io__state, io__state).
+:- mode radiobutton(in, in(list_skel(config)), in(window), in, in,
+		out(radiobutton), di, uo) is det.
+
 :- pred scrollbar(tcl_interp, list(config), widget, widget,
 		io__state, io__state).
 :- mode scrollbar(in, in(list_skel(scrollbar_config)), in(window),
@@ -496,12 +547,24 @@
 	;	visibility
 	.
 
-:- type event_data.
+:- type event_data_spec
+	--->	button
+	;	key
+	;	x
+	;	y
+	.
+
+:- type event_data
+	--->	button(int)
+	;	key(int)
+	;	x(int)
+	;	y(int)
+	.
 
-:- pred bind(tcl_interp, widget, event,
-		pred(tcl_interp, event_data, io__state, io__state),
+:- pred bind(tcl_interp, widget, event, list(event_data_spec),
+		pred(tcl_interp, list(event_data), io__state, io__state),
 		io__state, io__state).
-:- mode bind(in, in(toplevel), in, pred(in, in, di, uo) is det, di, uo) is det.
+:- mode bind(in, in, in, in, pred(in, in, di, uo) is det, di, uo) is det.
 
 :- pred configure(tcl_interp, widget, list(config), io__state, io__state).
 :- mode configure(in, in, in(list_skel(config)), di, uo) is det.
@@ -517,6 +580,9 @@
 :- pred get_selection(tcl_interp, widget, string, io__state, io__state).
 :- mode get_selection(in, in, out, di, uo) is det.
 
+:- pred ensure_window(widget, widget).
+:- mode ensure_window(in, out(window)) is det.
+
 % XXX hack until we can implement cget.
 :- pred unbind_command(tcl_interp, widget, io__state, io__state).
 :- mode unbind_command(in, in, di, uo) is det.
@@ -537,6 +603,7 @@
 	;	listbox(wpath)
 	;	menubutton(wpath)
 	;	menu(wpath)
+	;	radiobutton(wpath)
 	;	scrollbar(wpath)
 	;	text(wpath)
 	.
@@ -545,8 +612,6 @@
 
 :- type canvas_item	==	string.
 
-:- type event_data	--->	junk.
-
 %------------------------------------------------------------------------------%
 
 window(Interp, Configs, window(Widget)) -->
@@ -611,7 +676,7 @@
 
 create(Interp, Widget, ItemType, Configs, CanvasItem) -->
 	{ unwrap(Widget, Path) },
-	stringify_configs(Interp, Configs, ConfStr),
+	{ stringify_item_configs(Configs, ConfStr) },
 	{ stringify_itemtype(ItemType, ItemStr) },
 	{ string__format("%s create %s %s", [s(Path), s(ItemStr), s(ConfStr)],
 		CmdStr) },
@@ -629,6 +694,28 @@
 	eval(Interp, CmdStr, Res, ResStr),
 	{ Res = tcl_ok -> true ; error(ResStr) }.
 
+canvas_item_configure(Interp, Widget, Item, Configs) -->
+	{ unwrap(Widget, Path) },
+	{ stringify_item_configs(Configs, ConfStr) },
+	{ string__format("%s itemconfigure %s %s", [s(Path),
+		s(Item), s(ConfStr)], CmdStr) },
+	eval(Interp, CmdStr, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
+canvas_item_coords(Interp, Widget, Item, Dx, Dy) -->
+	{ unwrap(Widget, Path) },
+	{ string__format("%s coords %s %d %d", [s(Path), s(Item), i(Dx), i(Dy)],
+		CmdStr) },
+	eval(Interp, CmdStr, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
+canvas_move(Interp, Widget, Item, Dx, Dy) -->
+	{ unwrap(Widget, Path) },
+	{ string__format("%s move %s %d %d", [s(Path), s(Item), i(Dx), i(Dy)],
+		CmdStr) },
+	eval(Interp, CmdStr, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
 :- pred stringify_itemtype(canvas_item_type, string).
 :- mode stringify_itemtype(in, out) is det.
 
@@ -663,6 +750,47 @@
 	string__format("%d %d ", [i(X), i(Y)], ThisStr),
 	string__append(ThisStr, RestStr, Str).
 
+:- pred stringify_item_configs(list(item_config), string).
+:- mode stringify_item_configs(in, out) is det.
+
+stringify_item_configs([], "").
+stringify_item_configs([Cfg|Cfgs], Str) :-
+	(
+		Cfg = anchor(Anc),
+		stringify_anchor(Anc, AStr),
+		string__format("-anchor %s ", [s(AStr)], CfgStr)
+	;
+		Cfg =	background(Col),
+		string__format("-background %s ", [s(Col)], CfgStr)
+	;
+		Cfg =	bitmap(Bitm),
+		string__format("-bitmap %s ", [s(Bitm)], CfgStr)
+	;
+		Cfg =	extent(Ext),
+		string__format("-extent %d ", [i(Ext)], CfgStr)
+	;
+		Cfg =	fill(Col),
+		string__format("-fill %s ", [s(Col)], CfgStr)
+	;
+		Cfg =	foreground(Col),
+		string__format("-foreground %s ", [s(Col)], CfgStr)
+	;
+		Cfg =	outline(Col),
+		string__format("-outline %s ", [s(Col)], CfgStr)
+	;
+		Cfg =	start(St),
+		string__format("-width %d ", [i(St)], CfgStr)
+	;
+		Cfg =	type(Col),
+		string__format("-type %s ", [s(Col)], CfgStr)
+	;
+		Cfg =	width(Int),
+		string__format("-width %d ", [i(Int)], CfgStr)
+	),
+	stringify_item_configs(Cfgs, Str0),
+	string__append(CfgStr, Str0, Str).
+
+
 %------------------------------------------------------------------------------%
 
 entry(Interp, Configs, ParentWidget, entry(Widget)) -->
@@ -803,6 +931,40 @@
 	eval(Interp, Str, Res, ResStr),
 	{ Res = tcl_ok -> true ; error(ResStr) }.
 
+add_menu_item(Interp, Widget, separator, Configs) -->
+	{ unwrap(Widget, Path) },
+	stringify_configs(Interp, Configs, Str1),
+	{ string__format("%s add separator %s", [s(Path), s(Str1)], Str) },
+	eval(Interp, Str, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
+%------------------------------------------------------------------------------%
+
+:- type radio_group	==	string.
+
+new_radio_group(_Interp, RadioVar) -->
+	get_thingy_counter(Id),
+	set_thingy_counter(Id+1),
+	{ string__format("radiovar%d", [i(Id)], RadioVar) }.
+
+set_radio_group(Interp, RadVar, Value) -->
+	{ string__format("set %s %s", [s(RadVar), s(Value)], CmdStr) },
+	eval(Interp, CmdStr, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
+radiobutton(Interp, Configs, ParentWidget, RadioVar, Value,
+		radiobutton(Widget)) -->
+	{ unwrap(ParentWidget, Parent) },
+	get_thingy_counter(Id),
+	set_thingy_counter(Id+1),
+	{ string__format("%s.radiobutton%d", [s(Parent), i(Id)], Widget) },
+	{ string__format("radiobutton %s -indicatoron 0 -variable %s -value %s ",
+		[s(Widget), s(RadioVar), s(Value)], Str0) },
+	stringify_configs(Interp, Configs, Str1),
+	{ string__append(Str0, Str1, Str) },
+	eval(Interp, Str, Res, ResStr),
+	{ Res = tcl_ok -> true ; error(ResStr) }.
+
 %------------------------------------------------------------------------------%
 
 scrollbar(Interp, Configs, ParentWidget, scrollbar(Widget)) -->
@@ -948,26 +1110,35 @@
 
 %------------------------------------------------------------------------------%
 
-bind(Interp, Widget, Event, Closure) -->
+bind(Interp, Widget, Event, EDataSpecs, Closure) -->
 	{ unwrap(Widget, Path) },
 	get_thingy_counter(Id),
 	set_thingy_counter(Id+1),
 	{ string__format("cmd%d", [i(Id)], CmdName) },
 	{ stringify_event(Event, EventStr) },
-	create_command(Interp, CmdName, bind_wrapper(Closure)),
-	{ string__format("bind %s %s %s", [s(Path), s(EventStr), s(CmdName)],
-		Str) },
+	{ stringify_edata_specs(EDataSpecs, EDataStr) },
+	create_command(Interp, CmdName, bind_wrapper(Closure, EDataSpecs)),
+	{ string__format("bind %s %s { %s %s }", [s(Path), s(EventStr),
+		s(CmdName), s(EDataStr)], Str) },
 	eval(Interp, Str, Res, ResStr),
 	{ Res = tcl_ok -> true ; error(ResStr) }.
 
-:- pred bind_wrapper(pred(tcl_interp, event_data, io__state, io__state),
+:- pred bind_wrapper(pred(tcl_interp, list(event_data), io__state, io__state),
+		list(event_data_spec),
 		tcl_interp, list(string), tcl_status, string,
 		io__state, io__state).
-:- mode bind_wrapper(pred(in, in, di, uo) is det, in, in, out, out,
+:- mode bind_wrapper(pred(in, in, di, uo) is det, in, in, in, out, out,
 		di, uo) is det.
 
-bind_wrapper(Closure, Interp, _Args, tcl_ok, "") -->
-	call(Closure, Interp, junk).
+bind_wrapper(Closure, EDataSpecs, Interp, Args0, tcl_ok, "") -->
+	(
+		{ Args0 = [] },
+		{ error("bind_wrapper: no args") }
+	;
+		{ Args0 = [_|Args] },
+		{ decode_edata(EDataSpecs, Args, EData) },
+		call(Closure, Interp, EData)
+	).
 
 :- pred stringify_event(event, string).
 :- mode stringify_event(in, out) is det.
@@ -1039,6 +1210,59 @@
 stringify_mod(double, "Double").
 stringify_mod(triple, "Triple").
 
+:- pred stringify_edata_specs(list(event_data_spec), string).
+:- mode stringify_edata_specs(in, out) is det.
+
+stringify_edata_specs([], "").
+stringify_edata_specs([Spec|Rest], Str) :-
+	(	Spec = button,	SpecStr = "%b "
+	;	Spec = key,	SpecStr = "%k "
+	;	Spec = x,	SpecStr = "%x "
+	;	Spec = y,	SpecStr = "%y "
+	),
+	stringify_edata_specs(Rest, Str0),
+	string__append(SpecStr, Str0, Str).
+
+:- pred decode_edata(list(event_data_spec), list(string), list(event_data)).
+:- mode decode_edata(in, in, out) is det.
+
+decode_edata([], [], []).
+decode_edata([_|_], [], _) :-
+	error("decode_edata: ran out of args").
+decode_edata([], [_|_], _) :-
+	error("decode_edata: too many args").
+decode_edata([Spec|Specs], [Str|Strs], [Datum|Data]) :-
+	decode_edata(Specs, Strs, Data),
+	(
+		Spec = button,
+		( string__to_int(Str, Int) ->
+			Datum = button(Int)
+		;
+			error("decode_edata: data format error")
+		)
+	;
+		Spec = key,
+		( string__to_int(Str, Int) ->
+			Datum = key(Int)
+		;
+			error("decode_edata: data format error")
+		)
+	;
+		Spec = x,
+		( string__to_int(Str, Int) ->
+			Datum = x(Int)
+		;
+			error("decode_edata: data format error")
+		)
+	;
+		Spec = y,
+		( string__to_int(Str, Int) ->
+			Datum = y(Int)
+		;
+			error("decode_edata: data format error")
+		)
+	).
+
 %------------------------------------------------------------------------------%
 
 configure(Interp, Widget, Configs) -->
@@ -1050,6 +1274,19 @@
 
 %------------------------------------------------------------------------------%
 
+ensure_window(Widget0, Widget) :-
+	( (
+		Widget0 = window(_)
+	;
+		Widget0 = frame(_)
+	) ->
+		Widget = Widget0
+	;
+		error("ensure_window: not a window")
+	).
+
+%------------------------------------------------------------------------------%
+
 get(Interp, entry(Path), String) -->
 	{ string__format("%s get", [s(Path)], CmdStr) },
 	eval(Interp, CmdStr, Res, String),
@@ -1118,7 +1355,7 @@
 	(
 		Indicator = yes, IndicatorStr = "normal"
 	;
-		Indicator = no, IndicatorStr = "diabled"
+		Indicator = no, IndicatorStr = "disabled"
 	),
 	string__format("-state %s", [s(IndicatorStr)], Str).
 
@@ -1132,16 +1369,7 @@
 	string__format("-activerelief %s", [s(Relief)], Str).
 
 stringify_config(_Interp, anchor(Ank), Str, IO, IO) :-
-	( Ank = n, AnkStr = "n"
-	; Ank = s, AnkStr = "s"
-	; Ank = e, AnkStr = "e"
-	; Ank = w, AnkStr = "w"
-	; Ank = ne, AnkStr = "ne"
-	; Ank = nw, AnkStr = "nw"
-	; Ank = se, AnkStr = "se"
-	; Ank = sw, AnkStr = "sw"
-	; Ank = c, AnkStr = "c"
-	),
+	stringify_anchor(Ank, AnkStr),
 	string__format("-anchor %s", [s(AnkStr)], Str).
 
 stringify_config(_Interp, aspect(Asp), Str, IO, IO) :-
@@ -1238,6 +1466,12 @@
 stringify_config(_Interp, justify(Just), Str, IO, IO) :-
 	string__format("-justify %s", [s(Just)], Str).
 
+stringify_config(_Interp, label(Label), Str, IO, IO) :-
+	string__format("-label {%s}", [s(Label)], Str).
+
+stringify_config(_Interp, menu(menu(Path)), Str, IO, IO) :-
+	string__format("-menu %s", [s(Path)], Str).
+
 stringify_config(_Interp, multiple_select(Indicator), Str, IO, IO) :-
 	(
 		Indicator = yes, IndicatorStr = "extended"
@@ -1281,6 +1515,9 @@
 stringify_config(_Interp, scroll_region(H, W), Str, IO, IO) :-
 	string__format("-scrollregion {0 0 %d %d}", [i(H), i(W)], Str).
 
+stringify_config(_Interp, screen(Txt), Str, IO, IO) :-
+	string__format("-screen %s", [s(Txt)], Str).
+
 stringify_config(_Interp, scale_text(Txt), Str, IO, IO) :-
 	string__format("-label %s", [s(Txt)], Str).
 
@@ -1351,6 +1588,20 @@
 stringify_config(_Interp, wrap_length(Width), Str, IO, IO) :-
 	string__format("-wraplength %d", [i(Width)], Str).
 
+:- pred stringify_anchor(anchor::in, string::out) is det.
+
+stringify_anchor(Ank, AnkStr) :-
+	( Ank = n, AnkStr = "n"
+	; Ank = s, AnkStr = "s"
+	; Ank = e, AnkStr = "e"
+	; Ank = w, AnkStr = "w"
+	; Ank = ne, AnkStr = "ne"
+	; Ank = nw, AnkStr = "nw"
+	; Ank = se, AnkStr = "se"
+	; Ank = sw, AnkStr = "sw"
+	; Ank = c, AnkStr = "c"
+	).
+
 :- pred unwrap(widget, wpath).
 :- mode unwrap(in, out) is det.
 
@@ -1362,6 +1613,7 @@
 unwrap(listbox(Path), Path).
 unwrap(menubutton(Path), Path).
 unwrap(menu(Path), Path).
+unwrap(radiobutton(Path), Path).
 unwrap(scrollbar(Path), Path).
 unwrap(text(Path), Path).
 unwrap(window(Path), Path).
cvs diff: Diffing extras/graphics/Togl-1.2
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tools
cvs diff: Diffing trial
cvs diff: Diffing util



More information about the developers mailing list