#! ../mofe --f

mergeResources topLevel \
	*leftAttachment ATTACH_WIDGET \
	*background gray90

XmForm top topLevel 

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

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

XmRadioBox rb top leftWidget File5
XmToggleButton File6 rb 
XmToggleButton File7 rb 
XmToggleButton File8 rb indicatorOn false shadowThickness 3

XmScrolledText 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
     } 

XmScrolledList 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 ^^" "grüne \$-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>"
}

XmCommand 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"
      }

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

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

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

realize

