home *** CD-ROM | disk | FTP | other *** search
- /* MiscSwapContentsController.h
- *
- * A very simple class for controlling swapAble views. A subclass is a must
- * to easily work with the MiscSwapView classes.
- *
- * Usage: Just create a instance and connect it to the view that holds the
- * should swap in when the trigger object is activated.
- * As an alternative you can set the tag this view is related to by
- * creating an object with the right tag and setting it to be the
- * trigger. Its very easy to do this with the IB.
- *
- * Notes: If you create your own viewController you should really make a sub-
- * class of this object. Otherwise you might get problems if you do not
- * implement all the methods because the swapViews are very lazy in
- * respondsTo checking.
- *
- * When the view willSwapOut you should ensure that NO colorWells are
- * activated!! This may cause some trouble or inconsistency!!!!
- *
- * Written by: Thomas Engel
- * Created: 24.01.1994 (Copyright 1994 Thomas Engel)
- * Last Modified: 14.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 <appkit/appkit.h>
-
- @interface MiscSwapContentsController:Object
- {
- id swapView;
- id view;
- id trigger;
- int triggerTag;
- }
-
- - setSwapView:aView;
- - swapView;
- - setView:aView;
- - view;
- - setTrigger:anObject;
- - trigger;
- - setTriggerTag:(int)tag;
- - (int)triggerTag;
-
- // These revert/ok msg are send to setup/save the contents of a view.
- // Only the revert msg is invoked by default. If you have to store some
- // data when swapping out implement a [self ok:self] msg inside willSwapOut.
-
- - ok:sender;
- - revert:sender;
-
- // These methods are used to inform this class of its fate.
- // The willSwapIn method calls [self revert] by default.
- // Always take care of calling super when overriding these methods !
-
- - willSwapIn;
- - willSwapOut;
- - didSwapIn;
- - didSwapOut;
-
- - awakeFromNib;
-
- @end
-
- /*
- * History: 14.02.94 Changed the classes name to MiscSwapContentsController
- * from the MiscSwapSubviewController becauses it fits better
- * to what it really is.
- *
- * 24.01.94 Made it a Misc object and changed it to work with the
- * new Misc stuff.
- *
- * 09.01.94 Added the ok/revert stuff.
- *
- * 08.01.94 Derived from my old swapViewdelegate. The code+methods
- * were cleaned up a bit.
- *
- *
- * Bugs: - No read/write.
- *
- * - I could have automated the colorWell 'problem' but I don't think it
- * would be a good idea. It's not only a colorWell problem.
- * Swapping out has some affect on EVERY object that is linked to the
- * outside world.
- * A buildin soultion can not handle every case where object will be
- * linked to the outside world.
- * ( I thank the guys form UNInspector Kit because they made the
- * notice that problem through their release notes. Anyway I think
- * this kit has a more general approach towards inspectors. )
- */