Synopses & Reviews
Perl/Tk is the marriage of the Tk graphical toolkit with Perl, the powerful programming language used primarily for system administration, web programming, and database manipulation. With Perl/Tk, you can build Perl programs with an attractive, intuitive GUI interface with all the power of Perl behind it.
Mastering Perl/Tk is the "bible" of Perl/Tk it's not only a great book for getting started, but the best reference for learning the techniques of experienced Perl/Tk programmers. The first half of the book contains the basics on how to use Perl/Tk, and then branches out into advanced applications with a series of extensive program examples. The result is a book accessible for novices, and invaluable for experienced programmers ready to learn the next step in the elegant and effective use of Perl/Tk. The book includes:
- An introduction to each of the basic Perl/Tk widgets and geometry managers
- A dissection of the MainLoop, including how to use callbacks and bindings effectively
- Coverage of the Tix widgets, an extended set of widgets that are a part of the standard Perl/Tk distribution
- Working with images in Perl/Tk, including bitmaps, pixmaps, photos, and how to compose a compound image type
- How to create custom mega-widgets in Perl/Tk, both composite and derived
- Handling interprocess communication with Perl/Tk, both with standard Unix utilities (pipes and sockets) and with the send command designed for direct communication between Tk applications
- Developing your own Tk widget in the C language
- Examples of web applications written with Perl/Tk and the LWP library
The book also includes appendices on installing Perl/Tk, a complete quick-reference for each standard widget, and listings of all the extended examples in the book.
Nancy Walsh is the author of Learning Perl/Tk, and Steve Lidie wrote the Perl/Tk Pocket Reference as well as a series of Perl/Tk articles in The Perl Journal. Together, they have written Mastering Perl/Tk to be the definitive guide to Perl/Tk.
Synopsis
Perl/Tk, the marriage of Perl with the Tk toolkit, allows you to build Perl programs with an attractive, intuitive GUI interface. "Mastering Perl/Tk isthe one and only book you need for learning Perl/Tkand for mastering the techniques of experiencedPerl/Tk programmers.The first half of the book contains the basics onhow to use Perl/Tk, with coverage of all the standardwidgets and a thorough tutorial of the geometry managers. "Mastering Perl/Tk then branches out into advancedapplications, including extensive program examples.The result is a book accessible for novices, andinvaluable for experienced programmers ready to learnthe next step in the elegant and effective use of Perl/Tk. Nancy Walsh is the author of "Learning Perl/Tkand Steve Lidie is the author of the "Perl/TkPocket Reference and a series of Perl/Tk articlesin The Perl Journal. Together, they have written "Mastering Perl/Tk to be the definitive guide toPerl/Tk.
Synopsis
Nancy Walsh is the author of Learning Perl/Tk, and Steve Lidie wrote the Perl/Tk Pocket Reference as well as a series of Perl/Tk articles in The Perl Journal. Together, they have written Mastering Perl/Tk to be the definitive guide to Perl/Tk.
Synopsis
"Mastering Perl/Tk" is the "bible" of Perl/Tk: It's not only a great book for getting started, but the best reference for learning the techniques of experienced Perl/Tk programmers. The first half of the book contains the basics on how to use Perl/Tk, and then branches out into advanced applications with a series of extensive program examples.
About the Author
Steve Lidie has spent decades consulting, programming and administering systems from Apple, CDC, DEC, HP, IBM, Microsoft and SGI. Author of the Perl/Tk Pocket Reference and graduate of Lehigh University, he currently manages the University's large-scale scientific computing complex, and occasionally writes Tk articles for The Perl Journal and PerlMonth.
Nancy Walsh has been involved with Perl (and Perl/Tk) since 1996. She received a Computer Science degree from the University of Arizona in 1993, and currently works as a Principal Consultant for XOR, Inc. doing J2EE and Java work on various projects. Nancy has taught several Perl/Tk Tutorials at the O'Reilly Open Source Conference and is also the author of Learning Perl/Tk.
Table of Contents
Preface; History of This Book; What You Should Already Know; What's in This Book; Reading Order; Typographical Conventions; We'd Like to Hear from You; Acknowledgments; Chapter 1: Hello, Perl/Tk; 1.1 Perl/Tk Concepts; 1.2 Some Perl/Tk History; 1.3 Getting Started with Perl/Tk; 1.4 Hello World Example; 1.5 Unsolicited Advice; 1.6 Debugging and PrototypingPerl/Tk Programs; Chapter 2: Geometry Management; 2.1 The pack Geometry Manager; 2.2 The grid Geometry Manager; 2.3 The place Geometry Manager; 2.4 The form Geometry Manager; 2.5 Geometry Management Summary; Chapter 3: Fonts; 3.1 Experimenting with Fonts; 3.2 Dissecting a Font; 3.3 Using Fonts; 3.4 Using Fonts Dynamically; 3.5 Font Manipulation Methods; Chapter 4: Button, Checkbutton, and Radiobutton Widgets; 4.1 Creating Button Widgets; 4.2 Standard Options for Each Button Type; 4.3 Table of Options for Button-Type Widgets; 4.4 Displaying Text on Buttons; 4.5 Displaying an Image or Bitmap; 4.6 Checkbutton and Radiobutton Indicator Status; 4.7 On and Off Values for a Checkbutton; 4.8 Radiobutton Values; 4.9 The -command Option; 4.10 Disabling a Button; 4.11 Text Manipulation; 4.12 Altering the Button's Style; 4.13 Changing the Size of a Button; 4.14 Adding a Keyboard Mapping; 4.15 Color Options; 4.16 Indicator Colors; 4.17 Hiding the Indicator; 4.18 Focus Options; 4.19 Altering the Highlight Rectangle; 4.20 Configuring a Button; 4.21 Flashing the Button; 4.22 Invoking the Button; 4.23 Turning a Checkbutton/Radiobutton On and Off; Chapter 5: Label and Entry Widgets; 5.1 The Label Widget; 5.2 The Entry Widget; 5.3 The Perl/Tk LabEntry Mega-Widget; Chapter 6: The Scrollbar Widget; 6.1 Defining Scrollbar Parts; 6.2 The Scrolled Method; 6.3 The Scrollbar Widget; 6.4 Examples; Chapter 7: The Listbox Widget; 7.1 Creating and Filling a Listbox; 7.2 Listbox Options; 7.3 Selection Modes; 7.4 Colors; 7.5 Listbox Style; 7.6 Configuring a Listbox; 7.7 Inserting Items; 7.8 Deleting Items; 7.9 Retrieving Elements; 7.10 Selection Methods; 7.11 Moving to a Specific Index; 7.12 Translating Indexes; 7.13 Counting Items; 7.14 Active Versus Selected; 7.15 Bounding Box; 7.16 Finding an Index by y Coordinate; 7.17 Scrolling Methods; 7.18 Listbox Virtual Events; 7.19 Listbox Example; Chapter 8: The Text, TextUndo,and ROText Widgets; 8.1 Creating and Using a Text Widget; 8.2 Text Widget Options; 8.3 A Short Break for a Simple Example; 8.4 Text Indexes; 8.5 Text Tags; 8.6 Inserting Text; 8.7 Deleting Text; 8.8 Retrieving Text; 8.9 Translating Index Values; 8.10 Comparing Index Values; 8.11 Showing an Index; 8.12 Getting the Size of a Character; 8.13 Getting Line Information; 8.14 Searching the Contents of a Text Widget; 8.15 Scrolling; 8.16 Marks; 8.17 Embedding Widgets; 8.18 Internal Debug Flag; 8.19 The Perl/Tk Text Widget Extended Methods; 8.20 The TextUndo Widget; 8.21 The ROText Widget; Chapter 9: The Canvas Widget; 9.1 Creating a Canvas; 9.2 The Canvas Coordinate System; 9.3 The Scrollable Region; 9.4 Using bind with a Canvas; 9.5 Canvas Options; 9.6 Creating Items in a Canvas; 9.7 Configuring the Canvas Widget; 9.8 Configuring Items in the Canvas Widget; 9.9 Tags; 9.10 Retrieving Bounding Box Coordinates; 9.11 Translating Coordinates; 9.12 Moving Items Around; 9.13 Changing the Display List; 9.14 Deleting Items; 9.15 Deleting Tags; 9.16 Determining Item Type; 9.17 Setting Keyboard Focus; 9.18 Rendering the Canvas as PostScript; 9.19 Scaling the Canvas; 9.20 Scanning; 9.21 A Drawing Program Example; Chapter 10: The Scale Widget; 10.1 Creating a Scale; 10.2 Assigning a Callback; 10.3 Orientation; 10.4 Minimum and Maximum Values; 10.5 Displayed Versus Stored Value; 10.6 Adding a Label; 10.7 Displaying Value Increments; 10.8 Changing the Size of the Scale; 10.9 Options You'll Probably Never Need; 10.10 Configuring a Scale; 10.11 Getting the Value of a Scale; 10.12 Setting the Value of a Scale; 10.13 Determining Coordinates; 10.14 Identifying Parts of a Scale; Chapter 11: Frame, MainWindow,and Toplevel Widgets; 11.1 Creating a Frame; 11.2 Creating a Toplevel Widget; 11.3 Options; 11.4 Frame Methods; 11.5 Toplevel Methods; 11.6 Creating Multiple MainWindows; 11.7 Putting Two MainWindows to Work; Chapter 12: The Menu System; 12.1 Menu System Components; 12.2 Menubars and Pulldown Menus; 12.3 The Win32 System Menu Item; 12.4 Classical Menubars; 12.5 Popup Menus; 12.6 Option Menus; 12.7 Menu Virtual Events; 12.8 Pie Menus; Chapter 13: Miscellaneous Perl/Tk Methods; 13.1 Managing Widgets with configure and cget; 13.2 Building a Family Tree; 13.3 Widget's ID; 13.4 Color-Related Methods; 13.5 The Application's Name; 13.6 Widget Existence; 13.7 Is the Widget Mapped?; 13.8 Converting Screen Distances; 13.9 Size of Widget; 13.10 Widget Position; 13.11 Screen Information; 13.12 Atom Methods; 13.13 Ringing a Bell; 13.14 Clipboard and Selection Methods; 13.15 Destroying a Widget; 13.16 Focus Methods; 13.17 Grab Methods; 13.18 Marking a Widget Busy and Unbusy; 13.19 Widget Mapping and Layering; 13.20 Interapplication Communication; 13.21 Waiting for Events to Happen; 13.22 Time Delays; 13.23 Parsing Command-Line Options; 13.24 Really Miscellaneous Methods; Chapter 14: Creating Custom Widgets in Pure Perl/Tk; 14.1 A Mega-Widget Quick-Start; 14.2 The Perl/Tk Class Hierarchy; 14.3 Mega-Widget Implementation Details; 14.4 Composite Mega-Widgets; 14.5 Derived Mega-Widgets; 14.6 Packaging a Mega-Widget for Public Distribution; Chapter 15: Anatomy of the MainLoop; 15.1 Creating a Callback; 15.2 Binding to Events; 15.3 The bindtags Command; 15.4 Executing Nonblocking System Commands; 15.5 Tracing Perl/Tk Variables; 15.6 Nonblocking Wait Activities; 15.7 Splash Screens; 15.8 Synthesizing Virtual Events; 15.9 Coexisting with Other GUI Main Loops; Chapter 16: User Customization; 16.1 Using the Command Line; 16.2 Using the Option Database; Chapter 17: Images and Animations; 17.1 An Overview of Perl/Tk Image Types; 17.2 Methods Common to All Image Types; 17.3 Bitmap Primitives; 17.4 DefineBitmap; 17.5 The Bitmap Image Type; 17.6 The Pixmap Image Type; 17.7 The Photo Image Type; 17.8 The Compound Image Type; 17.9 Tk::Animation; 17.10 tkneko--Animating the Neko on a Canvas; 17.11 Tile and Transparent Images; 17.12 Miscellaneous Image Methods; 17.13 Simple Photo Rotations; Chapter 18: A Tk Interface Extension Tour; 18.1 Display Items; 18.2 Item Styles; 18.3 The TList Widget; 18.4 The HList Family of Widgets; 18.5 Tix Images; Chapter 19: Interprocess Communicationwith Pipes and Sockets; 19.1 Handling Unsolicited Media Changes; 19.2 IPADM Design Considerations; 19.3 The Perl/Tk IPADM Client, ipadm; 19.4 The IPADM Helper, ipadmh; 19.5 The IPADM Daemon, ipadmd; 19.6 Polling Win32 Sockets; Chapter 20: IPC with send; 20.1 Security and Inter-Language Considerations; 20.2 Computing π with Parallel Message Passing; 20.3 TclRobots; Chapter 21: C Widget Internals; 21.1 The Tk::Square Widget; 21.2 Interfacing tkSquare.c with Perl/Tk; 21.3 Building and Testing Tk::Square; 21.4 How Not to Port Tk::Square; Chapter 22: Perl/Tk and the Web; 22.1 Library for WWW Access in Perl; 22.2 The PerlPlus Browser Plug-in; Chapter 23: Plethora of pTk Potpourri; 23.1 pTk Special Variables and Exporter Symbols; 23.2 Manipulating the Cursor; 23.3 Dialog Boxes; 23.4 The Adjuster Widget; 23.5 The Balloon Widget; 23.6 The BrowseEntry Widget; 23.7 The LabFrame Widget; 23.8 The NoteBook Widget; 23.9 The Pane Widget; 23.10 The ProgressBar Widget; 23.11 Widgets Not in the Perl/Tk Distribution; Appendix A: Installing Perl/Tk; A.1 Installing Perl/Tk for Unix; A.2 Installing Perl/Tk for Win32; Appendix B: Options and Default Valuesfor Each Widget; B.1 Adjuster; B.2 Balloon; B.3 Bitmap; B.4 BrowseEntry; B.5 Button; B.6 Canvas; B.7 Checkbutton; B.8 ColorEditor; B.9 Dialog; B.10 DirTree; B.11 Entry; B.12 ErrorDialog; B.13 FileSelect; B.14 Frame; B.15 HList; B.16 Label; B.17 LabEntry; B.18 LabFrame; B.19 Listbox; B.20 MainWindow; B.21 Menu; B.22 Menubutton; B.23 Message; B.24 NoteBook; B.25 Optionmenu; B.26 Pane; B.27 Photo; B.28 ProgressBar; B.29 Radiobutton; B.30 ROText; B.31 Scale; B.32 Scrollbar; B.33 Table; B.34 Text; B.35 TextUndo; B.36 Tiler; B.37 TList; B.38 Toplevel; B.39 Tree; Appendix C: Complete Program Listings; C.1 Tk::CollapsableFrame; C.2 Tk::MacCopy; C.3 Tk::ExecuteCommand; C.4 Proc::Killfam; C.5 tkmpg123; C.6 Tk::Trace; C.7 tkhp16c; C.8 Tk::MacProgressBar; C.9 TclRobots.pm; C.10 Robot Control Program complex.ptr; C.11 clock-bezier.ppl; C.12 tkhanoi.ppl; Colophon;