From 09b2dba5cc2612792ed142c51a46e40066f5d733 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 26 Mar 2002 13:46:58 +0000 Subject: [PATCH] Removed GSTransparentView from GSTable which was making it more difficult to port to OS X git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13239 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Headers/gnustep/gui/GSTable.h | 4 +--- Source/GSTable.m | 27 ++++++--------------------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5fdd4a1b..2262b5956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Mar 26 14:33:24 2002 Nicola Pero + + * Source/GSTable.m: Removed GSTransparentView and replaced it with + a simple NSView. + * Headers/gnustep/gui/GSTable.h: Idem. + 2002-03-24 Adam Fedor * Source/NSStringDrawing.m (drawRun): Use new unicode functions diff --git a/Headers/gnustep/gui/GSTable.h b/Headers/gnustep/gui/GSTable.h index 4c540fe1b..0b66297b7 100644 --- a/Headers/gnustep/gui/GSTable.h +++ b/Headers/gnustep/gui/GSTable.h @@ -31,8 +31,6 @@ #include -@class GSTransparentView; - @interface GSTable: NSView { int _numberOfRows; @@ -47,7 +45,7 @@ // Each prisoner is enclosed in a jail (which is a subview under // our control). // Each prisoner is allowed to resize only inside its jail. - GSTransparentView **_jails; + NSView **_jails; // YES if the column/row should be expanded/reduced when the size // of the GSTable is expanded/reduced (this BOOL is otherwhere // called X/Y Resizing Enabled). diff --git a/Source/GSTable.m b/Source/GSTable.m index 7ed21df78..82ada4f2f 100644 --- a/Source/GSTable.m +++ b/Source/GSTable.m @@ -27,19 +27,6 @@ #include -// This is meant to make drawing invisible views a little faster -@interface GSTransparentView : NSView -@end -@implementation GSTransparentView --(void) lockFocusInRect: (NSRect)rect -{ -} --(void) unlockFocusNeedsFlush: (BOOL)flush -{ -} -@end - - @interface GSTable (Private) -(void) _updateRowSize: (int)row; -(void) _updateColumnSize: (int)column; @@ -89,7 +76,7 @@ _maxYBorder = 0; _jails = NSZoneMalloc (NSDefaultMallocZone (), - sizeof (GSTransparentView *) * (rows * columns)); + sizeof (NSView *) * (rows * columns)); _expandRow = NSZoneMalloc (NSDefaultMallocZone (), sizeof (BOOL) * rows); _expandColumn = NSZoneMalloc (NSDefaultMallocZone (), @@ -447,11 +434,9 @@ else // !_havePrisoner { if (prisonerNeedResize) - _jails[jailNumber] = [[GSTransparentView alloc] - initWithFrame: oldFrame]; + _jails[jailNumber] = [[NSView alloc] initWithFrame: oldFrame]; else // !prisonerNeedResize - _jails[jailNumber] = [[GSTransparentView alloc] - initWithFrame: theFrame]; + _jails[jailNumber] = [[NSView alloc] initWithFrame: theFrame]; [_jails[jailNumber] setAutoresizingMask: NSViewNotSizable]; [_jails[jailNumber] setAutoresizesSubviews: YES]; @@ -629,7 +614,7 @@ * (sizeof (BOOL))); _jails = NSZoneRealloc (NSDefaultMallocZone (), _jails, (_numberOfRows * _numberOfColumns) - * sizeof (GSTransparentView *)); + * sizeof (NSView *)); for (j = (_numberOfRows - 1) * _numberOfColumns; j < (_numberOfRows * _numberOfColumns); j++) @@ -671,7 +656,7 @@ * (sizeof (BOOL))); _jails = NSZoneRealloc (NSDefaultMallocZone (), _jails, (_numberOfRows * _numberOfColumns) - * sizeof (GSTransparentView *)); + * sizeof (NSView *)); // Reorder the jails for (j = (_numberOfRows - 1); j >= 0; j--) { @@ -845,7 +830,7 @@ // _jails = NSZoneMalloc (NSDefaultMallocZone (), - sizeof (GSTransparentView *) + sizeof (NSView *) * (_numberOfRows * _numberOfColumns)); _havePrisoner = NSZoneMalloc (NSDefaultMallocZone (),