home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-02-02 | 47.2 KB | 1,048 lines |
- # ppres data_file
-
- # This file contains a presentation prepared by
- # Perspecta Presents 1.09
-
- dictdefine itemlook Drawing -fg Black -lp Solid -bg White -fp Solid -width 1.00 -dash solid -arrow none -feather White -dir 0
- dictdefine itemlook Arrows -fg Black -lp Solid -bg White -fp Solid -width 1.00 -dash solid -arrow head -feather White -dir 0
- dictdefine itemlook TextBox -fg None -lp Solid -bg None -fp Solid -width 1.00 -dash solid -arrow none -feather Black -dir 0
- dictdefine paralook Title -family Times -color Blue -pointsize 36 -bold 1 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.20 -paraspacetype 1 -justify left -tabs {} -powertext None
- dictdefine paralook Text -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.00 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine paralook Heading -family Times -color Black -pointsize 24 -bold 1 -italic 0 -underline 0 -left 0.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine paralook Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 36.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine paralook BHeading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 18.00 -indent -18.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 18 54 90 126 162 198 234 270 306 342 378 414} -powertext Bullets
- dictdefine paralook BSubheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 54.00 -indent -18.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 54 90 126 162 198 234 270 306 342 378 414} -powertext Bullets
- dictdefine paralook I.Heading -family Times -color Black -pointsize 24 -bold 1 -italic 0 -underline 0 -left 36.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext Roman
- dictdefine paralook 1.Heading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 36.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine paralook A.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 63.00 -indent -27.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 72 108 144 180 216 252 288 324 360 396} -powertext Letters
- dictdefine paralook 1.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 90.00 -indent -27.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine paralook (a)Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 126.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 144 180 216 252 288 324 360 396} -powertext Letters(lc)
- dictdefine paralook i.Subheading -family Times -color Black -pointsize 24 -bold 0 -italic 0 -underline 0 -left 162.00 -indent -36.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.20 -linespacetype 1 -paraspace 1.50 -paraspacetype 1 -justify left -tabs { 180 216 252 288 324 360 396} -powertext Roman(lc)
- dictdefine paralook Code -family Courier -color Green -pointsize 24 -bold 1 -italic 0 -underline 0 -left 36.00 -indent 0.00 -right 0.00 -top 0.00 -bottom 0.00 -linespace 1.00 -linespacetype 1 -paraspace 1.00 -paraspacetype 1 -justify left -tabs { 36 72 108 144 180 216 252 288 324 360 396} -powertext None
- dictdefine color Black #000000
- dictdefine color White #ffffff
- dictdefine color Red #ff0000
- dictdefine color Orange #ffa500
- dictdefine color Yellow #ffff00
- dictdefine color Green #00ff00
- dictdefine color Blue #00bfff
- dictdefine color Purple #ca00e1
- dictdefine color Grey #c0c0c0
- talk itemconfig -look Drawing -fg Black -bg None -fp Solid -width 1.00 -arrow none -feather White -dir 90
- talk textconfig -look TextBox
- talk paraconfig -look BHeading
- set talk(textUnits) i
- set talk(featherSwatches) 16
- set talk(noteOrientation) v
- set talk(backgOrientation) v
- set talk(featherPrint) 1
- set talk(gridGridi) 8
- set talk(windowZoom) 1
- set talk(pointsize) {8 10 12 14 18 20 22 24 36}
- set talk(grid) 9
- set talk(textGridc) 5
- set talk(pagesize) {612 792}
- set talk(gridUnits) i
- set talk(textGridi) 8
- set talk(featherBlend) color
- set talk(spacing) {0.00 0.50 1.00 1.2 1.50 1.75 2.00 2.5 3.00 4.0}
- set talk(featherDisplay) 1
- set talk(printLevel) 2
- set talk(customUnits) i
- set talk(gridGridc) 5
- view active 1backg
- orientation - v
- set ti [new - title "54 95 558 140.956" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -color Blue;
- insert $ti shift -string "Title" -color Blue;
- tiformat $ti 0 5 0 6 -color Blue;
- set ti;
-
- view active 2backg
- orientation - v
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Title" ;
- set ti;
- new - rectangle "27 108 585 114.75" -look Drawing -fg None -bg Blue -fp Blend -width 0.50 -feather White -dir 90
- set ti [new - textitem "387 702 585 718.004" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify right;
- insert $ti shift -revert 1;
- insert $ti shift -family Helvetica -pointsize 12;
- insert $ti shift -string "Tk C Interfaces, slide " -family Helvetica -pointsize 12;
- set id [PowerCreate 1 $ti cursor {Page Number} Numbers { -family Helvetica -pointsize 12} -1 { 13 }];
- insert $ti shift -string "." -family Helvetica -pointsize 12;
- tiformat $ti 0 28 0 29 -pointsize 12;
- set ti;
-
- view active 1slide
- backg - 1
- set ti [new - title "27 140 585 241.0288" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -string "Writing A New Widget Class" ;
- insertPara $ti shift ;
- insert $ti shift -string "Using C and Tk" ;
- set ti;
- set ti [new - textitem "27 423 585 636.824" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Heading -paraspace 1.00 -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -color Red -bold 0 -italic 0 -underline 0;
- insert $ti shift -string "John Ousterhout" -color Red -bold 0 -italic 0 -underline 0;
- insertPara $ti shift ;
- insertPara $ti shift -color -1;
- insertPara $ti shift ;
- insert $ti shift -string "Computer Science Division" -bold 0 -italic 0 -underline 0;
- insertPara $ti shift ;
- insert $ti shift -string "Department of EECS" -bold 0 -italic 0 -underline 0;
- insertPara $ti shift ;
- insertPara $ti shift ;
- insert $ti shift -string "University of California at Berkeley" -bold 0 -italic 0 -underline 0;
- tiformat $ti 6 36 6 37 -bold 0 -italic 0 -underline 0;
- set ti;
- set ti [new - textitem "81 270 126 301.304" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Heading;
- insert $ti shift -revert 1;
- set ti;
-
- view active 1note
- orientation - v
- icon - 100.45455 40 0.67171717
-
- view active 2slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Outline" ;
- set ti;
- set ti [new - textitem "45 153 585 629.7776" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "What does Tk do for widget writers?" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
- insert $ti shift -string "Widget basics: data structures, etc." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Six procedures to write:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- Create" ;
- insertPara $ti shift ;
- insert $ti shift -string "- Configure" ;
- insertPara $ti shift ;
- insert $ti shift -string "- Display" ;
- insertPara $ti shift ;
- insert $ti shift -string "- Widget command" ;
- insertPara $ti shift ;
- insert $ti shift -string "- Event handler" ;
- insertPara $ti shift ;
- insert $ti shift -string "- Destroy" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
- insert $ti shift -string "Example: trivial ``square'' widget." ;
- set ti;
-
- view active 3slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "What Does Tk Do For You?" ;
- set ti;
- set ti [new - textitem "45 153 585 657.2288" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look 1.Heading;
- insert $ti shift -revert 1;
- insert $ti shift -color Red -bold 1;
- insert $ti shift -string "1." -color Red -bold 1;
- insert $ti shift -color -1;
- insert $ti shift -string " Window names:" -bold 1;
- insert $ti shift -bold -1;
- insert $ti shift -string " " ;
- insert $ti shift -family Courier -color Green -bold 1;
- insert $ti shift -string ".a.b.c" -family Courier -color Green -bold 1;
- insertPara $ti shift -family -1 -color -1 -bold -1;
- tlconfig $ti cursor -paraspace 2.50;
- insert $ti shift -color Red -bold 1;
- insert $ti shift -string "2." -color Red -bold 1;
- insert $ti shift -color -1;
- insert $ti shift -string " Caching (efficiency, convenience):" -bold 1;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BSubheading;
- insert $ti shift -string "Window information (size, parent, etc.)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "X resources (colors, fonts, GCs, etc.)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look 1.Heading -paraspace 2.50;
- insert $ti shift -color Red;
- insert $ti shift -string "3." -color Red;
- insert $ti shift -color -1;
- insert $ti shift -string " " ;
- insert $ti shift -bold 1;
- insert $ti shift -string "Protocol intermediary" -bold 1;
- insert $ti shift -bold -1;
- insert $ti shift -string ":" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BSubheading;
- insert $ti shift -string "Event dispatching." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Geometry management." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Selection protocols." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Keyboard focus." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Window manager." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Error handling." ;
- set ti;
-
- view active 4slide
- backg - 2
- new - rectangle "153 661.5 270 688.5" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "The Structure of a Widget" ;
- set ti;
- set ti [new - textitem "45 135 585 437.336" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Heading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Data structures for each widget:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BSubheading;
- insert $ti shift -string "Tk_Window" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " managed by Tk." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Widget record managed by widget code." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Heading -paraspace 2.00;
- insert $ti shift -string "C code for widget class:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BSubheading;
- insert $ti shift -string "Tcl " ;
- insert $ti shift -color Red;
- insert $ti shift -string "class command" -color Red;
- insert $ti shift -color -1;
- insert $ti shift -string " to create widgets." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Tcl " ;
- insert $ti shift -color Red;
- insert $ti shift -string "widget command" -color Red;
- insert $ti shift -color -1;
- insert $ti shift -string " to manipulate widgets." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Supporting C procedures (e.g. redisplay)." ;
- set ti;
- new - rectangle "72 522 162 639" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- set ti [new - textitem "49.5 495 184.5 520.87" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -pointsize 22;
- insert $ti shift -string "Tk_Window" -family Courier -pointsize 22;
- tiformat $ti 0 9 0 10 -family Courier -pointsize 22;
- set ti;
- new - arc "114.75 555.75 119.25 560.25 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
- set ti [new - textitem "157.5 688.691 265.5 715.309" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -pointsize 22;
- insert $ti shift -string "X Window" -pointsize 22;
- tiformat $ti 0 8 0 9 -pointsize 22;
- set ti;
- new - arc "117 657 135 675 11520 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "117 558 117 666" -look Drawing -fg Black -width 1.00 -arrow none
- new - line "126 675 153 675" -look Drawing -fg Black -width 1.00 -arrow head
- new - rectangle "225 522 297 612" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- new - arc "258.75 537.75 263.25 542.25 0 23040" -look Drawing -fg Black -bg Black -fp Solid -width 1.00
- new - line "261 540 162 540" -look Drawing -fg Black -width 1.00 -arrow head
- set ti [new - textitem "234 468 306 519.236" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -linespace 0.00 -paraspace 0.00 -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -pointsize 22;
- insert $ti shift -string "Widget" -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "Record" -pointsize 22;
- tiformat $ti 1 6 1 7 -pointsize 22;
- set ti;
- new - arc "369 549 387 567 0 23040" -look Drawing -fg Black -bg Green -fp Solid -width 1.00
- new - arc "369 576 387 594 0 23040" -look Drawing -fg Black -bg Green -fp Solid -width 1.00
- new - arc "369 603 387 621 0 23040" -look Drawing -fg Black -bg Green -fp Solid -width 1.00
- new - arc "360 630 378 648 0 23040" -look Drawing -fg Black -bg Green -fp Solid -width 1.00
- new - arc "333 639 351 657 0 23040" -look Drawing -fg Black -bg Green -fp Solid -width 1.00
- new - arc "360 540 396 576 0 11648" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - arc "324 630 360 666 5760 11712" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - arc "324 594 360 630 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "360 558 360 612" -look Drawing -fg Black -width 1.00 -arrow none
- new - arc "306 576 396 666 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "396 558 396 621" -look Drawing -fg Black -width 1.00 -arrow none
- new - line "342 666 351 666" -look Drawing -fg Black -width 1.00 -arrow none
- set ti [new - textitem "351 648 468 694.33" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -linespace 0.00 -paraspace 0.00 -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -color Green -pointsize 22;
- insert $ti shift -string "C Procedures" -color Green -pointsize 22;
- tiformat $ti 0 12 0 13 -color Green -pointsize 22;
- set ti;
- new - arc "423 486 576 558 0 23040" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- set ti [new - textitem "427.5 459 571.5 485.618" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -color Red -pointsize 22;
- insert $ti shift -string "Tcl Commands" -color Red -pointsize 22;
- tiformat $ti 0 12 0 13 -color Red -pointsize 22;
- set ti;
- new - rectangle "441 517.5 450 526.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "477 517.5 486 526.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "459 499.5 468 508.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "495 499.5 504 508.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "513 517.5 522 526.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "459 535.5 468 544.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "495 535.5 504 544.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "531 499.5 540 508.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "531 535.5 540 544.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- new - rectangle "549 517.5 558 526.5" -look Drawing -fg Black -bg Red -fp Solid -width 1.00 -feather White -dir 90;
- group - 10
- new - arc "463.5 549 499.5 585 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "499.5 540 499.5 571.5" -look Drawing -fg Black -width 1.00 -arrow none
- new - line "481.5 585 387 585" -look Drawing -fg Black -width 1.00 -arrow head
- new - arc "378 504 414 540 5760 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "378 522 378 549" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "463.5 504 396 504" -look Drawing -fg Black -width 1.00 -arrow none
- new - arc "315 558 333 576 0 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - arc "333 585 351 603 11520 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "324 558 297 558" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "333 594 333 567" -look Drawing -fg Black -width 1.00 -arrow none
- new - line "342 603 360 603" -look Drawing -fg Black -width 1.00 -arrow none
-
- view active 5slide
- backg - 2
- set ti [new - title "45 63.5 585 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Philosophy: Widgets Are Reactive" ;
- set ti;
- set ti [new - textitem "45 162 585 615.31616" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "User is in control, not Tk or widget or application." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 4.00;
- insert $ti shift -string "Widget code is " ;
- insert $ti shift -color Red;
- insert $ti shift -string "event-driven" -color Red;
- insert $ti shift -color -1;
- insert $ti shift -string ": responds to events around it." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Procedures in widget are invoked when events occur, e.g.:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- Tcl command invoked." ;
- insertPara $ti shift ;
- insert $ti shift -string "- Window needs to be redrawn." ;
- insertPara $ti shift ;
- insert $ti shift -string "- Window destroyed." ;
- insertPara $ti shift ;
- set ti;
-
- view active 6slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Tk and Xlib" ;
- set ti;
- set ti [new - textitem "45 135 567 166.304" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Heading;
- insert $ti shift -revert 1;
- insert $ti shift -string "When should widget call Tk, when Xlib?" ;
- set ti;
- set ti [new - textitem "45 432 585 690.4544" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Heading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Call Xlib only to draw on screen." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace 2.00;
- insert $ti shift -string "Call Tk for everything else:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BSubheading;
- insert $ti shift -string "Creating windows." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Manipulating windows (map, resize, etc.)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Managing events." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Allocating resources (colors, GCs, etc.)." ;
- set ti;
- new - rectangle "171 342 396 396" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- new - rectangle "171 252 324 324" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- new - rectangle "252 189 441 225" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- new - line "288 225 288 252" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "360 225 360 342" -look Drawing -fg Black -width 1.00 -arrow head
- set ti [new - textitem "193.5 273.572 301.5 302.428" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -string "Tk" ;
- set ti;
- set ti [new - textitem "229.5 354.572 337.5 383.428" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -string "Xlib" ;
- set ti;
- set ti [new - textitem "279 192.572 414 221.428" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -string "Widget Code" ;
- set ti;
-
- view active 7slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Example: Square Widget" ;
- set ti;
- set ti [new - textitem "45 171 585 555.37208" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Displays colored square on background." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 4.00;
- insert $ti shift -string "Widget command allows square to be moved, resized:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Code -paraspace 1.50;
- insert $ti shift -string ".s position 20 30" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace -1;
- insert $ti shift -string ".s size 10" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 4.00;
- insert $ti shift -string "Can write fancier behaviors in Tcl:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- Drag square with mouse." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace 1.20;
- insert $ti shift -string "- Animate." ;
- set ti;
-
- view active 8slide
- backg - 2
- set ti [new - title "45 63.5 594 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Creating a Widget" ;
- set ti;
- set ti [new - textitem "45 135 594 677.52896" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_SquareCmd" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -linespace 1.20 -paraspace 1.75;
- insert $ti shift -string "Invoked with Tcl command named after class:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Code -paraspace 1.50;
- insert $ti shift -string "square .s -fg RoyalBlue1" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look BHeading -paraspace 1.75;
- insert $ti shift -string "Class command registered in main program:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Code -paraspace 1.50;
- insert $ti shift -string "Tcl_CreateCommand(interp, \"square\"," ;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace -1;
- insert $ti shift -string " Tk_SquareCmd, ...)\;" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look BHeading -paraspace 1.75;
- insert $ti shift -string "Create " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_Window" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " object (variable " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "tkwin" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " holds handle)." ;
- insertPara $ti shift ;
- insert $ti shift -string "Initialize widget record (" ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "squarePtr" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "), set up callbacks." ;
- insertPara $ti shift ;
- insert $ti shift -string "Register widget command." ;
- insertPara $ti shift ;
- insert $ti shift -string "Configure widget using command-line arguments." ;
- insertPara $ti shift ;
- insert $ti shift -string "Don't map window: geometry manager will do it." ;
- set ti;
-
- view active 9slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Delayed Window Creation" ;
- set ti;
- set ti [new - textitem "45 153 585 615.58592" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "X window isn't created immediately by " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_CreateWindowFromPath" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 3.00;
- insert $ti shift -string "Tk_WindowId(tkwin)" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " returns " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "None" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Window creation occurs when window mapped by " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_MapWindow" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Delay saves overhead (can reconfigure without involving X server)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Can force creation of X window with " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_MakeWindowExist" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- set ti;
-
- view active 10slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Configure Procedure" ;
- set ti;
- set ti [new - textitem "45 153 594 661.1504" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "ConfigureSquare" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
- insert $ti shift -string "Processes " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "argc" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "/" ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "argv" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string ", modifies widget record, schedules widget redisplay." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Called from both class command and widget command." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Almost all of work done by Tk library procedure " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_ConfigureWidget" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Class provides table of configuration options: " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "configSpecs" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "ConfigureSquare must also call " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_GeometryRequest" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " to set desired size." ;
- set ti;
-
- view active 11slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Display Procedure" ;
- set ti;
- set ti [new - textitem "45 144 585 675.61184" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier -bold 1 -italic 0 -underline 0;
- insert $ti shift -string "DisplaySquare" -family Courier -bold 1 -italic 0 -underline 0;
- insert $ti shift -family -1 -bold -1 -italic -1 -underline -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
- insert $ti shift -string "Redisplay is delayed:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading -left 54.00 -indent -18.00 -tabs { 36 72 108 144 180 216 252 288 324 360 396};
- insert $ti shift -string "- Don't redisplay immediately (could result in multiple redisplays)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor ;
- insert $ti shift -string "- Instead, record what must be redrawn (for simple widgets, all or nothing)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor ;
- insert $ti shift -string "- Do actual redisplay when all pending work is finished: use " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_DoWhenIdle()" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
- insert $ti shift -string "Tk provides support for 3-D effects:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_3DBorder" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " data type." ;
- insertPara $ti shift ;
- insert $ti shift -string "- " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_Fill3DRectangle()" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string ", etc." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
- insert $ti shift -string "Double-buffering with pixmap to avoid flashing." ;
- set ti;
-
- view active 12slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Widget Command Procedure" ;
- set ti;
- set ti [new - textitem "45 153 585 631.30808" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "SquareWidgetCmd" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 3.00;
- insert $ti shift -string "Decodes " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "argv\[1\]" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string ", executes one of several commands." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Potentially modifies widget record." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Arranges for redisplay if necessary." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Heading;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace 4.00;
- insert $ti shift -color Red;
- insert $ti shift -string "Only provides primitive operations\; complex features are implemented with Tcl scripts." -color Red;
- set ti;
-
- view active 13slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Event-Handling Procedure" ;
- set ti;
- set ti [new - textitem "45 171 585 592.55264" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "SquareEventProc" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 4.00;
- insert $ti shift -string "Most events (e.g. " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "ButtonPress" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string ") handled with Tcl bindings (more flexible)." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Most widgets need C code only for " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "Expose" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string ", " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "DestroyNotify" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string ", maybe " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "ConfigureNotify" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Handler set up during widget creation by calling " ;
- insert $ti shift -family Courier;
- insert $ti shift -string "Tk_CreateEventHandler" -family Courier;
- insert $ti shift -family -1;
- insert $ti shift -string "." ;
- set ti;
-
- view active 14slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Destroy Procedure" ;
- set ti;
- set ti [new - textitem "45 144 585 259.68608" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Procedure " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "DestroySquare" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 2.00;
- insert $ti shift -string "WARNING!" -color Red;
- insert $ti shift -color -1;
- insert $ti shift -string " Can't always clean up immediately: widget record may be in use by nested procedure." ;
- set ti;
- set ti [new - textitem "81 288 333 316.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -pointsize 22 -bold 1;
- insert $ti shift -string "<ButtonRelease-1" -family Courier -pointsize 22 -bold 1;
- insert $ti shift -bold -1;
- insert $ti shift -string ">" -family Courier -pointsize 22;
- tiformat $ti 0 17 0 18 -family Courier -pointsize 22;
- set ti;
- set ti [new - textitem "108 342 306 370.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -color Green -pointsize 22 -bold 1;
- insert $ti shift -string ".button invoke" -family Courier -color Green -pointsize 22 -bold 1;
- tiformat $ti 0 14 0 15 -family Courier -color Green -pointsize 22 -bold 1;
- set ti;
- set ti [new - textitem "72 396 342 424.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -color Green -pointsize 22 -bold 1;
- insert $ti shift -string "ButtonWidgetCmd(...)" -family Courier -color Green -pointsize 22 -bold 1;
- tiformat $ti 0 20 0 21 -family Courier -pointsize 22;
- set ti;
- set ti [new - textitem "126 450 288 478.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -color Green -pointsize 22 -bold 1;
- insert $ti shift -string "destroy ." -family Courier -color Green -pointsize 22 -bold 1;
- tiformat $ti 0 9 0 10 -family Courier -pointsize 22;
- set ti;
- set ti [new - textitem "72 504 342 532.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -color Green -pointsize 22 -bold 1;
- insert $ti shift -string "ButtonEventProc(...)" -family Courier -color Green -pointsize 22 -bold 1;
- tiformat $ti 0 20 0 21 -family Courier -pointsize 22;
- set ti;
- set ti [new - textitem "54 558 360 586.51" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text;
- insert $ti shift -revert 1;
- insert $ti shift -family Courier -color Red -pointsize 22;
- insert $ti shift -string "? " -family Courier -color Red -pointsize 22;
- insert $ti shift -bold 1;
- insert $ti shift -string "DestroyButton(...)" -family Courier -color Red -pointsize 22 -bold 1;
- insert $ti shift -bold -1;
- insert $ti shift -string " ?" -family Courier -color Red -pointsize 22;
- tiformat $ti 0 22 0 23 -family Courier -color Red -pointsize 22;
- set ti;
- new - line "207 315 207 342" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "207 369 207 396" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "207 423 207 450" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "207 477 207 504" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "207 531 207 558" -look Drawing -fg Black -width 1.00 -arrow head
- new - rectangle "450 396 567 531" -look Drawing -fg Black -bg Yellow -fp Solid -width 1.00 -feather White -dir 90
- set ti [new - textitem "432 342 585 392.2724" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Text -justify center;
- insert $ti shift -revert 1;
- insert $ti shift -pointsize 22;
- insert $ti shift -string "Button Widget Record" -pointsize 22;
- tiformat $ti 0 20 0 21 -pointsize 22;
- set ti;
- new - line "342 408.935 441 408.935" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "342 516.935 360 516.935" -look Drawing -fg Black -width 1.00 -arrow none
- new - arc "378 426.935 414 462.935 5760 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - arc "342 480.935 378 516.935 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00
- new - line "396 426.935 441 426.935" -look Drawing -fg Black -width 1.00 -arrow head
- new - line "378 444.935 378 498.935" -look Drawing -fg Black -width 1.00 -arrow none
- new - line "342 570.935 387 570.935" -look Drawing -fg Black -width 1.00 -arrow none
- new - arc "405 444.935 441 480.935 5760 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00;
- new - arc "369 534.935 405 570.935 17280 5760" -look Drawing -fg Black -bg None -fp Solid -width 1.00;
- new - line "423 444.935 441 444.935" -look Drawing -fg Black -width 1.00 -arrow head;
- new - line "405 462.935 405 552.935" -look Drawing -fg Black -width 1.00 -arrow none;
- group - 4
- set ti [new - textitem "45 621 585 654.272" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Solution: must delay destruction." ;
- set ti;
-
- view active 15slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Delayed Window Destruction" ;
- set ti;
- set ti [new - textitem "45 135 585 713.5624" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Tk implements short-term reference counts." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading -paraspace 1.00;
- insert $ti shift -string "E.g. in " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "ButtonWidgetCmd" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string ":" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Code -paraspace 1.00;
- insert $ti shift -pointsize 22;
- insert $ti shift -string "Tk_Preserve((ClientData) butPtr)\;" -pointsize 22;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace 0.00;
- insert $ti shift -string "..." -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "Tcl_Eval(interp, butPtr->cmd, ...)\;" -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "..." -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "Tk_Release((ClientData) butPtr)\;" -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "return result\;" -pointsize 22;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 1.75;
- insert $ti shift -string "Don't call destruction procedure directly:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading -paraspace 1.00;
- insert $ti shift -string "E.g. in " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "ButtonEventProc" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string ":" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Code -paraspace 1.00;
- insert $ti shift -pointsize 22;
- insert $ti shift -string "if (eventPtr->type == DestroyNotify) \{" -pointsize 22;
- insertPara $ti shift ;
- tlconfig $ti cursor -paraspace 0.00;
- insert $ti shift -string " ..." -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string " Tk_EventuallyFree((ClientData) butPtr, DestroyButton)\;" -pointsize 22;
- insertPara $ti shift ;
- insert $ti shift -string "\}" -pointsize 22;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 1.75;
- insert $ti shift -string "DestroyButton(butPtr)" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " is invoked:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- Immediately if (no " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_Preserve" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string "'s pending)." ;
- insertPara $ti shift ;
- insert $ti shift -string "- During last " ;
- insert $ti shift -family Courier -bold 1;
- insert $ti shift -string "Tk_Release" -family Courier -bold 1;
- insert $ti shift -family -1 -bold -1;
- insert $ti shift -string " call." ;
- set ti;
-
- view active 16slide
- backg - 2
- set ti [new - title "45 63.5 567 109.456" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -look Title;
- insert $ti shift -revert 1;
- insert $ti shift -string "Things To Remember" ;
- set ti;
- set ti [new - textitem "45 153 585 615.3248" -look TextBox];
- tiformat $ti 0 0 0 1 -revert 1;
- insert $ti shift -revert 1;
- tlconfig $ti cursor -plook { -color Red} -look BHeading;
- insert $ti shift -revert 1;
- insert $ti shift -string "Event-driven style of programming." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -paraspace 2.50;
- insert $ti shift -string "Delayed operations:" ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Subheading;
- insert $ti shift -string "- Creation of X window." ;
- insertPara $ti shift ;
- insert $ti shift -string "- Redisplay." ;
- insertPara $ti shift ;
- insert $ti shift -string "- Destruction of widget record." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red} -look BHeading -paraspace 2.50;
- insert $ti shift -string "Work within Tcl framework: focus on primitives." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -plook { -color Red};
- insert $ti shift -string "Use Tk caches, configuration support." ;
- insertPara $ti shift ;
- tlconfig $ti cursor -look Heading -paraspace 4.00;
- insert $ti shift -color Red;
- insert $ti shift -string "Don't build from scratch: modify an existing widget." -color Red;
- tiformat $ti 7 52 7 53 -color Red;
- set ti;
-
- MakeWindow slide 13 0 .views.1 683x828+-1+5
- SpotConfig .views.1 0 0 1 on
- UpdateTitles; set generateName 2
-