home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!apple!apple!mlanett
- From: mlanett@Apple.COM (Mark Lanett)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Creating a floating palette in MacApp
- Message-ID: <70364@apple.Apple.COM>
- Date: 23 Jul 92 04:37:50 GMT
- References: <poon.711840774@roo>
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 32
-
- poon@parc.xerox.com (Alex Poon) writes:
-
- >I want to create a floating palette in MacApp, much like Hypercard's tools
- >window. I'd also like it to be resizable and scrollable. I've created
- >a palette view in MacApp as a subview of TGridView, but the window that
- >it's installed in becomes hidden when another window is activated
- >on top of it. I want the palette window to always be showing, and I don't
- >want any sense of it being activated or deactivated.
-
- MacApp 3: trivial. Just create a window and hit the appropriate check boxes
- in ViewEdit. These will be: window type (WindoidWDEF), Floats, Doesn't Generate
- Actiavtes, Hides on Suspend. Create it like you would any other window and
- Ta-da! it'll float around. Like I said, trivial. Oh yes, you have to call
- InitUFloatWindow() in main().
-
- MacApp 2: harder. 90% of it is done for you, it just that the last 10% is
- non-obvious. First off, there was an unsupported floating window package on
- ETO (there was a year ago when I used it, I can't get to an ETO now to check)
- that you'll need to incorporate. That's the 90% part. You need to specify the
- floating window resource template via Rez, not ViewEdit, because ViewEdit can't
- put out the refCon for the floating window. I had a Rez template with just
- the floater and put all my views in a separate view (created with ViewEdit).
- Creating a window becomes a matter of floater=NewTemplateWindow(...);
- DoCreateViews(floater,...);
-
- It's easier in 3.0, obviously. Also tabbing and other things are handled much
- better. Also there's a snippet doing floaters on the developer CD (also on
- ftp, I guess, but it's down right now), which is, alas, for MacApp 3.0b2.
- --
- /* Well, you wanted a command line interface, you got one, and now you
- can't figure out how to use it without the manual. What were you expecting?
- That's how command line interfaces work. - John Nagle */
-