Important: The information in this document is obsolete and should not be used for new development.
MacApp's Features
A Macintosh application is made up of many components, from menus to windows to documents. The MacApp class library and the sample applications supplied with MacApp make a programmer's job easier by providing a large number of predefined object classes. Your application can use some of these classes as they are defined. For others, you define subclasses that modify and extend the library classes.This chapter provides an overview of MacApp's capabilities. For more information on how MacApp implements a specific feature, see the chapters in Part 1, "MacApp Theory and Architecture." For information on working with MacApp in your application, see the chapters in Part 2, "Working With MacApp."
User Interface
MacApp provides view classes to implement a wide variety of Macintosh user interface items. A view is any instance of a subclass of MacApp'sTView
class. A window class supports standard Macintosh windows, including floating windows and modal or modeless dialog boxes. Window objects are themselves views, and they use other view objects to display data in their content area.Predefined view classes support common control items, such as buttons and checkboxes, and make it easy to define custom controls. Other view classes work with icons, pictures, and patterns. MacApp's views have built-in cursor handling, which can be easily customized, and a variety of scrolling capabilities.
MacApp builds support for the Drag Manager into many view classes. With a minimum of effort on your part, users can drag and drop data between windows and views in your application, and exchange data with other applications that support similar data types.
MacApp provides full support for pull-down, hierarchical, pop-up, and tear-off menus, and provides a numbering system for identifying and responding to user menu command choices.
MacApp dispatches mouse and key events to objects in the application that can respond to user actions. Text-editing classes enhance the Toolbox TextEdit package, adding features such as support for undo of typing, and implementation of Cut, Copy, Clear, and Paste commands for text.
Storing and Printing Data
MacApp's document classes store data on disk and represent data in memory while your application is running. MacApp supports standard document operations, including Open, Close, Save, and Save As. File and file-handler classes help documents interact with the Macintosh File Manager.MacApp's printing capability is implemented by print handlers that cooperate with view objects. MacApp's print handlers fully support standard Macintosh printing, including page setup.
Macintosh Operating System Support
MacApp offers support for many powerful features of the Macintosh Operating System:
- Scripting support helps your application send and respond to Apple events, execute scripts, attach scripts to modify the behavior of objects, and use Apple events to record its actions.
- Drag-and-drop support, based on the Macintosh Drag Manager, lets a user drag and drop data within a view, between views, and between your application and other applications (including the Finder) that support drag and drop of similar data types.
- MacApp's PowerTalk mailer support, based on the Standard Mail Package, lets you add a sophisticated electronic mailer to any window, turning documents into electronic mail.
- MacApp uses the Edition Manager to let your application publish its data or subscribe to data published by another application, providing dynamic data exchange between applications.
Programming Tasks
MacApp supplies many facilities to aid in performing programming tasks common to most applications.
Many of these features are demonstrated in MacApp's sample applications, described in the next section.
- A robust memory management system attempts to always maintain enough free space to carry out essential operations, such as saving a document or quitting the application.
- Command objects perform operations that can be done, undone, and redone by the user. Command objects are capable of sending Apple events to record their actions.
- A failure-handling mechanism provides an efficient way to signal errors and to clean up after an error occurs.
- List classes provide efficient storage and retrieval of items in sorted lists.
- A number of C++ utility classes perform operations such as object comparison, string processing, and processing of point and rectangle data types.
- The MABuild tool automates the process of building an application in the Macintosh Programmer's Workshop (MPW) environment.