#! ../mofe --f

mergeResources topLevel \
	*leftAttachment ATTACH_WIDGET \
	*background gray90

mForm top topLevel 

mPushButton File0 top \
	background firebrick \
	labelString Exit \
	activateCallback exit

mPushButton File1 top leftWidget File0 
mPushButton File2 top leftWidget File1
mPushButton File3 top leftWidget File2
mPushButton File4 top leftWidget File3
mPushButton File5 top leftWidget File4

mRadioBox rb top leftWidget File5
mToggleButton File6 rb 
mToggleButton File7 rb 
mToggleButton File8 rb indicatorOn false shadowThickness 3

mScrolledText text top  {
        editable true  editMode MULTI_LINE_EDIT rows 2 
	value "Ach du meine Guete....\ner war ungemanaged!" 
	background lightBlue 
	topWidget File0 topAttachment ATTACH_WIDGET 
	rightAttachment ATTACH_WIDGET rightWidget rb
     } 

mScrolledList l top {
        height 90 
	selectionPolicy MULTIPLE_SELECT 
	fontList  "-b&h-lucida-medium-r-*-*-14-*-*-*-p-*-iso8859-*=ft,-b&h-lucida-bold-r-*-*-14-*-*-*-p-*-iso8859-*=bft" 
	itemCount 5 
	items {rot " blau" "^bft ^^" "grne \$-We[rt\}e" "^bft so^ft bold"} 
	multipleSelectionCallback {test "%S" "%P"} 
	topWidget text topAttachment ATTACH_WIDGET 
	rightAttachment ATTACH_WIDGET rightWidget rb
      }

# multipleSelectionCallback "echo multiple %P und %S ." 

proc test {arg1 arg2} {
  puts stderr "das ergebis ist <$arg1> <$arg2>"
}

mCommand com top {
        height 3 background darkSlateBlue 
	promptString "Enter valid Wafe command" 
	topWidget l topAttachment ATTACH_WIDGET 
	rightAttachment ATTACH_FORM 
	commandChangedCallback {puts stderr "changed command = <%s>"} 
	commandEnteredCallback "eval %s"
      }

  mPushButton btn com {
        labelString "Beispiel:" 
	activateCallback "mCommandAppendValue com he"
      }
#	activateCallback "mCommandAppendValue com {echo \[expr 2+3*4\]}"

mRowColumn rest top {
	orientation HORIZONTAL
	topWidget com topAttachment ATTACH_WIDGET 
	bottomAttachment ATTACH_FORM 
      }

mArrowButton ma1 rest arrowDirection ARROW_UP
mArrowButton ma2 rest arrowDirection ARROW_RIGHT
mArrowButton ma3 rest arrowDirection ARROW_DOWN
mArrowButton ma4 rest arrowDirection ARROW_LEFT

realize

