LEARNING PERL/TK: GRAPHICAL USER INTERFACES WITH PERL
Ouvrage 9781565923140 : LEARNING PERL/TK: GRAPHICAL USER INTERFACES WITH PERL
Learning Perl/Tk is a tutorial for Perl/Tk, the
extension to Perl for creating graphical user
interfaces. 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 Tcl
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.
Although this book does not teach basic Perl,
anyone who has written even the simplest Perl
program should be able to learn Tk from this book.
The writing is breezy and informal, and
gets right to the point of what you need to know
and why. The book is rife with illustrations to
demonstrate how each element is drawn and how its
configuration options affect its
presentation.
Learning Perl/Tk is for every Perl programmer who
would like to implement simple,
easy-to-use graphical interfaces.
Table of Contents
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
Auteur : WALSH
Editeur : O'REILLY
Nombre de pages : 344
Date de publication : 01 1999
Toute la sélection
Toutes les sélections
Toute la sélection
Site réalisé en partenariat avec Courbis
(Courbis - alternate link), acteur de l'Internet depuis 1988...