home *** CD-ROM | disk | FTP | other *** search
- /* MiscInspector.m
- *
- * This class is a stupid single-attribute-inspector that is designed to work
- * with the MiscInspectorManager and the MiscSwapView stuff.
- *
- * For more interface-info see the header file. In depth information
- * can be found here in the source-code.
- *
- * Written by: Thomas Engel
- * Created: 08.02.1994 (Copyleft)
- * Last modified: 08.02.1994
- */
-
- //#import "MiscInspector.h"
- //#import "MiscInspectorManager.h"
- #import <misckit/misckit.h>
-
- @implementation MiscInspector
-
- - (BOOL)doesHandleSelection
- {
- // By default we will return YES here. In a real inspector class you should
- // ask the manager for the selection type etc and decide then.
-
- return YES;
- }
-
- - setManager:anObject
- {
- return [self setManager:anObject registerSelf:YES];
- }
-
- - setManager:anObject registerSelf:(BOOL)flag
- {
- manager = anObject;
- if( flag == YES ) [manager addInspector:self];
- return self;
- }
-
- - manager
- {
- return manager;
- }
-
- - ok:sender
- {
- [[self window] setDocEdited:NO];
- return self;
- }
-
- - revert:sender
- {
- // Here we will show/hide the buttons and set the editied state of the
- // window.
- // We also set the windows title to the title of the window of our view.
-
- [[self window] setTitle:[[view window] title]];
-
- if( [self wantsButtons] )
- [manager setShowButtons:YES];
- else [manager setShowButtons:NO];
-
- [[self window] setDocEdited:NO];
-
- return self;
- }
-
- - window
- {
- return [manager window];
- }
-
- - okButton
- {
- return [manager okButton];
- }
-
- - revertButton
- {
- return [manager revertButton];
- }
-
- - selection
- {
- return [manager selection];
- }
-
- - (unsigned)selectionCount
- {
- return [manager selectionCount];
- }
-
- - touch:sender
- {
- [manager touch:sender];
- return self;
- }
-
- - textDidChange:sender
- {
- [manager textDidChange:sender];
- return self;
- }
-
- - (BOOL)wantsButtons
- {
- return YES;
- }
-
- @end
-
- /*
- * History: 08.02.94 First code moved here.
- *
- *
- * Bugs: - No read/write.
- */