
Mastering Perl/Tk
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- 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
- Steve
- Nancy
- Hello, Perl/Tk
- Perl/Tk Concepts
- Some Perl/Tk History
- The X Window System and Xlib
- The Coming of Tcl/Tk
- The Evolution of Perl/Tk
- Perl/Tk Meets Win32
- Getting Started with Perl/Tk
- Do You Need To Install Anything?
- Creating Widgets
- Specifying Options
- Toplevel, MainWindow, and Frame Widgets
- Displaying a Widget
- The Event Loop
- Hello World Example
- exit Versus destroy
- Unsolicited Advice
- Programming Style
- Naming Conventions for Widget Types
- Designing Your Windows
- Debugging and Prototyping Perl/Tk Programs
- 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
- Valid screen distances
- Displaying in a Parent Other Than Your Own
- Methods Associated with pack
- Unpacking a widget
- Retrieving pack information
- Disabling and enabling automatic resizing
- Listing widgets
- Demo Programs for pack
- The grid Geometry Manager
- Special Characters
- Spanning columns
- Empty cells
- 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
- Weight
- Minimum cell size
- Padding
- Bounding box
- Removing a Widget
- Getting Information
- Widget Location
- Propagation
- How Many Columns and Rows?
- gridSlaves
- The place Geometry Manager
- place Options
- Absolute Coordinates
- Relative Coordinates
- Anchoring the Widget
- Width and Height
- Border Options
- Methods Associated with place
- Removing the widget
- Place information
- Place slaves
- The form Geometry Manager
- Options for form
- Attachments
- Attaching to the grid
- Widget-to-widget attachments
- Attaching to nothing
- Springs
- form Methods
- Changing the grid size
- Removing a widget from a container
- Options info for form
- What's managed by form?
- Circular dependency check
- Geometry Management Summary
- Fonts
- Experimenting with Fonts
- Dissecting a Font
- Using Fonts
- System Fonts
- Using Fonts Dynamically
- Font Manipulation Methods
- One Last Example
- 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
- Images with Checkbuttons and Radiobuttons
- 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
- Creating a Label
- Label Options
- How a Label Differs from Other Widgets
- Relief
- Status Message Example
- Container Frames
- Label Configuration
- 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
- Configuring the Scrollbar(s) Created with Scrolled
- 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
- Entry Widget
- Listbox, Text, and Canvas Widgets
- One Scrollbar, Multiple Widgets
- The Listbox Widget
- Creating and Filling a Listbox
- Listbox Options
- Selection Modes
- Operating System Differences
- Colors
- Listbox Style
- Style of Selected Items
- Special Listbox Resizing
- Configuring a Listbox
- Inserting Items
- Deleting Items
- Retrieving Elements
- Selection Methods
- Selecting Items
- Unselecting Items
- Testing for Selection
- Anchoring the Selection
- 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
- Fonts
- Widget Size
- Widget Style
- Line Spacing
- Tab Stops
- A Short Break for a Simple Example
- Text Indexes
- Base Index Values
- Index Modifiers
- Text Index Examples
- 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
- The Perl/Tk Text widget extended bindings
- 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
- Inserting Lines Using print and printf
- 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
- Setting and Getting the Gravity
- Determining Mark Names
- Creating and Deleting Marks
- Embedding Widgets
- windowCreate, windowCget, and windowConfigure
- Internal Debug Flag
- Scanning
- The Perl/Tk Text Widget Extended Methods
- The TextUndo Widget
- TextUndo Virtual Events
- The ROText Widget
- The Canvas Widget
- Creating a Canvas
- The Canvas Coordinate System
- The Scrollable Region
- Using bind with a Canvas
- Canvas Options
- Common Canvas Dash, Stipple, and Tile Options
- Additional Scrolling Options
- Canvas Widget Option List
- Creating Items in a Canvas
- The Arc Item
- The Bitmap Item
- The Image Item
- The Line Item
- The Oval Item
- The Polygon Item
- The Rectangle Item
- The Text Item
- Text item indexes
- Deleting characters
- Positioning the cursor
- Index information
- Adding text
- Selecting text
- The Widget Item
- The Grid Item
- The Group Item
- Configuring the Canvas Widget
- Configuring Items in the Canvas Widget
- Tags
- Binding Items Using Tags
- Finding Tags
- Getting Tags from a Specific Item
- 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
- Scrolling Methods
- 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-Specific Options
- Toplevel-Specific Options
- Viewing a Frame
- Adding a Label to a Frame
- Frames Aren't Interactive
- Colormap Complications
- The Magical Class Option
- 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
- Menu System Components
- Menus and Menu Items
- Menu Indexes
- Manipulating Menus
- Manipulating Menu Items
- Menubars
- Menu Options
- Menubars and Pulldown Menus
- Menubars the Clunky, Casual, Old-Fashioned Way
- Menubars the Slick, Sophisticated, New-Fashioned Way
- The Win32 System Menu Item
- Classical Menubars
- Menubutton Options
- Button-Only Options
- Popup Menus
- The post and Post Methods
- The Popup Method
- Popup examples
- Option Menus
- Tk::Optionmenu
- A Native Option Menu
- Menu Virtual Events
- Pie Menus
- Fitts' Law
- Miscellaneous Perl/Tk Methods
- Managing Widgets with configure and cget
- The configure Method
- The cget Method
- Building a Family Tree
- Widget's Children
- Name of a Widget
- Parent of a Widget
- The Widget's Toplevel
- Widget's Manager
- The Widget's class
- Widget's ID
- Widget's PathName From Its X11 ID
- Color-Related Methods
- Is the Colormap Full?
- Cell Count
- Color Depth
- Translate to RGB Value
- Setting Colors
- Predefined Color Scheme
- The Application's Name
- Widget Existence
- Is the Widget Mapped?
- Converting Screen Distances
- Size of Widget
- Widget's Geometry
- Requested Height
- Requested Width
- Actual Width
- Actual Height
- Widget Position
- Position Relative to the Root Window
- Coordinates Relative to the Parent
- Coordinates Relative to the Root Window
- Virtual Desktop Coordinates
- Cursor Coordinates Relative to the Desktop
- Screen Information
- Screen Name
- Screen Height and Width
- Cell Count
- Screen Depth
- Color Type
- Server Type
- Is the Widget Viewable?
- Atom Methods
- Ringing a Bell
- Clipboard and Selection Methods
- Clipboard Methods
- Selection Methods
- Clearing the selection
- Getting the selection
- Assigning a callback
- Determining the owner
- Setting the owner
- Exporting the Selection to the Outside World
- Destroying a Widget
- Focus Methods
- Keyboard Traversal
- Tabbing between widgets
- Default widget bindings
- Menu Traversal
- Grab Methods
- Marking a Widget Busy and Unbusy
- Widget Mapping and Layering
- Interapplication Communication
- Waiting for Events to Happen
- File Events
- Time Delays
- Parsing Command-Line Options
- Really Miscellaneous Methods
- Creating Custom Widgets in Pure Perl/Tk
- A Mega-Widget Quick-Start
- The Perl/Tk Class Hierarchy
- Mega-Widget Implementation Details
- Tk::Widget::new, the Real Perl/Tk Widget Constructor
- Subroutine ClassInit
- Subroutine CreateArgs
- Subroutine SetBindtags
- Subroutine Populate
- Subroutine ConfigSpecs
- ConfigSpecs Examples
- Subroutine Delegates
- Other Useful Methods
- Subroutine Advertise
- Subroutine Callback
- Subroutine Component
- Subroutine Descendants
- Subroutine Subwidget
- Subroutine Walk
- Mega-Widget Instance Variables
- Composite Mega-Widgets
- Tk::Thermometer
- Derived Mega-Widgets
- Tk::NavListbox
- Tk::CanvasPlot
- Tk::LCD
- Packaging a Mega-Widget for Public Distribution
- Packaging for CPAN
- Packaging for PPM
- Anatomy of the MainLoop
- Creating a Callback
- Callbacks and Closures
- Binding to Events
- Event Descriptor Syntax
- Event descriptor modifiers
- Event descriptor types
- The Event Structure
- The exporter tag :variables
- Event information methods
- Widget Class Bindings
- Widget Instance Bindings
- Binding to a MouseWheel Event
- Canvas Bindings
- The bindtags Command
- How Might We Use bindtags?
- bindDump-Dump Lots of Binding Information
- Executing Nonblocking System Commands
- fileevent Syntax
- Tk::ExecuteCommand
- An MPG Player-tkmpg123
- Tracing Perl/Tk Variables
- Tie::Watch
- Nonblocking Wait Activities
- Tk::waitVariableX
- Splash Screens
- Tk::Splashscreen
- Synthesizing Virtual Events
- Coexisting with Other GUI Main Loops
- Embedding OpenGL in a Perl/Tk Window
- Flying the Enterprise
- User Customization
- Using the Command Line
- Colors, Fonts, and Titles
- Initial MainWindow Placement
- Choosing a Display
- Option Database Lookups
- Synchronizing Window Messages
- Using the Option Database
- Manipulating Resources with option* Methods
- Manipulating Resources with Tk::CmdLine Subroutines
- Images and Animations
- An Overview of Perl/Tk Image Types
- Methods Common to All Image Types
- Bitmap Primitives
- DefineBitmap
- The Bitmap Image Type
- Cool Tricks with an Empty Bitmap
- An invisible cursor
- Filling a transparent Canvas item
- The Pixmap Image Type
- The Photo Image Type
- Creating a Color Palette with the put Method
- Using put to Create a Progress Bar with a 3D Look
- Capturing a Window with Tk::WinPhoto
- What you see is not always what you get
- Tk::Thumbnail
- 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
- Display Items
- Item Styles
- Item Style Methods
- The TList Widget
- TList Indexes and Methods
- The HList Family of Widgets
- Using Indicators with HList
- HList Methods
- The Tree Widget
- Tree Methods
- The DirTree Widget
- Adding a Directory
- Tix Images
- Interprocess Communication with Pipes and Sockets
- Handling Unsolicited Media Changes
- The Media Change Client, mediachangec
- The Media Change Server, mediachanged
- IPADM Design Considerations
- The Perl/Tk IPADM Client, ipadm
- Creating the Hypertext User Interface
- The Subnet Widget Edits a Subnet Description
- Starting the IPADM Helper Task
- fileevent Keeps ipadm Happy
- The IPADM Helper, ipadmh
- The IPADM Daemon, ipadmd
- The Forking Server
- IPADM Message Handling
- Locking an SDB File
- Updating the DHCP and DNS Configuration Files
- What About Security?
- Polling Win32 Sockets
- IPC with send
- Security and Inter-Language Considerations
- Application Names
- Tk::Receive
- Computing p with Parallel Message Passing
- The Message Passing Protocol
- Tcl/Tk Slave Processor Code
- Tcl/Tk Master Processor Code
- TclRobots
- TclRobots.pm, the Perl Interface to TclRobots
- Tk::Receive handles tclrobots to Perl communications
- The RCP API handles Perl to tclrobots communications
- Robot Control Programs
- C Widget Internals
- The Tk::Square Widget
- Tcl/Tk Example
- Overview of the Perl/Tk Distribution
- Layout of a Typical C Widget
- Tk::Square instance structure
- Tk::Square configuration specifications
- Tk::Square instance constructor
- Tk::Square method processors
- Tk::Square option configurator
- Tk::Square event handler
- Tk::Square drawing handler
- Tk::Square destructor
- Interfacing tkSquare.c with Perl/Tk
- Makefile.PL
- Square.xs
- Square.pm
- pTk/Makefile.PL
- Building and Testing Tk::Square
- t/square_demo.t
- How Not to Port Tk::Square
- Perl/Tk and the Web
- Library for WWW Access in Perl
- LWP::Simple, the Easiest Way to the Web
- Fetching Web Content with LWP::UserAgent
- lwp-request and fileevent Rule
- The Recipe for Displaying Web Images
- Win32 Considerations
- fork and local Win32 sockets
- fork and LWP::UserAgent
- Win32::Process and shared memory
- Tidying an Ugly Mess
- The PerlPlus Browser Plug-in
- Embedding Perl/Tk in Other Windows
- Embedded Versus Full-Screen Mode
- How You Can Contribute to the PerlPlus Plug-in Project
- Plethora of pTk Potpourri
- pTk Special Variables and Exporter Symbols
- Global Variables
- Symbols Exported by Default
- Optionally Exported Symbols
- Exporter Tags
- Manipulating the Cursor
- Creating Your Own Custom Cursor Shape
- Dialog Boxes
- The Dialog Widget
- The messageBox Method
- The DialogBox Widget
- Using ErrorDialog
- chooseColor Dialog
- getOpenFile and getSaveFile Dialogs
- The Adjuster Widget
- The Balloon Widget
- The BrowseEntry Widget
- The LabFrame Widget
- LabFrame Options
- The NoteBook Widget
- Creating Pages
- WordCount Example Using a NoteBook
- NoteBook Limitations
- The Pane Widget
- Pane Options
- The ProgressBar Widget
- ProgressBar Options
- Widgets Not in the Perl/Tk Distribution
- Installing Perl/Tk
- Installing Perl/Tk for Unix
- Installing Perl/Tk for Win32
- 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
- Tk::CollapsableFrame
- Tk::MacCopy
- Tk::ExecuteCommand
- Proc::Killfam
- tkmpg123
- Tk::Trace
- tkhp16c
- Tk::MacProgressBar
- TclRobots.pm
- Robot Control Program complex.ptr
- clock-bezier.ppl
- tkhanoi.ppl
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.