home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / Developer Documentation / Recipes, Tech Notes & Articles / Tech Notes / Utilities Documentation / Window Utilities < prev   
Encoding:
Text File  |  1995-11-07  |  2.2 KB  |  73 lines  |  [TEXT/ttxt]

  1. OpenDocâ„¢ Utilities Documentation
  2.  
  3.  
  4. Window Utilities
  5. by The OpenDoc Design Team
  6.  
  7. © 1993-1995  Apple Computer, Inc. All Rights Reserved.
  8. Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
  9. Mac and OpenDoc are trademarks of Apple Computer, Inc.
  10.  
  11.  
  12. Introduction
  13.  
  14. When a saved document is opened, OpenDoc retrieves the root frame of each saved window,  and calls the Open() method of the part belonging to that frame, passing it the frame. The part is responsible for recreating the platform window and creating an ODWindow using the RegisterWindowForFrame method.
  15.  
  16. The properties of the window are saved in a storage unit referenced from the root frame.  The utility functions BeginGetWindowProperties and EndGetWindowProperties can be used to retrieve these properties without using the Storage API directly.
  17.  
  18. Window Properties
  19.  
  20. The root frame of a saved window has the following persistent property:
  21.  
  22. Property                Type
  23.  
  24. kODPropWindowProperties        kODStrongStorageUnitRef
  25.  
  26. This window properties storage unit has the following properties:
  27.  
  28. kODPropWindowRect            kODRect
  29. kODPropWindowTitle            kODMacIText
  30. kODPropWindowProcID        kODSShort
  31. kODPropWindowIsVisible        kODBoolean
  32. kODPropWindowHasCloseBox        kODBoolean
  33. kODPropShouldShowLinks        kODBoolean
  34. kODPropWindowRefCon        kODSLong
  35. kODPropWindowIsResizable        kODBoolean
  36. kODPropWindowIsFloating        kODBoolean
  37. kODPropWindowIsRootWindow    kODBoolean
  38. kODPropSourceFrame            kODStrongStorageUnitRef
  39.  
  40.  
  41. Utility Functions
  42.  
  43. BeginGetWindowProperties
  44. EndGetWindowProperties
  45.  
  46. ODBoolean BeginGetWindowProperties(Environment* ev, ODFrame* frame, WindowProperties* properties);
  47. void EndGetWindowProperties(Environment* ev, WindowProperties* properties);
  48.  
  49. BeginGetWindowProperties retrieves the window properties from the specified root frame, and returns kODTrue if the properties were present. The properties are returned in the following struct:
  50.  
  51.  
  52. struct WindowProperties
  53. {
  54.     Rect boundsRect;
  55.     Str255 title;
  56.     ODSShort  procID;
  57.     ODBoolean hasCloseBox;
  58.     ODSLong   refCon;
  59.     ODBoolean wasVisible;
  60.     ODBoolean isResizable;
  61.     ODBoolean isFloating;
  62.     ODBoolean isRootWindow;
  63.     ODBoolean shouldShowLinks;
  64.     ODFrame*  sourceFrame;
  65. };
  66.  
  67. EndGetWindowProperties releases the source frame.
  68.  
  69.  
  70.  
  71.  
  72.  
  73.