home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22149 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.1 KB

  1. Path: sparky!uunet!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
  2. From: nerm@apple.com (Dean Yu)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Saving window position
  5. Message-ID: <nerm-250193114535@17.202.128.133>
  6. Date: 25 Jan 93 19:46:26 GMT
  7. References: <1993Jan25.140957.24643@ghost.dsi.unimi.it>
  8. Sender: news@gallant.apple.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: Apple Computer, Inc.
  11. Lines: 40
  12.  
  13. In article <1993Jan25.140957.24643@ghost.dsi.unimi.it>,
  14. piovanel@ghost.dsi.unimi.it (marco piovanelli) wrote:
  15. > I've decided to implement automatic saving of window positions in my
  16. > application.  I've tried to cling as closely as possible to the
  17. > guidelines expounded in IM VI (User Interface Guidelines).
  18. > However some points remain obscure:
  19. > 1. IM VI says that if the user opens a document, moves its window around
  20. >    and then closes the document without making any changes, my app is
  21. >    supposed to save the new window position without asking anything and
  22. >    without CHANGING THE FILE'S MODIFICATION DATE.
  23. >    I implement this with by doing a PBGetCatInfoSync() when I open
  24. >    the document file and a PBSetCatInfoSync() after I modify and close it.
  25. >    Is this the recommended way?  Is there an easier way?
  26.  
  27.   Well, you could always use GetDateTime()/SetDateTime()...  JUST KIDDING!
  28.  
  29. > 2. When a document is opened, I check to see if the saved window
  30. >    position makes sense for the current monitor(s).  I have a function
  31. >    declared as follows:
  32. >    FUNCTION WindowInDesktop(VAR windowFrame: Rect): Boolean;
  33. >    The function returns TRUE if windowFrame is COMPLETELY ENCLOSED
  34. >    in the Gray Region.  But other applications (e.g. the Finder and
  35. >    StuffIt Lite) restore the window position even if the window frame
  36. >    is mostly offscreen.  What is the correct algorithm?
  37. > Thank you in advance for any suggestion.
  38. >                     -- marco
  39.  
  40.   The currently favored method is if the user can still get to the title
  41. bar from where the window currently is, leave it alone.
  42.  
  43. -- Dean Yu
  44.    Blue Meanie, Negative Ethnic Role Model, etc.
  45.    Apple Computer, Inc.
  46.