Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: scwoop-1.1

3 views
Skip to first unread message

Jean-Luc Fontaine

unread,
Jul 24, 1996, 3:00:00 AM7/24/96
to

Hi everybody: here is the second release of scwoop.

### CHANGES ###

*** version 1.1 ***
added composite descendants configuration support
added widget tip class
added Tcl plug-in support through source.tcl utility
improved file selector (widget tips, ...)
added scroller implementation
added provided widgets documentation
*** version 1.0 ***

### README ###

This is scwoop (a Simple Composite Widget Object Oriented Package)
version 1.1. Scwoop is implemented in a single sourceable file and
uses simple techniques to provide composite widget (also known as mega
widget) support to the great Tk widget library.

Scwoop uses the stooop (Simple Tcl Only Object Oriented Programming)
extension (Tcl source file included). It is compatible with stooop
version 2.2.2.

As scwoop is entirely written in Tcl, it will run on all Tcl supported
platforms, including Windows and the Mac Intosh, if you have Tcl
version 7.5 and Tk version 4.1.

A full HTML documentation and several composite widget source files
are provided. There is a file selector dialog box demo. The file
selector composite widget embeds 2 scrollList composite widgets, 1
comboLabel, itself using an arrowButton composite, while help is
provided through widget tips.

Whether you like it (or hate it), please let me know. I would like to
hear about bugs and improvements you would like to see. I will correct
the bugs quickly, especially if you send me a test script.

Jean-Luc Fontaine (mailto:jfon...@apogee-com.fr)

###

You will be able to find it in the code section of your favorite
Tcl/Tk mirror site or directly at ftp.neosoft.com (it usually takes a
few days, check the NEW directpry first).

I can also email a copy to you (please tell me your favorite format,
MIME or uuencoded, compressed tar, gzipped tar or zip) in case you
cannot find it.

Enjoy and please let me know what you think.

### SAMPLE CODE ###

proc viewer::viewer {this parentPath args} composite {
[new frame $parentPath] $args
} {
composite::manage $this\
[new text $widget($this,path) -state disabled -wrap none] text\
[new scrollbar $widget($this,path)] vertical\
[new scrollbar $widget($this,path) -orient horizontal]
horizontal

widget::configure $composite($this,text)\
-yscrollcommand "$composite($this,vertical,path) set"\
-xscrollcommand "$composite($this,horizontal,path) set"
set textPath $composite($this,text,path)
widget::configure $composite($this,vertical) -command "$textPath
yview"
widget::configure $composite($this,horizontal) -command "$textPath
xview"

grid $textPath -sticky nsew
grid $composite($this,vertical,path) -column 1 -row 0 -sticky nsew
grid $composite($this,horizontal,path) -row 1 -sticky nsew
grid rowconfigure $widget($this,path) 0 -weight 1
grid columnconfigure $widget($this,path) 0 -weight 1

composite::complete $this
}

proc viewer::~viewer {this} {}

proc viewer::options {this} {
return {{-file file File {}} {-text text Text {}}}
}

proc viewer::set-text {this text} {
widget::configure $composite($this,text) -state normal
$composite($this,text,path) delete 1.0 end
$composite($this,text,path) insert 1.0 $text
widget::configure $composite($this,text) -state disabled
}

proc viewer::set-file {this name} {
if {[string length $name]==0} return
set file [open $name]
viewer::set-text $this [read $file]
close $file
}

set view [new viewer . -text "please wait..."]
pack $widget($view,path) -fill both -expand 1
update
widget::configure $view -file /etc/termcap

###

Jean-Luc Fontaine (mailto:jfon...@apogee-com.fr)

0 new messages