home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / UI / WinUtilM.h < prev   
Encoding:
C/C++ Source or Header  |  1996-04-22  |  2.9 KB  |  108 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        WinUtilM.h
  3.  
  4.     Contains:    Macintosh window utility functions and classes
  5.  
  6.     Owned by:    Richard Rodseth
  7.  
  8.     Copyright:    © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>     6/28/95    RR        1242642 BB Mostly ref counting. Added
  13.                                     WindowLink::ShouldRemove
  14.          <4>     6/22/95    RR        #1245283 Undoable frame deletion
  15.                                     #1209427 Changed private api between
  16.                                     iterator and iteratee. Allow deletion while
  17.                                     iterating. Added fRemove flag to WindowLink
  18.          <3>     5/25/95    jpa        List.h --> LinkList.h. Removed
  19.                                     GetNextWindow, which is now in Toolbox
  20.                                     <Windows.h> [1253324, 1241078]
  21.          <2>     4/14/95    TÇ        With RR & CG: #1194507 DR/BB:title bar of a
  22.                                     draft window doesn't reveal it is a draft
  23.                                     or which draft it is.  Added
  24.                                     GetDraftNumFromDraft.
  25.          <1>     6/16/94    RR        first checked in
  26.  
  27.     To Do:
  28.     In Progress:
  29.         
  30. */
  31.  
  32. #ifndef _WINUTILM_
  33. #define _WINUTILM_
  34.  
  35. #ifndef _LINKLIST_
  36. #include <LinkList.h>
  37. #endif
  38.  
  39. #ifndef _ODTYPES_
  40. #include "ODTypes.h"
  41. #endif
  42.  
  43. //==============================================================================
  44. // Classes used by this interface
  45. //==============================================================================
  46.  
  47. class ODWindow;
  48.  
  49. //==============================================================================
  50. // Function Prototypes
  51. //==============================================================================
  52.  
  53. WindowPtr GetWindowList();
  54. void SetWindowList(WindowPtr theWindow);
  55. //WindowPtr GetNextWindow(WindowPtr theWindow);
  56. void SetNextWindow(WindowPtr theWindow, WindowPtr nextWindow);
  57. ODBoolean GetWindowHilite(WindowPtr theWindow);
  58. void SetWindowHilite(WindowPtr theWindow, ODBoolean windowHilite);
  59. RgnHandle GetStructureRegion(WindowPtr theWindow);
  60. RgnHandle GetContentRegion(WindowPtr theWindow);
  61. ODBoolean    GetWindowVisible(WindowPtr theWindow);
  62. ODULong GetDraftNumFromDraft(Environment* ev, ODDraft* draft);
  63. //=====================================================================================
  64. // WindowLink
  65. //=====================================================================================
  66.  
  67. class WindowLink : public Link
  68. {
  69.     public:
  70.         WindowLink(ODID windowID, ODWindow* window);    
  71.         ~WindowLink() {}
  72.         
  73.         ODBoolean ShouldRemove();
  74.         
  75.         ODID        fID;
  76.         ODWindow* fWindow;
  77.         ODBoolean fRemove;
  78. };
  79.  
  80. //=====================================================================================
  81. // WindowListIterator - iterates over the Window Manager window list. Iterating from
  82. // back to front using Last/Previous obviously results in several scans of the list,
  83. // as it's a singly-linked list
  84. //=====================================================================================
  85.  
  86.                                                                         
  87. class WindowListIterator
  88. {
  89. public:
  90.     WindowListIterator();
  91.     ~WindowListIterator();
  92.  
  93.     ODBoolean IsNotComplete();                    
  94.  
  95.     WindowPtr First();
  96.  
  97.     WindowPtr Next();
  98.  
  99.     WindowPtr Last();
  100.  
  101.     WindowPtr Previous();
  102.  
  103. private:
  104.     WindowPtr fCurrentWindow;
  105. };
  106.  
  107.  
  108. #endif //_WINUTILM_