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

Object Additions


Category Of: Object
Declared In: apps/InterfaceBuilder.h



Category Description

Interface Builder adds these methods to the definition of the Object class so that any palette object can be queried for its various inspectors, for its editor, and for an image to represent the object when it's instantiated in the File window.

The inspector methods below return the class name for the object that will own the Inspector panel's display.  Interface Builder caches this information so that when the user attempts to inspect an object, Interface Builder knows what type of inspector to instantiate (if it hasn't yet been instantiated).  The inspector object provides the interface that Interface Builder displays in the Inspector panel.

Interface Builder supplies default implementations of these methods; you only override them if your custom palette object requires it.  For example, if you create a TextField palette object that validates its input, you would probably provide an Attributes inspector that lets the user specify the acceptable input values.  Thus, you would override the  getInspectorName method to return the class name for the Attributes inspector object.  However, you would probably not have to override the other inspector methods since the standard inspectors would be satisfactory.

Override the getEditorClassName method to return the class name of the editor to use for this object.  The editor is invoked when the user double-clicks the object.  View objects inherit Interface Builder's standard View editor.

You only need to override the getIBImage method if you want a special image to represent your custom palette object when it's dragged into the File window.  If you don't supply such an image, Interface Builder will use the standard sphere image.



Instance Methods

getConnectInspectorClassName
(const char *)getConnectInspectorClassName

Returns the class name of the receiver's Connection inspector.  Interface Builder uses this information to instantiate the inspector object for the currently selected object.  You should rarely need to override the standard Connection inspector.



getEditorClassName
(const char *)getEditorClassName

Returns the class name of the receiver's editor.  Interface Builder uses this information to instantiate the editor object for the currently selected object.



getHelpInspectorClassName
(const char *)getHelpInspectorClassName

Returns the class name of the receiver's Help inspector.  Interface Builder uses this information to instantiate the help inspector object for the currently selected object.  You should rarely need to override the standard Help inspector.



getIBImage
(NXImage *)getIBImage

Returns the image that's displayed in the File window when an instance of this class is created.  By default, Interface Builder provides an image of a sphere.  If you want to provide a different image, implement this method in your custom class.



getInspectorClassName
(const char *)getInspectorClassName

Returns the class name of the receiver's Attributes inspector.  Interface Builder uses this information to instantiate the help inspector object for the currently selected object.



getSizeInspectorClassName
(const char *)getSizeInspectorClassName

Returns the class name of the receiver's size inspector.  Interface Builder uses this information to instantiate the size inspector object for the currently selected object.