From ffcedd79505ea2e99f859c7cea2fb2221c948d4c Mon Sep 17 00:00:00 2001 From: nagai Date: Thu, 1 Jul 2004 09:38:48 +0000 Subject: * ext/tk/lib/tcltklib : bug fix * ext/tk/lib/tk : bug fix and add Tcl/Tk extension support libraries git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/sample/tkextlib/tkHTML/README | 12 + ext/tk/sample/tkextlib/tkHTML/hv.rb | 306 +++ ext/tk/sample/tkextlib/tkHTML/page1/image1 | Bin 0 -> 8995 bytes ext/tk/sample/tkextlib/tkHTML/page1/image10 | Bin 0 -> 3095 bytes ext/tk/sample/tkextlib/tkHTML/page1/image11 | Bin 0 -> 1425 bytes ext/tk/sample/tkextlib/tkHTML/page1/image12 | Bin 0 -> 2468 bytes ext/tk/sample/tkextlib/tkHTML/page1/image13 | Bin 0 -> 4073 bytes ext/tk/sample/tkextlib/tkHTML/page1/image14 | Bin 0 -> 53 bytes ext/tk/sample/tkextlib/tkHTML/page1/image2 | Bin 0 -> 42 bytes ext/tk/sample/tkextlib/tkHTML/page1/image3 | Bin 0 -> 3473 bytes ext/tk/sample/tkextlib/tkHTML/page1/image4 | Bin 0 -> 1988 bytes ext/tk/sample/tkextlib/tkHTML/page1/image5 | Bin 0 -> 973 bytes ext/tk/sample/tkextlib/tkHTML/page1/image6 | Bin 0 -> 2184 bytes ext/tk/sample/tkextlib/tkHTML/page1/image7 | Bin 0 -> 2022 bytes ext/tk/sample/tkextlib/tkHTML/page1/image8 | Bin 0 -> 1186 bytes ext/tk/sample/tkextlib/tkHTML/page1/image9 | Bin 0 -> 139 bytes ext/tk/sample/tkextlib/tkHTML/page1/index.html | 115 + ext/tk/sample/tkextlib/tkHTML/page2/image1 | Bin 0 -> 1966 bytes ext/tk/sample/tkextlib/tkHTML/page2/image10 | Bin 0 -> 255 bytes ext/tk/sample/tkextlib/tkHTML/page2/image11 | Bin 0 -> 590 bytes ext/tk/sample/tkextlib/tkHTML/page2/image12 | Bin 0 -> 254 bytes ext/tk/sample/tkextlib/tkHTML/page2/image13 | Bin 0 -> 493 bytes ext/tk/sample/tkextlib/tkHTML/page2/image14 | Bin 0 -> 195 bytes ext/tk/sample/tkextlib/tkHTML/page2/image15 | Bin 0 -> 68 bytes ext/tk/sample/tkextlib/tkHTML/page2/image16 | Bin 0 -> 157 bytes ext/tk/sample/tkextlib/tkHTML/page2/image17 | Bin 0 -> 81 bytes ext/tk/sample/tkextlib/tkHTML/page2/image18 | Bin 0 -> 545 bytes ext/tk/sample/tkextlib/tkHTML/page2/image19 | Bin 0 -> 53 bytes ext/tk/sample/tkextlib/tkHTML/page2/image2 | Bin 0 -> 49 bytes ext/tk/sample/tkextlib/tkHTML/page2/image20 | Bin 0 -> 533 bytes ext/tk/sample/tkextlib/tkHTML/page2/image21 | Bin 0 -> 564 bytes ext/tk/sample/tkextlib/tkHTML/page2/image22 | Bin 0 -> 81 bytes ext/tk/sample/tkextlib/tkHTML/page2/image23 | Bin 0 -> 539 bytes ext/tk/sample/tkextlib/tkHTML/page2/image24 | Bin 0 -> 151 bytes ext/tk/sample/tkextlib/tkHTML/page2/image25 | Bin 0 -> 453 bytes ext/tk/sample/tkextlib/tkHTML/page2/image26 | Bin 0 -> 520 bytes ext/tk/sample/tkextlib/tkHTML/page2/image27 | Bin 0 -> 565 bytes ext/tk/sample/tkextlib/tkHTML/page2/image28 | Bin 0 -> 416 bytes ext/tk/sample/tkextlib/tkHTML/page2/image29 | Bin 0 -> 121 bytes ext/tk/sample/tkextlib/tkHTML/page2/image3 | Bin 0 -> 10835 bytes ext/tk/sample/tkextlib/tkHTML/page2/image30 | Bin 0 -> 663 bytes ext/tk/sample/tkextlib/tkHTML/page2/image31 | Bin 0 -> 78 bytes ext/tk/sample/tkextlib/tkHTML/page2/image32 | Bin 0 -> 556 bytes ext/tk/sample/tkextlib/tkHTML/page2/image33 | Bin 0 -> 598 bytes ext/tk/sample/tkextlib/tkHTML/page2/image34 | Bin 0 -> 496 bytes ext/tk/sample/tkextlib/tkHTML/page2/image35 | Bin 0 -> 724 bytes ext/tk/sample/tkextlib/tkHTML/page2/image36 | Bin 0 -> 404 bytes ext/tk/sample/tkextlib/tkHTML/page2/image37 | Bin 0 -> 124 bytes ext/tk/sample/tkextlib/tkHTML/page2/image38 | Bin 0 -> 8330 bytes ext/tk/sample/tkextlib/tkHTML/page2/image39 | Bin 0 -> 369 bytes ext/tk/sample/tkextlib/tkHTML/page2/image4 | Bin 0 -> 268 bytes ext/tk/sample/tkextlib/tkHTML/page2/image5 | Bin 0 -> 492 bytes ext/tk/sample/tkextlib/tkHTML/page2/image6 | Bin 0 -> 246 bytes ext/tk/sample/tkextlib/tkHTML/page2/image7 | Bin 0 -> 551 bytes ext/tk/sample/tkextlib/tkHTML/page2/image8 | Bin 0 -> 497 bytes ext/tk/sample/tkextlib/tkHTML/page2/image9 | Bin 0 -> 492 bytes ext/tk/sample/tkextlib/tkHTML/page2/index.html | 433 ++++ ext/tk/sample/tkextlib/tkHTML/page3/image1 | Bin 0 -> 113 bytes ext/tk/sample/tkextlib/tkHTML/page3/image10 | Bin 0 -> 5088 bytes ext/tk/sample/tkextlib/tkHTML/page3/image11 | Bin 0 -> 4485 bytes ext/tk/sample/tkextlib/tkHTML/page3/image12 | Bin 0 -> 3579 bytes ext/tk/sample/tkextlib/tkHTML/page3/image13 | Bin 0 -> 5119 bytes ext/tk/sample/tkextlib/tkHTML/page3/image14 | Bin 0 -> 3603 bytes ext/tk/sample/tkextlib/tkHTML/page3/image2 | Bin 0 -> 74 bytes ext/tk/sample/tkextlib/tkHTML/page3/image3 | Bin 0 -> 681 bytes ext/tk/sample/tkextlib/tkHTML/page3/image4 | Bin 0 -> 3056 bytes ext/tk/sample/tkextlib/tkHTML/page3/image5 | Bin 0 -> 2297 bytes ext/tk/sample/tkextlib/tkHTML/page3/image6 | Bin 0 -> 79 bytes ext/tk/sample/tkextlib/tkHTML/page3/image7 | Bin 0 -> 1613 bytes ext/tk/sample/tkextlib/tkHTML/page3/image8 | Bin 0 -> 864 bytes ext/tk/sample/tkextlib/tkHTML/page3/image9 | Bin 0 -> 2379 bytes ext/tk/sample/tkextlib/tkHTML/page3/index.html | 2787 ++++++++++++++++++++++++ ext/tk/sample/tkextlib/tkHTML/page4/image1 | Bin 0 -> 42 bytes ext/tk/sample/tkextlib/tkHTML/page4/image2 | Bin 0 -> 14343 bytes ext/tk/sample/tkextlib/tkHTML/page4/image3 | Bin 0 -> 17750 bytes ext/tk/sample/tkextlib/tkHTML/page4/image4 | Bin 0 -> 61 bytes ext/tk/sample/tkextlib/tkHTML/page4/image5 | Bin 0 -> 201 bytes ext/tk/sample/tkextlib/tkHTML/page4/image6 | Bin 0 -> 214 bytes ext/tk/sample/tkextlib/tkHTML/page4/image7 | Bin 0 -> 149 bytes ext/tk/sample/tkextlib/tkHTML/page4/image8 | Bin 0 -> 203 bytes ext/tk/sample/tkextlib/tkHTML/page4/image9 | Bin 0 -> 1504 bytes ext/tk/sample/tkextlib/tkHTML/page4/index.html | 768 +++++++ ext/tk/sample/tkextlib/tkHTML/ss.rb | 404 ++++ 83 files changed, 4825 insertions(+) create mode 100644 ext/tk/sample/tkextlib/tkHTML/README create mode 100644 ext/tk/sample/tkextlib/tkHTML/hv.rb create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image1 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image10 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image11 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image12 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image13 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image14 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image2 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image3 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image4 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image5 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image6 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image7 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image8 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/image9 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page1/index.html create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image1 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image10 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image11 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image12 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image13 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image14 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image15 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image16 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image17 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image18 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image19 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image2 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image20 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image21 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image22 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image23 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image24 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image25 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image26 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image27 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image28 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image29 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image3 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image30 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image31 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image32 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image33 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image34 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image35 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image36 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image37 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image38 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image39 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image4 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image5 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image6 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image7 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image8 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/image9 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page2/index.html create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image1 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image10 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image11 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image12 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image13 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image14 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image2 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image3 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image4 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image5 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image6 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image7 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image8 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/image9 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page3/index.html create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image1 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image2 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image3 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image4 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image5 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image6 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image7 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image8 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/image9 create mode 100644 ext/tk/sample/tkextlib/tkHTML/page4/index.html create mode 100644 ext/tk/sample/tkextlib/tkHTML/ss.rb (limited to 'ext/tk/sample/tkextlib/tkHTML') diff --git a/ext/tk/sample/tkextlib/tkHTML/README b/ext/tk/sample/tkextlib/tkHTML/README new file mode 100644 index 0000000000..1208e270b4 --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/README @@ -0,0 +1,12 @@ + + [ TkHtml widget example ] + +The directory page1 -- page4 are referd from "test" directory of +original TkHtml extension's source archive. +( see http://www.hwaci.com/sw/tkhtml/index.html ) + +You can see the HTML documents on the 'hv.rb' or 'ss.rb' sample script. + + e.g. + LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH /usr/local/bin/ruby ./hv.rb page1/index.html + diff --git a/ext/tk/sample/tkextlib/tkHTML/hv.rb b/ext/tk/sample/tkextlib/tkHTML/hv.rb new file mode 100644 index 0000000000..cf93ad3ba5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/hv.rb @@ -0,0 +1,306 @@ +#!/usr/bin/env ruby +# +# This script implements the "hv" application. Type "hv FILE" to +# view FILE as HTML. +# +# This application is used for testing the HTML widget. It can +# also server as an example of how to use the HTML widget. +# +require 'tk' +require 'tkextlib/tkHTML' + +root = TkRoot.new(:title=>'HTML File Viewer', :iconname=>'HV') + +file = ARGV[0] + +# +# These images are used in place of GIFs or of form elements +# +biggray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO/// +EOD + +smgray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9m0VADv/ +EOD + +nogifbig = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhJAAkAPEAAACQkADQ0PgAAAAAACwAAAAAJAAkAAACmISPqcsQD6OcdJqKM71PeK15 + AsSJH0iZY1CqqKSurfsGsex08XuTuU7L9HywHWZILAaVJssvgoREk5PolFo1XrHZ29IZ8oo0 + HKEYVDYbyc/jFhz2otvdcyZdF68qeKh2DZd3AtS0QWcDSDgWKJXY+MXS9qY4+JA2+Vho+YPp + FzSjiTIEWslDQ1rDhPOY2sXVOgeb2kBbu1AAADv/ +EOD + +nogifsm = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhEAAQAPEAAACQkADQ0PgAAAAAACwAAAAAEAAQAAACNISPacHtD4IQz80QJ60as25d + 3idKZdR0IIOm2ta0Lhw/Lz2S1JqvK8ozbTKlEIVYceWSjwIAO/// +EOD + +# +# define variables +# +ul_hyper = TkVariable.new(0) +show_tbl = TkVariable.new(0) +show_img = TkVariable.new(1) + +# +# A font chooser routine. +# +# html[:fontcommand] = pick_font +pick_font = proc{|size, attrs| + puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (12 * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') +} + +# +# This routine is called for each form element +# +form_cmd = proc{|n, cmd, style, *args| + # puts "FormCmd: $n $cmd $args" + case cmd + when 'select', 'textarea', 'input' + TkLabel.new(:widgetname=>args[0], :image=>nogifsm) + end +} + +# +# This routine is called for every markup +# +images = {} +old_imgs = {} +big_imgs = {} + +hotkey = {} + +move_big_image = proc{|b| + return unless big_imgs.key?(b) + b.copy(big_imgs[b]) + big_imgs[b].delete + big_imgs.delete(b) + Tk.update +} + +image_cmd = proc{|*args| + return smgray unless show_img.bool + fn = args[0] + if old_imgs.key?(fn) + images[fn] = old_imgs[fn] + old_imgs.delete(fn) + return images[fn] + end + + begin + img = TkPhotoImage.new(:file=>fn) + rescue + return smgray + end + + if img.width * img.height > 20000 + b = TkPhotoImage.new(:width=>img.width, :height=>img.height) + big_imgs[b] = img + img = b + Tk.after_idle(proc{ move_big_image.call(b) }) + end + + images[fn] = img + + img +} + +# +# This routine is called for every +

+ + + + + + + + + +
Welcome to SlashdotLinuxNewsUnited StatesEducationSpace
+ + + +
faq
code
awards
privacy
slashNET
older stuff
rob's page
preferences
andover.net
submit story
advertising
supporters
past polls
topics
about
jobs
hof + +
+

+ + + +
Sections
+1/23
+apache
+1/29 (3)
+askslashdot
+1/27
+awards
+1/29 (2)
+books
+1/27
+bsd
+1/28 (2)
+features
+1/28 (2)
+interviews
+1/19
+radio
+1/27 (2)
+science
+1/28 (3)
+yro
Andover.Net
+AndoverNews
Ask Reggie
DaveCentral
FreeCode
MediaBuilder

