#!/bin/sh
# \
        exec itkwish "$0" ${1+"$@"}

frame .fr  
label .fr.lab \
		-font "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1" \
		-text "Paragraph Options..." -foreground steelblue
pack .fr.lab \
		-anchor w -padx 10 -pady 5
pack .fr \
		-side top \
		-fill both \
		-expand no \
		-anchor nw 

notebook .nb \
	-background gray90 \
	-width 400 -height 200 

pack .nb -anchor nw -fill both -expand yes -side left -padx 10 -pady 10
 
# Multi-line labels work...
#.nb add -label "Basic\nPara"
.nb add -label "Basic"
.nb add -label "Default Font"
.nb add -label "Pagination"
.nb add -label "Numbering"
.nb add -label "Advanced"

set basCS [.nb childsite 0]
set fntCS [.nb childsite "Default Font"]
set pagCS [.nb childsite 2]
set numCS [.nb childsite 3]
set advCS [.nb childsite end]

option add *background gray90

#
# Basic Page
#
frame $basCS.frm

optionmenu $basCS.frm.align \
		-labelpos w \
		-labeltext "Alignment:" \
		-items {"As Is" Left Center Right Justified}
pack $basCS.frm.align -side left -anchor nw -padx 10 -pady 10

pack $basCS.frm -fill both -expand yes -anchor nw

#
#  Font Page
#
frame $fntCS.frm

optionmenu $fntCS.frm.fam \
		-labelpos w \
		-labeltext "Family:" \
		-items {"As is" Courier Times Helvetica Symbol "Avant Garde" Bookman}
pack $fntCS.frm.fam -anchor e -padx 10 -pady 10

optionmenu $fntCS.frm.siz \
		-labelpos w \
		-labeltext "Size:" \
		-items {6 7 8 10 12 14 16 18 24 32 48}
pack $fntCS.frm.siz -anchor e -padx 10 -pady 10

optionmenu $fntCS.frm.ang \
		-labelpos w \
		-labeltext "Angle:" \
		-items {"As Is" Regular Italic}
pack $fntCS.frm.ang -anchor e -padx 10 -pady 10

optionmenu $fntCS.frm.wgt \
		-labelpos w \
		-labeltext "Weight:" \
		-items {"As Is" Regular Bold}
pack $fntCS.frm.wgt -anchor e -padx 10 -pady 10 
pack $fntCS.frm -fill y -expand yes -anchor nw

#
#  Pagination Page
#
frame $pagCS.frm

optionmenu $pagCS.frm.start \
		-labelpos n \
		-labeltext "Start:" \
		-items {"As is" Anywhere "Top of Column" "Top of Page" "Top of Left Page" "Top of Right Page"}
pack $pagCS.frm.start -anchor e -padx 10 -pady 10

pack $pagCS.frm -fill y -expand yes -anchor nw

#
#  Numbering Page
#
frame $numCS.frm

entry $numCS.frm.fmt -relief sunken
pack $numCS.frm.fmt -anchor w -padx 10 -pady 10

scrolledlistbox $numCS.frm.blk \
		-labelpos n \
		-labeltext "Building Blocks:" \
		-items {"\\b" "\\t" "<n>" "<n+>" "<n=1>" "<a>" "<a+>" "a=1" "<A>" "<A+>"}

pack $numCS.frm.blk -anchor w -padx 10 -pady 10

pack $numCS.frm -fill y -expand yes -anchor nw

#
#  Advanced Page
#
frame $advCS.frm

entryfield $advCS.frm.max -relief sunken \
		-labelpos w \
		-labeltext "Max # Adjacent:"
pack $advCS.frm.max -anchor e -padx 10 -pady 10

entryfield $advCS.frm.wrd -relief sunken \
		-labelpos w \
		-labeltext "Shortest Word:"
pack $advCS.frm.wrd -anchor e -padx 10 -pady 10

entryfield $advCS.frm.pfx -relief sunken \
		-labelpos w \
		-labeltext "Shortest Prefix:"
pack $advCS.frm.pfx -anchor e -padx 10 -pady 10

entryfield $advCS.frm.sfx -relief sunken \
		-labelpos w \
		-labeltext "Shortest Suffix:"
pack $advCS.frm.sfx -anchor e -padx 10 -pady 10

pack $advCS.frm -fill y -expand yes -anchor nw


.nb select 0

# Illustrate the use of scroll bars...
scrollbar .scroll -command ".nb view"
.nb configure -scrollcommand ".scroll set"
pack .scroll -fill y -expand yes -pady 10
