Справочник Пользователя для Adobe acrobat 7.0.5 sdk

Скачать
Страница из 122
63
Modifying the User Interface
Using the Adobe Dialog Manager (ADM)
6
can be used to define the layout of the user interface objects. All objects have properties 
and events that determine their default behavior and allow them to be modified or 
extended. These can also be set in code or using a resource.
ADM has an object-oriented design even though its interfaces are exported as procedural C 
functions. This is important since many of the properties, behaviors, and callback functions 
of the various types of ADM user interface objects (dialogs or dialog items) are the same. 
Understanding the fundamentals of managing one type of ADM user interface object 
results in understanding how to manipulate other ADM objects as well. 
Some ADM objects require additional support functions or properties. A window object, for 
instance, has functions to perform operations such as setting the minimum and maximum 
window size. ADM edit text items have additional functions to support properties such as 
justification and numeric precision.
Using ADM from Acrobat JavaScript
Acrobat JavaScript provides a convenient interface to ADM through which you may 
implement modal dialogs containing list objects and other controls normally included in 
graphical user interfaces. 
The 
app
 object’s 
execDialog
 
method is the Acrobat JavaScript method used to execute 
ADM dialogs. The method requires a single parameter: an object literal known as a dialog 
descriptor
, which contains properties and method handlers for all the dialog elements. 
For more information, see the Acrobat JavaScript Scripting Guide.
Using the ADM API from a Plug-in
Acrobat exposes ADM functionality to plug-in developers. This allows developers to use a 
single code base to implement dialog behavior on both Macintosh and Windows. 
N
O T E
:
You do not have to write platform-specific code to support Macintosh and Windows. 
However, it is still necessary to create platform-specific dialog resources using the 
appropriate tools on each platform.
The Acrobat SDK provides header files to simpify the use of ADM. In addition, several 
samples and snippets in the Acrobat SDK illustrate the use of ADM.
ADM contains a series of suites, each of which implements different functionality. Each 
suite has its own header file that declares its functions, data types, constants, and so on.
For more informaton, see the Adobe Dialog Manager Programmer’s Guide and Reference.
Macintosh Issues
Carbon is a set of programming interfaces that can be used to build Mac OS X applications 
that also run on Mac OS 8 and 9 (versions 8.1 and later). It includes a set of header files and 
a library called CarbonLib. These interfaces include most of the functions commonly used 
by Macintosh developers. By developing with these interfaces and linking with CarbonLib