1/*
2 * ftree2.c
3 *
4 * small test-driver for new dialog functionality
5 *
6 * Copyright (c) 1998, Anatoly A. Orehovsky
7 *
8 * file ./ftree2.test with xterm widget tree from
9 * preprocess editres(1) dump needed !!!
10 */
11
12#include <sys/cdefs.h>
13__FBSDID("$FreeBSD$");
14
15#include <stdio.h>
16#include <stdlib.h>
17#include <dialog.h>
18
19int
20main(int argc, char **argv)
21{
22	int retval;
23	unsigned char *tresult;
24
25	init_dialog();
26	use_helpfile("ftree2.test");
27	use_helpline("Press Arrows, Tab, Enter or F1");
28	retval = dialog_ftree("ftree2.test", '\t',
29		"ftree dialog box example",
30		"xterm widget tree from preprocess editres(1) dump",
31		-1, -1, 15,
32                            &tresult);
33
34	dialog_update();
35
36	dialog_clear();
37
38	end_dialog();
39
40	if (!retval)
41	{
42 		puts(tresult);
43  		free(tresult);
44  	}
45
46	exit(retval);
47}
48