Pages

Macintosh (Continues…)


InsideMacintosh, Volume I, page I-10
   
“Theroutines available for use in Macintosh programs are divided according tofunction, into what are in most cases called “managers” of the feature theysupport. … Most are part of either the Operating System or the User InterfaceToolbox and are in the Macintosh ROM.
    
“TheOperating System is at the lowest level; it does basic tasks such asinput and putput, memory management, and interrupt handling. The UserInterface Toolbox is a level above the Operating System; it helps youimplement the standard Macintosh user interface in your application. TheToolbox calls the Operating System to do low-level operations. …
    
“RAM-basedsoftware is available as well. In most cases this software performs specializedoperations (such as floating-point arithmetic) that aren’t integral to the userinterface but may be useful to some applications.” —Inside Macintosh,Volume I, page I-9
    
“TheMacintosh User Interface Toolbox provides a simple means of constructingapplication programs that conform to the standard Macintosh user interface. Byoffering a common set of routines that every application calls to implement theuser interface, the Toolbox not only ensures familiarity and consistency forthe user but also helps reduce the application’s code size and developmenttime. At the same time, it allows a great deal of flexibility: An applicationcan use its own code instead of a Toolbox call wherever appropriate, and candefine its own types of windows, menus, controls, and desk accessories.

“Figure 2 [below] shows the various parts of the Toolbox in rough order oftheir relative level. There are many interconnections between these parts; thehigher ones often call those at the lower levels.” —Inside Macintosh,Volume I, page I-9

  

    







   



   

   
“Tokeep the data of an application separate from its code, making the data easierto modify and easier to share among applications, the [Macintosh UserInterface] Toolbox includes the Resource Manager. The Resource Managerlets you, for example, store menus separetly from your code so that they can beedited or translated without requiring recompilation of the code. It alsoallows you to get standard data, such as the I-beam pointer for inserting text,from a shared system file. When you call other parts of the Toolbox that needaccess to the data, they call the Resource Manager. Although most applicationsnever need to call the Resource Manager directly, an understanding of theconcepts behind it is essential because they’re basic to so many otheroperations.” —Inside Macintosh, Volume I, page I-9

“Graphicsare an important part of every Macintosh application. All graphic operations onthe Macintosh are performed by QuickDraw. To draw something on thescreen, you’ll often call one of the other parts of the [Macintosh UserInterface] Toolbox, but it will in turn call QuickDraw. You’ll also callQuickDraw directly, usually to draw inside a window, or just to set upconstructs like rectangles that you’ll need when making other Toolbox calls.QuickDraw’s underlying concepts, like those of the Resource Manager, areimportant for you to understand.” —Inside Macintosh, Volume I, page I-11



Macintosh (Continues….)


“Graphicsinclude text as well as pictures. To draw text, QuickDraw calls the FontManager, which does the background work necessary to make a variety ofcharacter fonts available in various sizes and styles. Unless your applicationincludes a font menu, you need to know only a minimal amount about the FontManager.” —Inside Macintosh, Volume I, page I-11b4b
    
“Anapplication decides what to do from moment to moment by examining input fromthe user in the form of mouse and keyboard actions. It learns of such actionsby repeatedly calling the Toolbox Event Manager (which in turn callsanother, lower-level Event Manager in the Operating System). The Toolbox EventManager also reports occurences within the application that may require aresponse, such as when a window that was overlapped becomes exposed and needsto be redrawn.” —Inside Macintosh, Volume I, page I-11
    
“Allinformation presented by a standard Macintosh application appears in windows.[NOTE: information also can appear in the menu bar and can be audio.] To createwindows, activate them, move them, resize them, or close them, you’ll call the WindowManager It keeps track of overlapping windows, so you can manipulatewindows without concern for how they overlap. For example, the Window Managertells the Toolbox Event Manager when to inform your application that a windowhas to be redrawn. Also, when the user presses the mouse button, you call theWindow Manager to learn which part of which window it was pressed in, orwhether it was pressed in the menu bar or a desk accessory.” —InsideMacintosh, Volume I, page I-11

“Anywindow may contain controls, such as buttons, check boxes, and scroll bars. Youcan create and manipulate controls with the Control Manager. When youlearn from the Window Manager that the user pressed the mouse button inside awindow containing controls, you call the Control Manager to find out whichcontrol it was pressed in, if any.” —Inside Macintosh, Volume I, pageI-11
    
“Acommon place for the user to press the mouse button is, of course, in the menubar. You set up menus in the menu bar by calling the Menu Manager. Whenthe user gives a commadn, either from a menu with the mouse or from theleyboard with the Command key, you call the Menu Manager to find out whichcommand was given.” —Inside Macintosh, Volume I, page I-12
   
“Toaccept text typed by the user and allow the standard editing capabilities,including cutting and pasting text within a document via the Clipboard, yourapplication should call TextEdit. TextEdit also handles basic formattingsych as word wraparound and justification. You can use it just to display textif you like.” —Inside Macintosh, Volume I, page I-12
    
“Whenan application needs more information from the user about a command, itpresents a dialog box. In case of errors or potentially dangerous situations,it alerts the user with a box containing a message or with sound from theMacintosh’s speakers (or both). To create and present dialogs and alerts, andfind out the user’s responses to them, you call the Dialog Manager.” —InsideMacintosh, Volume I, page I-12 
   
“EveryMacintosh application should support the use of desk accessories. The useropens desk accessories through the Apple menu, which you set up by calling theMenu Manager. When you learn that the user has pressed the mouse button in adesk accessory, you pass that information on to the accessory by calling the DeskManager. The Desk Manager also includes routines that you must call toensure that desk accessories work properly.” —Inside Macintosh, VolumeI, page I-11

“Youcan use TextEdit to implement the standard text editing capability of cuttingand pasting via the Clipboard in your application. To allow the use of theClipboard for cutting and pasting text or graphics between your application andanother application or a desk accessory, you need to call the Scrap Manager.”—Inside Macintosh, Volume I, page I-12