mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
* English.lproj/Gorm.gorm
* GormCore/GormGenericEditor.h * GormCore/GormViewWithContentViewEditor.h * GormCore/GormViewWithContentViewEditor.m * Gorm.m: Beginning of implementation of groupSelectionInView: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@28618 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b199545b3d
commit
4585271703
8 changed files with 72 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2009-09-06 23:55-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* English.lproj/Gorm.gorm
|
||||
* GormCore/GormGenericEditor.h
|
||||
* GormCore/GormViewWithContentViewEditor.h
|
||||
* GormCore/GormViewWithContentViewEditor.m
|
||||
* Gorm.m: Beginning of implementation of groupSelectionInView:
|
||||
|
||||
2009-08-22 18:04-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* GormCore/GormOutlineView.m: Remove .tiff from the end of the images.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"alignSelectedObjects:",
|
||||
"arrangeSelectedObjects:",
|
||||
"exportStrings:",
|
||||
"newAction:",
|
||||
"groupSelectionInView:",
|
||||
"orderFrontFontPanel:",
|
||||
"translate:"
|
||||
);
|
||||
|
@ -44,7 +44,8 @@
|
|||
"loadClass:",
|
||||
"preferencesPanel:",
|
||||
"guideline:",
|
||||
"print:"
|
||||
"print:",
|
||||
"groupSelectionInView:"
|
||||
);
|
||||
Outlets = (
|
||||
gormMenu,
|
||||
|
|
Binary file not shown.
Binary file not shown.
7
Gorm.m
7
Gorm.m
|
@ -716,6 +716,13 @@
|
|||
[(GormGenericEditor *)selectionOwner groupSelectionInBox];
|
||||
}
|
||||
|
||||
- (void) groupSelectionInView: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInView)] == NO)
|
||||
return;
|
||||
[(GormGenericEditor *)selectionOwner groupSelectionInView];
|
||||
}
|
||||
|
||||
- (void) groupSelectionInScrollView: (id)sender
|
||||
{
|
||||
if ([selectionOwner respondsToSelector: @selector(groupSelectionInScrollView)] == NO)
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
- (void) groupSelectionInScrollView;
|
||||
- (void) groupSelectionInSplitView;
|
||||
- (void) groupSelectionInBox;
|
||||
- (void) groupSelectionInView;
|
||||
- (void) ungroup;
|
||||
- (void) setEditor: (id)anEditor forDocument: (id<IBDocuments>)doc;
|
||||
- (id) changeSelection: (id)sender;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
- (void) postDrawForView: (GormViewEditor *) viewEditor;
|
||||
- (void) groupSelectionInSplitView;
|
||||
- (void) groupSelectionInBox;
|
||||
- (void) groupSelectionInView;
|
||||
- (void) ungroup;
|
||||
- (void) pasteInView: (NSView *)view;
|
||||
@end
|
||||
|
|
|
@ -447,6 +447,58 @@ int _sortViews(id view1, id view2, void *context)
|
|||
[self selectObjects: [NSArray arrayWithObject: editor]];
|
||||
}
|
||||
|
||||
- (void) groupSelectionInView
|
||||
{
|
||||
NSEnumerator *enumerator = nil;
|
||||
GormViewEditor *subview = nil;
|
||||
NSView *view = nil;
|
||||
NSRect rect = NSZeroRect;
|
||||
GormViewEditor *editor = nil;
|
||||
NSView *superview = nil;
|
||||
|
||||
if ([selection count] < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
enumerator = [selection objectEnumerator];
|
||||
|
||||
while ((subview = [enumerator nextObject]) != nil)
|
||||
{
|
||||
superview = [subview superview];
|
||||
rect = NSUnionRect(rect, [subview frame]);
|
||||
[subview deactivate];
|
||||
}
|
||||
|
||||
view = [[NSView alloc] initWithFrame: NSZeroRect];
|
||||
[view setFrame: rect];
|
||||
|
||||
[superview addSubview: view];
|
||||
[document attachObject: view
|
||||
toParent: _editedObject];
|
||||
|
||||
enumerator = [selection objectEnumerator];
|
||||
|
||||
while ((subview = [enumerator nextObject]) != nil)
|
||||
{
|
||||
NSPoint frameOrigin;
|
||||
[view addSubview: [subview editedObject]];
|
||||
frameOrigin = [[subview editedObject] frame].origin;
|
||||
frameOrigin.x -= rect.origin.x;
|
||||
frameOrigin.y -= rect.origin.y;
|
||||
[[subview editedObject] setFrameOrigin: frameOrigin];
|
||||
[document attachObject: [subview editedObject]
|
||||
toParent: view];
|
||||
[subview close];
|
||||
}
|
||||
|
||||
editor = (GormViewEditor *)[document editorForObject: view
|
||||
inEditor: self
|
||||
create: YES];
|
||||
|
||||
[self selectObjects: [NSArray arrayWithObject: editor]];
|
||||
}
|
||||
|
||||
- (void) groupSelectionInScrollView
|
||||
{
|
||||
NSEnumerator *enumerator = nil;
|
||||
|
|
Loading…
Reference in a new issue