home *** CD-ROM | disk | FTP | other *** search
- /*
- *
- * Copyright (C) 1992 Ronin Consulting, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 1.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * This subclass of box allows a regions view to be swapped from a list of views.
- * Views can be assigned in Interface Builder by connecting to the panel outlets
- * or programmatally with the setPanel:at: method.
- *
- * To Do:
- * Currently does not handle being resized.
- */
-
- #import <appkit/Box.h>
-
- @interface SwitchBox:Box
- {
- id panel0;
- id panel1;
- id panel2;
- id panel3;
- id panel4;
- id panel5;
- id panel6;
- id panel7;
- id panel8;
- id panel9;
-
- id panelList;
- id delegate;
- id origContentView;
- int defaultPanel;
- }
-
- - initFrame:(const NXRect *)aRect;
- - free;
- - drawSelf:(const NXRect *)rects :(int)rectCount;
-
- - switchToTagOf: sender; /* switch to panelN where N = [sender tag] */
- - switchTo: (int) number; /* switch to panelN where N = number */
- - setDefaultPanel: (int) number;
- - (int) defaultPanel;
-
- - setDelegate: anObject;
- - delegate;
-
- - setPanel: aView at: (int) index; /* place a view in the SwitchBox' list at a given index */
-
- - (const char *)getInspectorClassName;
- - read:(NXTypedStream *) s;
- - write:(NXTypedStream *) s;
-
- @end
-
- @interface Object(SwitchBoxDelegate) /* Your delegate can implement these... */
-
- - willSwitchTo: (int)number; /* warns yopu before a switch - nil return aborts switch */
- - didSwitchTo: (int)number; /* tells you after switch is made */
-
- @end
-
-
-