diff --git a/ChangeLog b/ChangeLog index f217855e..4cbfac9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,14 @@ -2004-05-28 21:48 Gregory John Casamento +2004-05-29 08:56 Gregory John Casamento + + * Palettes/2Controls/main.m: Had some DOS formatted lines. Simply + converted to UNIX format. + * Palettes/3Containers/main.m: Changed the default border type + for both NSTableView and NSOutlineView to NSBezelBorder in + -finishInstantiate. + * Palettes/4Data/main.m: Changed the default border type for the + NSTextView to NSBezelBorder in -finishInstantiate. + +2004-05-29 07:30 Gregory John Casamento * Palettes/4Data/GormNSComboBoxInspector.gorm: Improved the layout a little. diff --git a/Palettes/2Controls/main.m b/Palettes/2Controls/main.m index dcf3a2dc..a31741bc 100644 --- a/Palettes/2Controls/main.m +++ b/Palettes/2Controls/main.m @@ -1,180 +1,180 @@ -/* main.m - - 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 -#include -#include -#include "GormCustomView.h" - -// @class GormPopUpNSMenu; -@class GormNSPopUpButton; - -@interface ControlsPalette: IBPalette -{ -} -@end - - -@implementation ControlsPalette -- (void) finishInstantiate -{ - NSView *contents; - id v; - - window = [[NSWindow alloc] initWithContentRect: NSMakeRect(0, 0, 272, 192) - styleMask: NSBorderlessWindowMask - backing: NSBackingStoreRetained - defer: NO]; - contents = [window contentView]; - - -/*******************/ -/* First Column... */ -/*******************/ - - // Editable text field - v = [[NSTextField alloc] initWithFrame: NSMakeRect(10, 147, 56, 21)]; - [v setEditable: YES]; - [v setStringValue: @"Text"]; - [contents addSubview: v]; - RELEASE(v); - - // Push button - v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 110, 56, 24)]; - [v setButtonType: NSMomentaryPushButton]; - [v setTitle: @"Button"]; - [contents addSubview: v]; - RELEASE(v); - - // Checkbox - v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 80, 56, 16)]; - [v setButtonType: NSSwitchButton]; - [v setImagePosition: NSImageRight]; - [v setTitle: @"Switch"]; - [v setBordered: NO]; - [contents addSubview: v]; - RELEASE(v); - - // Radio button: default on - v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 55, 56, 16)]; - [v setButtonType: NSRadioButton]; - [v setImagePosition: NSImageLeft]; - [v setTitle: @"Radio"]; - [v setBordered: NO]; - [v setState: NSOnState]; - [contents addSubview: v]; - RELEASE(v); - - // Radio button: default off - v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 37, 56, 16)]; - [v setButtonType: NSRadioButton]; - [v setImagePosition: NSImageLeft]; - [v setTitle: @"Radio"]; - [v setBordered: NO]; - [v setState: NSOffState]; - [contents addSubview: v]; - RELEASE(v); - - -/********************/ -/* Second Column... */ -/********************/ - - // Non editable text field (label) - v = [[NSTextField alloc] initWithFrame: NSMakeRect(78, 152, 83, 18)]; - [v setEditable: NO]; - [v setSelectable: NO]; - [v setBezeled: NO]; - [v setAlignment: NSCenterTextAlignment]; - [v setFont: [NSFont systemFontOfSize: 14.0]]; - [v setDrawsBackground: NO]; - [v setStringValue: @"Title"]; - [contents addSubview: v]; - RELEASE(v); - - // Group box - v = [[NSBox alloc] initWithFrame: NSMakeRect(78, 98, 53, 44)]; - [v setTitle: @"Box"]; - [contents addSubview: v]; - RELEASE(v); - - // Color well - v = [[NSColorWell alloc] initWithFrame: NSMakeRect(78, 62, 53, 30)]; - [contents addSubview: v]; - RELEASE(v); - - // Horizontal Slider - v = [[NSSlider alloc] initWithFrame: NSMakeRect(78, 39, 83, 16)]; - [v setDoubleValue: 0]; - [v setContinuous: YES]; - [contents addSubview: v]; - RELEASE(v); - - // Vertical Slider - v = [[NSSlider alloc] initWithFrame: NSMakeRect(145, 62, 16, 76)]; - [v setDoubleValue: 0]; - [v setContinuous: YES]; - [contents addSubview: v]; - RELEASE(v); - - // Progress Indicator - v = [[NSProgressIndicator alloc] initWithFrame: NSMakeRect(78, 15, 83, 18)]; - [v setIndeterminate: NO]; - [v setDoubleValue: 50.]; - [contents addSubview: v]; - RELEASE(v); - - -/*******************/ -/* Third Column... */ -/*******************/ - - // Popup button - v = [[GormNSPopUpButton alloc] initWithFrame: NSMakeRect(172, 147, 89, 20)]; - [v addItemWithTitle: @"Item 1"]; - [v addItemWithTitle: @"Item 2"]; - [v addItemWithTitle: @"Item 3"]; - [contents addSubview: v]; - RELEASE(v); - - // Form - v = [[NSForm alloc] initWithFrame: NSMakeRect(172, 101, 87, 45)]; - [v addEntry: @"Field 1"]; - [v addEntry: @"Field 2"]; - [v setEntryWidth: 87]; - [v setInterlineSpacing: 3]; - [v setCellSize: NSMakeSize([v cellSize].width, 21)]; - [contents addSubview: v]; - RELEASE(v); - - // Stepper - v = [[NSStepper alloc] initWithFrame: NSMakeRect(172, 76, 16, 23)]; - [contents addSubview: v]; - RELEASE(v); - - // CustomView - v = [[GormCustomView alloc] initWithFrame: NSMakeRect(172, 19, 89, 40)]; - [contents addSubview: v]; - RELEASE(v); -} -@end +/* main.m + + 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 +#include +#include +#include "GormCustomView.h" + +// @class GormPopUpNSMenu; +@class GormNSPopUpButton; + +@interface ControlsPalette: IBPalette +{ +} +@end + + +@implementation ControlsPalette +- (void) finishInstantiate +{ + NSView *contents; + id v; + + window = [[NSWindow alloc] initWithContentRect: NSMakeRect(0, 0, 272, 192) + styleMask: NSBorderlessWindowMask + backing: NSBackingStoreRetained + defer: NO]; + contents = [window contentView]; + + +/*******************/ +/* First Column... */ +/*******************/ + + // Editable text field + v = [[NSTextField alloc] initWithFrame: NSMakeRect(10, 147, 56, 21)]; + [v setEditable: YES]; + [v setStringValue: @"Text"]; + [contents addSubview: v]; + RELEASE(v); + + // Push button + v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 110, 56, 24)]; + [v setButtonType: NSMomentaryPushButton]; + [v setTitle: @"Button"]; + [contents addSubview: v]; + RELEASE(v); + + // Checkbox + v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 80, 56, 16)]; + [v setButtonType: NSSwitchButton]; + [v setImagePosition: NSImageRight]; + [v setTitle: @"Switch"]; + [v setBordered: NO]; + [contents addSubview: v]; + RELEASE(v); + + // Radio button: default on + v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 55, 56, 16)]; + [v setButtonType: NSRadioButton]; + [v setImagePosition: NSImageLeft]; + [v setTitle: @"Radio"]; + [v setBordered: NO]; + [v setState: NSOnState]; + [contents addSubview: v]; + RELEASE(v); + + // Radio button: default off + v = [[NSButton alloc] initWithFrame: NSMakeRect(10, 37, 56, 16)]; + [v setButtonType: NSRadioButton]; + [v setImagePosition: NSImageLeft]; + [v setTitle: @"Radio"]; + [v setBordered: NO]; + [v setState: NSOffState]; + [contents addSubview: v]; + RELEASE(v); + + +/********************/ +/* Second Column... */ +/********************/ + + // Non editable text field (label) + v = [[NSTextField alloc] initWithFrame: NSMakeRect(78, 152, 83, 18)]; + [v setEditable: NO]; + [v setSelectable: NO]; + [v setBezeled: NO]; + [v setAlignment: NSCenterTextAlignment]; + [v setFont: [NSFont systemFontOfSize: 14.0]]; + [v setDrawsBackground: NO]; + [v setStringValue: @"Title"]; + [contents addSubview: v]; + RELEASE(v); + + // Group box + v = [[NSBox alloc] initWithFrame: NSMakeRect(78, 98, 53, 44)]; + [v setTitle: @"Box"]; + [contents addSubview: v]; + RELEASE(v); + + // Color well + v = [[NSColorWell alloc] initWithFrame: NSMakeRect(78, 62, 53, 30)]; + [contents addSubview: v]; + RELEASE(v); + + // Horizontal Slider + v = [[NSSlider alloc] initWithFrame: NSMakeRect(78, 39, 83, 16)]; + [v setDoubleValue: 0]; + [v setContinuous: YES]; + [contents addSubview: v]; + RELEASE(v); + + // Vertical Slider + v = [[NSSlider alloc] initWithFrame: NSMakeRect(145, 62, 16, 76)]; + [v setDoubleValue: 0]; + [v setContinuous: YES]; + [contents addSubview: v]; + RELEASE(v); + + // Progress Indicator + v = [[NSProgressIndicator alloc] initWithFrame: NSMakeRect(78, 15, 83, 18)]; + [v setIndeterminate: NO]; + [v setDoubleValue: 50.]; + [contents addSubview: v]; + RELEASE(v); + + +/*******************/ +/* Third Column... */ +/*******************/ + + // Popup button + v = [[GormNSPopUpButton alloc] initWithFrame: NSMakeRect(172, 147, 89, 20)]; + [v addItemWithTitle: @"Item 1"]; + [v addItemWithTitle: @"Item 2"]; + [v addItemWithTitle: @"Item 3"]; + [contents addSubview: v]; + RELEASE(v); + + // Form + v = [[NSForm alloc] initWithFrame: NSMakeRect(172, 101, 87, 45)]; + [v addEntry: @"Field 1"]; + [v addEntry: @"Field 2"]; + [v setEntryWidth: 87]; + [v setInterlineSpacing: 3]; + [v setCellSize: NSMakeSize([v cellSize].width, 21)]; + [contents addSubview: v]; + RELEASE(v); + + // Stepper + v = [[NSStepper alloc] initWithFrame: NSMakeRect(172, 76, 16, 23)]; + [contents addSubview: v]; + RELEASE(v); + + // CustomView + v = [[GormCustomView alloc] initWithFrame: NSMakeRect(172, 19, 89, 40)]; + [contents addSubview: v]; + RELEASE(v); +} +@end diff --git a/Palettes/3Containers/main.m b/Palettes/3Containers/main.m index 71014fe2..a4615710 100644 --- a/Palettes/3Containers/main.m +++ b/Palettes/3Containers/main.m @@ -109,6 +109,7 @@ [v setHasVerticalScroller: YES]; [v setHasHorizontalScroller: NO]; contentSize = [v contentSize]; + [v setBorderType: NSBezelBorder]; tv = [[GormNSTableView alloc] initWithFrame: NSZeroRect]; @@ -143,6 +144,7 @@ [v setHasVerticalScroller: YES]; [v setHasHorizontalScroller: NO]; contentSize = [v contentSize]; + [v setBorderType: NSBezelBorder]; ov = [[GormNSOutlineView alloc] initWithFrame: NSZeroRect]; @@ -182,9 +184,7 @@ [v setDocumentView: ov]; RELEASE(ov); - RELEASE(v); - - + RELEASE(v); } @end diff --git a/Palettes/4Data/main.m b/Palettes/4Data/main.m index c468bc40..9561d94f 100644 --- a/Palettes/4Data/main.m +++ b/Palettes/4Data/main.m @@ -217,6 +217,7 @@ int defaultDateFormatIndex = 3; [[v contentView] setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable]; [[v contentView] setAutoresizesSubviews:YES]; + [v setBorderType: NSBezelBorder]; rect = [[v contentView] frame];