+

+
Who Bought Linux.Net?
Linux Posted by CmdrTaco on Saturday January 29, @10:52AM
from the this-game-again dept.
So Fred VanKampen (who has to hold the record for most money made by reselling two domain names) e-mailed us to say that the Domain Name for 'Linux.Net' has been sold. He won't say to whom, but it supposedly will be announced at LinuxWorld next week. Of course we have no idea what he got for the entry, but the rumors were that he made several million when he sold Linux.com to VA Linux. Hopefully he'll take me for a ride in his yacht. ;)

( Read More... | 58 of 62 comments )

Book Reviews: E-Mails from (Over?) The Edge
News Posted by Hemos on Saturday January 29, @10:43AM
from the touching-story dept.
I'd like to thank the author of this book for sending it to me. Nick's written a book that's touching and endearing, and one that's well worth reading for everyone who's ever had social struggles to deal with. As well, his involvement with the fine folks of TheVenue. I'll warn you - it's not a tech text. But it's still worth reading. Click below to read more.

( Read More... | 6197 bytes in body | 6 of 22 comments )

Linux Kernel 2.3.41
Linux Posted by CmdrTaco on Saturday January 29, @10:21AM
from the download-compile-reboot-repeat dept.
sdriver writes "For those of us who enjoy *panic*, *oops*, and suddenly seeing their video BIOS... the newest version is out! Be the first on your block to submit a new patch! ;) " If you don't know where to get it, you probably should stick to your warm and cuddly 2.2.x kernel *grin*. Now outta my way, I wanna crash my laptop!

( Read More... | 52 of 57 comments )

Congress Still Figuring Out E-Mail
United States Posted by Roblimo on Saturday January 29, @07:28AM
from the voice-of-the-people-can-get-awfully-loud dept.
Jett writes " Vote.com has an interesting article in their Webmag Fifth Estate about how congressmen have responded to the popularity of e-mail in their daily operations. Quote: 'Of the 440 voting and non-voting House of Representatives members, 22 have no e-mail at all. Even House Speaker Dennis Hastert is wired only halfway -- his office receives e-mail, but does not respond to it. And while all U.S. senators have e-mail, they, like their House counterparts, routinely shun non-constituent mail -- even though they chair committees whose decisions affect the entire country.'"

( Read More... | 66 of 66 comments )

Ask Slashdot: Sci Fi Literature 101?
Education Posted by Cliff on Saturday January 29, @06:56AM
from the recommendations-wanted dept.
ohlaadee asks: "My niece (she's 13) wants to start reading science fiction. I do too. I gave us both Asimov's _The Foundation_  for Christmas. We'll read it together. I suppose we could spend the rest of our lives just reading Asimov, but I'm wondering what books and movies you folks would come up with? What does the /. recommended Science Fiction 101 list include?"

( Read More... | 345 of 345 comments )

Could Distributed.Net Help the Mars Polar Lander?
Space Posted by Roblimo on Saturday January 29, @03:35AM
from the food-for-thought dept.
Anonymous Coward writes "This official JPL press release describes the current attempt to listen for faint signals from the Mars Lander. They get three windows a day, and it takes 18 hours to process data because the signal is so weak (if it's really there). Too bad they don't have a deal with distributed.net." Interesting thought. Is anyone at distributed.net or JPL interested in pursuing it?

( Read More... | 99 of 102 comments )

iCrave TV Loses Battle against U.S. Broadcasters
Television Posted by Roblimo on Saturday January 29, @12:21AM
from the shut-down-just-before-the-super-bowl dept.
Doran writes "C|Net has this story about how the Canadian company iCraveTV.com has lost its latest battle in U.S. courts over whether it can rebroadcast TV signals over the Web. The broadcasters say it's theft, while iCraveTV sez it's just doing what's legal for other cable TV companies in Canada (ie. rebroadcasting TV). Of course, by framing the streaming video iCraveTV is doing more than just rebroadcasting, they're also adding more commercial content, which the broadcasters feel dilutes their TV commercials. "

( Read More... | 152 of 170 comments )

Win2k Security holes found
Microsoft Posted by HeUnique on Friday January 28, @04:58PM
from the and-it's-not-even-out-yet dept.
According to a story posted by ZDNN, two security holes have been found on Windows 2000, and that's even before the official release of Windows 2000! Administrators who rush to incorporate the patch from MS beware - according to one of the talkback posts on ZDNN, the patch creates a new problem with Windows 2000 news server service.

( Read More... | 510 of 534 comments )

Encryption Debate at Mitnick Trial
Encryption Posted by Hemos on Friday January 28, @03:33PM
from the gimmie-the-data dept.
A number of people have written about the latest twist in the Mitnick case. Kevin wants to get his data back, but the government is refusing to do so until he gives them the key. Apparently, the government is unable to crack the encryption that he's got on it - you'd think after having the data for five years, they'd be able to brute-force the darn thing. It's a NYT article - free login required.

( Read More... | 504 of 521 comments )

