![](indexg.gif)
Pad++ Programmer's Guide
PadDRAW SAMPLE APPLICATION
Pad++ comes with a sample application called PadDraw. It is written entirely in Tcl and allows interactive creation of multiscale items and navigation within the Pad++ dataspace. It includes several demos including a dynamic tree-based Web browser and several lenses. PadDraw supplies basic drawing and zooming capabilities with lenses and semantic zooming that will allow you to create mockups of an application or visualization without any programming to motivate futher development.
PadDraw is contained in the draw subdirectory of the Pad++ distribution. It is intended to be both a user level sample application for experimenting with the Pad++ widget and a model for the developer of new Pad++ applications.
There are several files that may be useful to the application programmer. In particular:
- events.tcl Contains all the event-handler code that can be used for creating panning and zooming behavior.
- misc.tcl Contains many utility procedures used by the rest of PadDraw that may be useful.
- draw.tcl Contains the code that makes the Drawing Tools palette.
- debugevent.tcl Contains the code that makes the GUI event debugger.
When PadDraw starts up, several different kinds of files are loaded that control the look of PadDraw, as well as defining more specific things. Some of these files come with the Pad++ distribution, and some are available for individual customization. They are loaded after the Pad++ System file ~/.padinit, in the following order:
- padrc - Distribution file: Contains X resource file. Specifies default colors, sizes, and fonts for system in standard X resource file format.
- ~/.padrc - Customization file: Put your own changes to the X resource file here. They will override any definitions in the padrc file.
- paddefaults - Distribution file: Contains Tcl code. Specifies defaults for the PadDraw application, including colors.
- ~/.padsetup - Program generated file: Do Not Modify! This is used to store information about the setup of PadDraw between runs. For instance, the visibility and geometry of windows are stored here.
- ~/.paddefaults - Customization file: Put your own changes to the paddefaults here. They will override any definitions in the paddefaults file. For example, you could redefine the color palette, or the default font size of HTML pages here.
Pad++ Programmer's Guide - 10 JUN 1996
![](indexg.gif)
Generated with Harlequin WebMaker
Web Accessibility