### Copyright (C) 1996 Rasmus Ingemann Hansen
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

proc layout {} {
    # Menues / Main menu / Layout
    Desc "Layout of HelpMenu (three line menu at bottom) and message indexes."
    ShortDesc "Layout of Main menu"

### Layout of Help Menu ####
    Header head1 -text "Layout of HelpMenu" \
	-background gray\
	-help "The three line HelpMenu found on bottom of the main page"

    CheckBox actionMenuCheckBox1 \
	-text "Display the three-line MiniMenu found at bottom of index screen" \
	-help "When you know all the basic commands like m,f,d,r,s you can save a total of 5 lines for the message indexes when MiniMenu turned off. Gain more visibility."

    Line line1
    Radio actionMenuRadio1 \
	-text "The higher `userlevel', the more options available at Mini-menu and other menues" \
	-entryhelp {
		"Beginner level" "" \
		"Intermediate level" "" \
		"Expert level" ""
	} \
	-help "Most users find gaining more options at their menus neat. Userlevel also affects other areas." \
	-packFrame:fill x


### Layout of Indexes ###
    Header head2 -text "Layout of Indexes" \
	-background gray\
	-help "The indexed list of messages found on the main page"

    Menu actionMenuMenu1 \
	-text "Let current message index be visualized by" \
	-entries {
		"arrow '->'" "highlighted bar"
	} \
	-help "Way to show user which message is the current" \
	-button:width 13

    Line line3

    Menu actionMenuMenu2 \
	-text "Sort folders by " \
	-textafter "method" \
	-entryhelp {
		"Date Mail sent" "Higest priority to most resently sent message" \
		"Date mail received" "Higest priority when actually received"
		"Message sender" "Higest priority to alfanum. least sender name" \
		"Lines in sender" "Higest priority to shortest message" \
		"Message subject" "Higest priority to alfanum. least subject" \
		"Message status" "Higest priority from tagged through deleted" \
		"Mailbox order" "Higest priority least recently added to folder"\
	} \
	-help "How messages should be sorted (visually) on the main page" \
        -button:width 16

    Menu actionMenuMenu3 \
	-text "with highest priority at" \
	-entryhelp {
		"top" "Highest priority on top of screen at IndexMenu"\
		"bottom" "Highest priority on bottom of screen at IndexMenu"\
	} \
	-help "Highest priority shown with index 1 growing towards index with least priority." \
	-button:width 6

    Frame frame1 -entries {actionMenuMenu2 actionMenuMenu3}\
        -packFrame:fill x


  ############################## Init / Save ##############################

    Init {
    }

    Save {
	print "\n# display the three-line mini menu?"
        if {$actionMenuCheckBox1==1} {
		print "menu = ON"
        } else {
		print "menu = OFF"
	}

	print "\n# Userlevel: 0=beginner, 1=intermediate, 2+=expert"
        if {$actionMenuRadio1(index)==0} {
		print "userlevel = 0"
        } elseif {$actionMenuRadio1(index)==1} {
		print "userlevel = 1"
        } elseif {$actionMenuRadio1(index)==2} {
		print "userlevel = 2"
        } 

	print "\n# use arrow '->' (rather than inverse bar)?"
        if {$actionMenuMenu1(index)==1} {
		print "arrow = OFF"
        } else {
		print "arrow = ON"
        }

	print "\n# how to sort folders, \"Reverse-Sent\" by default"
	set temp ""
	if {$actionMenuMenu3(index)==0} {
		append temp "sortby = Reverse-"
	} else { append temp "sortby = " }
        if {$actionMenuMenu2(index)==0} {
		append temp "Sent"
		print $temp
	} elseif {$actionMenuMenu2(index)==1} {
		append temp "Received"
		print $temp
	} elseif {$actionMenuMenu2(index)==2} {
		append temp "From"
		print $temp
	} elseif {$actionMenuMenu2(index)==3} {
		append temp "Lines"
		print $temp
	} elseif {$actionMenuMenu2(index)==4} {
		append temp "Subject"
		print $temp
	} elseif {$actionMenuMenu2(index)==5} {
		append temp "Status"
		print $temp
	} elseif {$actionMenuMenu2(index)==6} {
		append temp "Mailbox"
		print $temp
	}

   }
}



