home *** CD-ROM | disk | FTP | other *** search
- #include "marquee.h"
-
- void InitManagers(void);
-
- main()
- {
- Rect r;
- WindowPtr w;
- EventRecord e;
- Str255 s1 = "\pThis string is too long",
- s2 = "\pThis string is also long";
-
- InitManagers();
- MarqueeInit();
- SetRect(&r, 40, 40, 240, 190);
- w = NewWindow(NIL, &r, "\pMarquee Display", true, rDocProc, -1, false, 0);
- SetPort(w);
- TextFont(newYork);
- MoveTo(100, 30);
- MarqueeDisplay(s1, 80);
- MoveTo(100, 60);
- MarqueeDisplay(s2, 80);
- while ( ! GetNextEvent(mDownMask,&e) )
- MarqueeIdle();
- }
-
- void InitManagers(void)
- {
- InitGraf (&thePort);
- InitFonts ();
- InitWindows ();
- InitMenus ();
- TEInit ();
- InitDialogs (NIL);
- FlushEvents (everyEvent, 0);
- InitCursor();
- }