Copyright ©1995 by NeXT Computer, Inc.  All Rights Reserved.




Protocols





IB


Adopted By: Interface Builder's subclass of the Application class


Accessing the Document

activeDocument Returns the active document


Accessing the Selection Owner

selectionOwner Returns the editor of the currently selected object


Managing Connections

connectSource Returns the object that's the source of the connection
connectDestination Returns the object that's the destination of the connection
(BOOL)isConnecting Returns YES if connection lines are being displayed
stopConnecting Removes any connection lines from the screen
displayConnectionBetween:source Causes Interface Builder to draw connection lines between
and:destination source and destination


Querying the Mode

(BOOL)isTestingInterface Returns YES if Interface Builder is in Test mode


Registering Controllers

registerDocumentController:aController Adds aController to the list of objects to be notified when documents are opened or saved
unregisterDocumentController:aController Removes aController from the list of document controllers




IBConnectors


Adopted By: Connector objects


Connector Methods

destination Implement to return the object that's the destination of the connection
establishConnection Implement to connect the source and destination objects
free Implement to release the storage for the connector object
nibInstantiate Implement to verify the identities of the connector's source and destination objects
read:(NXTypedStream *)stream Implement to unarchive the connector object from stream
renewObject:old Implement to update a connector by replacing its old
to:new source or destination object with a new object
source Implement to return the object that's the source of the connection
write:(NXTypedStream *)stream Implement to archive the connector object to stream




IBDocuments


Adopted By: Interface Builder's document objects


Managing the Document

touch Marks the document as edited
getDocumentPathIn:(char *)buffer Places the document's path in buffer


Managing the Object Hierarchy

attachObject:anObject Adds anObject to the hierarchy by attaching it to parent
to:parent
attachObjects:(List *)objectList Adds the objects in objectList to the hierarchy by attaching
to:parent them to parent
deleteObject:anObject Removes anObject from the object hierarchy
deleteObjects:(List *)objectList Removes objects in objectList from the object hierarchy
copyObject:anObject Copies anObject to the specified pasteboard
type:(NXAtom)type
inPasteboard:(Pasteboard *)aPasteboard
copyObjects:(List *)objectList Copies the objects in objectList to the specified pasteboard
type:(NXAtom)type
inPasteboard:(Pasteboard *)aPasteboard
(List *)pasteType:(NXAtom)type Alerts the document object that objects were pasted
fromPasteboard:(Pasteboard *)pboard
parent:theParent
(BOOL)objectIsMember:anObject Returns YES if anObject is a part of the object hierarchy
getObjects:(List *)objectList Places the objects from the object hierarchy into objectList
getParentForObject:anObject Returns the object above anObject in the object hierarchy


Setting Object Names

(BOOL)setName:(const char *)name Sets the name associated with the anObject
for:anObject
getNameIn:(char *)name Places the name associated with anObject in the buffer
for:anObject name


Managing Connectors

addConnector:aConnector Adds a connector object to Interface Builder's list
removeConnector:aConnector Removes aConnector from the list of connectors
listConnectors:(List *)aList Places in aList connector objects whose sources
forSource:aSource are aSource
listConnectors:(List *)aList Places in aList connector objects whose destinations
forDestination:aDestination are aDestination
listConnectors:(List *)aList Places in aList the connector objects of class
forSource:aSource filterClass whose sources are aSource
filterClass:filterClass
listConnectors:(List *)aList Places in aList the connector objects of class
forDestination:aDestination filterClass whose destinations are aDestination
filterClass:filterClass


Managing Editors

setSelectionFrom:anEditor Registers anEditor as the editor that owns the selection
editorDidClose:anEditor Informs the document object that anEditor is no longer
for:anObject active
getEditor:(BOOL)createIt Returns the editor object for anObject
for:anObject
(BOOL)openEditorFor:anObject Opens the editor object for anObject


Updating the Display

redrawObject:anObject Redraws the selected object by opening required editors




IBDocumentControllers


Adopted By: Document controller objects


Notification Methods

didOpenDocument:theDocument Notifies the controller that theDocument has been opened
didSaveDocument:theDocument Notifies the controller that theDocument has been saved
willSaveDocument:theDocument Notifies the controller that the user is attempting to save theDocument




IBEditors


Adopted By: Editor objects in Interface Builder


Initializing

initWith:anObject Implement to initialize a newly allocated editor
inDocument:aDocument


Identifying Objects

document Implement this method to return the active document
editedObject Implement to return the object that's being edited
window Implement to return the editor window


Displaying Objects

resetObject:anObject Implement to redraw anObject


Managing the Selection

(BOOL)wantsSelection Implement to return YES if the editor is willing to become the selection owner
selectObjects:(List *)objectList Implement to draw the objects in objectList as selected
makeSelectionVisible:(BOOL)showIt Implement to make the current selection visible


Copying and Pasting Objects

(BOOL)copySelection Implement to copy the selected object(s) to the pasteboard
(BOOL)deleteSelection Implement to delete the selected object(s)
(BOOL)pasteInSelection Implement to paste object(s) from pasteboard into selection
(NXAtom)acceptsTypeFrom:(const NXAtom *)typeList
Implement to return the pasteboard type your editor accepts


Opening and Closing Editors

close Implement to close the editor and free its resources
openSubeditorFor:anObject Implement to open the subeditor for anObject
closeSubeditors Implement to close all subeditors


Activating the Editor

orderFront Implement to bring the editor's window to the front
(BOOL)activate Implement to activate the editor




IBInspectors


Adopted By: IBInspector


Required Inspector Methods

ok:sender Implement in subclass to commit changes made in the Inspector panel
revert:sender Implement in subclass to load data into inspector's display
(BOOL)wantsButtons Returns whether the inspector requires Interface Builder to display OK and Revert buttons in the Inspector panel




IBObject
(informal protocol)


Adopted By: Custom palette objects


Identifying Inspectors, Editors, and Images

(const char *)getConnectInspectorClassName Returns the class name of the receiver's connection inspector
(const char *)getEditorClassName Returns the class name of the receiver's editor
(const char *)getHelpInspectorClassName Returns the class name of the receiver's help inspector
(NXImage *)getIBImage Returns the image that's displayed in the File window when an instance of this class is created
(const char *)getInspectorClassName Returns the class name of the receiver's attributes inspector
(const char *)getSizeInspectorClassName Returns the class name of the receiver's size inspector




IBSelectionOwners


Adopted By: Editor objects


Selection Methods

getSelectionInto:(List *)objectList Implement to place the selected objects into objectList
redrawSelection Implement to redraw the objects in the selection
(unsigned)selectionCount Implement to return the number of objects in the editor's selection