Forum: Future Ports of Games to Linux
Games Posted by CmdrTaco on Friday January 28, @02:26PM
from the it's-been-awhile dept.
It's been a long time since I posted an open forum like this, but I'm curious what people think on this one. What games do you most want to see ported to Linux in the next few months? Of course, for me personally it's StarCraft and Diablo 2, but I'm curious what games have come out or are due soon that people would most like to see a port of (and note that WINE doesn't count. ;)

( Read More... | 648 of 652 comments )

Features
Voting has begun for the $100k Slashdot Beanie Awards. Talk amongst yourselves and choose who deserves the cash.

The latest installment of Geeks in Space is up at The Sync. Listen to CmdrTaco, Hemos, and Nate talk about the latest events to happen - or not happen in the computer world.

Perhaps you are seeking Jon Katz's series of articles related to recent events in Colorado. These articles include Voices from the Hellmouth, More Stories from the Hellmouth or The Price of Being Different,

For something different, try reading a little essay Thoughts from the Furnace about the internet, and flame.

And for a bit of an amusing take on the Open Source world, check out Open Source as an Ant Farm

Update: 01/03 03:10 by CowboyNeal:

Past Features

Ask Slashdot
  • Sci Fi Literature 101?
  • Linux and Satellite Internet Services
  • Open Defensive Patents?
  • Technologies That Shaped the Last Century?
  • Disk Repair Tools for Linux?
  • Why Can't the Command-Line be More Standardized?
  • Packet Radio Networking with PalmOS?
  • Cheap Rackmount Enclosures/Systems?
  • Open Source Software and Tax Breaks?
  • Building an Upgradable Dual Processor System

    if you have a question for Ask Slashdot, send it to askslashdot@slashdot.org

  • Slashdot Login
    Nickname:

    Password:

    Don't have an account yet? Go Create One. A user account will allow you to customize all these nutty little boxes, tailor the stories you see, as well as remember your comment viewing preferences.

    Slashdot Poll
    The Tech Advance I Most Want Is:
    Nanotechnology
    Cold Fusion
    Powerful Fuel Cells
    Hard Wiring my Body
    Universal Strong Crypto
    Interstellar Travel
    Cybernetic Body Armor
    ColecoVision
    [ Results | Polls ]
    Comments:656 | Votes:29121

    Older Stuff

    Friday January 28

  • Abstract Programming and GPL Enforcement (235)
  • Interview: FreeDOS Leader Jim Hall Answers (86)
  • Open Source's Achilles Heel (466)
  • The Virtue of Communal Instincts (237)
  • Gartner Group Debunking Open Source Myths (165)
  • DoubleClick Taken to Court (310)
  • Updated Slash & Server 51 (81)
  • XMMS 1.0.0 Released (128)
  • Linux and Satellite Internet Services (138)
  • UN Wants to Combat Online Racism (531)

    Thursday January 27

  • Crackdowns, Fools and the MPAA (351)
  • Heroes of Might and Magic III Demo Released (157)
  • Sandia Labs Venture Into Nanotechnology (117)
  • CA Announces Program Ports to Linux (195)
  • Interview: Larry Augustin Finally Answers (210)
  • Final Call for Voting in Slashdot's Beanie Awards (178)
  • Transmeta Code Morphing != Just In Time (449)
  • Intrusion Detection (65)
  • Using Enzymes to Help Fight CO2 Build-Up (165)
  • Jon Johansen on ABC World News Tonight (415)


    Older Articles
    Yesterday's Edition

  • Book Reviews

    Jon Katz, Resident Gasbag, has a new, very appropriate book coming out soon, Geeks. Preorder now and receive the book early.

    For probably the best fiction read around, check out Neal Stephenson's Cryptonomicon, an engaging read about WWII, cryptography and buried treasure. And data vaults.

    If you've been doing a lot of work in Perl, you've probably figured out you really need Perl in a Nutshell or The Perl Cookbook. If you're still learning, grab Programming Perl.

    And if you want to learn more about how to become a better coder, grab The Unified Software Development Process or The Practice of Programming Additionally, check out Refactoring: Improving the Design of Existing Code .

    Developing a large application? Grab Eric Greenberg's excellent Network Application Frameworks.

    Visit Our Book Reviews Section for more.
    Update: 11/12 05:19 by H:

    Quick Links
    Cool Sites:
  • Linux.com (What is Linux?)
  • Everything (Blow your Mind)
  • After Y2k (This is Post-Apocalyptic?)
  • User Friendly (Laugh)
  • Themes.org (Make X Perty)

    Support Slashdot:

  • ThinkGeek (Clothe Yourself in Slashdot)
  • CDnow (Support Rob's Who Habit)
  • Slashdot Advertiser Index
  • Freshmeat

    January

  • We should get this out of the door now
  • Is Linux for Crazies?
  • SQN Linux 1.6
  • Limo 0.3.2
  • Fusion GS 1.3
  • MMR 1.5.4
  • KUPS 0.3.4
  • 3DSE patch for XMMS 4
  • Linux 2.3.41
  • Free Code for Linux S/390
    Search Freshmeat:

    More Meat...

  • + + + + + + + + + + +
    +
    + + +
    +
    +
      + Wasn't there something about a PASCAL programmer knowing the value of +everything and the Wirth of nothing? + 
    + + + All trademarks and copyrights on this + page are owned by their respective owners. Comments + are owned by the Poster. + The Rest © 1997-2000 Andover.Net. + +
    +

    + + + [ home | + awards | + supporters | + rob's homepage | + contribute story | + older articles | + Andover.Net | + advertising | + past polls | + about | + faq ] + +
    + + diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image1 b/ext/tk/sample/tkextlib/tkHTML/page2/image1 new file mode 100644 index 0000000000..2ed6ddcfe1 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image1 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image10 b/ext/tk/sample/tkextlib/tkHTML/page2/image10 new file mode 100644 index 0000000000..3021b68990 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image10 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image11 b/ext/tk/sample/tkextlib/tkHTML/page2/image11 new file mode 100644 index 0000000000..41d1fe3666 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image11 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image12 b/ext/tk/sample/tkextlib/tkHTML/page2/image12 new file mode 100644 index 0000000000..655a686541 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image12 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image13 b/ext/tk/sample/tkextlib/tkHTML/page2/image13 new file mode 100644 index 0000000000..97d5950e8c Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image13 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image14 b/ext/tk/sample/tkextlib/tkHTML/page2/image14 new file mode 100644 index 0000000000..6d73ad833c Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image14 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image15 b/ext/tk/sample/tkextlib/tkHTML/page2/image15 new file mode 100644 index 0000000000..90cc3b2b16 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image15 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image16 b/ext/tk/sample/tkextlib/tkHTML/page2/image16 new file mode 100644 index 0000000000..93aa853cf1 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image16 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image17 b/ext/tk/sample/tkextlib/tkHTML/page2/image17 new file mode 100644 index 0000000000..f46f0308cd Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image17 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image18 b/ext/tk/sample/tkextlib/tkHTML/page2/image18 new file mode 100644 index 0000000000..3badd5e909 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image18 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image19 b/ext/tk/sample/tkextlib/tkHTML/page2/image19 new file mode 100644 index 0000000000..bd4f6d9677 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image19 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image2 b/ext/tk/sample/tkextlib/tkHTML/page2/image2 new file mode 100644 index 0000000000..7566dda25d Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image2 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image20 b/ext/tk/sample/tkextlib/tkHTML/page2/image20 new file mode 100644 index 0000000000..358fa95f63 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image20 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image21 b/ext/tk/sample/tkextlib/tkHTML/page2/image21 new file mode 100644 index 0000000000..c81aa52588 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image21 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image22 b/ext/tk/sample/tkextlib/tkHTML/page2/image22 new file mode 100644 index 0000000000..6cbd63022a Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image22 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image23 b/ext/tk/sample/tkextlib/tkHTML/page2/image23 new file mode 100644 index 0000000000..e8173a7456 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image23 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image24 b/ext/tk/sample/tkextlib/tkHTML/page2/image24 new file mode 100644 index 0000000000..bffd4b4956 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image24 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image25 b/ext/tk/sample/tkextlib/tkHTML/page2/image25 new file mode 100644 index 0000000000..c656fa4f30 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image25 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image26 b/ext/tk/sample/tkextlib/tkHTML/page2/image26 new file mode 100644 index 0000000000..bc93fdb259 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image26 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image27 b/ext/tk/sample/tkextlib/tkHTML/page2/image27 new file mode 100644 index 0000000000..6ad0eff1e7 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image27 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image28 b/ext/tk/sample/tkextlib/tkHTML/page2/image28 new file mode 100644 index 0000000000..88f0d7cea6 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image28 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image29 b/ext/tk/sample/tkextlib/tkHTML/page2/image29 new file mode 100644 index 0000000000..e0704183b3 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image29 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image3 b/ext/tk/sample/tkextlib/tkHTML/page2/image3 new file mode 100644 index 0000000000..ac3fa33e6f Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image3 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image30 b/ext/tk/sample/tkextlib/tkHTML/page2/image30 new file mode 100644 index 0000000000..4a41950434 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image30 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image31 b/ext/tk/sample/tkextlib/tkHTML/page2/image31 new file mode 100644 index 0000000000..60f13ed564 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image31 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image32 b/ext/tk/sample/tkextlib/tkHTML/page2/image32 new file mode 100644 index 0000000000..04ddc4e8d7 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image32 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image33 b/ext/tk/sample/tkextlib/tkHTML/page2/image33 new file mode 100644 index 0000000000..c1ecfff6c4 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image33 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image34 b/ext/tk/sample/tkextlib/tkHTML/page2/image34 new file mode 100644 index 0000000000..3dfd5d76e2 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image34 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image35 b/ext/tk/sample/tkextlib/tkHTML/page2/image35 new file mode 100644 index 0000000000..aea44f3017 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image35 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image36 b/ext/tk/sample/tkextlib/tkHTML/page2/image36 new file mode 100644 index 0000000000..baef0e0380 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image36 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image37 b/ext/tk/sample/tkextlib/tkHTML/page2/image37 new file mode 100644 index 0000000000..6c6ba52b45 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image37 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image38 b/ext/tk/sample/tkextlib/tkHTML/page2/image38 new file mode 100644 index 0000000000..e298e04b29 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image38 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image39 b/ext/tk/sample/tkextlib/tkHTML/page2/image39 new file mode 100644 index 0000000000..e16e2f10d5 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image39 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image4 b/ext/tk/sample/tkextlib/tkHTML/page2/image4 new file mode 100644 index 0000000000..9e5e46b7e5 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image4 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image5 b/ext/tk/sample/tkextlib/tkHTML/page2/image5 new file mode 100644 index 0000000000..646a6d9a51 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image5 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image6 b/ext/tk/sample/tkextlib/tkHTML/page2/image6 new file mode 100644 index 0000000000..7df417c710 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image6 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image7 b/ext/tk/sample/tkextlib/tkHTML/page2/image7 new file mode 100644 index 0000000000..0e6ac10aff Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image7 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image8 b/ext/tk/sample/tkextlib/tkHTML/page2/image8 new file mode 100644 index 0000000000..ba7fb476b9 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image8 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image9 b/ext/tk/sample/tkextlib/tkHTML/page2/image9 new file mode 100644 index 0000000000..b1cad73ae9 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page2/image9 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/index.html b/ext/tk/sample/tkextlib/tkHTML/page2/index.html new file mode 100644 index 0000000000..7eaf2d2cc9 --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/page2/index.html @@ -0,0 +1,433 @@ + + + Tcl Resource Center + + + + + + + + + + +
    Scriptics + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tcl/Tk
    Scripting Solutions for eBusiness Integration
    ProductsCustomersPartnersServicesTcl ResourcesCompany
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Software
    Tcl/Tk Core
    Applications
    Extensions
    Patches
    Tcl & Java
    Tcl/Tk Ports
    Tools
    Documentation
    Community
    What's New
    Add URL
    Keyword Search
    Index
    + + + +
    Resource
    +
    + + + + + + + +
    +   +

    Tcl Resource Center

    +Top>Software Central>Extensions>Tk Widgets
    Viewed by name (By date)

    +

    Tk is a toolkit for building graphical user interfaces with Tcl. + Your Tcl/Tk scripts run on UNIX, Windows, and Macintosh.

    +

      +
      BLT 8.0 Unofficial zip and DLL +
      This is a compiled version of BLT 8.0 "unofficial" for +the Windows platform. Edit + (September 24, 1999 06:31)
      BLT 8.0p2 Unofficial tar file +
      This is a contributed patch to make BLT compatible with Tcl/Tk 8.0p2. While still "unofficial", it is widely used. + Make sure you get the 8.0p2 version because the 8.0 version does + not compile under windows. + There is also a 2.3-8.1 version that has been patched to work with 8.1. + README file. Edit + (August 30, 1999 06:38)
      BLT Home Page +
      + Author George Howlett, Version 2.3, + Works with Tk 4.1 through Tk 8.1 +
      Download, BLT2.3.tar.gz, BLT2.4h.tar.gz, BLT2.4i.tar.gz, blt2.4i-for-8.0.exe, blt2.4i-for-8.1.exe
      BLT is a set of widgets for Tk, including a graph widget, +bar chart, drag&drop, a simple command tracer, and much more. +The 2.4 release, which is still under development, works with 8.0 +or higher. +There are also an "unofficial" release for 8.0p2 +and 8.1a2 that were not done by the author. Edit + (October 26, 1999 09:43)
      BWidget +
      A set of native Tk 8.x Widgets using Tcl8.x namespaces. +The ToolKit is available under Unix/X11 and Windows. +The BWidget(s) have a professional look&feel as in other +well known Toolkits (Tix or Incr Widget) but the concept is +radically different because everything is native +so no platform compilation, no compiled extension +library are needed. The code is 100 Pure Tcl/Tk. +More 30 components : Notebook, PageManager, Tree, PanedWindow, ButtonBox, +ScrollView, ComboBox, SpinBox, ListBox, SelectFont, SelectColor, +ProgressBare ... Edit + (September 06, 1999 09:58)
      Dash Patch for Tk +
      This patch has many enhancements to the Tk and its canvas +widget, including dashed lines, smoothed polygons, +and performance enhancements. Edit + (November 21, 1999 06:33)
      Embedded Tk (et) +
      + Author Richard Hipp, Version 8.0b5, + Works with Tk 4.0, 4.1, 4.2, 8.0 +
      Download: et80b5.tar.gz
      Embedded Tk or ``ET'' is tool for making stand-alone executables out of a mixture of C or C++ and Tcl/Tk. +Using ET you can invoke a short Tcl/Tk script in the middle of a C routine, or you can invoke a C routine in the +middle of a Tcl/Tk script. ET also bundles external Tcl/Tk scripts (including the standard Tcl/Tk startup scripts) +into the executable so that the executable can be run on another binary-compatible computer that doesn't have +Tcl/Tk installed. Edit + (August 19, 1999 15:35)
      Enhanced Tk Console (TkCon) +
      + Author Jeff Hobbs, Version 1.3, + Works with Tk 4.1 through Tk 8.1 +
      Download: tkcon.tar.gz
      TkCon is a replacement for the standard console that comes with Tk (on Windows/Mac, but also works on + +Unix). The console itself provides many more features than the standard console. Edit + (August 23, 1999 12:06)
      Frontier-Tk ScriptMeridian project +
      This project seeks to integrate the Tk toolkit +with the Frontier scripting language. Edit + (August 19, 1999 15:36)
      Img image format extension +
      This package enhances Tk, adding support for many other Image formats: +BMP, XBM, XPM, GIF (with transparency), PNG, +JPEG, TIFF and postscript. +This is implemented as a shared library that can be dynamically loaded into +Tcl/Tk. + Edit + (November 21, 1999 06:35)
      mclistbox - a multi-column listbox widget +
      mclistbox is a multi-column listbox that is +written in pure tcl and runs on all platforms +that support tcl/tk 8.0 or higher. This widget +requires no other extensions; it is completely +standalone. Edit + (August 19, 1999 15:37)
      MFC views C++ class for embedding Tk +
      The idea of embedding Tk in MFC windows always seemed very enticing but information was sparse and contradictory - on a + scale between "very easy" and "not yet possible". The only thing for it was to have a go and lo, it wasn't that hard after all. + CTkView is a C++ class which can be used in MFC SDI or MDI applications. An instance of CTkView hosts an embedded Tk + toplevel widget and performs some management chores for the widget so that it can size, update and react correctly to Windows + events. Edit + (August 19, 1999 15:38)
      Pad++ +
      + Author Ben Bederson et al, Version 0.9p1, + Works with 8.0 +
      Download: download.html
      Pad++ is a Tk widget that provides a Zoomable User Interface (ZUI) that supports real-time interactive zoomable graphics in a fashion similar to the Tk Canvas widget. Pad++ supports tens of thousands of objects which include text, images, graphics, portals, lenses, simple html (and more), including transparency and rotation. Edit + (August 19, 1999 15:39)
      Progressbar +
      Progressbar is a megawidget written in pure tcl (ie: no compiling required - runs on all platforms Macintosh, Unix, Windows). +Its primary purpose is to show the progress of any action in percent. Edit + (January 24, 2000 09:19)
      scwoop (Simple Composite Widget Object Oriented Package) +
      Scwoop is a composite widget (also known as mega widget) extension to the great Tk widget library. Scwoop is +entirely written in Tcl using the stooop (Simple Tcl Only Object Oriented Programming) extension. Edit + (January 09, 2000 02:10)
      Supertext - tk text widget with unlimited undo +
      + Author Bryan Oakley, Version 1.0b1, + Works with Tcl 8.0 +
      Download: supertext.tcl
      Supertext is a package that provides a tk text widget with full undo and the ability to execute procedures both before and after a text +widget command has been processed. Supertext may be used as-is, or for the brave it may be used in place of the standard text +widget. Edit + (August 23, 1999 12:06)
      Tabbed Notebook Widget +
      + Author Richard Hipp, Version 1.0, + Works with Tk 4.1 or later. +
      Download: notebook.tcl
      This implements a tabbed notebook using +a canvas widget and embedded frames. +This is pure Tcl +code - not a C extension. Edit + (August 23, 1999 12:08)
      Tcl GD - graphics +
      + Author John Ellson and Spencer Thomas, Version 2.0, + Works with 8.0 and higher +
      Download: Gdtclft2.0.tar.gz
      + Thomas Boutell's Gd package provides a convenient way to generate + PNG images with a C program. If you prefer Tcl for CGI + applications, you'll want the TCL GD extension. Edit + (August 19, 1999 14:52)
      The Meta-GUI Tools +
      The Meta-GUI tools provide a framework for quickly building full +GUI applications. The GUI is rendered by a run-time engine +based on a hierarchical set of definitions you provide. At the bottom +of the hierarchy are abstract data types such as length, angle, +string, etc., and these are used to progressively build up frames, +dialogs, toolbars, menus, and operations. Edit + (August 23, 1999 12:10)
      Tkpiechart Home Page +
      Tkpiechart is a Tcl-only extension that allows the programmer to create and dynamically update 2D or 3D pie +charts in a Tcl/Tk application. This uses the stooop package and builds +pie charts on a Tk canvas. Edit + (January 09, 2000 02:12)
      TkPrint +
      TkPrint is an extension that allows you to print from a + Tk widget. Edit + (October 11, 1999 09:58)
      TkTable Home Page +
      The TkTable widget. The table command creates a +2-dimensional grid of cells. The table can use a Tcl array variable or Tcl + +command for data storage and retrieval. Edit + (November 18, 1999 09:25)
      TkTextMatrix (spreadsheet) +
      + Author John Arthur Tucker, Version 4.1, + Works with Tk 4.1 +
      Download: download.htm, textmatrix4.1.tar.gz
      A Tcl/Tk spreadsheet widget, TkTextmatrix, which is implemented in C++ and is + basically a Tk Canvas widget plus extra behavior for manipulating rows and columns of cell + items many times faster than with a plain Tk Canvas. It actually inserts text nearly as fast + as the Tk Text widget. If you work with or are interested in creating your own Tcl/Tk widgets + in C++, you might want to take a look at the C++ widget library included with this + distribution. Edit + (August 23, 1999 12:14)
      ToGL - a Tk Open GL widget +
      Togl is a Tk widget for OpenGL rendering. Togl is based on OGLTK, originally written by Benjamin Bederson at the +University of New Mexico (who has since moved to the University of Maryland). Togl adds the new features: +
        +
      • color-index mode support including color allocation functions +
      • support for requesting stencil, accumulation, alpha buffers, etc +
      • multiple OpenGL drawing widgets +
      • OpenGL extension testing from Tcl +
      • simple, portable font support +
      • overlay plane support +
      +Togl allows one to create and manage a special Tk/OpenGL widget with Tcl and render into it with a C program. That is, +a typical Togl program will have Tcl code for managing the user interface and a C program for computations and +OpenGL rendering. Edit + (August 23, 1999 12:14)
      Tree Widget +
      This implements a tree display in a canvas widget. +It is similar in layout to that of the +Windows explorer file viewer. This is pure Tcl +code - not a C extension. Edit + (September 29, 1999 14:37)
      Windows Extensions for Tcl/Tk (Michael Schwartz) +
      This site has pointers to several extensions specific to the +Windows platform. The extensions provide printing, +a MAPI interface to send email, and an interface to manipulate +.INI files, among other things. Edit + (October 07, 1999 10:50)
      [incr Widgets] Home Page +
      [incr Widgets] is a set of megawidgets (combo boxes, etc.) that are +upon the [incr Tcl] object system and the [incr Tk] megawidget +framework. This comes bundled with the +[incr Tcl] distributions. Edit + (September 05, 1999 16:08)
      combobox +
      + Author Bryan Oakley, Version 1.03, + Works with 8.x +
      Download: combobox.tcl
      combobox is a pure-tcl implementation of a combobox widget. It is +entirely self contained and does not require any other OO or megawidget +extension. It supports both editable and non-editable entries, and +provides the ability to call a procedure anytime the value of the combobox +changes. Edit + (August 23, 1999 12:15)
      Rnotebook +
      + Author Daniel Roche, Version 1.0, + Works with 8.0 or higher +
      Download: index.html
      This implements a resizeable notebook +widget in pure tcl/tk Edit + (August 19, 1999 15:39)
      saMDI v1.0a1 Multi-Document Interface Extension +
      A multi-document interface (MDI) extension for TCL/Tk 8.0. +This is a common interface format in Microsoft Windows that lets a parent window contain multiple child windows. +In effect you get a window manager inside a window! +Uses and includes the STOOOP object-oriented extension by +Jean-Luc Fontaine. +saMDI v1.0a1 GPL Copyright 1998 Sam Tregar. Edit + (August 23, 1999 12:07)
      Tix Support Site +
      + Author Ioi Lam, (adopted by Gregg Squires), Version 4.1, + Works with Tcl 7.4 through Tcl 8.0 +
      Download, Tix4.1.0.006.tar.gz, Tix41p6.zip, win41p6bin.zip
      Tix has found a new home! +
      + Tix provides over 40 new Tk including the +combo box, file selection dialogs, paned widget, +notebook, hierarchical list, directory tree, and more. + Edit + (August 23, 1999 12:11)
      Tk Tree Widget (C++) +
      Tk Tree widget for Tcl8.0.3. + +This version contains (optional) support for \[incr Tcl\] and \[incr Tk\] +version 3.0. +
      +With the tree widget, you can display a tree in a Tk canvas. The nodes +can be made up of any number of canvas items or even other Tk widgets. +You create the objects that make up a node and the line that connects +it to its parent and pass them to the tree widget. After this the tree +widget manages the positions of the nodes and end points of the tree +lines. Operations are available for inserting, moving and removing +nodes and subtrees and for querrying the position of a node in the +tree. The tree can be displayed horizontally or vertically. + Edit + (August 25, 1999 03:14)
      widget, simple megawidget package +
      + Author Jeffrey Hobbs, Version 0.9, + Works with Tcl/Tk 8.0 or higher +
      Download: widget-0.9.tar.gz
      This is a package of + megawidgets (i.e., compound widgets) that work almost exactly like Tk widgets. + You can also build your own new megawidgets. +Includes: combobox, hierarchy, console, progressbar, +tabnotebook, validating entry, pane geometry manager, baloon help. Edit + (August 23, 1999 12:16)
      +


      Top
      Home + | Products + | Customers + | Partners + | Services + | Tcl Resources + | Company +
      Search + | Site Map + | Feedback + | Contact Us + | info@scriptics.com + +
      + + © 1998-2000 Scriptics Corporation. All rights reserved. + Legal Notice | + Privacy Statement +
      + + \ No newline at end of file diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image1 b/ext/tk/sample/tkextlib/tkHTML/page3/image1 new file mode 100644 index 0000000000..814d1e8f08 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image1 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image10 b/ext/tk/sample/tkextlib/tkHTML/page3/image10 new file mode 100644 index 0000000000..45001faf05 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image10 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image11 b/ext/tk/sample/tkextlib/tkHTML/page3/image11 new file mode 100644 index 0000000000..7c4c170f21 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image11 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image12 b/ext/tk/sample/tkextlib/tkHTML/page3/image12 new file mode 100644 index 0000000000..903e7344a6 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image12 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image13 b/ext/tk/sample/tkextlib/tkHTML/page3/image13 new file mode 100644 index 0000000000..226d4f68c2 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image13 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image14 b/ext/tk/sample/tkextlib/tkHTML/page3/image14 new file mode 100644 index 0000000000..8e8c71814c Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image14 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image2 b/ext/tk/sample/tkextlib/tkHTML/page3/image2 new file mode 100644 index 0000000000..2ddeb3258c Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image2 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image3 b/ext/tk/sample/tkextlib/tkHTML/page3/image3 new file mode 100644 index 0000000000..1651ba7e41 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image3 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image4 b/ext/tk/sample/tkextlib/tkHTML/page3/image4 new file mode 100644 index 0000000000..b565c8dd0e Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image4 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image5 b/ext/tk/sample/tkextlib/tkHTML/page3/image5 new file mode 100644 index 0000000000..e1268b81c0 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image5 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image6 b/ext/tk/sample/tkextlib/tkHTML/page3/image6 new file mode 100644 index 0000000000..1a6b260b40 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image6 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image7 b/ext/tk/sample/tkextlib/tkHTML/page3/image7 new file mode 100644 index 0000000000..cec7aa04d8 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image7 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image8 b/ext/tk/sample/tkextlib/tkHTML/page3/image8 new file mode 100644 index 0000000000..ad0d748d65 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image8 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image9 b/ext/tk/sample/tkextlib/tkHTML/page3/image9 new file mode 100644 index 0000000000..46ade3018b Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page3/image9 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/index.html b/ext/tk/sample/tkextlib/tkHTML/page3/index.html new file mode 100644 index 0000000000..ce92e8a22e --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/page3/index.html @@ -0,0 +1,2787 @@ + +
      +

      Embedding Tcl in C/C++ Applications

      + + + + + +
      + Presented At: +
      + The Tcl2K Conference
      + Austin, Texas
      + 9:00am, February 15, 2000
      +
      +
        + Instructor: +
      + D. Richard Hipp
      + drh@hwaci.com
      + http://www.hwaci.com/drh/
      + 704.948.4565 +
      +

      +

      + +
      +

      + Copies of these notes, example source code,
      and other + resources related to this tutorial
      are available online at + + http://www.hwaci.com/tcl2k/

      +

      $Id$

      +
      +

      + +


      +

      Tutorial Outline

      +

      +


      +

      Embedding Tcl in C/C++ Applications

      +

      +


      +

      Why Mix C With Tcl/Tk?

      +

      +


      +

      Why Mix C With Tcl/Tk?

      +

      + "Use C for the things C is good at and use Tcl/Tk for the things + Tcl/Tk is good at." +

      + + + + + +
      + C is good at: +
        +
      • Speed
      • +
      • Complex data structures
      • +
      • Computation
      • +
      • Interacting with hardware
      • +
      • Byte-by-byte data analysis
      • +
      +
        + Tcl/Tk is good at: +
        +
      • Building a user interface
      • +
      • Manipulation of strings
      • +
      • Portability
      • +
      • Opening sockets
      • +
      • Handling events
      • +
      +
      +


      +

      Programming Models

      + + + + + + + + + + + + + + + + +
      + +

      Mainstream Tcl Programming Model:

      +
        + +

      Embedded Tcl Programming Model:  

      +
      + +
      • Add bits of C code to a large Tcl program
      +
        + +
      • Add bits of Tcl code to a large C program
      +
      + +
      • Main Tcl script loads extensions written in C
      +
        + +
      • Main C procedure invokes the Tcl interpreter
      +
      + +
      • Tcl/Tk is a programming language
      +
        + +
      • Tcl/Tk is a C library
      +
      + +

      + Most of the Tcl2K conference is about
      +
        + +

      + This tutorial is about
      +
      + +


      +

      "Hello, World!" Using The Tcl Library

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>    Always include <tcl.h>
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();    Create a new Tcl interpreter
      +  Tcl_Eval(interp, "puts {Hello, World!}");    Execute a Tcl command.
      +  return 0;
      +}
      + +


      +

      Compiling "Hello, World!"

      +

      Unix:

      +
      + $ gcc hello.c -ltcl -lm -ldl
      + $ ./a.out
      + Hello, World!
      + +

      Windows using Cygwin:

      +
      + C:> gcc hello.c -ltcl80 -lm
      + C:> a.exe
      + Hello, World!
      + +

      Windows using Mingw32:

      +
      + C:> gcc -mno-cygwin hello.c -ltcl82 -lm
      +
      + +
      Also works with VC++

      +


      +

      Where Does -ltcl Come From On Unix?

      +

      Build it yourself using these steps:

      +

      +


      +

      What Other Libraries Are Required For Unix?

      +

      +


      +

      How To Compile Under Unix Without Installing Tcl

      +

      Specify the *.a file directly:

      +
      +  $ gcc -I../tcl8.2.2/generic hello.c \ 
      +      ../tcl8.2.2/unix/libtcl8.2.a -lm -ldl
      +  $ strip a.out
      +  $ ./a.out
      +  Hello, World!
      + +

      Or, tell the C compiler where to look for *.a files:

      +
      +  $ gcc -I../tcl8.2.2/generic hello.c \ 
      +      -L../tcl8.2.2/unix -ltcl -lm -ldl
      +  $ strip a.out
      +  $ ./a.out
      +  Hello, World!
      + +
      The -I../tcl8.2.2 argument + tells the compiler where to + find <tcl.h>.

      +


      +

      What's "Cygwin"?

      +

      +


      +

      Where Does -ltcl82 Come From On Windows?

      +

      Build it like this:

      +

      +


      +

      Where Does Your Code Go?

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  /* Your application code goes here */    Insert C code here to do whatever it is your program is + suppose to do
      +  return 0;
      +}
      + +


      +

      Building A Simple TCLSH

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  char *z;
      +  char zLine[2000];
      +  interp = Tcl_CreateInterp();
      +  while( fgets(zLine,sizeof(zLine),stdin) ){    Get one line of input
      +    Tcl_Eval(interp, zLine);    Execute the input as Tcl.
      +    z = Tcl_GetStringResult(interp);
      +    if( z[0] ){
      +      printf("¸üÿ¿PX¶\n", z);
      +    }
          Print result if not empty
      +  }
      +  return 0;
      +}
      +

      +
      What if user types more than 2000 characters?
      +

      + +


      +

      Building A Simple TCLSH

      +

      Use TCL to handle input. Allows input lines of unlimited length.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +/* Tcl code to implement the
      +** input loop */
      +static char zLoop[] = 
      +  "while {![eof stdin]} {\n"
      +  "  set line [gets stdin]\n"    Get one line of input
      +  "  set result [eval $line]\n"    Execute input as Tcl
      +  "  if {$result!=\"\"} {puts $result}\n"    Print result
      +  "}\n"
      +;

      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, zLoop);    Run the Tcl input loop
      +  return 0;
      +}
      +

      +
      But what about commands that span multiple lines of input?
      +

      + +


      +

      Better Handling Of Command-Line Input

      +

      The file "input.tcl"

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +set line {}
      +while {![eof stdin]} {
      +  if {$line!=""} {
      +    puts -nonewline "> "
      +  } else {
      +    puts -nonewline "% "
      +  }
      +  flush stdout
          Prompt for user input. The prompt is normally "%" + but changes to ">" if the current line is a continuation.
      +  append line [gets stdin]
      +  if {[info complete $line]} {
      +    if {[catch {uplevel #0 $line} result]} {    If the command is complete, execute it.
      +      puts stderr "Error: $result"
      +    } elseif {$result!=""} {
      +      puts $result
      +    }
      +    set line {}
      +  } else {
      +    append line \n
      +  }
          If the command is incomplete, append a newline and get + another line of text.
      +}
      + +


      +

      Better Handling Of Command-Line Input

      +

      The file "input.c"

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, "source input.tcl");    Read and execute the input loop
      +  return 0;
      +}
      +

      +
      But now the program is not standalone!
      +

      + +


      +

      Converting Scripts Into C Strings

      + + + + +
      +static char zInputLoop[] = 
      +  "set line {}\n"
      +  "while {![eof stdin]} {\n"
      +  "  if {$line!=\"\"} {\n"
      +  "    puts -nonewline \"> \"\n"
      +  "  } else {\n"
      +  "    puts -nonewline \"% \"\n"
      +  "  }\n"
      +  "  flush stdout\n"
      +  "  append line [gets stdin]\n"
      +  "  if {[info complete $line]} {\n"
      +  "    if {[catch {uplevel #0 $line} result]} {\n"
      +  "      puts stderr \"Error: $result\"\n"
      +  "    } elseif {$result!=\"\"} {\n"
      +  "      puts $result\n"
      +  "    }\n"
      +  "    set line {}\n"
      +  "  } else {\n"
      +  "    append line \\n\n"
      +  "  }\n"
      +  "}\n"
      +;
      + +


      +

      Compile Tcl Scripts Into C Programs

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>
      +
      +
      +static char zInputLoop[] = 
      +  /* Actual code omitted */
      +;
          Copy and paste the converted Tcl script here
      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, zInputLoop);    Execute the Tcl code
      +  return 0;
      +}
      + +


      +

      Converting Scripts To Strings
      Using SED Or TCLSH

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +sed -e 's/\\/\\\\/g' \     Convert \ into \\
      +  -e 's/"/\\"/g' \     Convert " into \"
      +  -e 's/^/  "/' \     Add " to start of each line
      +  -e 's/$/\\n"/' input.tcl    Add \n" to end of each line
      +

      +

      +
      +while {![eof stdin]} {
      +  set line [gets stdin]
      +  regsub -all {\} $line {&&} line    Convert \ into \\
      +  regsub -all {"} $line {\"} line    Convert " into \"
      +  puts "\"$line\\n\""    Add " in front and \n" at the end
      +}
      + +


      +

      Converting Scripts Into C Strings

      +

      You may want to save space by removing comments and extra whitespace + from scripts.

      + + + + +
      +static char zInputLoop[] = 
      +  "set line {}\n"
      +  "while {![eof stdin]} {\n"
      +  "if {$line!=\"\"} {\n"
      +  "puts -nonewline \"> \"\n"
      +  "} else {\n"
      +  "puts -nonewline \"% \"\n"
      +  "}\n"
      +  "flush stdout\n"
      +  "append line [gets stdin]\n"
      +  "if {[info complete $line]} {\n"
      +  "if {[catch {uplevel #0 $line} result]} {\n"
      +  "puts stderr \"Error: $result\"\n"
      +  "} elseif {$result!=\"\"} {\n"
      +  "puts $result\n"
      +  "}\n"
      +  "set line {}\n"
      +  "} else {\n"
      +  "append line \\n\n"
      +  "}\n"
      +  "}\n"
      +;
      + +


      +

      Converting Scripts To Strings

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +sed -e 's/\\/\\\\/g' \ 
      +  -e 's/"/\\"/g' \ 
      +  -e '/^ *#/d' \     Delete lines that begin with #
      +  -e '/^ *$/d' \     Delete blank lines
      +  -e 's/^ */  "/' \     Delete leading spaces
      +  -e 's/$/\\n"/' input.tcl

      +

      +

      +while {![eof stdin]} {
      +  set line [gets stdin]
      +  set line [string trimleft $line]    Remove leading space
      +  if {$line==""} continue    Delete blank lines
      +  if {[string index $line 0]=="#"} {
      +    continue
      +  }
          Delete lines starting with #
      +  regsub -all {\} $line {&&} line
      +  regsub -all {"} $line {\"} line
      +  puts "\"$line\\n\""
      +}
      + +


      +

      Removing Comments Or Leading Space
      Will Break Some Tcl Scripts!

      + + + + + + + + + + + + + + + + + + + + + + +
      +image create bitmap smiley -data {
      +#define smile_width 15
      +#define smile_height 15
          These lines begin with # but are not comment
      +static unsigned char smile_bits[] = {
      +   0xc0, 0x01, 0x30, 0x06, 0x0c, 0x18,
      +   0x04, 0x10, 0x22, 0x22, 0x52, 0x25,
      +   0x01, 0x40, 0x01, 0x40, 0x01, 0x40,
      +   0x12, 0x24, 0xe2, 0x23, 0x04, 0x10,
      +   0x0c, 0x18, 0x30, 0x06, 0xc0, 0x01};
      +}

      +

      +text .t
      +pack .t
      +.t insert end [string trim {
      +She walks in beauty, like the night
      +     Of cloudless climes and starry skies;
      +And all that's best of dark and bright
      +     Meet in her aspect and her eyes;
          Indentation is deleted on lines 2 + and 4
      +}] 

      +
      +

      +
      Problems like these are rare
      +

      + +


      +

      Adding A "continue" Command

      + + + + + + + + + + + + + +
      +set line {}
      +while {![eof stdin]} {
      +  if {$line!=""} {
      +    puts -nonewline "> "
      +  } else {
      +    puts -nonewline "% "
      +  }
      +  flush stdout
      +  append line [gets stdin]
      +  if {[info complete $line]} {
      +    if {[lindex $line 0]=="continue"} {
      +      break;
          Break out of the loop if the command + is "continue"
      +    } elseif {[catch {uplevel #0 $line} result]} {
      +      puts stderr "Error: $result"
      +    } elseif {$result!=""} {
      +      puts $result
      +    }
      +    set line {}
      +  } else {
      +    append line \n
      +  }
      +}
      + +


      +

      Stop For Tcl Input At Various Points
      In A C Program

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl Input loop as a C string */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  /* Application C code */    Do some computation
      +  Tcl_Eval(interp, zInputLoop);    Stop for some Tcl input
      +  /* More application C code */    Do more computation
      +  Tcl_Eval(interp, zInputLoop);    Stop for more Tcl input
      +  /* Finish up the application */    Finish the computation
      +  return 0;
      +}
      + +


      +

      Using Tcl For Testing

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl Input loop as a C string */
      +;

      +
      +int main(int argc, char **argv){
      +#ifdef TESTING
      +  Tcl_Interp *interp;
          Create interpreter only if TESTING + is defined
      +  interp = Tcl_CreateInterp();
      +#endif
      +  /* Application C code */
      +#ifdef TESTING
      +  Tcl_Eval(interp, zInputLoop);
      +#endif
          Accept command-line input only if TESTING + is defined
      +  /* More application C code */
      +#ifdef TESTING
      +  Tcl_Eval(interp, zInputLoop);
      +#endif
      +  /* Finish up the application */
      +  return 0;
      +}
      + +


      +

      Creating A New Tcl Command In C

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int NewCmd(
      +  void *clientData,
      +  Tcl_Interp *interp,
      +  int argc,
      +  char **argv
          The Tcl command is implemented as + a C function with four arguments.
      +){
      +  printf("Hello, World!\n");
      +  return TCL_OK;    Returns TCL_OK or TCL_ERROR
      +}

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateCommand(interp, "helloworld",
      +                    NewCmd, 0, 0);
          Tell the interpreter which C function to call when the + "helloworld" Tcl command is executed
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      Linkage From Tcl To C

      +

      + +


      +

      Linkage From Tcl To C

      +

      + +


      +

      When To Use A Delete Proc

      +

      Examples of where the delete proc is used in standard Tcl/Tk:

      + + + + + + + + + + + + + + + + + + + + + + +
      +button .b -text Hello
      +pack .b
      +rename .b {}    Deleting the .b command causes the button to be destroyed
      +

      +
      +image create photo smiley \ 
      +    -file smiley.gif
      +rename smiley {}    Deleting the smiley command destroys the image and reclaims the + memory used to hold the image
      +

      + +


      +

      Linkage From Tcl To C

      +

      The argc and argv parameters work just like in + main()

      + + + + + + + +
      +helloworld one {two three} four    argc = 4
      + argv[0] = "helloworld"
      + argv[1] = "one"
      + argv[2] = "two three"
      + argv[3] = "four"
      + argv[4] = NULL
      + +


      +

      A Short-Cut

      +

      In a program with many new Tcl commands implemented in C, it becomes + tedious to type the same four parameters over and over again. So + we define a short-cut.

      + + + + + + + + + + + + + + + + + + + +
      +#define TCLARGS \ 
      +    void *clientData, \ 
      +    Tcl_Interp *interp, \ 
      +    int argc, \ 
      +    char *argv
          Define TCLARGS once in a header file
      + 

      +int NewCmd(TCLARGS){    Use the TCLARGS macro to define new C functions + that implement Tcl commands.
      +   /* implementation... */
      +}
      +

      +
      For brevity, we will use the TCLARGS macro during the + rest of this talk.
      +

      + +


      +

      Returning A Value From C Back To Tcl

      + + + + + + + + + + + + + + + + +
      +int NewCmd(TCLARGS){    Note that the C function returns an "int"
      +  return TCL_OK;    Return value is TCL_OK or TCL_ERROR
      +}
      +

      + +


      +

      Returning A Value From C Back To Tcl

      + + + + + + + + + + + + + +
      +int NewCmd(TCLARGS){
      +  Tcl_SetResult(interp,"Hello!",TCL_STATIC);    Set the result to "Hello!"
      +  return TCL_OK;
      +}
      +

      + +


      +

      The Tcl_Obj Interface

      +

      +


      +

      The Tcl_Obj Interface

      + + + + + + + + + + + + + + + + + + + + + + +
      +int NewObjCmd(
      +  void *clientData,
      +  Tcl_Interp *interp,
      +  int objc,
      +  Tcl_Obj *const* objv    4th parameter is an array Tcl_Objs, not an array of strings
      +){
      +  /* Implementation... */
      +  return TCL_OK;
      +}

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateObjCommand(interp, "newcmd",
      +                       NewObjCmd, 0, 0);
          Use a different function to register the command
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The Tcl_Obj Interface

      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      Memory allocation functions

      +
      + + + +
      + Tcl_Alloc
      +
      + Tcl_Free
      +
      + Tcl_Realloc
      +

      Functions useful in the implementation of new Tcl commands

      +
      + + + +
      + Tcl_AppendElement
      + Tcl_AppendResult
      + Tcl_GetBoolean
      +
      + Tcl_GetDouble
      + Tcl_GetInt
      + Tcl_GetStringResult
      +
      + Tcl_ResetResult
      + Tcl_SetResult
      +

      Functions for controlling the Tcl interpreter

      +
      + + + +
      + Tcl_CreateCommand
      + Tcl_CreateInterp
      +
      + Tcl_CreateObjCommand
      + Tcl_DeleteCommand
      +
      + Tcl_DeleteInterp
      + Tcl_Exit
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      I/O functions

      +
      + + + +
      + Tcl_Close
      + Tcl_Eof
      + Tcl_Flush
      + Tcl_GetChannel
      + Tcl_GetChannelMode
      + Tcl_GetChannelName
      +
      + Tcl_Gets
      + Tcl_OpenCommandChannel
      + Tcl_OpenFileChannel
      + Tcl_OpenTcpClient
      + Tcl_OpenTcpServer
      + Tcl_Read
      +
      + Tcl_Seek
      + Tcl_Tell
      + Tcl_Ungets
      + Tcl_Write
      + Tcl_WriteChars
      +

      Names and meanings of system error codes

      +
      + + + +
      + Tcl_ErrnoId
      + Tcl_ErrnoMsg
      +
      + Tcl_GetErrno
      + Tcl_SetErrno
      +
      + Tcl_SignalId
      + Tcl_SignalMsg
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      General Operating System Calls

      +
      + + + +
      + Tcl_Access
      + Tcl_Chdir
      + Tcl_GetCwd
      +
      + Tcl_GetHostName
      + Tcl_GetNameOfExecutable
      + Tcl_Sleep
      +
      + Tcl_Stat
      +

      String Manipulation And Comparison

      +
      + + + +
      + Tcl_Concat
      + Tcl_Merge
      +
      + Tcl_SplitList
      + Tcl_StringCaseMatch
      +
      + Tcl_StringMatch
      +

      Dynamically Resizable Strings

      +
      + + +
      + Tcl_DStringAppend
      + Tcl_DStringAppendElement
      + Tcl_DStringEndSublist
      + Tcl_DStringInit
      + Tcl_DStringLength
      +
      + Tcl_DStringResult
      + Tcl_DStringSetLength
      + Tcl_DStringStartSublist
      + Tcl_DStringValue
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      Event Handlers

      +
      + + +
      + Tcl_CancelIdleCall
      + Tcl_CreateChannelHandler
      + Tcl_CreateTimerHandler
      + Tcl_DeleteChannelHandler
      +
      + Tcl_DeleteTimerHandler
      + Tcl_DoOneEvent
      + Tcl_DoWhenIdle
      +

      Functions For Reading And Writing Tcl Variables

      +
      + + + +
      + Tcl_GetVar
      + Tcl_GetVar2
      + Tcl_LinkVar
      + Tcl_SetVar
      + Tcl_SetVar2
      +
      + Tcl_TraceVar
      + Tcl_TraceVar2
      + Tcl_UnlinkVar
      + Tcl_UnsetVar
      + Tcl_UnsetVar2
      +
      + Tcl_UntraceVar
      + Tcl_UntraceVar2
      + Tcl_UpdateLinkedVar
      +

      Functions For Executing Tcl Code

      +
      + + + +
      + Tcl_Eval
      + Tcl_EvalFile
      +
      + Tcl_EvalObj
      + Tcl_GlobalEval
      +
      + Tcl_GlobalEvalObj
      + Tcl_VarEval
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      Functions For Dealing With Unicode

      +
      + + +
      + Tcl_NumUtfChars
      + Tcl_UniCharAtIndex
      + Tcl_UniCharIsAlnum
      + Tcl_UniCharIsAlpha
      + Tcl_UniCharIsControl
      + Tcl_UniCharIsDigit
      + Tcl_UniCharIsGraph
      + Tcl_UniCharIsLower
      + Tcl_UniCharIsPrint
      + Tcl_UniCharIsPunct
      + Tcl_UniCharIsSpace
      + Tcl_UniCharIsUpper
      + Tcl_UniCharIsWordChar
      + Tcl_UniCharLen
      + Tcl_UniCharNcmp
      + Tcl_UniCharToLower
      + Tcl_UniCharToTitle
      +
      + Tcl_UniCharToUpper
      + Tcl_UniCharToUtf
      + Tcl_UniCharToUtfDString
      + Tcl_UtfAtIndex
      + Tcl_UtfBackslash
      + Tcl_UtfCharComplete
      + Tcl_UtfFindFirst
      + Tcl_UtfFindLast
      + Tcl_UtfNcasecmp
      + Tcl_UtfNcmp
      + Tcl_UtfNext
      + Tcl_UtfPrev
      + Tcl_UtfToLower
      + Tcl_UtfToTitle
      + Tcl_UtfToUniChar
      + Tcl_UtfToUniCharDString
      + Tcl_UtfToUpper
      +
      +

      Functions For Dealing With Tcl_Objs

      +
      Too numerous to list...

      +


      +

      Documentation Of The Tcl API

      +

      +


      +

      Initialization Scripts

      +

      +
      Invoke the Tcl_Init() function to locate and read the + Tcl initialization scripts.

      +


      +

      The Tcl_Init() Function

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);    Locate and read the initialization scripts
      +  /* Call Tcl_CreateCommand()? */
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      +

      +
      But Tcl_Init() can fail. We need to check its return value...
      +

      + +


      +

      The Tcl_Init() Function

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  if( Tcl_Init(interp)!=TCL_OK ){
      +    fprintf(stderr,"Tcl_Init() failed: ¸üÿ¿PX¶",
      +       Tcl_GetStringResult(interp));
      +  }
          Print error message if Tcl_Init() fails
      +  /* Call Tcl_CreateCommand()? */
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      +

      +
      But now the program is not standalone.
      +

      + +


      +

      How Tcl_Init() Works

      +

      +


      +

      The Default initTcl Procedure

      + + + + +
      +set errors {}
      +set dirs {}
      +if {[info exists tcl_library]} {
      +  lappend dirs $tcl_library
      +} else {
      +  if {[info exists env(TCL_LIBRARY)]} {
      +    lappend dirs $env(TCL_LIBRARY)
      +  }
      +  lappend dirs $tclDefaultLibrary
      +  unset tclDefaultLibrary
      +  set dirs [concat $dirs $tcl_libPath]
      +}
      +foreach i $dirs {
      +  set tcl_library $i
      +  set tclfile [file join $i init.tcl]
      +  if {[file exists $tclfile]} {
      +    if {![catch {uplevel #0 [list source $tclfile]} msg]} {
      +      return
      +    } else {
      +      append errors "$tclfile: $msg\n$errorInfo\n"
      +    }
      +  }
      +}
      +error "Can't find a usable init.tcl ..."
      + +


      +

      The Default Initialization Sequence

      +

      +
      Commands defined in the initialization scripts are loaded + on demand.

      +


      +

      Standalone Initialization Techniques

      +

      Manually execute all initialization scripts

      + +
      This approach is not recommended

      +


      +

      Standalone Initialization Techniques

      +

      Redefining the builtin source command

      +

      +


      +

      Redefining source

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +static char zInitTcl[] = "...";
      +static char zParrayTcl[] = "...";
          Scripts init.tcl and parray.tcl
      +
      +int NewSourceCmd(TCLARGS){
      +  if( !strcmp(argv[1],"/builtin/init.tcl") )
      +    return Tcl_Eval(interp, zInitTcl);
      +  if( !strcmp(argv[1],"/builtin/parray.tcl") )
      +    return Tcl_Eval(interp, zParrayTcl);
          Call Tcl_Eval() on builtin strings if the names match
      +  return Tcl_EvalFile(interp, argv[1]);    Call Tcl_EvalFile() if no match
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  setenv("TCL_LIBRARY","/builtin");    Causes tclInit to look for init.tcl in /builtin
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateCommand(interp, "source",
      +                    NewSourceCmd, 0, 0);
          Redefine source
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      Redefining source

      +

      +


      +

      Standalone Initialization Techniques

      +

      Use the Tcl*InsertProc() functions

      +

      +


      +

      The TclStatInsertProc() Function

      +

      +


      +

      The TclStatInsertProc() Function

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tclInt.h>    Rather than <tcl.h>!
      +
      +static int
      +BltinFileStat(char *path,struct stat *buf){
      +  char *zData;
      +  int nData;
      +  zData = FindBuiltinFile(path, 0, &nData);    Check if path is a builtin
      +  if( zData==0 ){
      +    return -1;
      +  }
          Fail if path is not a builtin
      +  memset(buf, 0, sizeof(*buf));
      +  buf->st_mode = 0400;
      +  buf->st_size = nData;
      +  return 0;    Success if it is builtin
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  TclStatInsertProc(BltinFileStat);    Register new stat function
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The TclAccessInsertProc() Function

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tclInt.h>    Rather than <tcl.h>!
      +
      +/* BltinFileStat() not shown... */

      +static int
      +BltinFileAccess(char *path, int mode){
      +  char *zData;
      +  if( mode & 3 ) return -1;    All builtins are read-only
      +  zData = FindBuiltinFile(path, 0, &nData);    Check if path is a builtin
      +  if( zData==0 ) return -1;    Fail if path is not a builtin
      +  return 0;    Success if it is builtin
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  TclStatInsertProc(BltinFileStat);
      +  TclAccessInsertProc(BltinFileAccess);
          Register new stat and access functions
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The TclOpenFileChannelInsertProc() Function

      + + + + +
      +static Tcl_Channel BuiltinFileOpen(
      +  Tcl_Interp *interp,   /* The TCL interpreter doing the open */
      +  char *zFilename,      /* Name of the file to open */
      +  char *modeString,     /* Mode string for the open (ignored) */
      +  int permissions       /* Permissions for a newly created file (ignored) */
      +){
      +  char *zData;
      +  BuiltinFileStruct *p;
      +  int nData;
      +  char zName[50];
      +  Tcl_Channel chan;
      +  static int count = 1;

      +  zData = FindBuiltinFile(zFilename, 1, &nData);
      +  if( zData==0 ) return NULL;
      +  p = (BuiltinFileStruct*)Tcl_Alloc( sizeof(BuiltinFileStruct) );
      +  if( p==0 ) return NULL;
      +  p->zData = zData;
      +  p->nData = nData;
      +  p->cursor = 0;
      +  sprintf(zName,"etbi_bffffc7c_8049b04",((int)BuiltinFileOpen)>>12,count++);
      +  chan = Tcl_CreateChannel(&builtinChannelType, zName, 
      +                           (ClientData)p, TCL_READABLE);
      +  return chan;
      +}
      + +


      +

      The TclOpenFileChannelInsertProc() Function

      + + + + +
      +static Tcl_ChannelType builtinChannelType = {
      +  "builtin",          /* Type name. */
      +  NULL,               /* Always non-blocking.*/
      +  BuiltinFileClose,   /* Close proc. */
      +  BuiltinFileInput,   /* Input proc. */
      +  BuiltinFileOutput,  /* Output proc. */
      +  BuiltinFileSeek,    /* Seek proc. */
      +  NULL,               /* Set option proc. */
      +  NULL,               /* Get option proc. */
      +  BuiltinFileWatch,   /* Watch for events on console. */
      +  BuiltinFileHandle,  /* Get a handle from the device. */
      +};
      +

      +

      For additional information see:

      + +

      + +


      +

      Initializing Tk

      +

      +


      +

      Implementing An Event Loop

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +button .b -text Hello -command exit
      +pack .b
          Create a Tk interface
      +
      +
      +bind . <Destroy> {
      +  if {![winfo exists .]} exit
      +}
          Close the application when the main window + is destroyed
      +
      +
      +while 1 {vwait forever}    The event loop
      + +


      +

      "Hello, World!" Using Tk

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tk.h>

      +
      +static char zHello[] =     The application code
      +  "button .b "
      +    "-text {Hello, World} "
      +    "-command exit\n"
      +  "pack .b\n";

      +
      +static char zEventLoop[] =    The event loop
      +  "bind . <Destroy> {\n"
      +  "  if {![winfo exists .]} exit\n"
      +  "}\n"
      +  "while 1 {vwait forever}\n";

      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tk_Init(interp);
          We really should check the return values of the init functions...
      +  Tcl_Eval(interp, zHello);
      +  Tcl_Eval(interp, zEventLoop);    The event loop never returns
      +  /*NOTREACHED*/
      +}
      + +


      +

      Compiling "Hello, World!" For Tk

      +

      Unix:

      +
      +  $ gcc hello.c -ltk -L/usr/X11R6/lib \ 
      +        -lX11 -ltcl -lm -ldl
      +  $ ./a.out
      + +

      Windows using Cygwin:

      +
      +  C:> gcc hello.c -mwindows -ltk80 -ltcl80 -lm
      +  C:> a.exe
      + +

      Windows using Mingw32:

      +
      +  C:> gcc -mno-cygwin hello.c -mwindows \ 
      +           -ltk82 -ltcl82 -lm
      +  C:> a.exe

      +


      +

      Making The Program Standalone

      +

      To make a Tcl application standalone you have to convert the following + initialization scripts to C strings and compile them into the + executable:

      + + + + + +
      +   auto.tcl
      +   history.tcl
      +   init.tcl +
      +   ldAout.tcl
      +   package.tcl +
      +   parray.tcl
      +   safe.tcl +
      +   tclIndex
      +   word.tcl +
      + +

      To make a Tk application standalone requires these additional + initialization scripts from the Tk Library:

      + + + + + +
      +   bgerror.tcl
      +   button.tcl
      +   clrpick.tcl
      +   comdlg.tcl
      +   console.tcl
      +   dialog.tcl +
      +   entry.tcl
      +   focus.tcl
      +   listbox.tcl
      +   menu.tcl
      +   msgbox.tcl
      +   optMenu.tcl +
      +   palette.tcl
      +   safetk.tcl
      +   scale.tcl
      +   scrlbar.tcl
      +   tclIndex
      +   tearoff.tcl +
      +   text.tcl
      +   tk.tcl
      +   tkfbox.tcl
      +   xmfbox.tcl +
      + +

      Total of about 13K lines and 400K bytes of text or 9K lines and + 250K bytes if you strip comments and leading spaces

      +


      +

      A Review Of The Features We Want

      +

        +
      1. + Combine C/C++ with Tcl/Tk into a single executable. +
      + +
        +
      1. + The executable should be standalone. It must not depend + on files not normally found on the system. +
      + +
        +
      1. + It should be difficult for end users to alter the program + (and introduce bugs). +

      +


      +

      Available Programming Aids

      +

      Several tools are available. The chart below shows which tools + help achieve which objectives.

      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Features The Tool Helps To Achieve
      Tool NameMix C and TclStandaloneHide Source
      SWIG  
      TclPro Wrapper 
      FreeWrap 
      Wrap  
      mktclapp

      +


      +

      SWIG

      + +

      • Creates an interface between an existing C/C++ library and a high-level + programming language. Support for: +
          +
        • Tcl/Tk
        • +
        • Perl
        • +
        • Python
        • +
        • Java
        • +
        • Eiffel
        • +
        • Guile
        • +
      • No changes required to C/C++ code. Can be used with legacy libraries.
      • Generates an extension, not a standalone binary
      • The tutorial on SWIG was yesterday afternoon.
      • http://www.swig.org/

      + +


      +

      Wrapper Programs

      + +

      • Convert a pure Tcl/Tk program into a standalone binary
      • Several wrapper programs are available: +
          +
        • TclPro Wrapper - http://www.scriptics.com/
        • +
        • FreeWrap - http://www.albany.net/~dlabelle/freewrap/freewrap.html
        • +
        • Wrap - http://members1.chello.nl/~j.nijtmans/wrap.html
        • +
      • No C compiler required!
      • TclPro will convert Tcl script into bytecode so that it cannot be + easily read by the end user. FreeWrap encrypts the scripts.
      • FreeWrap uses compression on its executable. + Wrap uses compression on both the executable and on the bundled script files.
      • Usually include extensions like winico and/or BLT

      + +


      +

      mktclapp

      + +

      • Mix C/C++ with Tcl/Tk into a standalone binary
      +
      • mktclapp generates an application initialization file + that contains Tcl scripts as strings and makes all necessary calls + to Tcl_Init, Tcl_CreateCommand, + Tcl*InsertProc, etc.
      • Features to make it easier to write new Tcl command in C
      • xmktclapp.tcl provides a GUI interface to mktclapp
      • http://www.hwaci.com/sw/mktclapp/

      + +


      +

      "Hello, World!" Using Mktclapp

      +

      +


      +

      "Hello, World!" Using Mktclapp

      + +

      • Set "Command Line Input?" to "None"
      • Set "Standalone?" to "Yes"
      • Enter "hw.mta" for the Configuration File
      • Enter "hw.c" for the Output C File

      + +


      +

      "Hello, World!" Using Mktclapp

      + +

      • Go to the "Tcl Scripts" page
      • Press "Insert" and add hw.tcl to the list of + Tcl scripts
      • Change the "Startup Script" to be hw.tcl.
      • Select File/Build and File/Exit

      + +


      +

      "Hello, World!" Using Mktclapp

      +

      +


      +

      Adding C Code To Your Program

      +

      Put the new C code in a new source file named "add.c"

      + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"    Generated by mktclapp
      +
      +int ET_COMMAND_add(ET_TCLARGS){    ET_TCLARGS is a macro defined in hw.h
      +  int a, b;
      +  char zResult[30];
      +  a = atoi(argv[1]);
      +  b = atoi(argv[2]);
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Adding C Code To Your Program

      + +

      • Go to the "C/C++ Modules" page of xmktclapp.tcl
      +
      • Press "Insert" and add add.c to the list of + C/C++ modules

      • Select File/Build and File/Exit

      + +


      +

      Adding C Code To Your Program

      +

      +
      Don't have to worry with Tcl_CreateCommand() - Mktclapp takes + care of that automatically.

      +


      +

      Checking Parameters In The add Command

      +

      Modify add.c to insure the add command + is called with exactly two integer arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"

      +int ET_COMMAND_add(ET_TCLARGS){
      +  int a, b;
      +  char zResult[30];
      +  if( argc!=3 ){
      +    Tcl_AppendResult(interp,
      +      "wrong # args: should be: \"",
      +      argv[0], " VALUE VALUE\"", 0);
      +    return TCL_ERROR;
      +  }
          Report an error if there are not exactly + 2 arguments
      +  if( Tcl_GetInt(interp, argv[1], &a)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
          Report an error if the first argument is + not an integer
      +  if( Tcl_GetInt(interp, argv[2], &b)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
          Do the same for the second argument
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Using The Tcl_Obj Interface

      +

      In the file objadd.c put this code:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"
      +
      +int ET_OBJCOMMAND_add2(ET_OBJARGS){
      +  int a, b;
          Use "ET_OBJCOMMAND" instead of "ET_COMMAND" and + "ET_OBJARGS" instead of "ET_TCLARGS"
      +  if( objc!=3 ){
      +    Tcl_WrongNumArgs(interp, 1, objv,
      +      "number number");
      +    return TCL_ERROR;
      +  }
          A special routine for "wrong # args" error
      +  if( Tcl_GetIntFromObj(interp, objv[1], &a) ){    Instead of Tcl_GetInt
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetIntFromObj(interp, objv[2], &b) ){
      +    return TCL_ERROR;
      +  }
      +  Tcl_SetIntObj(Tcl_GetObjResult(interp), a+b);    Result stored as integer, not a string
      +  return TCL_OK;
      +}
      + +


      +

      Speed Of Tcl_Obj Versus "char*" Interfaces

      +

      +
      In many real-world problems, the Tcl_Obj interface has no noticeable + speed advantage over the string interface.

      +


      +

      More About Built-in Tcl Scripts

      + +

      • Comments and leading white-space are removed from the + script by default. Use the "Don't Strip Comments" + button to change this.
      • The file name must exactly match the name that is + used by the source command.

      + +


      +

      Locations Of Libraries

      + +

      • Tells mktclapp where to look for script libraries.
      • All Tcl scripts in the indicated directories are + compiled into the appinit.c file.
      • Comments and extra white-space are removed. + There is no way to turn this off.

      + +


      +

      Built-in Binary Data Files

      + +

      • Arbitrary files become part of the virtual filesystem
      • No comment or white-space removal is attempted
      • Useful for images or other binary data

      + +


      +

      New Commands In Namespaces

      +

      Two underscores (__) are replaced by two colons (::) in + command names, thus giving the ability to define new commands + in a namespace

      + + + + + + + + + + + + + +
      +#include <hw.h>
      +
      +int ET_COMMAND_adder__add(ET_TCLARGS){
      +  int a, b;
          Creates the Tcl command called "adder::add"
      +  char *zResult[30];
      +  if( argc!=3 ){
      +    Tcl_AppendResult(interp,
      +      "wrong # args: should be: \"",
      +      argv[0], " VALUE VALUE\"", 0);
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetInt(interp, argv[1], &a)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetInt(interp, argv[1], &b)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Adding Your Own main()

      + + + + + + + + + + + + + +
      +int main(int argc, char **argv){
      +  /* Application specific initialization */
      +  Et_Init(argc, argv);    Never returns!
      +  /*NOTREACHED*/
      +  return 0;
      +}
      +

      +
      The "Autofork" feature is disabled if you supply your own main()
      +

      + +


      +

      Initializing The Tcl Interpreter

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int counter = 0;

      +int main(int argc, char **argv){
      +   Et_Init(argc, argv);
      +   /*NOTREACHED*/
      +   return 0;
      +}

      +int Et_AppInit(Tcl_Interp *interp){
      +  if( Blt_Init(Interp) ){
      +    return TCL_ERROR;
      +  }
          Example: Initialize an extension
      +  Tcl_LinkVar(interp, "counter", &counter,
      +              TCL_LINK_INT);
          Or link a C variable to a Tcl variable
      +  return TCL_OK;    Return TCL_OK if successful
      +}
      + +


      +

      Writing Your Own Event Loop

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>
      +
      +void Et_CustomMainLoop(Tcl_Interp *interp){    Replaces the default event loop
      +  return;    Ex: Return without handling any events.
      +}

      +int main(int argc, char **argv){
      +  Et_Init(argc, argv);    This now returns after initializing Tcl
      +  /* Application code here */
      +  return 0;
      +}
      + +


      +

      Writing Your Own Event Loop

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +void Et_CustomMainLoop(Tcl_Interp *interp){
      +  for(;;){
      +    Tcl_DoOneEvent(TCL_ALL_EVENTS|TCL_DONT_WAIT);
      +    /* Other processing... */
      +  }
          Intermix processing and event handling
      +}

      +int main(int argc, char **argv){
      +  Et_Init(argc, argv);    Never returns
      +  /*NOTREACHED*/
      +  return 0;
      +}
      + +


      +

      Mktclapp Initialization Sequence

      +

      +


      +

      Invoking Tcl From C

      +

      +


      +

      Invoking Tcl From C

      +

      Example: A C function that pops up an error message dialog box

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Tcl_SetVar(Et_Interp, "zMsg", zMsg, TCL_GLOBAL_ONLY);
      +  Tcl_GlobalEval(Et_Interp, 
      +    "tk_messageBox -icon error -msg $zMsg -type ok");
      +  Tcl_UnsetVar(Et_Interp, "zMsg", TCL_GLOBAL_ONLY);
      +}
      + +


      +

      Invoking Tcl From C

      +

      The same C function implemented using Et_EvalF() instead + of Tcl_GlobalEval()

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Et_EvalF(Et_Interp, 
      +    "tk_messageBox -icon error -msg {¸üÿ¿PX¶} -type ok",
      +    zMsg);
      +}
      +

      +

      + + + + +

      + +


      +

      Invoking Tcl From C

      +

      Use the "" format to generate a quoted string

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Et_EvalF(Et_Interp, 
      +    "tk_messageBox -icon error -msg \"%\" -type ok",
      +    zMsg);
      +}
      +

      + +


      +

      Other Functions Provided By Mktclapp

      +

      +


      +

      Operating Mktclapp From The Command Line

      +

      +


      +

      Format Of An MTA File

      + + + + + + + + + + + + + + + + + + + +
      +# Configuration file generated by xmktclapp
      +# Hand editing is not recommended
      +#
          Comments begin with one #
      +## Autofork No
      +## CFile:add.c 1
      +## CFile:objadd.c 1
      +## CmdLine Console
      +## ConfigFile hw.mta
      +## Data:check.gif 1
      +## MainScript hw.tcl
      +## Mode Tcl/Tk
      +## NoSource No
      +## OutputFile hw.c
      +## Shroud No
      +## Standalone Yes
      +## TclFile:hw.tcl 1
      +## TclLib /usr/lib/tcl8.0
      +## TkLib /usr/lib/tk8.0
          Lines beginning with two #s are used + by xmktclapp.tcl and ignored by mktclapp
      +-console
      +-main-script "hw.tcl"
      +-tcl-library "/usr/lib/tcl8.0"
      +-tk-library "/usr/lib/tk8.0"
      +"add.c"
      +"objadd.c"
      +-i "check.gif"
      +-strip-tcl "hw.tcl"
          All other lines are read by mktclapp and + ignored by xmktclapp.tcl
      + +


      +

      Summary

      +

      +


      diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image1 b/ext/tk/sample/tkextlib/tkHTML/page4/image1 new file mode 100644 index 0000000000..da26d7092e Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image1 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image2 b/ext/tk/sample/tkextlib/tkHTML/page4/image2 new file mode 100644 index 0000000000..e176a96a55 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image2 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image3 b/ext/tk/sample/tkextlib/tkHTML/page4/image3 new file mode 100644 index 0000000000..e829d3712c Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image3 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image4 b/ext/tk/sample/tkextlib/tkHTML/page4/image4 new file mode 100644 index 0000000000..f14ea13547 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image4 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image5 b/ext/tk/sample/tkextlib/tkHTML/page4/image5 new file mode 100644 index 0000000000..4ef6277226 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image5 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image6 b/ext/tk/sample/tkextlib/tkHTML/page4/image6 new file mode 100644 index 0000000000..1adb261b40 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image6 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image7 b/ext/tk/sample/tkextlib/tkHTML/page4/image7 new file mode 100644 index 0000000000..ba0d26ec18 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image7 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image8 b/ext/tk/sample/tkextlib/tkHTML/page4/image8 new file mode 100644 index 0000000000..8b81d58e27 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image8 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image9 b/ext/tk/sample/tkextlib/tkHTML/page4/image9 new file mode 100644 index 0000000000..f0a352f9d0 Binary files /dev/null and b/ext/tk/sample/tkextlib/tkHTML/page4/image9 differ diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/index.html b/ext/tk/sample/tkextlib/tkHTML/page4/index.html new file mode 100644 index 0000000000..c7bfde35a5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/page4/index.html @@ -0,0 +1,768 @@ + + + +[fm] welcome to freshmeat.net + + + +
      +
      +
      +
      + + + + + +
      freshmeat.net +
      +find:
      +linux.com partner
      + + + + +
      news |
      +appindex |
      +editorials |
      lounge |
      +contribute |
      +feedback |
      about |
      +awards |
      +FAQ |
      + +
      + +
      +
      + + + +sort by: [ date | name | urgency ]
       
      + +
      +We should get this out of the door now
      +scoop - January 29th 2000, 23:59 EST +

      Everyone else is talking about it, so we should announce it ourselves +before you start to think it's a government hoax. Server 51 is our new hosting service for Open Source projects, based on Super Cool Space Alien Technology(TM). We hadn't planned to announce it quite so soon, and it's still in the alpha stage as we work day and night at integrating SCSAT with our terrestrial systems, but feel free to take a look around and see what's going on. When we're out of the testing stage and ready to make room for your project, we'll send word via your implants. Be listening. + + + +

      [ comments (8) ] +

      Category: freshmeat + + homepage   +
      +
      + + +
      + +
      +Is Linux for Crazies?
      +jeff covey - January 29th 2000, 23:59 EST +

      Ray Woodcock writes: "In terms relevant to Linux, this freshmeat +editorial glances at the tendency of mainstream viewpoints to dismiss +other viewpoints as 'fringe,' the propensity of dissident movements to +splinter into factions before they can effectively counter their +primary adversaries, and the difficulty of creating stability without +squelching curiosity." +

      [ comments (2), 2065 words in body ] +

      Category: Editorial + +   +
      +
      + + +
      + +
      +RabbIT 2.0.2
      +Ernimril - January 29th 2000, 18:29 EST +

      RabbIt is the mutating, caching webproxy which is used to speed up surfing over slow links like modems. It does this by removing advertising and background images and scaling down images to low quality JPEGs. RabbIT is written in Java and should be able to run on any platform. It does depend upon an image converter if imagescaleing is on. The recommended image converter is "convert" from the ImageMagick package.

      +

      Changes: Fixes have been made for a few bugs concerning keep alive and the HTTP response header, a bug with NT and cache directories, a bug concerning requests without a response body, a bug in GZIPHandler that caused it to not gzip already compressed (gzip or compress) streams, a bug in HTTPHeader regarding response phrases that are multiline, and a few bugs in ImageHandler and NCache. GZIPHandler has been built as an intermediate(*) to FilterHandler (this means that it is possible to gzip text/plain, etc., without filtering those streams) uuencoding has been added to the Coder, RabbIT now uses HTTP/1.1, HTMLParser now compiles cleanly with Jikes, and GeneralHeader has been created to allow for HTTPFooter (which is useful when sending chunked data). +

      Urgency: low +

      [ comments (0) ] +

      License: freely distributable
      + Category: Daemons/Proxy
      +download homepage appindex record   +
      +
      + + +
      + +
      +nmpg 1.1.3
      +Joel Lindau - January 29th 2000, 18:18 EST +

      nmpg is a small command-driven frontend and network-jukebox for mpg123.

      +

      Changes: Bugfixes, better memory managment, a new .nmpgrc parser, and new options. +

      Urgency: low +

      [ comments (0) ] +

      License: OpenSource
      + Category: Console/Sound
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +mod_dtcl 0.7.3
      +David Welton - January 29th 2000, 18:11 EST +

      Mod_dtcl is a free/open source implementation of server-parsed Tcl under Apache. It allows you to tightly integrate HTML with Tcl, a widely-used scripting language with many years of development invested in it. There are also many external Tcl modules that you can load into mod_dtcl, to create images, access databases, etc.

      +

      Changes: A major overhaul of header handling and internal buffering, and the addition of the ability to handle binary data. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Web/Development
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +CoreLinux++ 0.4.6
      +Frank V. Castellucci - January 29th 2000, 18:07 EST +

      CoreLinux++ is an initiative to normalize methods and conventions for OOA/OOD/C++ development for Linux, materialized in a set of Open Source C++ class libraries (libcorelinux++ and libcoreframework++) to support common patterns and exploit the C++ standards.

      +

      Changes: This release adds AbstractFactory and AssociativeIterator analysis, design, implementations, test code, a CVS daily tarball, a Patch Submission facility and updated FAQ, Web Pages, and defect reporting guidelines. +

      Urgency: medium +

      [ comments (0) ] +

      License: LGPL
      + Category: Development/Libraries
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +scribe 0.2
      +ChromeBob - January 29th 2000, 12:12 EST +

      scribe writes functions prototypes for your C code, so you don't have to. It also compares unique functions between source code files and will 'extern' when appropriate. C++ methods support is also planned.

      +

      Changes: A fix for an fflush() bug and better documentation. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Development/Tools
      +download homepage appindex record   +
      +
      + + +
      + +
      +E theme updater 0.1
      +Hallvar Helleseth - January 29th 2000, 12:04 EST +

      E theme Updater is a bash script to automatically update all of your Enlightenment themes from e.themes.org.

      +

      Changes: Initial release. + +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Misc
      +download homepage appindex record   +
      +
      + + +
      + +
      +Powertweak-Linux 0.1.7
      +Dave Jones - January 29th 2000, 12:03 EST +

      Powertweak-Linux is a port of the Microsoft Windows tool of the same name rewritten from the ground up. Its main function is to tune your system to its optimal performance settings. Currently, it tunes PCI chipsets and can set /proc/sys entries.

      +

      Changes: A major GUI overhaul, the ability to generate configuration files, extended PCI information tabs, extra information support for the Matrox G200, and numerous other bugfixes & improvements. +

      Urgency: low +

      [ comments (2) ] +

      License: GPL
      + Category: Console/System
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +Pexeso Beta
      +Pavol Krigler - January 29th 2000, 11:55 EST +

      pexeso is a simple graphic card game for one or two players.

      +

      Changes: Initial public release. + +

      [ comments (0) ] +

      License: Freeware
      + Category: Console/Games
      +download homepage appindex record   +
      +
      + + +
      + +
      +XZX 2.9.2
      +E. Kunze - January 29th 2000, 11:54 EST +

      XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.

      +

      Changes: Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES. +

      Urgency: low +

      [ comments (0) ] +

      License: Shareware
      + Category: X11/Emulators
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +DistroLib 0.4
      +PhiR - January 29th 2000, 11:54 EST +

      DistroLib is an abstraction library designed to make the development of distributed application easier. Its main target is currently compute-bound tasks based on a one server, many clients model (much like distributed.net), but it is quite generic and could be used for any client/server app. It is lightweight, easy-to-use, and relies heavily on threads.

      +

      Changes: Important bug fixes and command history support. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Development/Libraries
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +ToutDoux 1.1.7
      +yeupou - January 29th 2000, 11:54 EST +

      ToutDoux is a project manager which lets you design a plan of action using a tree structure, with translations in French and English.

      +

      Changes: A new menu and XML standard for save files. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: GNOME/Tools
      +download homepage appindex record   +
      +
      + + +
      + +
      +goMP 1.0.3
      +Gautier - January 29th 2000, 11:52 EST +

      goMP is a set of CGI scripts that allows you to remotely control, via a Web browser, a computer acting as an MP3 jukebox. This program is very useful for someone who's got a dedicated computer with a lot of MP3 files but that doesn't have any output and input devices except network and sound card. It's main advantages are built-in cataloging, fast access to music, and no special software needed on the client side.

      +

      Changes: Bugfixes, a password-protected config page, basic search function, easier installation thanks to an install script, and relocation of HTML docs and CGIs to a subdirectory. +

      Urgency: medium +

      [ comments (0) ] +

      License: Artistic
      + Category: Web/Tools
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +APSEND 1.40
      +M.K. - January 29th 2000, 11:50 EST +

      APSEND is a TCP/IP packet sender to test firewalls and other network applications. It also includes a syn flood option, the land DoS attack, and a DoS attack against tcpdump running on a UNIX-based system. Future updates will include support for a scripting language to construct TCP packets and a few more options and protocols like UDP and ICMP. A port of APSEND from Perl to C is planned as well.

      +

      Changes: The stream attack, bugfixes, and rewrites for parts of the code. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Networking
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +ecasound 1.6.12r10
      +Kai Vehmanen - January 29th 2000, 11:48 EST +

      Ecasound is a software package designed for multitrack audio processing. It can be used for simple tasks like audio playback, recording and format conversions, as well as for multitrack effect processing, mixing, recording and signal recycling. Ecasound supports a wide range of audio inputs, outputs and effect algorithms. Ecasound has a chain-based design that allows effects to be easily combined both in series and in parallel. Oscillators and MIDI-CCs can be used for controlling effect parameters. Includes a versatile console mode interface, a Qt-based X-interface and various command-line utils suitable for batch processing.

      +

      Changes: Support for 24- and 32-bit audio formats and for ALSA 0.5, multichannel noisegate, a new 2nd order lowpass filter, some ia-mode commands, and various bugfixes and low-level improvements. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Sound
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +SCEZ 20000129
      +endergone Zwiebeltuete - January 29th 2000, 11:46 EST +

      SCEZ is a library that should make the handling of smart cards (not memory cards) and card readers as simple as possible and be at the same time small and easily portable. Currently supported are Dumb Mouse, CT-API and Towitoko readers and Schlumberger Cryptoflex, Gemplus GPK4000, GSM SIM and Telesec SigG cards. A PKCS#15 implementation is in the design phase. There are ports to PalmOS and MS-Windows available.

      +

      Changes: More card and reader drivers, and an application to read out GSM SIM card (phone book and SMS) and write it to the card. +

      Urgency: low +

      [ comments (0) ] +

      License: BSD type
      + Category: Development/Libraries
      +download homepage appindex record   +
      +
      + + +
      + +
      +Comicq 0.2.0
      +Terminal6 - January 29th 2000, 11:45 EST +

      COMICQ is a command line ICQ messaging tool that allows a user to connect to ICQ using your UIN and password, then sends a message to the destination UIN.

      +

      Changes: Several bugfixes, icq99a compliance, and a new option --ip that allows you to get any user's IP by their UIN. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Communication
      +download homepage appindex record   +
      +
      + + +
      + +
      +senv 0.2
      +Zbyszek Sobiecki - January 29th 2000, 11:44 EST +

      Senv allows you to run programs with a specified environment. It can set uid, gid, root directory, working directory, limits, and environment variables. It is useful in init scripts and as a shell for users for setting resource limits and environment variables. You can create sets of configurations and specify the one to use from command line.

      +

      Changes: Login shell limits and environment setting for users, permanent resource limits for specified groups of users and environment variables, and other minor bugfixes. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Administration
      +download changelog appindex record   +
      +
      + + +
      + +
      +XZX 2.9.2
      +E. Kunze - January 29th 2000, 10:55 EST +

      XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.

      +

      Changes: Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES. +

      Urgency: low +

      [ comments (0) ] +

      License: Shareware
      + Category: X11/Emulators
      +download homepage changelog appindex record   +
      +
      + + +

      [ full page for today | yesterday's edition ]
      + +
      + +
      navigator
      +- full page for today
      +- yesterday's edition
      +- new: fm news via NNTP

      +
      + +
      eye catcher
      +Free Shirts
      We give away a free freshmeat t-shirt every week for the best comment added to an application announcement or story posted on freshmeat. +

      #freshmeat
      If you want to chat about what's new on freshmeat and hang out with other fm lounge lizards and the fm staff, head over to #freshmeat on irc.freshmeat.net, part of The Open Projects Network. + 

      +
      + +
      site notes
      +- We should get this out of the door now (Jan 29th)
      +- freshmeat Y2K report (Jan 01st)
      +- Assorted freshmeat notes (Aug 16th)

      +
      + +
      recent editorials
      +- Is Linux for Crazies? (Jan 29th)
      +- A New Business Plan for Free Software (Jan 22nd)
      +- Is Linux Going to Reunite the UNIX Market? (Jan 15th)

      +
      + +
      andover.net
      +
      Mirror Logo

      +- Animation Factory
      +- DaveCentral
      +- FreeCode
      +- Internet Traffic Report
      +- IT Manager's Journal
      +- MediaBuilder
      +- Slashdot
      +- Slaughterhouse
      +- TechMailings
      +- TechSightings
      +

      E-Commerce

      +- ThinkGeek (Stuff for smart masses)

      +
      + +
      supported sites
      +- Userfriendly.org
      +- SecurityFocus
      +- copyleft
      +- Filewatcher
      +- Linux.com
      +- LinuxTelephony
      +- LinuxToday
      +- Openprojects
      +- 32bitsonline
      +- The GNU Project

      +
      + +
      saturday
      +- We should get this out of the door now
      +- Is Linux for Crazies?
      +- RabbIT 2.0.2
      +- nmpg 1.1.3
      +- mod_dtcl 0.7.3
      +- CoreLinux++ 0.4.6
      +- scribe 0.2
      +- E theme updater 0.1
      +- Powertweak-Linux 0.1.7
      +- Pexeso Beta
      +- XZX 2.9.2
      +- DistroLib 0.4
      +- ToutDoux 1.1.7
      +- goMP 1.0.3
      +- APSEND 1.40
      +- ecasound 1.6.12r10
      +- SCEZ 20000129
      +- Comicq 0.2.0
      +- senv 0.2
      +- XZX 2.9.2
      +- log4j 0.7.5
      +- SQN Linux 1.6
      +- Limo 0.3.2
      +- Fusion GS 1.3
      +- MMR 1.5.4
      +- KUPS 0.3.4
      +- 3DSE patch for XMMS 4
      +- Linux 2.3.41
      +- Free Code for Linux S/390
      +- CircleMUD 3.0 beta patchlevel 17
      +- NiL Isn't Liero 000128
      +- OpenSSH Unix Port 1.2.2
      +- KBoxes! 1.3
      +- phpLanParty 0.23
      +- DGen/SDL 1.20
      +- EdcomLib 1.0 alpha 5
      +- Etherboot 4.4.2
      +- BLADE 0.18.0
      +- Sapphire 0.13.7
      +- ippl 1.99.3
      +- Saint 1.5patch1
      +- Zircon 1.18.232
      +- nmap 2.3BETA14
      +- xterm patch #124
      +- MyThreads-Links v0.5.2
      +- sudo 1.6.2p1
      +- MIT Photonic-Bands 0.10
      +- Launcher 0.86
      +- nano 0.8.1
      +- Gtk-- 1.1.8
      +- tkchooser 0.65
      +- XShipWars 1.33a
      +- Lamerpad 0.1

      +
      + +
      friday
      +- fsv 0.9
      +- popsneaker 0.1.1
      +- eyep-updater.sh 1.0
      +- W3Mail 0.5.0
      +- The Urgent Decision 0.9.9
      +- LTSP 1.02
      +- Production BASIC 0.2.12
      +- Postfix 19991231-pl03
      +- Mp3 Commander 0.7
      +- iManager 1.0.1b
      +- Eterm 0.9
      +- dqd_dirindex 1.0
      +- Tidings 1.0.4
      +- localscan 2.1
      +- WMKeyboard 0.3
      +- fcmp 1.0.2
      +- Akkord 0.3.1
      +- HiM 0.1.1
      +- cdrecord 1.8
      +- eMixer 0.05.5
      +- FreeVSD 1.4.0
      +- Common C++ Libraries 0.0
      +- Moonshine 1.0beta2
      +- swim 0.3.5
      +- Xmame/xmess 0.36b15.1
      +- pcmcia-cs 3.1.9
      +- gPS 0.5.2
      +- Snort 1.5.1
      +- Pygmy Linux 0.7 beta
      +- Intro to Bash Programming HOWTO 0.3
      +- GNU Pth 1.3b2
      +- Laonux 0.1
      +- x-wvdial 0.12
      +- Intro to Bash Programming HOWTO 0.3
      +- Catalog 1.02
      +- harvest 1.5.20-kj-0.9
      +- wmseti 0.3.0a
      +- RIG 1.02
      +- FreeAddr 0.2
      +- GtkAda 1.2.5
      +- dot.conf 0.6.0
      +- dep.pl 1.28.0
      +- Prae's Scripts 1.1
      +- Project Clock 0.1
      +- Xtheater 0.2.1
      +- i-no Chart 0.1
      +- spliff 0.8.1
      +- Regexx 0.95
      +- RBook 0.5.0
      +- RIG 1.01
      +- wchat 1.2.0
      +- PCCS MySQLDatabase Admin Tool 1.2.2

      +
      + +
      thursday
      +- CADUBI 1.1b1
      +- Angus' Chess Clock 0.8.1
      +- MP3 Report Generator 1.0.0
      +- 4DOM 0.9.2
      +- 4XSLT 0.8.2
      +- OpenNaken 1.10
      +- iManager 1.0b
      +- QuakeForge 0.1.0
      +- pylice 0.7.0
      +- Solfege 0.6.0
      +- xinetd 2.1.8.7p1
      +- jac 0.13
      +- Xmms 1.0.0
      +- KSrnd 0.97
      +- getpg / UW-IMAP 0.54
      +- getpg 0.53
      +- setserial 2.17
      +- Pan 0.7.3
      +- jwhois 2.4.1
      +- Kmp3 1.0
      +- xPine 0.0.12
      +- Avenger's News System 2.1 Alpha
      +- RIG 1.0
      +- scroller 1.0
      +- Perl EyeP Client 0.1
      +- sfront 0.54
      +- XFrisk 1.2
      +- Moffy 0.0.1
      +- Solid POP3 0.14
      +- php3guest 1.5
      +- crUD 01.27.2000
      +- crUD 01.27.2000
      +- Free Pascal Compiler 0.99.14
      +- gtk-font-hack 0.2-gtk-1.2.6
      +- Linux 2.2.15pre5
      +- krunseti 0.2.1
      +- CompuPic 5.0.1036
      +- gfontview 0.3.3
      +- authlocal 1.0.2
      +- bigwig 1.1
      +- CAFire 0.0.11
      +- ANVLOGIN 2.0
      +- sawmill.el 1.9
      +- Perlsh 20000127
      +- sitescooper 2.1.2
      +- MHDns 1.4
      +- JChemPaint 0.5
      +- Filesystems HOWTO 0.7.3
      +- KSnes9x 1.2
      +- Mozilla M13
      +- edna 0.3
      +- GMasqdialer 0.99.8
      +- spliff 0.8
      +- MultiSeti 0.3
      +- rude 0.50
      +- cgi-util++ 0.0
      +- Cricket 0.72
      +- nuni 0.04
      +- Ksetiwatch 0.3.0
      +- SiteMgrYAP 0.1.2
      +- phpLanParty 0.21
      +- Glitter Newsreader 0.1
      +- Fastresolve 2.4
      +- ColdSync 1.1.2
      +- DDD 3.2
      +- X Northern Captain 4.2.1
      +- abcde 1.0.2
      +- Gnapster 1.3.2
      +- xmix 1.0 Alpha
      +- gtktetcolor 0.3
      +- muttzilla 0.40
      +- muttzilla 0.40
      +- asp2php 0.73.6
      +- mod_ticket 1.0
      +- MegaHAL for Eggdrop .01
      +- Jetty 2.3.5
      +- xlpotdb 1.0
      +- Koala Complete MUD Server 0.1.1a
      +- mcountd 0.4
      +- cdbackup 0.5.0
      +- The Java SSH/Telnet Application/Applet 2.0 RC1

      +
      + +
      slashdot
      +- Petition Apple for Linux QuickTime
      +- GNUstep 0.6.5 freeze
      +- YETI@Home
      +- Documents Unsealed in Microsoft/Caldera Case
      +- Who Bought Linux.Net?
      +- E-Mails from (Over?) The Edge
      +- Linux Kernel 2.3.41
      +- Congress Still Figuring Out E-Mail
      +- Sci Fi Literature 101?
      +- Could Distributed.Net Help the Mars Polar Lander?

      +
      + +
      securityfocus
      +- Win2000 security hole a 'major threat'
      +- Visa acknowledges cracker break-ins
      +- What's Wrong With Microsoft Security?
      +- Microsoft posts first Win2K security patch
      +- Libnids 1.12
      +- New hack attack is greater threat than imagined
      +- Student charged with hacking
      +- Building and Managing Virtual Private Networks (book)
      +- Threats, Vulnerabilities and Real-Worl Responses: The Foundations of the TruSecure Process
      +- The Hundredth Window : Protecting Your Privacy and Security in the Age of the Internet (boo

      +
      + +
      bebits
      +- Pe 3.0a3
      +- Rarscript 1.5
      +- CD Manager 0.66a beta
      +- TraX 1.1
      +- BeMath 1.2.2
      +- simple blackjack 1
      +- HtmlTree 0.5.3
      +- Yacp 0.1
      +- TicTacToe 1.5
      +- Pe 3.0a2

      +
      + +
      linuxtoday
      +- Linux Journal: KDE--The Next Generation
      +- Kernel Cousin gimp-devel #11 Is Out
      +- Infoworld: Corel Linux OS ideal for the desktop
      +- Technology Evaluation: IBM Jumps on the Linux Bandwagon with Both Feet, Sort Of
      +- Tobias Hövekamp: European Union acknowledges
      +- &
      +- #34;Open Source Software
      +- &
      +- #34;

      +
      + +
      linuxtelephony
      +- Traverse Technologies releases NETspider-U in US
      +- Quicknet releases new GPL'd Linux Drivers!
      +- Natural Microsystems Delivers Carrier-Class Linux
      +- Quicknet is hiring programmers of all kinds!
      +- Babylon MLPPP Software Released under GPL
      +- Linux Telephony Server Project?
      +- Vovida Networks to Hire Telephony Software Engineers
      +- SPIRO-Linux Introduces Web-Enabled Phone Administration
      +- LinuxTelephony sponsors area at LinuxFest 2000
      +- GSM-Mobile Switching Center (MSC) with Linux-PC

      +
      + +
      32bitsonline
      +- Game: Homeworld
      +- DVD Lawsuit Spreads Its Own 'Trade Secrets'
      +- Register.com Adds 'One-step' Domain Registration
      +- WebEvent: Keeping you organized
      +- Y2K Officers Defend $100 Bil Investment
      +- DON'T BE FOOLED
      +- Microsoft Scorns Think-Tank's Breakup Idea
      +- Yahoo Accused Of Stalking Internet Users
      +- eToys.com Settles Spat With Swiss Artist Group
      +- [more articles/news]

      +

      +

      + +
      +
      + + +
      copyright © 1997-2000 Andover.Net - +icons courtesy of tigert@gimp.org - +code revision 20000101 - +our privacy policy
      + + + + diff --git a/ext/tk/sample/tkextlib/tkHTML/ss.rb b/ext/tk/sample/tkextlib/tkHTML/ss.rb new file mode 100644 index 0000000000..e71c26f7dc --- /dev/null +++ b/ext/tk/sample/tkextlib/tkHTML/ss.rb @@ -0,0 +1,404 @@ +#!/usr/bin/env ruby +# +# This script implements the "ss" application. "ss" implements +# a presentation slide-show based on HTML slides. +# +require 'tk' +require 'tkextlib/tkHTML' + +root = TkRoot.new(:title=>'HTML File Viewer', :iconname=>'HV') +fswin = nil + +html = nil +html_fs = nil + +hotkey = {} + +file = ARGV[0] + + +# These are images to use with the actual image specified in a +# "" markup can't be found. +# +biggray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO/// +EOD + +smgray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9m0VADv/ +EOD + + +# +# A font chooser routine. +# +# html[:fontcommand] = pick_font +pick_font = proc{|size, attrs| + # puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (12 * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') +} + +# This routine is called to pick fonts for the fullscreen view. +# +baseFontSize = 24 +pick_font_fs = proc{|size, attrs| + # puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (baseFontSize * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') +} + +# +# +hyper_cmd = proc{|*args| + puts "HyperlinkCommand: #{args.inspect}" +} + +# This routine is called to run an applet +# +applet_arg = TkVarAccess.new_hash('AppletArg') +run_applet = proc{|size, w, arglist| + applet_arg.value = Hash[*simplelist(arglist)] + + return unless applet_arg.key?('src') + + src = html.remove(applet_arg['src']) + + applet_arg['window'] = w + applet_arg['fontsize'] = size + + begin + Tk.load_tclscript(src) + rescue => e + puts "Applet error: #{e.message}" + end +} + +# +# +form_cmd = proc{|n, cmd, *args| +} + +# +# +images = {} +old_imgs = {} +big_imgs = {} + +# +# +move_big_image = proc{|b| + return unless big_imgs.key?(b) + b.copy(big_imgs[b]) + big_imgs[b].delete + big_imgs.delete(b) +} + +image_cmd = proc{|hs, *args| + fn = args[0] + + if old_imgs.key?(fn) + return (images[fn] = old_imgs.delete(fn)) + end + + begin + img = TkPhotoImage.new(:file=>fn) + rescue + return ((hs)? smallgray: biggray) + end + + if hs + img2 = TkPhotoImage.new + img2.copy(img, :subsample=>[2,2]) + img.delete + img = img2 + end + + if img.width * img.height > 20000 + b = TkPhotoImage.new(:width=>img.width, :height=>img.height) + big_imgs[b] = img + img = b + Tk.after_idle(proc{ move_big_image.call(b) }) + end + + images[fn] = img + + img +} + + +# +# This routine is called for every