home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Inspectors / InspectMe / InspectorManager.h < prev    next >
Encoding:
Text File  |  1992-07-31  |  2.4 KB  |  84 lines

  1. // InspectorManager.h
  2. // By Kevin Brain (ksbrain@zeus.UWaterloo.ca)
  3.  
  4. // A class that manages the displaying of elements of a list of view 
  5. // objects that are periodically displayed and removed from a window.
  6.  
  7. // Compositing techniques and functions from ToolInspector example
  8. // by Sharon Biocca Zakhour, NeXT Developer Support Team
  9. // You may freely copy, distribute and reuse the code in this example.  
  10. // *Everybody involved* disclaims any warranty of any kind, expressed 
  11. // or implied, as to its fitness for any particular use.
  12.  
  13. #import <objc/Object.h>
  14. #import <appkit/graphics.h>
  15.  
  16. /* Inspector Type */
  17. #define MESSAGE 0
  18.  
  19. #define FIRSTADDEDINSPECTOR 1
  20. #define LOWERLEFTX 10
  21. #define LOWERLEFTY 10
  22.  
  23. @interface InspectorManager:Object
  24. {
  25.     id    inspectorPanel;
  26.     id    messagePanel;
  27.     id    inspectorStrings;
  28.     id     messageTextField;
  29.     id    messageBox;
  30.     id    delegate;
  31.     id    revertOKOut;
  32.     id    popupOut;        // attaches to button that covers popup list
  33.     id    inspectorList;
  34.     id    groupList;
  35.     id    visibleInspectors;    /* Storage of visible inspector numbers */
  36.     NXRect    lastRect;
  37.     BOOL useKeyEquivalents;
  38.     struct inspectorListEntry {    // list of inspector info
  39.         id    view;                // the box composing the inspector
  40.         id    cacheWindow;        // offscreen window that caches the view
  41.         char *title;            // pointer to inspector title
  42.         BOOL showing;            // YES if showing in the panel
  43.         BOOL cached;            // YES if the view is cached
  44.         NXRect offscreenRect;    // rect in layout view for compositing
  45.         };    
  46. }    
  47.  
  48.  
  49. /* instance methods */
  50. - init;
  51. - (unsigned int)addInspector:(id)theView title:(const char *)theTitle;
  52. - (unsigned int)addInspector:(id)theView title:(const char *)theTitle 
  53.     atLocation:(NXCoord)xLoc :(NXCoord)yLoc
  54.     cached:(BOOL)isCached cacheWindow:(id)theCacheWindow;
  55. - (unsigned int)addGroup:(const char *)theTitle;
  56. - setUseKeyEquivalents:(BOOL)use;
  57. - switchToInspector:(unsigned int)newInspectorNum;
  58. - showInspector:(unsigned int)inspectorNum;
  59. - hideInspector:(unsigned int)inspectorNum;
  60. - (BOOL)showing:(unsigned int)inspectorNum;
  61. - (int)group;
  62. - showMessage:(const char *)theMessage;
  63. - messageTextField;
  64. - panel;
  65. - popUpListButton;
  66. - revertOKMatrix;
  67. - setDelegate:(id)anObject;
  68. - delegate;
  69. - selectGroup:sender;
  70. - revertPressed:sender;
  71. - okPressed:sender;
  72. - showRevertOK;
  73. - hideRevertOK;
  74. - showGroupPopUp;
  75. - hideGroupPopUp;
  76. @end
  77.  
  78. @interface Object(InspectorManagerDelegate)
  79. - groupChanged:sender to:(int)newGroup;
  80. - inspectRevert:sender;
  81. - inspectOK:sender;
  82. @end
  83.  
  84.