mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 11:00:59 +00:00
*** 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:
parent
061ef7d091
commit
b00d2c51eb
6 changed files with 35 additions and 29 deletions
|
@ -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>
|
2003-11-07 15:28 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/NSControl.m (-mouseDown:): Rewrite to use -setHighlighted:
|
* Source/NSControl.m (-mouseDown:): Rewrite to use -setHighlighted:
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
{
|
{
|
||||||
NSToolbar *_toolbar;
|
NSToolbar *_toolbar;
|
||||||
}
|
}
|
||||||
|
- (id) initWithToolbar: (NSToolbar *)toolbar;
|
||||||
- (void) setToolbar: (NSToolbar *)toolbar;
|
- (void) setToolbar: (NSToolbar *)toolbar;
|
||||||
- (NSToolbar *) toolbar;
|
- (NSToolbar *) toolbar;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -140,7 +140,7 @@ APPKIT_EXPORT NSSize NSTokenSize;
|
||||||
float _alphaValue;
|
float _alphaValue;
|
||||||
|
|
||||||
NSToolbar *_toolbar;
|
NSToolbar *_toolbar;
|
||||||
|
id _toolbarView;
|
||||||
NSCachedImageRep *_cachedImage;
|
NSCachedImageRep *_cachedImage;
|
||||||
NSPoint _cachedImageOrigin;
|
NSPoint _cachedImageOrigin;
|
||||||
|
|
||||||
|
|
|
@ -1693,11 +1693,23 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
{
|
{
|
||||||
return mainWindow;
|
return mainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
resp = [mainWindow delegate];
|
resp = [mainWindow delegate];
|
||||||
if (resp != nil && [resp respondsToSelector: aSelector])
|
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||||
{
|
{
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ([NSDocumentController isDocumentBasedApplication])
|
||||||
|
{
|
||||||
|
resp = [[NSDocumentController sharedDocumentController]
|
||||||
|
documentForWindow: mainWindow];
|
||||||
|
|
||||||
|
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||||
|
{
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([self respondsToSelector: aSelector])
|
if ([self respondsToSelector: aSelector])
|
||||||
|
|
|
@ -45,6 +45,15 @@ static NSNotificationCenter *nc = nil;
|
||||||
static const int current_version = 1;
|
static const int current_version = 1;
|
||||||
|
|
||||||
@implementation GSToolbarView
|
@implementation GSToolbarView
|
||||||
|
- (id) initWithToolbar: (NSToolbar *)toolbar
|
||||||
|
{
|
||||||
|
if((self = [super init]) != nil)
|
||||||
|
{
|
||||||
|
ASSIGN(_toolbar,toolbar);
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
RELEASE(_toolbar);
|
RELEASE(_toolbar);
|
||||||
|
@ -83,33 +92,6 @@ static const int current_version = 1;
|
||||||
}
|
}
|
||||||
@end
|
@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)
|
@implementation NSToolbar (GNUstepPrivate)
|
||||||
- (id) _toolbarView
|
- (id) _toolbarView
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
#include "AppKit/NSToolbar.h"
|
#include "AppKit/NSToolbar.h"
|
||||||
#include "GNUstepGUI/GSTrackingRect.h"
|
#include "GNUstepGUI/GSTrackingRect.h"
|
||||||
#include "GNUstepGUI/GSDisplayServer.h"
|
#include "GNUstepGUI/GSDisplayServer.h"
|
||||||
|
#include "GNUstepGUI/GSToolbarView.h"
|
||||||
|
|
||||||
BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo);
|
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
|
- (void) setToolbar: (NSToolbar*)toolbar
|
||||||
{
|
{
|
||||||
|
// assign and setup the toolbar...
|
||||||
ASSIGN(_toolbar, toolbar);
|
ASSIGN(_toolbar, toolbar);
|
||||||
// FIXME The toolbar needs to know about the window!
|
_toolbarView = [GSToolbarView initWithToolbar: _toolbar];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSToolbar *) toolbar
|
- (NSToolbar *) toolbar
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue