mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 04:50:54 +00:00
Adding NSOutlineView changes so far so that everyone can see the progress which has been made. GJC
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12704 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
229c19e444
commit
275c7ff8d5
5 changed files with 1699 additions and 44 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Sat Feb 23 11:28:32 2002 Gregory Casamento <greg_casamento@yahoo.com>
|
||||||
|
* Headers/gnustep/gui/AppKit.h: Added NSOutlineView header
|
||||||
|
* Headers/gnustep/gui/NSOutlineView.h: Added additional ivars and
|
||||||
|
corrected methods for delegate and data source.
|
||||||
|
* Source/NSOutlineView.m: Added lots of new code to handle the
|
||||||
|
outline view.
|
||||||
|
* Source/externs.m: Added definitions for notifications.
|
||||||
|
|
||||||
Sat Feb 23 12:20:28 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
Sat Feb 23 12:20:28 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
Patch by Alexander Malmberg <alexander@malmber.org> -
|
Patch by Alexander Malmberg <alexander@malmber.org> -
|
||||||
|
@ -57,6 +65,7 @@ Fri Feb 22 18:22:48 2002 Nicola Pero <nicola@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSApplication.m ([-terminate:]): Use an autorelease pool.
|
* Source/NSApplication.m ([-terminate:]): Use an autorelease pool.
|
||||||
|
|
||||||
|
>>>>>>> 1.1360
|
||||||
Thu Feb 21 23:29:50 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
Thu Feb 21 23:29:50 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Headers/gnustep/gui/NSWindow.h (_originalResponder): Ivar removed.
|
* Headers/gnustep/gui/NSWindow.h (_originalResponder): Ivar removed.
|
||||||
|
|
|
@ -139,6 +139,7 @@
|
||||||
#ifndef STRICT_OPENSTEP
|
#ifndef STRICT_OPENSTEP
|
||||||
#include <AppKit/NSDrawer.h>
|
#include <AppKit/NSDrawer.h>
|
||||||
#include <AppKit/NSLayoutManager.h>
|
#include <AppKit/NSLayoutManager.h>
|
||||||
|
#include <AppKit/NSOutlineView.h>
|
||||||
#include <AppKit/NSTextContainer.h>
|
#include <AppKit/NSTextContainer.h>
|
||||||
#include <AppKit/NSTextStorage.h>
|
#include <AppKit/NSTextStorage.h>
|
||||||
#include <AppKit/NSUserInterfaceValidation.h>
|
#include <AppKit/NSUserInterfaceValidation.h>
|
||||||
|
|
|
@ -31,11 +31,16 @@
|
||||||
|
|
||||||
#include <AppKit/NSTableView.h>
|
#include <AppKit/NSTableView.h>
|
||||||
|
|
||||||
|
@class NSMutableArray;
|
||||||
|
@class NSString;
|
||||||
|
|
||||||
@interface NSOutlineView : NSTableView
|
@interface NSOutlineView : NSTableView
|
||||||
{
|
{
|
||||||
|
NSMutableArray *_items;
|
||||||
|
NSMutableArray *_expandedItems;
|
||||||
BOOL _resize;
|
BOOL _resize;
|
||||||
BOOL _followsCell;
|
BOOL _followsCell;
|
||||||
BOOL _autosave;
|
BOOL _autosaveExpandedItems;
|
||||||
float _indentLevel;
|
float _indentLevel;
|
||||||
NSTableColumn *_outlineTableColumn;
|
NSTableColumn *_outlineTableColumn;
|
||||||
BOOL _shouldCollapse;
|
BOOL _shouldCollapse;
|
||||||
|
@ -67,7 +72,7 @@
|
||||||
- (void)setOutlineTableColumn: (NSTableColumn *)outlineTableColumn;
|
- (void)setOutlineTableColumn: (NSTableColumn *)outlineTableColumn;
|
||||||
- (BOOL)shouldCollapseAutoExpandedItemsForDeposited: (BOOL)deposited;
|
- (BOOL)shouldCollapseAutoExpandedItemsForDeposited: (BOOL)deposited;
|
||||||
|
|
||||||
@end /* interface of NSTableView */
|
@end /* interface of NSOutlineView */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Informal protocol NSOutlineViewDataSource
|
* Informal protocol NSOutlineViewDataSource
|
||||||
|
@ -78,19 +83,23 @@
|
||||||
item: (id)item
|
item: (id)item
|
||||||
childIndex: (int)index;
|
childIndex: (int)index;
|
||||||
|
|
||||||
|
// required method
|
||||||
- (id)outlineView: (NSOutlineView *)outlineView
|
- (id)outlineView: (NSOutlineView *)outlineView
|
||||||
child: (int)index
|
child: (int)index
|
||||||
ofItem:(id)item;
|
ofItem: (id)item;
|
||||||
|
|
||||||
|
// required method
|
||||||
- (BOOL)outlineView: (NSOutlineView *)outlineView
|
- (BOOL)outlineView: (NSOutlineView *)outlineView
|
||||||
isItemExpandable: (id)item;
|
isItemExpandable: (id)item;
|
||||||
|
|
||||||
- (id)outlineView: (NSOutlineView *)outlineView
|
- (id)outlineView: (NSOutlineView *)outlineView
|
||||||
itemForPersistentObject:(id)object;
|
itemForPersistentObject:(id)object;
|
||||||
|
|
||||||
|
// required method
|
||||||
- (int)outlineView: (NSOutlineView *)outlineView
|
- (int)outlineView: (NSOutlineView *)outlineView
|
||||||
numberOfChildrenOfItem: (id)item;
|
numberOfChildrenOfItem: (id)item;
|
||||||
|
|
||||||
|
// required method
|
||||||
- (id)outlineView: (NSOutlineView *)outlineView
|
- (id)outlineView: (NSOutlineView *)outlineView
|
||||||
objectValueForTableColumn:(NSTableColumn *)tableColumn
|
objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||||
byItem:(id)item;
|
byItem:(id)item;
|
||||||
|
@ -99,12 +108,14 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||||
persistentObjectForItem: (id)item;
|
persistentObjectForItem: (id)item;
|
||||||
|
|
||||||
- (void)outlineView: (NSOutlineView *)outlineView
|
- (void)outlineView: (NSOutlineView *)outlineView
|
||||||
setObjectView: (id)object
|
setObjectValue: (id)object
|
||||||
forTableColumn: (NSTableColumn *)tableColumn;
|
forTableColumn: (NSTableColumn *)tableColumn
|
||||||
|
byItem: (id)item;
|
||||||
|
|
||||||
- (NSDragOperation)outlineView: (NSOutlineView*)outlineView
|
- (NSDragOperation)outlineView: (NSOutlineView*)outlineView
|
||||||
validateDrop: (id <NSDraggingInfo>)info
|
validateDrop: (id <NSDraggingInfo>)info
|
||||||
proposedItem: (id)item proposedChildIndex:(int)index;
|
proposedItem: (id)item
|
||||||
|
proposedChildIndex: (int)index;
|
||||||
|
|
||||||
- (BOOL)outlineView: (NSOutlineView *)outlineView
|
- (BOOL)outlineView: (NSOutlineView *)outlineView
|
||||||
writeItems: (NSArray*)items
|
writeItems: (NSArray*)items
|
||||||
|
@ -125,29 +136,44 @@ APPKIT_EXPORT NSString *NSOutlineViewSelectionDidChangeNotification;
|
||||||
APPKIT_EXPORT NSString *NSOutlineViewSelectionIsChangingNotification;
|
APPKIT_EXPORT NSString *NSOutlineViewSelectionIsChangingNotification;
|
||||||
APPKIT_EXPORT NSString *NSOutlineViewItemDidExpandNotification;
|
APPKIT_EXPORT NSString *NSOutlineViewItemDidExpandNotification;
|
||||||
APPKIT_EXPORT NSString *NSOutlineViewItemDidCollapseNotification;
|
APPKIT_EXPORT NSString *NSOutlineViewItemDidCollapseNotification;
|
||||||
|
APPKIT_EXPORT NSString *NSOutlineViewItemWillExpandNotification;
|
||||||
|
APPKIT_EXPORT NSString *NSOutlineViewItemWillCollapseNotification;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Methods Implemented by the Delegate
|
* Methods Implemented by the Delegate
|
||||||
*/
|
*/
|
||||||
@interface NSObject (NSOutlineViewDelegate)
|
@interface NSObject (NSOutlineViewDelegate)
|
||||||
|
// notification methods
|
||||||
- (BOOL) outlineView: (NSOutlineView *)aOutlineView
|
|
||||||
shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|
||||||
row: (int)rowIndex;
|
|
||||||
- (BOOL) outlineView: (NSOutlineView *)aOutlineView
|
|
||||||
shouldSelectRow: (int)rowIndex;
|
|
||||||
- (BOOL) outlineView: (NSOutlineView *)aOutlineView
|
|
||||||
shouldSelectTableColumn: (NSTableColumn *)aTableColumn;
|
|
||||||
- (void) outlineView: (NSOutlineView *)aOutlineView
|
|
||||||
willDisplayCell: (id)aCell
|
|
||||||
forTableColumn: (NSTableColumn *)aTableColumn
|
|
||||||
row: (int)rowIndex;
|
|
||||||
- (void) outlineViewColumnDidMove: (NSNotification *)aNotification;
|
- (void) outlineViewColumnDidMove: (NSNotification *)aNotification;
|
||||||
- (void) outlineViewColumnDidResize: (NSNotification *)aNotification;
|
- (void) outlineViewColumnDidResize: (NSNotification *)aNotification;
|
||||||
|
- (void) outlineViewItemDidCollapse: (NSNotification *)aNotification;
|
||||||
|
- (void) outlineViewItemDidExpand: (NSNotification *)aNotification;
|
||||||
|
- (void) outlineViewItemWillCollapse: (NSNotification *)aNotification;
|
||||||
|
- (void) outlineViewItemWillExpand: (NSNotification *)aNotification;
|
||||||
- (void) outlineViewSelectionDidChange: (NSNotification *)aNotification;
|
- (void) outlineViewSelectionDidChange: (NSNotification *)aNotification;
|
||||||
- (void) outlineViewSelectionIsChanging: (NSNotification *)aNotification;
|
- (void) outlineViewSelectionIsChanging: (NSNotification *)aNotification;
|
||||||
- (void) outlineViewItemDidExpand: (NSNotification *)aNotification;
|
|
||||||
- (void) outlineViewItemDidCollapse: (NSNotification *)aNotification;
|
// delegate methods
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
shouldCollapseItem: (id)item;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
shouldEditTableColumn: (NSTableColumn *)tableColumn
|
||||||
|
item: (id)item;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
shouldExpandItem: (id)item;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
shouldSelectItem: (id)item;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
shouldSelectTableColumn: (NSTableColumn *)tableColumn;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
willDisplayCell: (id)cell
|
||||||
|
forTableColumn: (NSTableColumn *)tableColumn
|
||||||
|
item: (id)item;
|
||||||
|
- (BOOL) outlineView: (NSOutlineView *)outlineView
|
||||||
|
willDisplayOutlineCell: (id)cell
|
||||||
|
forTableColumn: (NSTableColumn *)tableColumn
|
||||||
|
item: (id)item;
|
||||||
|
- (BOOL) selectionShouldChangeInOutlineView: (NSOutlineView *)outlineView;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* _GNUstep_H_NSOutlineView */
|
#endif /* _GNUstep_H_NSOutlineView */
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -342,6 +342,16 @@ NSString *NSTableViewColumnDidMoveNotification = @"TableViewColumnDidMove";
|
||||||
NSString *NSTableViewColumnDidResizeNotification = @"TableViewColumnDidResize";
|
NSString *NSTableViewColumnDidResizeNotification = @"TableViewColumnDidResize";
|
||||||
NSString *NSTableViewSelectionIsChangingNotification = @"TableViewSelectionIsChanging";
|
NSString *NSTableViewSelectionIsChangingNotification = @"TableViewSelectionIsChanging";
|
||||||
|
|
||||||
|
// NSOutlineView notifications
|
||||||
|
NSString *NSOutlineViewSelectionDidChangeNotification = @"OutlineViewSelectionDidChange";
|
||||||
|
NSString *NSOutlineViewColumnDidMoveNotification = @"OutlineViewColumnDidMove";
|
||||||
|
NSString *NSOutlineViewColumnDidResizeNotification = @"OutlineViewColumnDidResize";
|
||||||
|
NSString *NSOutlineViewSelectionIsChangingNotification = @"OutlineViewSelectionIsChanging";
|
||||||
|
NSString *NSOutlineViewItemDidExpandNotification = @"OutlineViewItemDidExpand";
|
||||||
|
NSString *NSOutlineViewItemDidCollapseNotification = @"OutlineViewItemDidCollapse";
|
||||||
|
NSString *NSOutlineViewItemWillExpandNotification = @"OutlineViewItemWillExpand";
|
||||||
|
NSString *NSOutlineViewItemWillCollapseNotification = @"OutlineViewItemWillCollapse";
|
||||||
|
|
||||||
// NSWindow notifications
|
// NSWindow notifications
|
||||||
NSString *NSWindowDidBecomeKeyNotification = @"WindowDidBecomeKey";
|
NSString *NSWindowDidBecomeKeyNotification = @"WindowDidBecomeKey";
|
||||||
NSString *NSWindowDidBecomeMainNotification = @"WindowDidBecomeMain";
|
NSString *NSWindowDidBecomeMainNotification = @"WindowDidBecomeMain";
|
||||||
|
|
Loading…
Reference in a new issue