home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / apps / InterfaceBuilder.h next >
Text File  |  1992-07-09  |  5KB  |  230 lines

  1. /* InterfaceBuilder - InterfaceBuilder.h - Jean-Marie Hullot - (c) 1991 NeXT Computer Inc. */
  2.  
  3. #import <appkit/appkit.h>
  4. @class Sound;
  5.  
  6. // InterfaceBuilder Pasteboard types
  7.  
  8. extern NXAtom IBObjectPboardType;
  9. extern NXAtom IBCellPboardType;
  10. extern NXAtom IBMenuPboardType;
  11. extern NXAtom IBMenuCellPboardType;
  12. extern NXAtom IBViewPboardType;
  13. extern NXAtom IBWindowPboardType;
  14.  
  15. @protocol IB
  16.  
  17. - activeDocument;
  18. - selectionOwner;
  19.  
  20. /* The following might be useful when implementing your own ConnectInspector */
  21.  
  22. - connectSource;
  23. - connectDestination;
  24. - (BOOL)isConnecting;
  25. - stopConnecting;
  26. - displayConnectionBetween:source and:dest;
  27.  
  28. /* Test Mode */
  29.  
  30. - (BOOL)isTestingInterface;
  31.  
  32. /* Document Controllers registration */
  33.  
  34. - registerDocumentController:aController;
  35. - unregisterDocumentController:aController;
  36.  
  37. /* Updater */
  38.  
  39. - disableUpdate;
  40. /* Not supported as public API in Release 3 */
  41. - reenableUpdate;
  42. /* Not supported as public API in Release 3 */
  43.  
  44. @end
  45.  
  46. @protocol IBDocumentControllers
  47. - willSaveDocument:aDocument;
  48. - didSaveDocument:aDocument;
  49. - didOpenDocument:aDocument;
  50. @end
  51.  
  52. @protocol IBSelectionOwners
  53. - (unsigned)selectionCount; 
  54. - getSelectionInto:(List *)objectList;
  55. - redrawSelection;
  56. @end
  57.  
  58. @protocol IBDocuments
  59.  
  60. - touch;
  61. - getDocumentPathIn:(char *)thePath;
  62.  
  63. - (BOOL)objectIsMember:object; 
  64.  
  65.  
  66. - getObjects:(List *)objects;
  67. - getParentForObject:object;
  68.  
  69. - copyObject:anObject type:(NXAtom)type inPasteboard:(Pasteboard *)aPasteboard;
  70. - copyObjects:(List *)objectList type:(NXAtom)type inPasteboard:(Pasteboard *)aPasteboard;
  71. - (List *)pasteType:(NXAtom)type fromPasteboard:(Pasteboard *)aPasteboard parent:aParent;
  72.  
  73. - attachObject:object to:parent;
  74. - attachObjects:(List *)objectList to:parent;
  75.  
  76. - deleteObject:anObject;
  77. - deleteObjects:(List *)objectList;
  78.  
  79. - (BOOL) setName:(const char *)aName for:anObject;
  80. - getNameIn:(char *)name for:object;
  81.  
  82.  
  83. - addConnector:aConnector;
  84. - removeConnector:aConnector;
  85. - listConnectors:(List *)aList forSource:aSource;
  86. - listConnectors:(List *)aList forDestination:aDest;
  87. - listConnectors:(List *)aList forSource:aSource filterClass:filterClass;
  88. - listConnectors:(List *)aList forDestination:aDest filterClass:filterClass;
  89.  
  90. - setSelectionFrom:anEditor;
  91. - editorDidClose:anEditor for:anObject;
  92.  
  93. - openEditorFor:anObject;
  94. - getEditor:(BOOL)createIt for:anObject;
  95.  
  96. - redrawObject:anObject;
  97.  
  98. @end
  99.  
  100. @protVH IBConnectors
  101.  
  102. - free;
  103. - write:(NXTypedStream *) s;
  104. - read:(NXTypedStream *) s;
  105.  
  106. - source;
  107. - destination;
  108. - renewObject:old to:new;
  109. - nibInstantiate;
  110. - establishConnection;
  111.  
  112. @end
  113.  
  114. @protocol IBEditors <IBSelectionOwners>
  115.  
  116. - initWith:anObject inDocument:aDocument;
  117. - document;
  118. - editedObject;
  119. - window;
  120. - (BOOL) wantsSelection;
  121. - selectObjects:(List *)objectList;
  122. - close;
  123. - openSubeditorFor:anObject;
  124. - closeSubeditors;
  125. - resetObject:anObject;
  126.  
  127. - orderFront;
  128. - (BOOL)activate;
  129. - makeSelectionVisible:(BOOL)showIt;
  130.  
  131. - (NXAtom)acceptsTypeFrom:(const NXAtom *)typeList;
  132. - (BOOL)copySelection;
  133. - (BOOL)deleteSelection;
  134. - (BOOL)pasteInSelection;
  135.  
  136.  
  137. @end
  138.  
  139. @interface Object (IBObject)
  140.  
  141. - (const char *)getInspectorClassName;
  142. - (const char *)getConnectInspectorClassName;
  143. - (const char *)getSizeInspectorClassName;
  144. - (const char *)getHelpInspectorClassName;
  145.  
  146. - (const char *)getEditorClassName;
  147.  
  148. - (NXImage *)getIBImage;
  149.  
  150. @end
  151.  
  152. @interface View (IBView)
  153.  
  154. #define IB_BOTTOMLEFT    0
  155. #define IB_MIDDLELEFT     1
  156. #define IB_TOPLEFT     2
  157. #define IB_MIDDLETOP    3
  158. #define IB_TOPRIGHT    4
  159. #define IB_MIDDLERIGHT    5
  160. #define IB_BOTTOMRIGHT    6
  161. #define IB_MIDDLEBOTTOM    7
  162.  
  163. - getMinSize:(NXSize *)minSize maxSize:(NXSize *)maxSize from:(int)where;
  164. - placeView:(NXRect *)frameRect;
  165.     // default is setFrame:
  166. @end
  167.  
  168. @protocol IBInspectors
  169. - (BOOL)wantsButtons;
  170.     /* Required */
  171.     /* whether the inspector wants ok & revert buttons or not */
  172.  
  173. - revert:sender;
  174.     /* Required */
  175.     /* This is the main point of functionality: this method is called when the inspector is activited; must call [super revert:sender] */
  176.     
  177. - ok:sender;
  178.     /* Required */
  179.     /* must call [super ok:sender] */
  180. @end
  181.  
  182. @interface IBInspector:Object <IBInspectors> {
  183.     id        object;
  184.     id        window;
  185.     id        driver;        // private!
  186.     id        okButton;
  187.     id        revertButton;
  188. }
  189.  
  190. - object;
  191. - window;
  192.  
  193. - touch:sender;
  194.     
  195. - textDidChange:sender;
  196.  
  197. - updateFor:(int)changeMask; 
  198. /* Not supported as public API in Release 3 */ 
  199.  
  200. @end
  201.  
  202. @interface IBPalette:Object {
  203.     id        paletteDocument;
  204.     id        originalWindow;
  205.     id        paletteView;
  206.     id        draggedView;
  207.     id        paletteInfo;    // private
  208. }
  209.  
  210. - paletteDocument;
  211. - originalWindow;
  212. - paletteView;
  213. /* Not supported as public API in Release 3 */
  214. - draggedView;
  215. /* Not supported as public API in Release 3 */
  216.  
  217. - finishInstantiate;
  218. - associateObject:object type:(NXAtom)typeVIh:aView;
  219.  
  220. - declareTypesFor:aView inPasteboard:(Pasteboard *)aPasteboard;
  221. /* Not supported as public API in Release 3 */
  222. - pasteboard:aPasteboard provideData:(NXAtom)type;
  223. /* Not supported as public API in Release 3 */
  224.  
  225. - findImageNamed:(const char *)name;
  226.  
  227. @end
  228.  
  229.  
  230.