#!./nistk -f
# basewin.tcl -

#option add *background "gray"
#option add *Font "-misc-fixed-bold-*-*-*-14-*"

#source $tbed_library/cpanel.tcl

#wm title . "Prototype"
#wm minsize . 1 1

###############################################################################

proc nis_menubar {w} {
  # menu ...
  menubutton $w.file  -text "File"  -menu $w.file.m
  menu $w.file.m
  $w.file.m add command -label "Open"  -command noop
  $w.file.m add command -label "Close"  -command noop
  $w.file.m add command -label "Save As ..."  -command noop
  $w.file.m add command -label "Save"  -command noop
  $w.file.m add command -label "Quit"  -command "destroy ." 

  menubutton $w.edit  -text "Edit"  -menu .menu.edit.m
  menu $w.edit.m
  $w.edit.m add command -label "Now"  -command noop
  $w.edit.m add command -label "Later"  -command noop

  menubutton $w.conf  -text "Config"  -menu .menu.conf.m
  menu $w.conf.m
  $w.conf.m add command  -label "Local"  -command noop
  $w.conf.m add command  -label "Remote"  -command noop

  menubutton $w.help -text "Help" -menu .menu.help.m
  menu $w.help.m
  $w.help.m add command  -label "Love"  -command noop
  $w.help.m add command  -label "Fortune"  -command noop

  pack $w.file $w.edit $w.conf $w.help  -side left  -padx 4
}

proc noop {} {}

###############################################################################

frame .menu  -relief raised  -border 1
nis_menubar .menu

#frame .pane  -relief raised  -border 1
#pack .menu .pane

bind . <Any-FocusIn> {
    if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} {
        focus .menu
    }
}

pack .menu

