#!/usr/bin/wish

load ./tclLdap.so

proc about_ldaptool {} {
tk_dialog .about_ldaptool "About LDAPTool" \
"LDAPTool is a RFC2307 compliant network managent tool modeled after
the Solaris \'admintool\'" warning 0 OK
}
# MENUS

frame .menubar \
  -relief raised -bd 2
menubutton .menubar.file \
  -text "File" \
  -menu .menubar.file.menu \
  -underline 0
menu .menubar.file.menu -tearoff no
.menubar.file.menu add command \
  -label "Exit" \
  -underline 1 \
  -command { exit }

menubutton .menubar.edit \
  -text "Edit" \
  -menu .menubar.edit.menu \
  -underline 0
menu .menubar.edit.menu -tearoff no
.menubar.edit.menu add command \
  -label "Add..." \
  -underline 0 \
  -command { true }
.menubar.edit.menu add command \
  -label "Modify..." \
  -underline 0 \
  -command { true }
.menubar.edit.menu add separator
.menubar.edit.menu add command \
  -label "Delete" \
  -underline 0 \
  -command { true }

menubutton .menubar.browse \
  -text "Browse" \
  -menu .menubar.browse.menu \
  -underline 0
menu .menubar.browse.menu -tearoff no
.menubar.browse.menu add command \
  -label "Users" \
  -underline 0 \
  -command { true }
.menubar.browse.menu add command \
  -label "Groups" \
  -underline 0 \
  -command { true }
.menubar.browse.menu add command \
  -label "Hosts" \
  -underline 0 \
  -command { true }
.menubar.browse.menu add command \
  -label "Services" \
  -underline 0 \
  -command { true }

menubutton .menubar.help \
  -text "Help" \
  -menu .menubar.help.menu \
  -underline 0
menu .menubar.help.menu -tearoff no
.menubar.help.menu add command \
  -label "About Ldaptool..." \
  -underline 0 \
  -command { about_ldaptool }
.menubar.help.menu add command \
  -label "About Managing Users..." \
  -underline 6 \
  -command { true }
pack .menubar.file .menubar.edit .menubar.browse \
  -side left
pack .menubar.help \
  -side right

frame .tx
text .tx.text \
  -yscrollcommand {.tx.scrl set}
scrollbar .tx.scrl \
  -command ".tx.text yview"
pack .tx.scrl  -side right -fill y
pack .tx.text -side left

frame .statusbar
label .statusbar.host \
  -text "\"dc=marcus,dc=seva,dc=net\" on marcus.seva.net"
#label .statusbar.null \
# -text ""
pack .statusbar.host \
  -side right -fill y

pack .menubar \
  -side top \
  -fill x \
  -expand true
pack .tx
pack .statusbar \
  -side bottom



