head	1.5;
access;
symbols
	iwidgets-4-0-1:1.5
	iwidgets-4-0-0:1.5
	iwidgets_overhaul:1.3.0.6
	tclpro-1-5-0:1.3
	tclpro-1-4-1:1.3
	tclpro-1-4-0:1.3
	itcl-3-2-0:1.3
	ajuba-ajuba2-2-0:1.3
	scriptics-sc-2-0-b5:1.3
	scriptics-sc-2-0-fixed:1.3
	scriptics-sc-2-0-b2:1.3
	scriptics-sc-2-0-b1:1.3
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	scriptics-sc-1-1-branch:1.3.0.4
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.2
	scriptics-sc-1-0-base:1.3
	scriptics-bc-1-0-b1:1.3
	scriptics-tclpro-1-3-0:1.3
	scriptics-tclpro-1-3-b4:1.3
	itcl-3-1-0:1.3
	scriptics-tclpro-1-3-b3:1.3
	scriptics-tclpro-1-2:1.3
	scriptics-tclpro-1-2-b2:1.3
	scriptics-tclpro-1-2-b1:1.3
	scriptics-tclpro-1-2-a1:1.3
	itcl-3-0-1:1.3
	itcl3-0-1:1.3
	stanton:1.3;
locks; strict;
comment	@# @;


1.5
date	2001.08.20.19.12.18;	author smithc;	state Exp;
branches;
next	1.4;

1.4
date	2001.08.07.19.56.47;	author smithc;	state Exp;
branches;
next	1.3;

1.3
date	98.08.25.11.34.34;	author stanton;	state Exp;
branches
	1.3.6.1;
next	1.2;

1.2
date	98.08.11.14.41.26;	author welch;	state Exp;
branches;
next	1.1;

1.1
date	98.07.27.18.51.43;	author stanton;	state Exp;
branches;
next	;

1.3.6.1
date	2001.08.07.19.18.25;	author smithc;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Updating demos for Iwidgets4.0.0 release.
@
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



@


1.4
log
@Merging iwidgets_overhaul branch to CVS head.
@
text
@d4 1
a4 1
package require Iwidgets 3.0
@


1.3
log
@fixed bug where image names conflicted with global commands
@
text
@a0 1
#!/bin/sh
a3 2
#\
exec itkwish "$0" ${1+"$@@"}
a5 3
#
# Demo script for the Mainwindow class
#
@


1.3.6.1
log
@This merge is from the iwidgets_overhaul branch created by Chad Smith
to extract the [incr Widgets] from the [incr Tcl] distribution.  See
the CHANGES file for a list of changes I made to this distribution.
The new [incr Widgets] version number is 4.0.0.
@
text
@d1 1
d5 2
d9 3
@


1.2
log
@3.0 final from Michael
@
text
@d82 1
a82 1
    -image [image create photo new -file [file join $imagedir new.gif]] \
d87 1
a87 1
    -image [image create photo open -file [file join $imagedir open.gif]] \
d92 1
a92 1
    -image [image create photo close -file [file join $imagedir close.gif]] \
d99 1
a99 1
    -image [image create photo cut -file [file join $imagedir cut.gif]] \
d104 1
a104 1
    -image [image create photo copy -file [file join $imagedir copy.gif]] \
d109 1
a109 1
    -image [image create photo paste -file [file join $imagedir paste.gif]] \
d114 1
a114 1
    -image [image create photo clear -file [file join $imagedir clear.gif]] \
d124 1
a124 1
    -image [image create photo save -file [file join $imagedir save.gif]] \
d128 1
a128 1
    -image [image create photo print -file [file join $imagedir print.gif]] \
d132 1
a132 1
    -image [image create photo find -file [file join $imagedir find.gif]] \
d138 1
a138 1
    -image [image create photo help -file [file join $imagedir help.gif]] \
d144 1
a144 1
    -image [image create photo exit -file [file join $imagedir exit.gif]] \
@


1.1
log
@Initial revision
@
text
@@
