mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
* Gorm.m: added menu item for "group in scroll view".
* GNUmakefile: added GormScrollViewEditor.m * GormScrollViewEditor.m: new file. * GormInternalViewEditor.m: added support for NSScrollView contents editing. * Palettes/3Containers/GormTableViewEditor.m: removed old support for NSScrollView. * GormViewWithContentViewEditor.m: added support for keyboard moving & resizing of elements & support for "group in scroll view". * Palettes/0Menus/GormMenuEditor.m: fixes when adding a menu item into an NSPopupButton. * Palettes/2Controls/GormBoxInspector.gorm: * Palettes/1Windows/GormWindowInspector.gorm: * Palettes/1Windows/GormWindowSizeInspector.gorm: updated for better visual aspect. * GormButtonEditor.m: fixed inline title editing. * GormDocument.m: do not save the last directory if the save/openpanel do not return NSOKButton. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14677 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7fb3cb11ff
commit
ca8fb4f95a
17 changed files with 417 additions and 51 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
||||||
|
2002-10-08 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||||
|
|
||||||
|
* Gorm.m: added menu item for "group in scroll view".
|
||||||
|
* GNUmakefile: added GormScrollViewEditor.m
|
||||||
|
* GormScrollViewEditor.m: new file.
|
||||||
|
* GormInternalViewEditor.m: added support for NSScrollView
|
||||||
|
contents editing.
|
||||||
|
* Palettes/3Containers/GormTableViewEditor.m: removed old support
|
||||||
|
for NSScrollView.
|
||||||
|
* GormViewWithContentViewEditor.m: added support for keyboard
|
||||||
|
moving & resizing of elements & support for "group in scroll view".
|
||||||
|
|
||||||
|
* Palettes/0Menus/GormMenuEditor.m: fixes when adding a menu item
|
||||||
|
into an NSPopupButton.
|
||||||
|
|
||||||
|
* Palettes/2Controls/GormBoxInspector.gorm:
|
||||||
|
* Palettes/1Windows/GormWindowInspector.gorm:
|
||||||
|
* Palettes/1Windows/GormWindowSizeInspector.gorm:
|
||||||
|
updated for better visual aspect.
|
||||||
|
|
||||||
|
* GormButtonEditor.m: fixed inline title editing.
|
||||||
|
|
||||||
|
* GormDocument.m: do not save the last directory if the save/openpanel
|
||||||
|
do not return NSOKButton.
|
||||||
|
|
||||||
2002-10-04 Gregory John Casamento <greg_casamento@yahoo.com>
|
2002-10-04 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GormInternalViewEditor.m: (dragExited:) move variable up for
|
* GormInternalViewEditor.m: (dragExited:) move variable up for
|
||||||
|
|
|
@ -599,7 +599,6 @@
|
||||||
);
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
|
|
||||||
NSWindowController = {
|
NSWindowController = {
|
||||||
Actions = (
|
Actions = (
|
||||||
showWindow:
|
showWindow:
|
||||||
|
|
|
@ -159,7 +159,8 @@ Gorm_OBJC_FILES = \
|
||||||
GormInternalViewEditor.m \
|
GormInternalViewEditor.m \
|
||||||
GormPalettesManager.m \
|
GormPalettesManager.m \
|
||||||
GormOutlineView.m \
|
GormOutlineView.m \
|
||||||
GormCustomClassInspector.m
|
GormCustomClassInspector.m \
|
||||||
|
GormScrollViewEditor.m
|
||||||
|
|
||||||
-include GNUmakefile.preamble
|
-include GNUmakefile.preamble
|
||||||
|
|
||||||
|
|
11
Gorm.m
11
Gorm.m
|
@ -343,6 +343,14 @@ NSString *GormLinkPboardType = @"GormLinkPboardType";
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) groupSelectionInScrollView: (id)sender
|
||||||
|
{
|
||||||
|
if ([selectionOwner respondsToSelector: @selector(groupSelectionInScrollView)] == NO)
|
||||||
|
return nil;
|
||||||
|
[(id)selectionOwner groupSelectionInScrollView];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
- (id) ungroup: (id)sender
|
- (id) ungroup: (id)sender
|
||||||
{
|
{
|
||||||
NSLog(@"ungroup: selectionOwner %@", selectionOwner);
|
NSLog(@"ungroup: selectionOwner %@", selectionOwner);
|
||||||
|
@ -721,6 +729,9 @@ NSString *GormLinkPboardType = @"GormLinkPboardType";
|
||||||
[aMenu addItemWithTitle: @"Group in box"
|
[aMenu addItemWithTitle: @"Group in box"
|
||||||
action: @selector(groupSelectionInBox:)
|
action: @selector(groupSelectionInBox:)
|
||||||
keyEquivalent: @""];
|
keyEquivalent: @""];
|
||||||
|
[aMenu addItemWithTitle: @"Group in scrollview"
|
||||||
|
action: @selector(groupSelectionInScrollView:)
|
||||||
|
keyEquivalent: @""];
|
||||||
[aMenu addItemWithTitle: @"Ungroup"
|
[aMenu addItemWithTitle: @"Ungroup"
|
||||||
action: @selector(ungroup:)
|
action: @selector(ungroup:)
|
||||||
keyEquivalent: @""];
|
keyEquivalent: @""];
|
||||||
|
|
|
@ -515,7 +515,7 @@ static NSRect oldFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[[[self window] contentView] setNeedsDisplayInRect: oldFrame];
|
[/*[[self window] contentView]*/[self superview] setNeedsDisplayInRect: oldFrame];
|
||||||
inside = NO;
|
inside = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,7 +568,7 @@ static NSRect oldFrame;
|
||||||
// frame.origin.y -= 2;
|
// frame.origin.y -= 2;
|
||||||
// frame.size.height = 2;
|
// frame.size.height = 2;
|
||||||
NSTextView *tv = [self startEditingInFrame: frame];
|
NSTextView *tv = [self startEditingInFrame: frame];
|
||||||
[[[self window] contentView] addSubview: tv];
|
[/*[[self window] contentView]*/[self superview] addSubview: tv];
|
||||||
[tv setText: [_EO stringValue]];
|
[tv setText: [_EO stringValue]];
|
||||||
[tv setAlignment: [_EO alignment]];
|
[tv setAlignment: [_EO alignment]];
|
||||||
[tv setFont: [_EO font]];
|
[tv setFont: [_EO font]];
|
||||||
|
|
|
@ -1594,10 +1594,10 @@ static NSImage *classesImage = nil;
|
||||||
result = [oPanel runModalForDirectory: pth
|
result = [oPanel runModalForDirectory: pth
|
||||||
file: nil
|
file: nil
|
||||||
types: fileTypes];
|
types: fileTypes];
|
||||||
[[NSUserDefaults standardUserDefaults] setObject: [oPanel directory]
|
|
||||||
forKey:@"OpenDir"];
|
|
||||||
if (result == NSOKButton)
|
if (result == NSOKButton)
|
||||||
{
|
{
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject: [oPanel directory]
|
||||||
|
forKey:@"OpenDir"];
|
||||||
return [self loadDocument: [oPanel filename]];
|
return [self loadDocument: [oPanel filename]];
|
||||||
}
|
}
|
||||||
return nil; /* Failed */
|
return nil; /* Failed */
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
[[self superview] isKindOfClass: [NSTabView class]]
|
[[self superview] isKindOfClass: [NSTabView class]]
|
||||||
||
|
||
|
||||||
[[self superview] isKindOfClass: [GSWindowView class]]
|
[[self superview] isKindOfClass: [GSWindowView class]]
|
||||||
|
||
|
||||||
|
[[self superview] isKindOfClass: [NSClipView class]]
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
return @"GormInternalViewEditor";
|
return @"GormInternalViewEditor";
|
||||||
|
@ -100,6 +102,10 @@
|
||||||
{
|
{
|
||||||
[[superview window] setContentView: self];
|
[[superview window] setContentView: self];
|
||||||
}
|
}
|
||||||
|
else if ([superview isKindOfClass: [NSClipView class]])
|
||||||
|
{
|
||||||
|
[superview setDocumentView: self];
|
||||||
|
}
|
||||||
|
|
||||||
[self addSubview: _editedObject];
|
[self addSubview: _editedObject];
|
||||||
|
|
||||||
|
@ -200,6 +206,10 @@
|
||||||
[self removeSubview: _editedObject];
|
[self removeSubview: _editedObject];
|
||||||
[[superview window] setContentView: _editedObject];
|
[[superview window] setContentView: _editedObject];
|
||||||
}
|
}
|
||||||
|
else if ([superview isKindOfClass: [NSClipView class]])
|
||||||
|
{
|
||||||
|
[superview setDocumentView: _editedObject];
|
||||||
|
}
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
133
GormScrollViewEditor.m
Normal file
133
GormScrollViewEditor.m
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
/* GormScrollViewEditor.m
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* Author: Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||||
|
* Date: 2002
|
||||||
|
*
|
||||||
|
* This file is part of GNUstep.
|
||||||
|
*
|
||||||
|
* 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; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
|
#import "GormPrivate.h"
|
||||||
|
|
||||||
|
#import "GormBoxEditor.h"
|
||||||
|
|
||||||
|
#define _EO ((NSScrollView *)_editedObject)
|
||||||
|
|
||||||
|
@implementation NSScrollView (GormObjectAdditions)
|
||||||
|
- (NSString*) editorClassName
|
||||||
|
{
|
||||||
|
if ([self documentView]
|
||||||
|
&& [[self documentView] isKindOfClass: [NSTableView class]])
|
||||||
|
return @"GormTableViewEditor";
|
||||||
|
else
|
||||||
|
return @"GormScrollViewEditor";
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface GormScrollViewEditor : GormViewWithSubviewsEditor
|
||||||
|
{
|
||||||
|
GormInternalViewEditor *documentViewEditor;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation GormScrollViewEditor
|
||||||
|
|
||||||
|
- (BOOL) activate
|
||||||
|
{
|
||||||
|
if ([super activate])
|
||||||
|
{
|
||||||
|
NSView *documentView = [_EO documentView];
|
||||||
|
|
||||||
|
NSLog(@"documentView %@", documentView);
|
||||||
|
|
||||||
|
documentViewEditor = [document editorForObject: documentView
|
||||||
|
inEditor: self
|
||||||
|
create: YES];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) deactivate
|
||||||
|
{
|
||||||
|
if (activated == YES)
|
||||||
|
{
|
||||||
|
[self deactivateSubeditors];
|
||||||
|
|
||||||
|
[super deactivate];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) mouseDown: (NSEvent *) theEvent
|
||||||
|
{
|
||||||
|
BOOL onKnob = NO;
|
||||||
|
|
||||||
|
|
||||||
|
// if we are on one of our own knob, then this event should be processed
|
||||||
|
// by our parent (cause this is a resizing event)
|
||||||
|
{
|
||||||
|
if ([parent respondsToSelector: @selector(selection)] &&
|
||||||
|
[[parent selection] containsObject: _EO])
|
||||||
|
{
|
||||||
|
IBKnobPosition knob = IBNoneKnobPosition;
|
||||||
|
NSPoint mouseDownPoint =
|
||||||
|
[self convertPoint: [theEvent locationInWindow]
|
||||||
|
fromView: nil];
|
||||||
|
knob = GormKnobHitInRect([self bounds],
|
||||||
|
mouseDownPoint);
|
||||||
|
if (knob != IBNoneKnobPosition)
|
||||||
|
onKnob = YES;
|
||||||
|
}
|
||||||
|
if (onKnob == YES)
|
||||||
|
{
|
||||||
|
if (parent)
|
||||||
|
return [parent mouseDown: theEvent];
|
||||||
|
else
|
||||||
|
return [self noResponderFor: @selector(mouseDown:)];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opened == NO)
|
||||||
|
{
|
||||||
|
// NSLog(@"GormBoxEditor not opened");
|
||||||
|
[super mouseDown: theEvent];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ([[_EO hitTest: [theEvent locationInWindow]]
|
||||||
|
isDescendantOf: documentViewEditor])
|
||||||
|
{
|
||||||
|
// NSLog(@"md %@ descendant of", self);
|
||||||
|
if ([documentViewEditor isOpened] == NO)
|
||||||
|
[documentViewEditor setOpened: YES];
|
||||||
|
[documentViewEditor mouseDown: theEvent];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSView *v = [_EO hitTest: [theEvent locationInWindow]];
|
||||||
|
if (v && [v isKindOfClass: [NSScroller class]])
|
||||||
|
[v mouseDown: theEvent];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -617,6 +617,117 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) moveSelectionByX: (float)x
|
||||||
|
andY: (float)y
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int count = [selection count];
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
id v = [selection objectAtIndex: i];
|
||||||
|
NSRect f = [v frame];
|
||||||
|
|
||||||
|
f.origin.x += x;
|
||||||
|
f.origin.y += y;
|
||||||
|
|
||||||
|
[v setFrameOrigin: f.origin];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) resizeSelectionByX: (float)x
|
||||||
|
andY: (float)y
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int count = [selection count];
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
id v = [selection objectAtIndex: i];
|
||||||
|
NSRect f = [v frame];
|
||||||
|
|
||||||
|
f.size.width += x;
|
||||||
|
f.size.height += y;
|
||||||
|
|
||||||
|
[v setFrameSize: f.size];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) keyDown: (NSEvent *)theEvent
|
||||||
|
{
|
||||||
|
NSString *characters = [theEvent characters];
|
||||||
|
unichar character = 0;
|
||||||
|
float moveBy = 1.0;
|
||||||
|
|
||||||
|
if ([characters length] > 0)
|
||||||
|
{
|
||||||
|
character = [characters characterAtIndex: 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (([theEvent modifierFlags] & NSShiftKeyMask) == NSShiftKeyMask)
|
||||||
|
{
|
||||||
|
if (([theEvent modifierFlags] & NSAlternateKeyMask) == NSAlternateKeyMask)
|
||||||
|
{
|
||||||
|
moveBy = 10.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([selection count] == 1)
|
||||||
|
{
|
||||||
|
switch (character)
|
||||||
|
{
|
||||||
|
case NSUpArrowFunctionKey:
|
||||||
|
[self resizeSelectionByX: 0 andY: 1*moveBy];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSDownArrowFunctionKey:
|
||||||
|
[self resizeSelectionByX: 0 andY: -1*moveBy];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSLeftArrowFunctionKey:
|
||||||
|
[self resizeSelectionByX: -1*moveBy andY: 0];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSRightArrowFunctionKey:
|
||||||
|
[self resizeSelectionByX: 1*moveBy andY: 0];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (([theEvent modifierFlags] & NSAlternateKeyMask) == NSAlternateKeyMask)
|
||||||
|
{
|
||||||
|
moveBy = 10.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([selection count] > 0)
|
||||||
|
{
|
||||||
|
switch (character)
|
||||||
|
{
|
||||||
|
case NSUpArrowFunctionKey:
|
||||||
|
[self moveSelectionByX: 0 andY: 1*moveBy];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSDownArrowFunctionKey:
|
||||||
|
[self moveSelectionByX: 0 andY: -1*moveBy];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSLeftArrowFunctionKey:
|
||||||
|
[self moveSelectionByX: -1*moveBy andY: 0];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
case NSRightArrowFunctionKey:
|
||||||
|
[self moveSelectionByX: 1*moveBy andY: 0];
|
||||||
|
[self setNeedsDisplay: YES];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[super keyDown: theEvent];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
||||||
{
|
{
|
||||||
if ([super acceptsTypeFromArray: types])
|
if ([super acceptsTypeFromArray: types])
|
||||||
|
@ -792,6 +903,63 @@
|
||||||
[self selectObjects: [NSArray arrayWithObject: editor]];
|
[self selectObjects: [NSArray arrayWithObject: editor]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) groupSelectionInScrollView
|
||||||
|
{
|
||||||
|
NSEnumerator *enumerator;
|
||||||
|
GormViewEditor *subview;
|
||||||
|
NSView *view;
|
||||||
|
NSScrollView *scrollView;
|
||||||
|
NSRect rect = NSZeroRect;
|
||||||
|
GormViewEditor *editor;
|
||||||
|
NSView *superview;
|
||||||
|
|
||||||
|
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:
|
||||||
|
NSMakeRect(0, 0, rect.size.width, rect.size.height)];
|
||||||
|
scrollView = [[NSScrollView alloc] initWithFrame: rect];
|
||||||
|
[scrollView setHasHorizontalScroller: YES];
|
||||||
|
[scrollView setHasVerticalScroller: YES];
|
||||||
|
|
||||||
|
[document attachObject: scrollView
|
||||||
|
toParent: _editedObject];
|
||||||
|
|
||||||
|
[superview addSubview: scrollView];
|
||||||
|
[scrollView setDocumentView: view];
|
||||||
|
|
||||||
|
|
||||||
|
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];
|
||||||
|
[subview close];
|
||||||
|
}
|
||||||
|
|
||||||
|
editor = [document editorForObject: scrollView
|
||||||
|
inEditor: self
|
||||||
|
create: YES];
|
||||||
|
|
||||||
|
[self selectObjects: [NSArray arrayWithObject: editor]];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@class GormBoxEditor;
|
@class GormBoxEditor;
|
||||||
@class GormSplitViewEditor;
|
@class GormSplitViewEditor;
|
||||||
|
|
|
@ -698,7 +698,13 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if ([_menu _ownedByPopUp])
|
||||||
|
{
|
||||||
|
[item setOnStateImage: nil];
|
||||||
|
[item setMixedStateImage: nil];
|
||||||
|
}
|
||||||
[edited addItem: item];
|
[edited addItem: item];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[edited sizeToFit];
|
[edited sizeToFit];
|
||||||
|
@ -749,7 +755,15 @@
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
[edited insertItem: item atIndex: pos++];
|
if ([edited _ownedByPopUp])
|
||||||
|
{
|
||||||
|
NSLog(@"owned by popup");
|
||||||
|
[item setOnStateImage: nil];
|
||||||
|
[item setMixedStateImage: nil];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
NSLog(@"not owned by popup");
|
||||||
|
[edited insertItem: item atIndex: pos++];
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
[edited sizeToFit];
|
[edited sizeToFit];
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
};
|
};
|
||||||
IBInspector = {
|
IBInspector = {
|
||||||
Actions = (
|
Actions = (
|
||||||
ok:,
|
"ok:",
|
||||||
revert:,
|
"revert:",
|
||||||
touch:
|
"touch:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
window
|
window
|
||||||
|
@ -32,11 +32,11 @@
|
||||||
};
|
};
|
||||||
NSControl = {
|
NSControl = {
|
||||||
Actions = (
|
Actions = (
|
||||||
takeDoubleValueFrom:,
|
"takeDoubleValueFrom:",
|
||||||
takeFloatValueFrom:,
|
"takeFloatValueFrom:",
|
||||||
takeIntValueFrom:,
|
"takeIntValueFrom:",
|
||||||
takeObjectValueFrom:,
|
"takeObjectValueFrom:",
|
||||||
takeStringValueFrom:
|
"takeStringValueFrom:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
target
|
target
|
||||||
|
@ -68,19 +68,16 @@
|
||||||
Super = NSControl;
|
Super = NSControl;
|
||||||
};
|
};
|
||||||
NSView = {
|
NSView = {
|
||||||
|
Outlets = (
|
||||||
|
nextKeyView
|
||||||
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
NSWindow = {
|
NSWindow = {
|
||||||
Outlets = (
|
Outlets = (
|
||||||
delegate
|
delegate,
|
||||||
|
initialFirstResponder
|
||||||
);
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
NewClass1 = {
|
|
||||||
Actions = (
|
|
||||||
);
|
|
||||||
Outlets = (
|
|
||||||
);
|
|
||||||
Super = IBInspector;
|
|
||||||
};
|
|
||||||
}
|
}
|
Binary file not shown.
|
@ -11,9 +11,9 @@
|
||||||
};
|
};
|
||||||
IBInspector = {
|
IBInspector = {
|
||||||
Actions = (
|
Actions = (
|
||||||
ok:,
|
"ok:",
|
||||||
revert:,
|
"revert:",
|
||||||
touch:
|
"touch:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
);
|
);
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
};
|
};
|
||||||
NSControl = {
|
NSControl = {
|
||||||
Actions = (
|
Actions = (
|
||||||
takeDoubleValueFrom:,
|
"takeDoubleValueFrom:",
|
||||||
takeFloatValueFrom:,
|
"takeFloatValueFrom:",
|
||||||
takeIntValueFrom:,
|
"takeIntValueFrom:",
|
||||||
takeObjectValueFrom:,
|
"takeObjectValueFrom:",
|
||||||
takeStringValueFrom:
|
"takeStringValueFrom:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
target
|
target
|
||||||
|
@ -63,11 +63,15 @@
|
||||||
Super = NSControl;
|
Super = NSControl;
|
||||||
};
|
};
|
||||||
NSView = {
|
NSView = {
|
||||||
|
Outlets = (
|
||||||
|
nextKeyView
|
||||||
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
NSWindow = {
|
NSWindow = {
|
||||||
Outlets = (
|
Outlets = (
|
||||||
delegate
|
delegate,
|
||||||
|
initialFirstResponder
|
||||||
);
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
|
|
Binary file not shown.
|
@ -15,9 +15,9 @@
|
||||||
};
|
};
|
||||||
IBInspector = {
|
IBInspector = {
|
||||||
Actions = (
|
Actions = (
|
||||||
ok:,
|
"ok:",
|
||||||
revert:,
|
"revert:",
|
||||||
touch:
|
"touch:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
window
|
window
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
};
|
};
|
||||||
NSControl = {
|
NSControl = {
|
||||||
Actions = (
|
Actions = (
|
||||||
takeDoubleValueFrom:,
|
"takeDoubleValueFrom:",
|
||||||
takeFloatValueFrom:,
|
"takeFloatValueFrom:",
|
||||||
takeIntValueFrom:,
|
"takeIntValueFrom:",
|
||||||
takeObjectValueFrom:,
|
"takeObjectValueFrom:",
|
||||||
takeStringValueFrom:
|
"takeStringValueFrom:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
target
|
target
|
||||||
|
@ -68,11 +68,15 @@
|
||||||
Super = NSControl;
|
Super = NSControl;
|
||||||
};
|
};
|
||||||
NSView = {
|
NSView = {
|
||||||
|
Outlets = (
|
||||||
|
nextKeyView
|
||||||
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
NSWindow = {
|
NSWindow = {
|
||||||
Outlets = (
|
Outlets = (
|
||||||
delegate
|
delegate,
|
||||||
|
initialFirstResponder
|
||||||
);
|
);
|
||||||
Super = NSResponder;
|
Super = NSResponder;
|
||||||
};
|
};
|
||||||
|
|
Binary file not shown.
|
@ -33,16 +33,16 @@ static NSCell *_editedCell;
|
||||||
static NSCell *_currentHeaderCell;
|
static NSCell *_currentHeaderCell;
|
||||||
static NSText *_textObject;
|
static NSText *_textObject;
|
||||||
|
|
||||||
@implementation NSScrollView (GormObjectAdditions)
|
// @implementation NSScrollView (GormObjectAdditions)
|
||||||
- (NSString*) editorClassName
|
// - (NSString*) editorClassName
|
||||||
{
|
// {
|
||||||
if ([self documentView]
|
// if ([self documentView]
|
||||||
&& [[self documentView] isKindOfClass: [NSTableView class]])
|
// && [[self documentView] isKindOfClass: [NSTableView class]])
|
||||||
return @"GormTableViewEditor";
|
// return @"GormTableViewEditor";
|
||||||
else
|
// else
|
||||||
return [super editorClassName];
|
// return [super editorClassName];
|
||||||
}
|
// }
|
||||||
@end
|
// @end
|
||||||
|
|
||||||
@interface GormTableViewEditor (Private)
|
@interface GormTableViewEditor (Private)
|
||||||
- (void) editHeader: (NSTableHeaderView*) th
|
- (void) editHeader: (NSTableHeaderView*) th
|
||||||
|
|
Loading…
Reference in a new issue