RIET USERS: Multiple OS GUI C++ Tools

L. Cranswick ( L.M.D.Cranswick@dl.ac.uk )
Sun, 15 Feb 1998 14:48:59 +0000 (GMT)

Hi All,

Thought there may be one or two(?) people
interested in this on wxWindows.
For those who may be thinking of developing
GUIs for their code but want it to run on Multiple
operating system - including MS-Windows(?).

Also, for UNIX, just got sent a very nice UNIX GUI wrapper
script file (via a mailing list) for the automatic/manual
web and ftp mirroring software, wget
(ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/.betas/
wget-1.5-b7.tar.gz).
Makes a call to something called "wish" to make
things happen. Very brief and concise bit of code
and turns a command line program into a nice GUI.

Tacked onto the end of this email for UNIX junkies.

Lachlan.

Found via: GUI Tools
http://www.cs.cmu.edu/afs/cs.cmu.edu/user/bam/www/toolnames.html

http://web.ukonline.co.uk/julian.smart/wxwin/

Os's Supported:
Currently, virtually all varieties of UNIX are supported, and all C++
compilers, the most popular UNIX platforms being Linux and Sun. On UNIX,
Motif, XView and Xt are supported to different extents (the Xt port is user
contributed). Windows 3.1, Windows 95 and Windows NT are supported
(including NT on non-Intel platforms) and (as far as we know) all commercial
Windows compilers are capable of compiling wxWindows.
Official Mac support is due soon (1997). An OS/2 port has been started but
needs more work.

Welcome to the home of wxWindows - arguably the most
complete freeware portable C++ GUI toolkit.
wxWindows is a class library that allows
you to compile graphical C++ programs
on a range of different platforms.
wxWindows uses the native graphical
user interface (GUI) on each platform,
and so your program will take on the
native 'look and feel' that users are
familiar with.
Although GUI applications are mostly
built programmatically, there is a dialog
editor to help build attractive dialogs and
panels.
See also the wxWindows Developers'
Site at http://wxwin.projects.ml.org, a
resource for the people contributing to
the wxWindows effort.

Comparison of XVT and wxWindows
http://web.ukonline.co.uk/julian.smart/wxwin/

=========================================
=========================================

Small Script for Creating GUI over WGET program.

To: Wget List <wget@sunsite.auc.dk>
Subject: Utter coolness
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 13 Feb 1998 14:40:02 +0100

"Paul \[Mr. Bogus\]" <paulrahme@hotmail.com> from South Africa has
written this cool frontend for Wget. Enjoy it!

#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

# tget --
# A frontend to "wget", a program to get ftp/http files.
# By Paul Rahme [Mr. Bogus] -- (paulrahme@hotmail.com) 1998.
# Thanks to Hrvoje Niksic, Lindsay Marshall & Ken Corey.

wm title . "Tget : Wget frontend"
wm minsize . 1 1

frame .output -relief raised -borderwidth 1
label .output.lbl -text "Output window"
text .output.t -height 10 -yscrollc {.output.sb set}
scrollbar .output.sb -command {.output.t yview}
pack .output.lbl -side top
pack .output.sb -side right -fill y
pack .output.t -side bottom -fill both -expand 1
pack .output -side bottom -fill x

frame .buttons
pack .buttons -side bottom -fill x -pady 2m
button .buttons.quit -text "Quit" -command {
destroy .
}
pack .buttons.quit -side right

button .buttons.ok -text "Go get it!" -command {
set url [.url.urlName get]
set file [.file.fileName get]

if {[expr "{$inputFile} == {on}"]} then {
set url "-i $file"
}

set tries [.options.tries.ent get]
set level [.options.level.ent get]

if {[expr "{$filter} == {on}"]} then {
set filters "-A [.options.filter.ent get]"
} else {
set filters ""
}

if {[expr "{$exclude} == {on}"]} then {
set excludes "-X [.options.exclude.ent get]"
} else {
set excludes ""
}

set xx [ open "|wget $logfile $recursive -t $tries -l $level $continue $noparent $filters $excludes $relative $timestamp $url" r]

fileevent $xx readable {
if {[eof $xx]} {
close $xx
.output.t insert end "got $url."
} else {
set thisLine [gets $xx]
.output.t insert end "$thisLine\n"
.output.t yview end
update idletasks
}
}
}
pack .buttons.ok -side bottom

frame .url -relief raised -borderwidth 1
label .url.urlHeading -text "Enter a URL to get: " -anchor e
entry .url.urlName -width 65
pack .url.urlHeading .url.urlName -side top

frame .file -relief raised -borderwidth 1
frame .file.topHalf
label .file.topHalf.fileHeading -text "Rather take a list of URL's from an input file: " -anchor e
checkbutton .file.topHalf.listFile -onvalue "on" -offvalue "off" -variable inputFile -relief flat
pack .file.topHalf.listFile .file.topHalf.fileHeading -side left
entry .file.fileName -width 50
button .file.but -text "Browse ..." -command "fileDialog . .file.fileName open"
pack .file.topHalf -side top
pack .file.but .file.fileName -side right -fill x

pack .url -side top -fill x
pack .file -side top -fill x

proc fileDialog {w ent operation} {
set types {
{"All files" *}
}

set file [tk_getOpenFile -filetypes $types -parent $w]

if [string compare $file ""] {
$ent delete 0 end
$ent insert 0 $file
$ent xview end
}
}

frame .options -relief raised -borderwidth 1
label .options.optHeading -text "Options" -anchor e
checkbutton .options.recurse -onvalue "-r" -offvalue "" -variable recursive \
-text "Recurse into all links followed from the page (subdir's for an ftp:// address)"
frame .options.level
label .options.level.heading -text "Number of levels to recurse (0 for infinite)"
entry .options.level.ent -width 3
pack .options.level.ent .options.level.heading -side left
checkbutton .options.logfile -onvalue "-olog.txt" -offvalue "" -variable logfile \
-text "Create a logfile in the current directory (./log.txt) with no output in window"
frame .options.tries
label .options.tries.heading -text "Number of retries (0 for infinite)"
entry .options.tries.ent -width 3
pack .options.tries.ent .options.tries.heading -side left
checkbutton .options.continue -onvalue "-c" -offvalue "" -variable continue \
-text "Continue a download that died before it finished"
checkbutton .options.timestamp -onvalue "-N" -offvalue "" -variable timestamp \
-text "Only download new/newer files or where file size differs"
checkbutton .options.relative -onvalue "-L" -offvalue "" -variable relative \
-text "Follow only relative links"
frame .options.filter
checkbutton .options.filter.but -onvalue "on" -offvalue "off" -variable filter \
-text "Filter file extensions to (list seperated by commas eg. gif,jpeg,jpg) :"
entry .options.filter.ent
pack .options.filter.but .options.filter.ent -side left
frame .options.exclude
checkbutton .options.exclude.but -onvalue "on" -offvalue "off" -variable exclude \
-text "Exclude files