Learning Perl/Tk

書誌事項

Learning Perl/Tk

Nancy Walsh

O'Reilly, 1999

大学図書館所蔵 件 / 6

この図書・雑誌をさがす

注記

Includes index

内容説明・目次

内容説明

With Tk, Perl programs can be window-based rather than command-line based, with buttons, entry fields, listboxes, menus, and scrollbars. Originally developed for the Tel language, the Perl port of the Tk toolkit liberates Perl programmers from the world of command-line options, STDIN, and STDOUT, allowing them to build graphical, event-driven applications for both Windows and UNIX. This book is aimed at Perl novices and experts alike. It explains the reasoning behind event driven applications and drills in guidelines on how to best design graphical applications. It teaches how to implement and configure each of the Perl/Tk graphical elements step-by-step. Special attention is given to the geometry managers, which are needed to position each button, menu, label and listbox in the window frame.

目次

Preface. 1. Introduction to Perl/Tk A Bit of History about Perl (and Tk) Perl/Tk for both Unix and Windows 95/NT Why use a Graphical Interface? Why use Perl/Tk? Installing the Tk Module Creating Widgets Coding Style Displaying a Widget The Anatomy of an Event Loop Hello World Example Using exit vs. destroy Naming Conventions for Widget Types Using print for Diagnostic/Debugging Purposes Designing Your Windows (A short lecture). 2. Geometry Management Pack Grid Place Geometry Management Summary. 3. The Basic Button The Button Widget Some Fun Things to Try. 4. Checkbuttons & Radiobuttons The Checkbutton Widget The Radiobutton Widget Notes Fun Things to Try. 5. Label and Entry Widgets Labels The Entry Widget Fun Things to Try. 6. Scrollbars Defining Scrollbar Parts The Scrolled Method The Scrollbar Widget Examples Fun Things to Try. 7. The Listbox Widget Creating and Filling a Listbox Listbox Options Listbox Methods Listbox Example Script Fun Things to Try. 8. The Text Widget Creating and Using a Text Widget Text Widget Options A Short Break for a Simple Example Text Indexes Text Tags Marks Embedding Widgets Generic Text Widget Methods Fun Things to Try. 9. The Canvas Widget Creating a Canvas Coordinate System The Scrollable Region Using Bind with a Canvas Canvas Options Creating Items in a Canvas Canvas Methods A Drawing Program Example Fun Things to Try. 10. The Scale Widget Creating a Scale Scale Options Scale Widget Methods Fun Things To Try. 11. Menus Different Types of Menus The Menubutton Widget Complete Menubutton Examples The Menu Widget Optionmenu Widget Fun Things to Try. 12. Frames Creating a Frame Frame Options Frame Methods Fun Real-Life Examples To Try. 13. Toplevel Widgets Creating a Toplevel Widget Toplevel Options Toplevel Methods Review. 14. Binding Events The bind Method Arguments Sent to the Callback Defining Event Sequences Event Information Bailing out of a Callback The bindtags Method Ways to Use Bind. 15. Composite Widgets Looking at an Example Sideways Location of Files Creating a Composite Widget based on Frame Toplevel Based Composite Widgets. 16. Methods for Any Widget Building a Family Tree Color Related Methods Option Databases Application's Name Widget Existance Widget Mapped or Not Converting Screen Distances Size of Widget Widget Position Screen Information Atom Methods Ringing A Bell Clipboard Methods Selection Methods Destroying a Widget Focus Methods Grab Methods Interapplication Communication Waiting for Events to Happen Parsing Command Line Options Time Delays. A. Configuring Widgets with configure and cget. B. Operating System differences. C. Fonts. Index

「Nielsen BookData」 より

詳細情報

ページトップへ