Updated editor to handle ungrouping of scroll view.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16897 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-06-08 06:11:28 +00:00
parent a057b2a714
commit 2402c3e4ee
3 changed files with 57 additions and 6 deletions

View file

@ -1,3 +1,25 @@
2003-06-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormScrollViewEditor.m: Added -[destroyAndListSubviews]
method to allow views within a NSScrollView to be ungrouped.
* GormViewWithContentViewEditor.m: Added GormScrollViewEditor
to list of classes to test for so that the ungroup method will
proceed.
Addresses bug #3536.
2003-06-07 Gregory John Casamento <greg_casamento@yahoo.com>
* GormPrivate.h: Added declaration for GormDidModifyClassNotification
* Gorm.m: Added definition for GormDidModifyClassNotification. Also
corrected an issue which was causing Gorm to crash when testing
an interface.
* GormClassManager.m: Added code to post the notification when
an outlet or an action is added.
* GormClassInspector.m: Added code to handleNotification
GormDidModifyClassNotification so that the views in the
inspector can be properly updated when the class is edited in the
class editor.
2003-06-07 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassInspector.m: Added post of notification in

View file

@ -168,4 +168,34 @@
return self;
}
- (NSArray *)destroyAndListSubviews
{
id internalView = [[[_EO documentView] subviews] objectAtIndex: 0];
NSEnumerator *enumerator = [[internalView subviews] objectEnumerator];
GormViewEditor *subview;
NSMutableArray *newSelection = [NSMutableArray array];
[parent makeSubeditorResign];
// NSLog(@"documentview = %@",[_EO documentView]);
while ((subview = [enumerator nextObject]) != nil)
{
id v;
NSRect frame;
v = [subview editedObject];
frame = [v frame];
frame = [parent convertRect: frame fromView: _EO];
[subview deactivate];
[v setFrame: frame];
[newSelection addObject: v];
}
{
id thisView = [self editedObject];
[self close];
[thisView removeFromSuperview];
}
return newSelection;
}
@end

View file

@ -23,13 +23,9 @@
*/
#include <AppKit/AppKit.h>
#include "GormPrivate.h"
#include "GormViewWithContentViewEditor.h"
#include "GormPlacementInfo.h"
#include "GormSplitViewEditor.h"
@ -1013,9 +1009,9 @@
[self selectObjects: [NSArray arrayWithObject: editor]];
}
@class GormBoxEditor;
@class GormSplitViewEditor;
@class GormScrollViewEditor;
- (void) ungroup
{
@ -1028,9 +1024,12 @@
toUngroup = [selection objectAtIndex: 0];
NSLog(@"toUngroup = %@",[toUngroup description]);
if ([toUngroup isKindOfClass: [GormBoxEditor class]]
|| [toUngroup isKindOfClass: [GormSplitViewEditor class]])
|| [toUngroup isKindOfClass: [GormSplitViewEditor class]]
|| [toUngroup isKindOfClass: [GormScrollViewEditor class]]
)
{
id contentView = toUngroup;