mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Merge 2ca264ed91
into f39a2644f6
This commit is contained in:
commit
0ca704cfe8
22 changed files with 225 additions and 16 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
@ -33,6 +33,10 @@ env:
|
|||
libcurl4-gnutls-dev
|
||||
libgmp-dev
|
||||
libcairo2-dev
|
||||
libjpeg-dev
|
||||
libtiff-dev
|
||||
libpng-dev
|
||||
libicns-dev
|
||||
|
||||
# packages for GCC Objective-C runtime
|
||||
APT_PACKAGES_gcc: >-
|
||||
|
|
|
@ -73,6 +73,7 @@ Gorm_RESOURCE_FILES = \
|
|||
Palettes/2Controls/2Controls.palette \
|
||||
Palettes/3Containers/3Containers.palette \
|
||||
Palettes/4Data/4Data.palette \
|
||||
Palettes/5Boxes/5Boxes.palette \
|
||||
Images/FileIcon_gmodel.tiff \
|
||||
Images/GormEHCoil.tiff \
|
||||
Images/GormEHLine.tiff \
|
||||
|
|
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Hbox.tiff
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Hbox.tiff
Normal file
Binary file not shown.
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Table.tiff
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Table.tiff
Normal file
Binary file not shown.
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Vbox.tiff
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/Vbox.tiff
Normal file
Binary file not shown.
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
BoxesPalette = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
vview,
|
||||
hview,
|
||||
tview,
|
||||
vimage,
|
||||
himage,
|
||||
timage
|
||||
);
|
||||
Super = IBPalette;
|
||||
};
|
||||
}
|
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/data.info
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/data.info
Normal file
Binary file not shown.
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/objects.gorm
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.gorm/objects.gorm
Normal file
Binary file not shown.
15
Applications/Gorm/Palettes/5Boxes/BoxesPalette.h
Normal file
15
Applications/Gorm/Palettes/5Boxes/BoxesPalette.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
@interface BoxesPalette : IBPalette
|
||||
{
|
||||
id vview;
|
||||
id hview;
|
||||
id tview;
|
||||
id vimage;
|
||||
id himage;
|
||||
id timage;
|
||||
}
|
||||
@end
|
50
Applications/Gorm/Palettes/5Boxes/BoxesPalette.m
Normal file
50
Applications/Gorm/Palettes/5Boxes/BoxesPalette.m
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <GNUstepGUI/GSTable.h>
|
||||
#include "BoxesPalette.h"
|
||||
|
||||
@interface GSTable (GormDrawingExtension)
|
||||
- (void) drawRect: (NSRect)rect;
|
||||
@end
|
||||
|
||||
@implementation GSTable (GormDrawingExtension)
|
||||
- (void) drawRect: (NSRect)aRect
|
||||
{
|
||||
// draw whatever the parent view contains.
|
||||
[super drawRect: aRect];
|
||||
|
||||
if([(id<IB>)NSApp isTestingInterface] == NO)
|
||||
{
|
||||
CGFloat dot_dash[] = {1.0, 1.0};
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
|
||||
// Draw a green box;
|
||||
[[NSColor blueColor] set];
|
||||
DPSsetlinewidth(ctxt, 1.0);
|
||||
DPSsetdash(ctxt, dot_dash, 4, 0.0);
|
||||
DPSrectstroke(ctxt, NSMinX(aRect) + 0.5, NSMinY(aRect) + 0.5,
|
||||
NSWidth(aRect) - 1.0, NSHeight(aRect) - 1.0);
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation BoxesPalette
|
||||
|
||||
- (void)finishInstantiate
|
||||
{
|
||||
// make the associations...
|
||||
[self associateObject: tview
|
||||
type: IBViewPboardType
|
||||
with: timage];
|
||||
|
||||
[self associateObject: hview
|
||||
type: IBViewPboardType
|
||||
with: himage];
|
||||
|
||||
[self associateObject: vview
|
||||
type: IBViewPboardType
|
||||
with: vimage];
|
||||
}
|
||||
|
||||
@end
|
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.tiff
Normal file
BIN
Applications/Gorm/Palettes/5Boxes/BoxesPalette.tiff
Normal file
Binary file not shown.
49
Applications/Gorm/Palettes/5Boxes/GNUmakefile
Normal file
49
Applications/Gorm/Palettes/5Boxes/GNUmakefile
Normal file
|
@ -0,0 +1,49 @@
|
|||
# GNUmakefile
|
||||
#
|
||||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
# Date: 1999
|
||||
#
|
||||
# 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.
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
PALETTE_NAME = 5Boxes
|
||||
5Boxes_PALETTE_ICON = BoxesPalette
|
||||
5Boxes_OBJC_FILES = \
|
||||
BoxesPalette.m \
|
||||
GSTableInspector.m
|
||||
|
||||
5Boxes_PRINCIPAL_CLASS = BoxesPalette
|
||||
|
||||
5Boxes_RESOURCE_FILES = \
|
||||
BoxesPalette.tiff \
|
||||
BoxesPalette.gorm \
|
||||
GSTableInspector.gorm \
|
||||
palette.table
|
||||
|
||||
5Boxes_STANDARD_INSTALL = no
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/palette.make
|
||||
|
||||
-include GNUmakefile.postamble
|
||||
|
2
Applications/Gorm/Palettes/5Boxes/GNUmakefile.preamble
Normal file
2
Applications/Gorm/Palettes/5Boxes/GNUmakefile.preamble
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
GSTableInspector = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
matrix
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
}
|
Binary file not shown.
Binary file not shown.
10
Applications/Gorm/Palettes/5Boxes/GSTableInspector.h
Normal file
10
Applications/Gorm/Palettes/5Boxes/GSTableInspector.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
@interface GSTableInspector : IBInspector
|
||||
{
|
||||
id matrix;
|
||||
}
|
||||
@end
|
49
Applications/Gorm/Palettes/5Boxes/GSTableInspector.m
Normal file
49
Applications/Gorm/Palettes/5Boxes/GSTableInspector.m
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* All Rights reserved */
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "GSTableInspector.h"
|
||||
#include <GNUstepGUI/GSTable.h>
|
||||
|
||||
@implementation GSTable (IBObjectAdditions)
|
||||
- (NSString *)inspectorClassName
|
||||
{
|
||||
return @"GSTableInspector";
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GSTableInspector
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ([super init] == nil)
|
||||
return nil;
|
||||
|
||||
if ([NSBundle loadNibNamed: @"GSTableInspector" owner: self] == NO)
|
||||
{
|
||||
NSLog(@"Could not load GSTableInspector");
|
||||
return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) ok: (id)sender
|
||||
{
|
||||
[super ok: sender];
|
||||
NSLog(@"Testing...");
|
||||
|
||||
if(sender == matrix)
|
||||
{
|
||||
[object setXBorder: [[sender cellAtIndex: 0] intValue]];
|
||||
[object setYBorder: [[sender cellAtIndex: 1] intValue]];
|
||||
[object setMinXBorder: [[sender cellAtIndex: 2] intValue]];
|
||||
[object setMaxXBorder: [[sender cellAtIndex: 3] intValue]];
|
||||
[object setMinYBorder: [[sender cellAtIndex: 4] intValue]];
|
||||
[object setMaxYBorder: [[sender cellAtIndex: 5] intValue]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setObject: (id)anobject
|
||||
{
|
||||
[super setObject: anobject];
|
||||
}
|
||||
@end
|
6
Applications/Gorm/Palettes/5Boxes/palette.table
Normal file
6
Applications/Gorm/Palettes/5Boxes/palette.table
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
NibFile = "BoxesPalette";
|
||||
Class = "BoxesPalette";
|
||||
Icon = "BoxesPalette";
|
||||
ExportClasses = ("GSTable","GSVbox","GSHbox");
|
||||
}
|
|
@ -32,7 +32,8 @@ SUBPROJECTS = \
|
|||
1Windows \
|
||||
2Controls \
|
||||
3Containers \
|
||||
4Data
|
||||
4Data \
|
||||
5Boxes
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
1Windows.palette,
|
||||
2Controls.palette,
|
||||
3Containers.palette,
|
||||
4Data.palette
|
||||
4Data.palette,
|
||||
5Boxes.palette
|
||||
);
|
||||
BuiltinPlugins = (
|
||||
Gorm.plugin,
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
@end
|
||||
|
||||
@implementation GormPalettePanel
|
||||
/*
|
||||
- (BOOL) canBecomeKeyWindow
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
- (BOOL) canBecomeMainWindow
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
*/
|
||||
@end
|
||||
|
||||
@interface GormPaletteView : NSView
|
||||
|
@ -363,13 +353,16 @@ static NSImage *dragImage = nil;
|
|||
inDirectory: nil];
|
||||
if ([array count] > 0)
|
||||
{
|
||||
unsigned index;
|
||||
|
||||
NSEnumerator *en = nil;
|
||||
NSString *paletteName = nil;
|
||||
|
||||
array = [array sortedArrayUsingSelector: @selector(compare:)];
|
||||
en = [array objectEnumerator];
|
||||
|
||||
for (index = 0; index < [array count]; index++)
|
||||
while ((paletteName = [en nextObject]) != nil)
|
||||
{
|
||||
[self loadPalette: [array objectAtIndex: index]];
|
||||
NSLog(@"Built in palette... %@", paletteName);
|
||||
[self loadPalette: paletteName];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -380,6 +373,7 @@ static NSImage *dragImage = nil;
|
|||
id paletteName = nil;
|
||||
while((paletteName = [en nextObject]) != nil)
|
||||
{
|
||||
NSLog(@"User Palettes Loading... %@", paletteName);
|
||||
[self loadPalette: paletteName];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue