home *** CD-ROM | disk | FTP | other *** search
- /* MiscInspector.h
- *
- * This class is a stupid single-attribute-inspector that is designed to work
- * with the MiscInspectorManager and the MiscSwapView stuff.
- *
- * Usage: For rapid prototyping just create one instans for one view/attribute
- * you want to inspect/control.
- * Create a subclass to add the real code.
- * It works almost the same way as the WorkspaceInspectors do. So it
- * should be straight forward. Just write your revert:, ok: methods and
- * your almost done. You MUST add [super ok/revert:sender].(see below)
- * The only difference is 'doesHandleSelection'. There you have to
- * check weqther the managers selection is worth your attention or not.
- * Remember that the window, textDidChange etc methods always need the
- * manager to work properly.
- *
- * Notes: This class depends on the swapView stuff and therefore it is not
- * possible to have one object in charge of different views!
- * I don't find this a very serious limitation. In the very rare cases
- * where you want to do that you should use an InspectorWrapper. Take a
- * look at the way the default inspectors are implemented.
- *
- * If you really want to change the ok/rev. Buttons title...do it.
- * But remember to reset them when you willSwapOut !
- * And take care of ColorWells. Remember to deactivate then when
- * swapping out.
- *
- * Written by: Thomas Engel
- * Created: 08.02.1994 (Copyright 1994 Thomas Engel)
- * Last modified: 22.02.1994
- */
-
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
-
- #import <misckit/MiscSwapContentsController.h>
-
- @interface MiscInspector:MiscSwapContentsController
- {
- id manager;
- }
-
- // doesHandleSelection should return weather we are intersted or not.
- // Setting the manager has the effect that the inspector will add itself to
- // the managers inspector list ( [self setManager:.. registerSelf:YES] )
- // Avoiding registration is needed when we work with inspectorWrappers.
-
- - (BOOL)doesHandleSelection;
- - setManager:anObject;
- - setManager:anObject registerSelf:(BOOL)flag;
- - manager;
-
- // Use revert to load the NIB etc. Same stuff as with SwapContentsControllers
- // and IB/WM Inspectors.
-
- - ok:sender;
- - revert:sender;
-
- // The following methods are almost stupid . They only ask the manager for
- // the same info. They are included for more WM-Inspector appearance.
-
- - window;
- - okButton;
- - revertButton;
-
- - selection;
- - (unsigned)selectionCount;
-
- - touch:sender;
- - textDidChange:sender;
-
- // As for the IB-Inspectors each inspector can handle button appearance.
- // Attention this can only work the right way when you include
- // [super ok/revert] to your overridden methods.
- // revert should be the first, ok the last action in your privat ok/revert
- // stuff.
- // By default we want buttons...if they exist!
-
- - (BOOL)wantsButtons;
-
- @end
-
- /*
- * History: 08.02.94 First code moved here.
- *
- *
- * Bugs: - No read/write.
- *
- * - wantsButtons does only Hide the Buttons right now. Maybe there is
- * a way to size the swapView. (is it desireable ?)
- */