# Main Window -- Button panel style for S2K browser
#  Ray R. Larson (Mar. 93)
#
proc MainPanel {} {


global BIGFONT
global CURRENTDATABASE
global PGUSERATTRLIST
global S2K_VERSION

frame .fm15 -borderwidth {2}  -geometry {20x20}  -relief {raised}

message .fm15.mess19 -aspect {959}  -justify {left}  -padx {7}  -pady {3}  -relief {sunken}  -text "Current Database is: $CURRENTDATABASE"

message .fm15.mess18 -aspect {500}  -justify {center}  -padx {7}  -pady {3}  -text "$S2K_VERSION" -foreground LightSkyBlue3

message .fm15.mess16 -aspect {686}  -borderwidth {0}  -font $BIGFONT  -justify {center}  -padx {34}  -pady {7}  -relief {raised}  -text {Sequoia 2000: Lassen Text Browser} -foreground red

pack append .fm15 \
              .fm15.mess16 {top frame n padx 76} \
              .fm15.mess18 {top frame center padx 5 pady 10 expand fill} \
              .fm15.mess19 {top frame center padx 58 pady 23 expand}
frame .fm2 -borderwidth {2}  -relief {raised}

#  QUIT menu
button .fm2.mbt12 -activebackground {OrangeRed1}  -text {Quit} -foreground LightSkyBlue3 -command {finishup} 


# POSTQUEL menu
button   .fm2.mbt11a  -command {buildpqcommand}  -text "Build PostQuel Command"  
button   .fm2.mbt11b  -command {dbquery .winquery}  -text "Edit PostQuel Command"  
button  .fm2.mbt11c  -command {recallpqcommand}  -text "Recall PostQuel Command"  

# SEARCH menu
button  .fm2.mbt10  -command {SearchDocs}  -text "Search Window"  

# BROWSE menu
button   .fm2.mbt8a  -command {geobrowse}  -text "Geographic Browser"  
button   .fm2.mbt8b  -command {browsedocnames}  -text "Browse Document Names"  
button   .fm2.mbt8c  -command {browseauthornames}  -text "Browse Document Authors"  
# button     .fm2.mbt8d -command {browsedockeywords}  -text "Document_Keywords"  
button .fm2.mbt8e \
    -command "mkListList PGUSERATTRLIST {-text \"Database Attribute List\"}" \
    -text "Browse Database Attributes"  
button .fm2.mbt8f \
        -command {mkList2 PGCLASS {-text "Database Classes List"}} \
       -text "Browse Database Classes"  
button  .fm2.mbt8g -command {Newlist / }  -text {Browse Large Object Pathnames}  

button  .fm2.mbt8i -command IntroWindow  -text {Info Window}  

pack append .fm2 \
              .fm2.mbt8b {top expand fillx} \
              .fm2.mbt8c {top expand fillx} \
              .fm2.mbt8a {top expand fillx} \
              .fm2.mbt8e {top expand fillx} \
              .fm2.mbt8f {top expand fillx} \
              .fm2.mbt8g {top expand fillx} \
              .fm2.mbt10 {top expand fillx} \
              .fm2.mbt11b {top expand fillx} \
              .fm2.mbt8i {top expand fillx} \
              .fm2.mbt12 {top expand fillx}

pack append . \
              .fm15 {top frame center} \
              .fm2 {top frame center expand fill}

wm geometry . -1+0

#end of mainbrowse
}


proc finishup {} {
     global TEMPFILEPATH
     savequerylist     
     catch {eval exec rm -rf [glob $TEMPFILEPATH*]}
     PQfinish
     exit
}
