Create bookmark
Mastering Perl/Tk
Graphical User Interfaces in Perl
Notes
Please login to add notes
- Table of Contents
- + Preface
-
+
Hello, Perl/Tk
-
+
Geometry Management
-
+
The pack Geometry Manager
- Options for pack
- Positioning Widgets
- Allocation Rectangles
- Filling the Allocation Rectangle
- Expanding the Allocation Rectangle
- Anchoring a Widget in Its Allocation Rectangle
- Widget Order in the Window
- + Padding the Size of the Widget
- Displaying in a Parent Other Than Your Own
- + Methods Associated with pack
- Demo Programs for pack
-
+
The grid Geometry Manager
- + Special Characters
- grid Options
- Specifying Rows and Columns Explicitly
- Spanning Rows and Columns Explicitly
- Forcing a Widget to Fill a Cell
- Padding the Widget
- Specifying a Different Parent
- + Configuring Columns and Rows
- Removing a Widget
- Getting Information
- + Widget Location
- How Many Columns and Rows?
- gridSlaves
- + The place Geometry Manager
-
+
The form Geometry Manager
- Geometry Management Summary
-
+
The pack Geometry Manager
- + Fonts
-
+
Button, Checkbutton, and Radiobutton Widgets
- Creating Button Widgets
- Standard Options for Each Button Type
- Table of Options for Button-Type Widgets
- Displaying Text on Buttons
- + Displaying an Image or Bitmap
- Checkbutton and Radiobutton Indicator Status
- On and Off Values for a Checkbutton
- Radiobutton Values
- The -command Option
- Disabling a Button
- Text Manipulation
- Altering the Button’s Style
- Changing the Size of a Button
- Adding a Keyboard Mapping
- Color Options
- Indicator Colors
- Hiding the Indicator
- Focus Options
- Altering the Highlight Rectangle
- Configuring a Button
- Flashing the Button
- Invoking the Button
- Turning a Checkbutton/Radiobutton On and Off
-
+
Label and Entry Widgets
- + The Label Widget
-
+
The Entry Widget
- Creating the Entry Widget
- Entry Options
- Assigning the Entry’s Contents to a Variable
- Relief
- Entry Indexes
- Text Selection Options
- The Insert Cursor
- Password Entries
- Entry Widget Validation
- Using a Scrollbar
- Configuring an Entry Widget
- Deleting Text
- Getting the Contents of an Entry Widget
- Moving the Insertion Cursor
- Getting a Numeric Index Value
- Inserting Text
- Scanning Text
- Working with the Selection
- Changing the View in the Entry Widget
- The Perl/Tk LabEntry Mega-Widget
-
+
The Scrollbar Widget
- Defining Scrollbar Parts
- + The Scrolled Method
-
+
The Scrollbar Widget
- Creating a Scrollbar Widget
- Scrollbar Options
- Scrollbar Colors
- Scrollbar Style
- Scrollbar Orientation
- Using the Arrows and the Slider
- Assigning a Callback
- How the Scrollbar Communicates with Other Widgets
- Scrollbar Configuration
- Defining What We Can See
- Getting the Current View
- Activating Elements in a Scrollbar
- Calculating Change from Pixels
- Locating a Point in the Trough
- Identifying Elements
- + Examples
-
+
The Listbox Widget
- Creating and Filling a Listbox
- Listbox Options
- + Selection Modes
- Colors
- + Listbox Style
- Configuring a Listbox
- Inserting Items
- Deleting Items
- Retrieving Elements
- + Selection Methods
- Moving to a Specific Index
- Translating Indexes
- Counting Items
- Active Versus Selected
- Bounding Box
- Finding an Index by y Coordinate
- Scrolling Methods
- Listbox Virtual Events
- Listbox Example
-
+
The Text, TextUndo, and ROText Widgets
- Creating and Using a Text Widget
- + Text Widget Options
- A Short Break for a Simple Example
- + Text Indexes
-
+
Text Tags
- Tag Options
- A Simple Tag Example
- Selections in a Text Widget Using the "sel" Tag
- Configuring and Creating Tags
- Adding a Tag to Existing Text
- + Using bind with Tags
- Deleting All Instances of a Tag
- Removing a Tag from the Text
- Raising and Lowering Tags
- Getting Tag Names
- Determining Where a Tag Applies
- + Inserting Text
- Deleting Text
- Retrieving Text
- Translating Index Values
- Comparing Index Values
- Showing an Index
- Getting the Size of a Character
- Getting Line Information
- Searching the Contents of a Text Widget
- Scrolling
- + Marks
- + Embedding Widgets
- + Internal Debug Flag
- The Perl/Tk Text Widget Extended Methods
- + The TextUndo Widget
- The ROText Widget
-
+
The Canvas Widget
- Creating a Canvas
- The Canvas Coordinate System
- The Scrollable Region
- Using bind with a Canvas
- + Canvas Options
-
+
Creating Items in a Canvas
- Configuring the Canvas Widget
- Configuring Items in the Canvas Widget
- + Tags
- Retrieving Bounding Box Coordinates
- Translating Coordinates
- Moving Items Around
- Changing the Display List
- Deleting Items
- Deleting Tags
- Determining Item Type
- Setting Keyboard Focus
- Rendering the Canvas as PostScript
- Scaling the Canvas
- + Scanning
- A Drawing Program Example
-
+
The Scale Widget
- Creating a Scale
- Assigning a Callback
- Orientation
- Minimum and Maximum Values
- Displayed Versus Stored Value
- Adding a Label
- Displaying Value Increments
- Changing the Size of the Scale
- Options You’ll Probably Never Need
- Configuring a Scale
- Getting the Value of a Scale
- Setting the Value of a Scale
- Determining Coordinates
- Identifying Parts of a Scale
-
+
Frame, MainWindow, and Toplevel Widgets
- Creating a Frame
- Creating a Toplevel Widget
- + Options
- Frame Methods
-
+
Toplevel Methods
- Sizing a Toplevel
- Maximum Size
- Minimum Size
- Limiting Resizing
- Using a Size Aspect
- Setting the Title
- Showing the Toplevel
- Withdrawing the Toplevel
- Iconifying the Toplevel
- Specifying the Icon Bitmap
- Specifying the Icon Mask
- Setting the Name of the Icon
- Setting the Icon Position
- Using a Window Instead of an Icon
- Determining the State
- Assigning a Client Name
- Window Properties
- The Colormap Property
- The Command Property
- The Focus Model
- Getting a Widget’s Window ID
- The Application Grid
- Being the Leader
- Removing Decorations
- Who Placed the Window?
- Who Sized It?
- Transient Windows
- Creating Multiple MainWindows
- Putting Two MainWindows to Work
-
+
The Menu System
-
+
Miscellaneous Perl/Tk Methods
- + Managing Widgets with configure and cget
- + Building a Family Tree
- + Widget’s ID
- + Color-Related Methods
- The Application’s Name
- Widget Existence
- Is the Widget Mapped?
- Converting Screen Distances
- + Size of Widget
- + Widget Position
- + Screen Information
- Atom Methods
- Ringing a Bell
- + Clipboard and Selection Methods
- Destroying a Widget
- + Focus Methods
- Grab Methods
- Marking a Widget Busy and Unbusy
- Widget Mapping and Layering
- Interapplication Communication
- + Waiting for Events to Happen
- Time Delays
- Parsing Command-Line Options
- Really Miscellaneous Methods
-
+
Creating Custom Widgets in Pure Perl/Tk
- + Anatomy of the MainLoop
-
+
User Customization
-
+
Images and Animations
- An Overview of Perl/Tk Image Types
- Methods Common to All Image Types
- Bitmap Primitives
- DefineBitmap
- + The Bitmap Image Type
- The Pixmap Image Type
- + The Photo Image Type
- The Compound Image Type
- Tk::Animation
- tkneko—Animating the Neko on a Canvas
- Tile and Transparent Images
- Miscellaneous Image Methods
- Simple Photo Rotations
-
+
A Tk Interface Extension Tour
-
+
Interprocess Communication with Pipes and Sockets
-
+
IPC with send
-
+
C Widget Internals
- + Perl/Tk and the Web
- + Plethora of pTk Potpourri
- + Installing Perl/Tk
-
+
Options and Default Values for Each Widget
- Adjuster
- Balloon
- Bitmap
- BrowseEntry
- Button
- Canvas
- Checkbutton
- ColorEditor
- Dialog
- DirTree
- Entry
- ErrorDialog
- FileSelect
- Frame
- HList
- Label
- LabEntry
- LabFrame
- Listbox
- MainWindow
- Menu
- Menubutton
- Message
- NoteBook
- Optionmenu
- Pane
- Photo
- ProgressBar
- Radiobutton
- ROText
- Scale
- Scrollbar
- Table
- Text
- TextUndo
- Tiler
- TList
- Toplevel
- Tree
- + Complete Program Listings
- Index
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.
Test the closed alpha on paperc.com
Book Details
Authors
Categories
Computers > Programming Languages > JavaScript
Publishers
Publication year : 2008
License: All rights reserved ©
Times read: 1,129

