module BasicMenu where

import Tcl


basicMenu = 
     do w <- window []

	f1  <- frame w []
	e   <- edit w [width 40, height 20]
	vs  <- vscroll e []
	
	f2  <- frame w []
	b   <- menubutton w [text "File"]
	m   <- menu b [tearoff False]
	cset b [use_menu m]
	mbutton m [wgt_label "Clear", command (resetEdit e "")] 
	separator m 
	mbutton m [wgt_label "Quit", command (destroy w)] 

	packAdd b [inFrame f2,packH]
	packAdd f2 [packV,packAnchor W]

	packAdd e [inFrame f1,packH,fillXY,expand True]
	packAdd vs [inFrame f1,packH,fillY]
	packAdd f1 [packV,expand True,fillXY]

	return ()
