Date: Tue, 9 Oct 2001 21:45:20 -0400 From: The Anarcat <anarcat@anarcat.dyndns.org> To: Libh <freebsd-libh@freebsd.org> Subject: Re: bug in Hui::run? Message-ID: <20011009214519.D603@shall.anarcat.dyndns.org> In-Reply-To: <20011009214227.C603@shall.anarcat.dyndns.org> References: <20011009212837.B603@shall.anarcat.dyndns.org> <20011009214227.C603@shall.anarcat.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--wTWi5aaYRw9ix9vO
Content-Type: multipart/mixed; boundary="hoZxPH4CaxYzWscb"
Content-Disposition: inline
--hoZxPH4CaxYzWscb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
AAAAAAAAARGHJ!
ok, that's it for tonight.=20
here's the file.
A.
--hoZxPH4CaxYzWscb
Content-Type: application/x-tcl
Content-Disposition: attachment; filename="console.tcl"
Content-Transfer-Encoding: quoted-printable
proc read_cmd {hui button data} {=0A=0A global command=0A cons_append=
[eval [$command text]]=0A}=0A=0Aproc cons_append {string} {=0A global c=
ons_out=0A =0A $cons_out text [format "%s%s\n" [$cons_out text] $string=
]=0A=0A}=0A=0A# Create the main-window and its elements=0Aproc cons_make_ma=
in_win {hui} {=0A global command=0A global cons_w=0A global cons_o=
ut=0A =0A # Create a main_window with title, x/y offset and x/y size=
=0A set cons_w [$hui window cons_w "Console" "0 0" "25 5" "vertical"] =
=0A =0A set cmd_cont [$cons_w container "container"]=0A # Define t=
he widget we want to add=0A set command [$cmd_cont inputLine "Console Co=
mmand" "" -1]=0A $command resize {10 10}=0A $cmd_cont button "gobutto=
n" "&Eval" {read_cmd ""} "default"=0A =0A set cons_out [$cons_w textE=
dit "Console Output" "" FALSE]=0A =0A # Finally, show the window=0A =
$cons_w show=0A}=0A=0A# Init UI=0Aset hui [Hui::open "auto"]=0A=0A# Creat=
e the main-window=0Acons_make_main_win $hui=0A=0A# Run hui=0A$hui run=0A=0A=
# proc init_console {hui} {=0A# global console=0A# global console_o=
ut=0A =0A# # Create a main_window with title, x/y offset and x/y siz=
e=0A# set console_window [$hui window console_window "Hello World in li=
bh" "0 0" "25 5" "vertical"] =0A =0A# # Define the widget we want to=
add=0A# set console_out [$console_window textEdit "console_out" "" TRU=
E]=0A =0A# # Finally, show the window=0A# $console_out show=0A=
=0A# # set console [$hui window "console_window" "Console" "14 0" "50 2=
0"]=0A# # $console show=0A=0A# # $console erase=0A# # $console =
arrange "vertical"=0A=0A# # set command [$console textEdit "command_fie=
ld" "" 1 "TCLH Command" "0 0" "5 10"]=0A# # $command resize "-1 1"=0A=
=0A# # set cont [$console container "container" "0 0" "free"]=0A# # =
$cont resize "-1 2"=0A# # set console_out [$console textEdit "console_=
output" "" 0 "Console Output" "0 0" "5 10"]=0A# # $console resize "-1 5=
"=0A=0A# }=0A=0A# init_console $hui=0A=0A# $hui run
--hoZxPH4CaxYzWscb--
--wTWi5aaYRw9ix9vO
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjvDqC8ACgkQttcWHAnWiGdIMwCfeSYyDDPMBsDgmh/J38Qy7SrN
d5QAn3P4GfTYp47TIQHRA30UfovlITEi
=Ai1G
-----END PGP SIGNATURE-----
--wTWi5aaYRw9ix9vO--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011009214519.D603>
