home *** CD-ROM | disk | FTP | other *** search
- /*
- #
- # Apple Macintosh Developer Technical Support
- #
- # ModalList : Simple Modal Dialog and List Manager Sample Application
- #
- # ModalListInit.c - Initialization Segment
- #
- # Copyright © 1989 Apple Computer, Inc.
- # All rights reserved.
- #
- # Versions:
- # 1.00 10/89
- # 1.01 06/92
- #
- # Components:
- # ModalList.make October 1, 1989
- # ModalList.h October 1, 1989
- # ModalList.c October 1, 1989
- # ModalListInit.c June 12, 1992
- # ModalList.r October 1, 1989
- # TCModalList.π June 12, 1992
- # TCModalList.π.rsrc June 12, 1992
- #
- # ModalList is an example application that demonstrates
- # how to use the Dialog Manager and List Manager routines
- # together. It is not a good example of a sample application
- # but a great example of the use of lists in a dialog. The
- # default LDEF is used to display a 2 dimensional list of strings.
- # Each cell's string is initialized to represent it's position in the
- # list. The user can change these strings and search for a particular
- # setting. Once again this is not meant as an example application and
- # there are some features that are documented in the source listing
- # that you should pay close attention to inorder to understand how
- # this example works.
- #
- */
-
- #pragma segment Initialize
-
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Dialogs.h>
- #include <Windows.h>
- #include <TextEdit.h>
- #include <Memory.h>
- #include <OSUtils.h>
- #include <Packages.h>
- #include <SegLoad.h>
- #include "ModalList.h"
-
-
- void Initialize(void)
- {
- auto EventRecord event;
- auto short count;
- auto SysEnvRec mac;
-
- InitGraf((Ptr) &qd.thePort);
- InitFonts();
- InitWindows();
- TEInit();
- InitDialogs(nil);
- InitCursor();
-
- for (count = 1; count <= 3; count++)
- EventAvail(everyEvent, &event);
-
- /* Make sure that the machine has at least 128K ROMs which includes the List Manager.
- ** If it doesn't, exit.
- */
- SysEnvirons(cSysEnvironsVersion, &mac);
- if (mac.machineType < 0)
- ExitToShell();
- }
-
-