1 /* GormViewEditor.h
2  *
3  * Copyright (C) 2002 Free Software Foundation, Inc.
4  *
5  * Author:	Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
6  * Date:	2002
7  *
8  * This file is part of GNUstep.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
23  */
24 
25 #include <InterfaceBuilder/InterfaceBuilder.h>
26 
27 #ifndef	INCLUDED_GormViewEditor_h
28 #define	INCLUDED_GormViewEditor_h
29 
30 @class GormViewWithSubviewsEditor;
31 @class GormPlacementInfo;
32 @class GormViewWindow;
33 
34 @interface GormViewEditor : NSView <IBEditors>
35 {
36   id<IBDocuments>	            document;
37   id		                    _editedObject;
38   BOOL                              activated;
39   BOOL                              closed;
40   GormViewWithSubviewsEditor        *parent;
41   GormViewWindow                    *viewWindow;
42 }
43 - (BOOL) activate;
44 - (id) initWithObject: (id)anObject
45 	   inDocument: (id<IBDocuments>)aDocument;
46 - (void) close;
47 - (void) deactivate;
48 - (id<IBDocuments>) document;
49 - (id) editedObject;
50 - (void) detachSubviews;
51 - (void) postDraw: (NSRect) rect;
52 - (id) parent;
53 - (NSArray *) selection;
54 - (void) makeSelectionVisible: (BOOL) value;
55 - (BOOL) isOpened;
56 - (BOOL) canBeOpened;
57 - (void) setOpened: (BOOL) value;
58 - (void) frameDidChange: (id) sender;
59 @end
60 
61 @interface GormViewEditor (EditingAdditions)
62 - (NSEvent *) editTextField: view withEvent: (NSEvent *)theEvent;
63 @end
64 
65 @interface GormViewEditor (IntelligentPlacement)
66 - (GormPlacementInfo *) initializeResizingInFrame: (NSView *)view
67 						    withKnob: (IBKnobPosition) knob;
68 - (void) updateResizingWithFrame: (NSRect) frame
69 			andEvent: (NSEvent *)theEvent
70 		andPlacementInfo: (GormPlacementInfo*) gpi;
71 - (void) validateFrame: (NSRect) frame
72 	     withEvent: (NSEvent *) theEvent
73       andPlacementInfo: (GormPlacementInfo*)gpi;
74 @end
75 
76 @interface GormViewEditor (WindowAndRect)
77 /*
78  * Pull the window object and it's rect.
79  */
80 - (NSWindow *)windowAndRect: (NSRect *)prect
81                   forObject: (id) object;
82 @end
83 
84 #endif
85