mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 07:50:58 +00:00
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
This commit is contained in:
parent
0802b70a1a
commit
09b2dba5cc
3 changed files with 13 additions and 24 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Mar 26 14:33:24 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
|
* Source/GSTable.m: Removed GSTransparentView and replaced it with
|
||||||
|
a simple NSView.
|
||||||
|
* Headers/gnustep/gui/GSTable.h: Idem.
|
||||||
|
|
||||||
2002-03-24 Adam Fedor <fedor@gnu.org>
|
2002-03-24 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Source/NSStringDrawing.m (drawRun): Use new unicode functions
|
* Source/NSStringDrawing.m (drawRun): Use new unicode functions
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
|
|
||||||
#include <AppKit/NSView.h>
|
#include <AppKit/NSView.h>
|
||||||
|
|
||||||
@class GSTransparentView;
|
|
||||||
|
|
||||||
@interface GSTable: NSView
|
@interface GSTable: NSView
|
||||||
{
|
{
|
||||||
int _numberOfRows;
|
int _numberOfRows;
|
||||||
|
@ -47,7 +45,7 @@
|
||||||
// Each prisoner is enclosed in a jail (which is a subview under
|
// Each prisoner is enclosed in a jail (which is a subview under
|
||||||
// our control).
|
// our control).
|
||||||
// Each prisoner is allowed to resize only inside its jail.
|
// 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
|
// YES if the column/row should be expanded/reduced when the size
|
||||||
// of the GSTable is expanded/reduced (this BOOL is otherwhere
|
// of the GSTable is expanded/reduced (this BOOL is otherwhere
|
||||||
// called X/Y Resizing Enabled).
|
// called X/Y Resizing Enabled).
|
||||||
|
|
|
@ -27,19 +27,6 @@
|
||||||
|
|
||||||
#include <AppKit/GSTable.h>
|
#include <AppKit/GSTable.h>
|
||||||
|
|
||||||
// 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)
|
@interface GSTable (Private)
|
||||||
-(void) _updateRowSize: (int)row;
|
-(void) _updateRowSize: (int)row;
|
||||||
-(void) _updateColumnSize: (int)column;
|
-(void) _updateColumnSize: (int)column;
|
||||||
|
@ -89,7 +76,7 @@
|
||||||
_maxYBorder = 0;
|
_maxYBorder = 0;
|
||||||
|
|
||||||
_jails = NSZoneMalloc (NSDefaultMallocZone (),
|
_jails = NSZoneMalloc (NSDefaultMallocZone (),
|
||||||
sizeof (GSTransparentView *) * (rows * columns));
|
sizeof (NSView *) * (rows * columns));
|
||||||
_expandRow = NSZoneMalloc (NSDefaultMallocZone (),
|
_expandRow = NSZoneMalloc (NSDefaultMallocZone (),
|
||||||
sizeof (BOOL) * rows);
|
sizeof (BOOL) * rows);
|
||||||
_expandColumn = NSZoneMalloc (NSDefaultMallocZone (),
|
_expandColumn = NSZoneMalloc (NSDefaultMallocZone (),
|
||||||
|
@ -447,11 +434,9 @@
|
||||||
else // !_havePrisoner
|
else // !_havePrisoner
|
||||||
{
|
{
|
||||||
if (prisonerNeedResize)
|
if (prisonerNeedResize)
|
||||||
_jails[jailNumber] = [[GSTransparentView alloc]
|
_jails[jailNumber] = [[NSView alloc] initWithFrame: oldFrame];
|
||||||
initWithFrame: oldFrame];
|
|
||||||
else // !prisonerNeedResize
|
else // !prisonerNeedResize
|
||||||
_jails[jailNumber] = [[GSTransparentView alloc]
|
_jails[jailNumber] = [[NSView alloc] initWithFrame: theFrame];
|
||||||
initWithFrame: theFrame];
|
|
||||||
|
|
||||||
[_jails[jailNumber] setAutoresizingMask: NSViewNotSizable];
|
[_jails[jailNumber] setAutoresizingMask: NSViewNotSizable];
|
||||||
[_jails[jailNumber] setAutoresizesSubviews: YES];
|
[_jails[jailNumber] setAutoresizesSubviews: YES];
|
||||||
|
@ -629,7 +614,7 @@
|
||||||
* (sizeof (BOOL)));
|
* (sizeof (BOOL)));
|
||||||
_jails = NSZoneRealloc (NSDefaultMallocZone (), _jails,
|
_jails = NSZoneRealloc (NSDefaultMallocZone (), _jails,
|
||||||
(_numberOfRows * _numberOfColumns)
|
(_numberOfRows * _numberOfColumns)
|
||||||
* sizeof (GSTransparentView *));
|
* sizeof (NSView *));
|
||||||
|
|
||||||
for (j = (_numberOfRows - 1) * _numberOfColumns;
|
for (j = (_numberOfRows - 1) * _numberOfColumns;
|
||||||
j < (_numberOfRows * _numberOfColumns); j++)
|
j < (_numberOfRows * _numberOfColumns); j++)
|
||||||
|
@ -671,7 +656,7 @@
|
||||||
* (sizeof (BOOL)));
|
* (sizeof (BOOL)));
|
||||||
_jails = NSZoneRealloc (NSDefaultMallocZone (), _jails,
|
_jails = NSZoneRealloc (NSDefaultMallocZone (), _jails,
|
||||||
(_numberOfRows * _numberOfColumns)
|
(_numberOfRows * _numberOfColumns)
|
||||||
* sizeof (GSTransparentView *));
|
* sizeof (NSView *));
|
||||||
// Reorder the jails
|
// Reorder the jails
|
||||||
for (j = (_numberOfRows - 1); j >= 0; j--)
|
for (j = (_numberOfRows - 1); j >= 0; j--)
|
||||||
{
|
{
|
||||||
|
@ -845,7 +830,7 @@
|
||||||
|
|
||||||
//
|
//
|
||||||
_jails = NSZoneMalloc (NSDefaultMallocZone (),
|
_jails = NSZoneMalloc (NSDefaultMallocZone (),
|
||||||
sizeof (GSTransparentView *)
|
sizeof (NSView *)
|
||||||
* (_numberOfRows * _numberOfColumns));
|
* (_numberOfRows * _numberOfColumns));
|
||||||
|
|
||||||
_havePrisoner = NSZoneMalloc (NSDefaultMallocZone (),
|
_havePrisoner = NSZoneMalloc (NSDefaultMallocZone (),
|
||||||
|
|
Loading…
Reference in a new issue