mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
* GormCore/GormWindowEditor.m: Remove IBApplicationAdditions category.
* Palettes/1Windows/DrawerSmall.tiff: icon for NSDrawer in objects view. * Palettes/1Windows/Drawer.tiff: Icon for drawer on palette * Palettes/1Windows/GNUmakefile: Added new files. * Palettes/1Windows/inspectors.m: Add IBApplicationAdditions category for NSWindow (from GormWindowEditor above) and add category for NSDrawer. * Palettes/1Windows/WindowsPalette.h: Moved interface for WindowsPalette here. * Palettes/1Windows/WindowsPalette.m: Removed interface and added #include * Resources/ClassInformation.plist: Added ivars which were missing for NSDrawer. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
39b213700b
commit
a72d9dae48
9 changed files with 119 additions and 40 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2006-09-12 23:10-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormWindowEditor.m: Remove IBApplicationAdditions category.
|
||||
* Palettes/1Windows/DrawerSmall.tiff: icon for NSDrawer in objects
|
||||
view.
|
||||
* Palettes/1Windows/Drawer.tiff: Icon for drawer on palette
|
||||
* Palettes/1Windows/GNUmakefile: Added new files.
|
||||
* Palettes/1Windows/inspectors.m: Add IBApplicationAdditions category
|
||||
for NSWindow (from GormWindowEditor above) and add category for
|
||||
NSDrawer.
|
||||
* Palettes/1Windows/WindowsPalette.h: Moved interface for
|
||||
WindowsPalette here.
|
||||
* Palettes/1Windows/WindowsPalette.m: Removed interface and added
|
||||
#include
|
||||
* Resources/ClassInformation.plist: Added ivars which were missing
|
||||
for NSDrawer.
|
||||
|
||||
2006-08-27 01:37-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormBoxEditor.m: Check to see if the subview responds
|
||||
|
|
|
@ -37,30 +37,6 @@
|
|||
|
||||
#define _EO ((NSWindow *)_editedObject)
|
||||
|
||||
@implementation NSWindow (IBObjectAdditions)
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormWindowEditor";
|
||||
}
|
||||
|
||||
/*
|
||||
* Method to return the image that should be used to display windows within
|
||||
* the matrix containing the objects in a document.
|
||||
*/
|
||||
- (NSImage*) imageForViewer
|
||||
{
|
||||
static NSImage *image = nil;
|
||||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *path = [bundle pathForImageResource: @"GormWindow"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
return image;
|
||||
}
|
||||
@end
|
||||
|
||||
/*
|
||||
* Default implementations of methods used for updating a view by
|
||||
* direct action through an editor.
|
||||
|
|
BIN
Palettes/1Windows/Drawer.tiff
Normal file
BIN
Palettes/1Windows/Drawer.tiff
Normal file
Binary file not shown.
BIN
Palettes/1Windows/DrawerSmall.tiff
Normal file
BIN
Palettes/1Windows/DrawerSmall.tiff
Normal file
Binary file not shown.
|
@ -38,13 +38,16 @@ PALETTE_NAME = 1Windows
|
|||
GormNSWindow.h \
|
||||
GormWindowAttributesInspector.h\
|
||||
GormWindowSizeInspector.h\
|
||||
GormNSPanel.h
|
||||
GormNSPanel.h \
|
||||
WindowsPalette.h
|
||||
|
||||
1Windows_PRINCIPAL_CLASS = WindowsPalette
|
||||
|
||||
1Windows_RESOURCE_FILES = \
|
||||
WindowsPalette.tiff \
|
||||
WindowDrag.tiff \
|
||||
Drawer.tiff \
|
||||
DrawerSmall.tiff \
|
||||
GormNSWindowSizeInspector.gorm \
|
||||
GormNSWindowInspector.gorm \
|
||||
palette.table
|
||||
|
|
29
Palettes/1Windows/WindowsPalette.h
Normal file
29
Palettes/1Windows/WindowsPalette.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
WindowsPalette.h
|
||||
|
||||
Copyright (C) 1999-2006 Free Software Foundation, Inc.
|
||||
|
||||
Author: Gregory Casamento <greg_casamento@yahoo.com>
|
||||
Date: 2006
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include <InterfaceBuilder/IBInspector.h>
|
||||
|
||||
@interface WindowsPalette: IBPalette
|
||||
@end
|
|
@ -34,6 +34,7 @@
|
|||
#include "GormNSPanel.h"
|
||||
#include "GormNSWindow.h"
|
||||
#include "GormWindowSizeInspector.h"
|
||||
#include "WindowsPalette.h"
|
||||
|
||||
@interface GormWindowMaker : NSObject <NSCoding>
|
||||
{
|
||||
|
@ -100,11 +101,6 @@
|
|||
}
|
||||
@end
|
||||
|
||||
@interface WindowsPalette: IBPalette
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation WindowsPalette
|
||||
- (void) finishInstantiate
|
||||
{
|
||||
|
@ -114,17 +110,20 @@
|
|||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"WindowDrag"];
|
||||
NSImage *dragImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
||||
NSString *drawerPath = [bundle pathForImageResource: @"Drawer"];
|
||||
NSImage *drawerImage = [[NSImage alloc] initWithContentsOfFile: drawerPath];
|
||||
NSFont *systemFont = [NSFont boldSystemFontOfSize: [NSFont systemFontSize]];
|
||||
RELEASE(originalWindow);
|
||||
originalWindow= [[NSWindow alloc] initWithContentRect:
|
||||
NSMakeRect(0, 0, 272, 192)
|
||||
styleMask: NSBorderlessWindowMask
|
||||
backing: NSBackingStoreRetained
|
||||
defer: NO];
|
||||
originalWindow = [[NSWindow alloc] initWithContentRect:
|
||||
NSMakeRect(0, 0, 272, 192)
|
||||
styleMask: NSBorderlessWindowMask
|
||||
backing: NSBackingStoreRetained
|
||||
defer: NO];
|
||||
contents = [originalWindow contentView];
|
||||
|
||||
w = [[GormWindowMaker alloc] init];
|
||||
v = [[NSButton alloc] initWithFrame: NSMakeRect(35, 60, 80, 64)];
|
||||
v = [[NSButton alloc] initWithFrame: NSMakeRect(35, 100, 80, 64)];
|
||||
[v setFont: systemFont];
|
||||
[v setBordered: NO];
|
||||
[v setImage: dragImage];
|
||||
[v setImagePosition: NSImageOverlaps];
|
||||
|
@ -137,7 +136,8 @@
|
|||
RELEASE(w);
|
||||
|
||||
w = [[GormPanelMaker alloc] init];
|
||||
v = [[NSButton alloc] initWithFrame: NSMakeRect(155, 60, 80, 64)];
|
||||
v = [[NSButton alloc] initWithFrame: NSMakeRect(155, 100, 80, 64)];
|
||||
[v setFont: systemFont];
|
||||
[v setBordered: NO];
|
||||
[v setImage: dragImage];
|
||||
[v setImagePosition: NSImageOverlaps];
|
||||
|
@ -149,7 +149,22 @@
|
|||
RELEASE(v);
|
||||
RELEASE(w);
|
||||
|
||||
w = [[NSDrawer alloc] init];
|
||||
v = [[NSButton alloc] initWithFrame: NSMakeRect(95, 30, 80, 64)];
|
||||
[v setFont: systemFont];
|
||||
[v setBordered: NO];
|
||||
[v setImage: drawerImage];
|
||||
[v setImagePosition: NSImageOverlaps];
|
||||
[v setTitle: @"Drawer"];
|
||||
[contents addSubview: v];
|
||||
[self associateObject: w
|
||||
type: IBObjectPboardType
|
||||
with: v];
|
||||
RELEASE(v);
|
||||
RELEASE(w);
|
||||
|
||||
RELEASE(dragImage);
|
||||
RELEASE(drawerImage);
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
#include "WindowsPalette.h"
|
||||
/*
|
||||
IBObjectAdditions category for NSPanel
|
||||
*/
|
||||
|
@ -45,4 +45,41 @@
|
|||
{
|
||||
return @"GormWindowAttributesInspector";
|
||||
}
|
||||
|
||||
- (NSString*) editorClassName
|
||||
{
|
||||
return @"GormWindowEditor";
|
||||
}
|
||||
|
||||
/*
|
||||
* Method to return the image that should be used to display windows within
|
||||
* the matrix containing the objects in a document.
|
||||
*/
|
||||
- (NSImage*) imageForViewer
|
||||
{
|
||||
static NSImage *image = nil;
|
||||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *path = [bundle pathForImageResource: @"GormWindow"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
return image;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSDrawer (IBObjectAdditions)
|
||||
- (NSImage*) imageForViewer
|
||||
{
|
||||
static NSImage *image = nil;
|
||||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [WindowsPalette class]];
|
||||
NSString *path = [bundle pathForImageResource: @"DrawerSmall"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
return image;
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -300,7 +300,9 @@
|
|||
"toggle:"
|
||||
);
|
||||
Outlets = (
|
||||
delegate
|
||||
delegate,
|
||||
contentView,
|
||||
parentWindow
|
||||
);
|
||||
Super = NSResponder;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue