head	14.2;
access;
symbols
	rel-7-10-4:14.1
	STABLE:14.1.0.10
	stable-branch:14.1
	rel-7-10-2:14.1
	rel-7-10-0:14.1
	rel-7-8-4:14.1
	rel-7-8-2:14.1
	rel-7-8-0:14.1
	trimnurbs-branch:14.1.0.8
	help:14.1
	temp_tag:14.1
	bobWinPort-20051223-freeze:14.1
	postmerge-20051223-bobWinPort:14.1
	premerge-20051223-bobWinPort:14.1
	rel-7-6-6:14.1
	rel-7-6-4:14.1
	rel-7-6-2:14.1
	rel-7-6-branch:14.1.0.6
	rel-7-6-0:14.1
	rel-7-4-2:14.1
	rel-7-4-branch:14.1.0.4
	bobWinPort:14.1.0.2
	rel-7-4-0:14.1
	rel-7-2-6:14.1
	rel-7-2-4:14.1
	rel-7-2-2:14.1
	rel-7-2-0:14.1
	rel-7-0-4:14.1
	rel-7-0-2:14.1
	rel-7-0-1:14.1
	opensource-post:14.1
	opensource-pre:1.1
	rel-7-0-branch:1.1.0.2
	rel-7-0:1.1;
locks; strict;
comment	@# @;


14.2
date	2007.09.14.15.21.34;	author erikgreenwald;	state Exp;
branches;
next	14.1;

14.1
date	2004.11.16.19.42.18;	author morrison;	state Exp;
branches;
next	1.1;

1.1
date	2004.05.20.14.49.21;	author morrison;	state Exp;
branches;
next	;


desc
@@


14.2
log
@removed trailing whitespace
@
text
@# ----------------------------------------------------------------------
#  DEMO: mainwindow in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0

wm withdraw .
iwidgets::mainwindow .mw

set imagedir [file join ${iwidgets::library} demos images]

#
# Add a File menubutton
#
.mw menubar add menubutton file -text "File" -underline 0 -padx 8 -pady 2 \
    -menu {options -tearoff no
	   command new -label "New" -underline 0 \
	       -helpstr "Create a new file"
	   command open -label "Open ..." -underline 0 \
	       -helpstr "Open an existing file"
	   command save -label "Save" -underline 0 \
	       -helpstr "Save the current file"
	   command saveas -label "Save As ..." -underline 5 \
	       -helpstr "Save the file as a differnet name"
	   command print -label "Print" -underline 0 \
	       -helpstr "Print the file"
           separator sep1
	   command close -label "Close" -underline 0 \
	       -helpstr "Close the file"
	   separator sep2
	   command exit -label "Exit" -underline 1 \
	       -helpstr "Exit this application"
    }

#
# Add the Edit menubutton.
#
.mw menubar add menubutton edit -text "Edit" -underline 0 -padx 8 -pady 2 \
    -menu {options -tearoff no
	   command cut -label "Cut" -underline 2 \
	       -helpstr "Cut the selection into the clipboard"
           command copy -label "Copy" -underline 0 \
	       -helpstr "Copy the selection to the clipboard"
           command paste -label "Paste" -underline 0 \
	       -helpstr "Paste the clipboard to the current point"
           separator sep3
           command find -label "Find" -underline 2 \
	       -helpstr "Search the text"
           separator sep4
           command clear -label "Clear" -underline 2 \
	       -helpstr "Clear the selection"
    }

#
# Add the Help menubutton.
#
.mw menubar add menubutton help -text "Help" -underline 0 -padx 8 -pady 2 \
    -menu {options -tearoff no
	   command onwindow -label "On Window" -underline 3 \
	       -helpstr "Obtain help on the window"
           command onkeys -label "On Keys" -underline 3 \
	       -helpstr "Obtain help on the keys"
           command index -label "Index" -underline 0 \
	       -helpstr "View the help index"
           command onhelp -label "On Help" -underline 2 \
	       -helpstr "Obtain help on help"
           command onversion -label "On Version" -underline 2 \
	       -helpstr "View the version information"
    }

#
# Add items to the toolbar.
#
.mw toolbar add frame filler1 -width 108 -relief raised -borderwidth 2

.mw toolbar add button new \
    -image [image create photo -file [file join $imagedir new.gif]] \
    -helpstr "Create a new file" \
    -balloonstr "New"

.mw toolbar add button open \
    -image [image create photo -file [file join $imagedir open.gif]] \
    -helpstr "Open an existing file" \
    -balloonstr "Open"

.mw toolbar add button close \
    -image [image create photo -file [file join $imagedir close.gif]] \
    -helpstr "Close the file" \
    -balloonstr "Close"

.mw toolbar add frame filler2 -width 20 -relief raised -borderwidth 2

.mw toolbar add button cut \
    -image [image create photo -file [file join $imagedir cut.gif]] \
    -helpstr "Cut the selection into the cut buffer" \
    -balloonstr "Cut"

.mw toolbar add button copy \
    -image [image create photo -file [file join $imagedir copy.gif]] \
    -helpstr "Copy the selection to the cut buffer" \
    -balloonstr "Copy"

.mw toolbar add button paste \
    -image [image create photo -file [file join $imagedir paste.gif]] \
    -helpstr "Paste the cut buffer to the current point" \
    -balloonstr "Paste"

.mw toolbar add button clear \
    -image [image create photo -file [file join $imagedir clear.gif]] \
    -helpstr "Clear the selection" \
    -balloonstr "Clear"

.mw toolbar add frame filler3 -relief raised -borderwidth 2

#
# Add items to the menubar.
#
.mw mousebar add button save \
    -image [image create photo -file [file join $imagedir save.gif]] \
    -helpstr "Save the current file"

.mw mousebar add button print \
    -image [image create photo -file [file join $imagedir print.gif]] \
    -helpstr "Print the file"

.mw mousebar add button find \
    -image [image create photo -file [file join $imagedir find.gif]] \
    -helpstr "Search the text"

.mw mousebar add frame filler1 -height 20 -relief raised -borderwidth 2

.mw mousebar add button help \
    -image [image create photo -file [file join $imagedir help.gif]] \
    -helpstr "Obtain help for this window"

.mw mousebar add frame filler2 -relief raised -borderwidth 2

.mw mousebar add button exit \
    -image [image create photo -file [file join $imagedir exit.gif]] \
    -helpstr "Exit this application"

.mw mousebar add frame filler3 -height 5

#
# Change the packing of the last fillers in the tool and mouse bar
# so that it expands across and down the rest of the mainwindow.
#
pack [.mw toolbar component filler3] -expand yes -fill both
pack [.mw mousebar component filler2] -expand yes -fill both


#
# Install a scrolledtext widget in the childsite.
#
iwidgets::scrolledtext [.mw childsite].st -visibleitems 40x8
pack [.mw childsite].st -fill both -expand yes

#
# Activate the main window.
#
.mw activate



@


14.1
log
@dawn of a new revision.  it shall be numbered 14 to match release 7.  begin the convergence by adding emacs/vi local variable footer blocks to encourage consistent formatting.
@
text
@d31 1
a31 1
	       -helpstr "Exit this application" 
@


1.1
log
@Sources that are external to BRL-CAD are moved from the top level to src/other/.
@
text
@@

