*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18075 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-11-11 19:40:18 +00:00
parent 04ee2f9928
commit ff53f21b06
6 changed files with 35 additions and 29 deletions

View file

@ -1,3 +1,11 @@
2003-11-11 14:41 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSApplication.m: (-targetForAction:): Added code to check the
document of the main window as well.
* NSToolbar.m: Additional implementation.
* NSWindow.[hm]: Added some code for drawing the toolbar.
* GSToolbarView.h: added initWithToolbar: method.
2003-11-07 15:28 Alexander Malmberg <alexander@malmberg.org>
* Source/NSControl.m (-mouseDown:): Rewrite to use -setHighlighted:

View file

@ -39,6 +39,7 @@
{
NSToolbar *_toolbar;
}
- (id) initWithToolbar: (NSToolbar *)toolbar;
- (void) setToolbar: (NSToolbar *)toolbar;
- (NSToolbar *) toolbar;
@end

View file

@ -140,7 +140,7 @@ APPKIT_EXPORT NSSize NSTokenSize;
float _alphaValue;
NSToolbar *_toolbar;
id _toolbarView;
NSCachedImageRep *_cachedImage;
NSPoint _cachedImageOrigin;

View file

@ -1693,11 +1693,23 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
{
return mainWindow;
}
resp = [mainWindow delegate];
if (resp != nil && [resp respondsToSelector: aSelector])
{
return resp;
}
if ([NSDocumentController isDocumentBasedApplication])
{
resp = [[NSDocumentController sharedDocumentController]
documentForWindow: mainWindow];
if (resp != nil && [resp respondsToSelector: aSelector])
{
return resp;
}
}
}
if ([self respondsToSelector: aSelector])

View file

@ -45,6 +45,15 @@ static NSNotificationCenter *nc = nil;
static const int current_version = 1;
@implementation GSToolbarView
- (id) initWithToolbar: (NSToolbar *)toolbar
{
if((self = [super init]) != nil)
{
ASSIGN(_toolbar,toolbar);
}
return self;
}
- (void) dealloc
{
RELEASE(_toolbar);
@ -83,33 +92,6 @@ static const int current_version = 1;
}
@end
@interface GSToolbarButton : NSButton
{
NSToolbarItem *_item;
}
@end
@implementation GSToolbarButton
- (id) initWithItem: (NSToolbarItem *)item
{
[super init];
ASSIGN(_item, item);
return self;
}
- (void) dealloc
{
RELEASE (_item);
[super dealloc];
}
- (void) drawRect: (NSRect)aRect
{
// set the image and draw using the super class...
[super drawRect: aRect];
}
@end
@implementation NSToolbar (GNUstepPrivate)
- (id) _toolbarView
{

View file

@ -70,6 +70,7 @@
#include "AppKit/NSToolbar.h"
#include "GNUstepGUI/GSTrackingRect.h"
#include "GNUstepGUI/GSDisplayServer.h"
#include "GNUstepGUI/GSToolbarView.h"
BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo);
@ -4015,8 +4016,10 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
- (void) setToolbar: (NSToolbar*)toolbar
{
// assign and setup the toolbar...
ASSIGN(_toolbar, toolbar);
// FIXME The toolbar needs to know about the window!
_toolbarView = [GSToolbarView initWithToolbar: _toolbar];
}
- (NSToolbar *) toolbar