mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Improvements to the outline view.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20435 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6825599ba5
commit
099ef420b0
3 changed files with 15 additions and 28 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-12-10 17:55 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* GormClassEditor.m: Changes to return a item if it's an'
|
||||||
|
action/outlet holder without generating a string.
|
||||||
|
* GormOutlineView.m: Modifications to make drawing of the
|
||||||
|
actions and outlets more efficient.
|
||||||
|
|
||||||
2004-12-08 21:03 Gregory John Casamento <greg_casamento@yahoo.com>
|
2004-12-08 21:03 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GormOutlineView.m: Corrected a leak.
|
* GormOutlineView.m: Corrected a leak.
|
||||||
|
|
|
@ -378,6 +378,9 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
||||||
id identifier = [aTableColumn identifier];
|
id identifier = [aTableColumn identifier];
|
||||||
id className = item;
|
id className = item;
|
||||||
|
|
||||||
|
if([item isKindOfClass: [GormOutletActionHolder class]])
|
||||||
|
return item;
|
||||||
|
|
||||||
if ([identifier isEqualToString: @"classes"])
|
if ([identifier isEqualToString: @"classes"])
|
||||||
{
|
{
|
||||||
return className;
|
return className;
|
||||||
|
|
|
@ -144,11 +144,6 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
|
||||||
{
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren;
|
- (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren;
|
||||||
{
|
{
|
||||||
if (!_isEditing)
|
if (!_isEditing)
|
||||||
|
@ -321,7 +316,6 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
NSRect imageRect;
|
NSRect imageRect;
|
||||||
int i;
|
int i;
|
||||||
float x_pos;
|
float x_pos;
|
||||||
static BOOL drawingEditedObject = NO;
|
|
||||||
|
|
||||||
if (_dataSource == nil)
|
if (_dataSource == nil)
|
||||||
{
|
{
|
||||||
|
@ -379,7 +373,6 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
{
|
{
|
||||||
valueforcell = [value getName];
|
valueforcell = [value getName];
|
||||||
isOutletAction = YES;
|
isOutletAction = YES;
|
||||||
drawingEditedObject = YES;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -406,27 +399,12 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
drawingRect.size.width -= _attributeOffset;
|
drawingRect.size.width -= _attributeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* For later...
|
|
||||||
if (drawingEditedObject)
|
|
||||||
{
|
|
||||||
[self setBackgroundColor: salmonColor];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (_isEditing)
|
|
||||||
{
|
|
||||||
[self setBackgroundColor: darkSalmonColor];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (tb == _outlineTableColumn && !isOutletAction)
|
if (tb == _outlineTableColumn && !isOutletAction)
|
||||||
{
|
{
|
||||||
NSImage *image = nil;
|
NSImage *image = nil;
|
||||||
int level = 0;
|
int level = 0;
|
||||||
float indentationFactor = 0.0;
|
float indentationFactor = 0.0;
|
||||||
// float originalWidth = drawingRect.size.width;
|
|
||||||
|
|
||||||
drawingEditedObject = NO;
|
|
||||||
// display the correct arrow...
|
// display the correct arrow...
|
||||||
if ([self isItemExpanded: item])
|
if ([self isItemExpanded: item])
|
||||||
{
|
{
|
||||||
|
@ -466,11 +444,10 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
+= indentationFactor + [image size].width + 5;
|
+= indentationFactor + [image size].width + 5;
|
||||||
drawingRect.size.width
|
drawingRect.size.width
|
||||||
-= indentationFactor + [image size].width + 5;
|
-= indentationFactor + [image size].width + 5;
|
||||||
|
// [cell drawWithFrame: drawingRect inView: self];
|
||||||
}
|
}
|
||||||
|
else if ((tb == _actionColumn || tb == _outletColumn)
|
||||||
|
&& isOutletAction == NO)
|
||||||
if ((tb == _actionColumn || tb == _outletColumn)
|
|
||||||
&& !drawingEditedObject)
|
|
||||||
{
|
{
|
||||||
NSImage *image = nil;
|
NSImage *image = nil;
|
||||||
|
|
||||||
|
@ -494,10 +471,10 @@ static NSColor *darkGreyBlueColor = nil;
|
||||||
// Adjust drawing rect of cell being displayed...
|
// Adjust drawing rect of cell being displayed...
|
||||||
drawingRect.origin.x += [image size].width + 5;
|
drawingRect.origin.x += [image size].width + 5;
|
||||||
drawingRect.size.width -= [image size].width + 5;
|
drawingRect.size.width -= [image size].width + 5;
|
||||||
|
// [cell drawWithFrame: drawingRect inView: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((tb != _outletColumn || tb != _actionColumn)
|
if (((tb != _outletColumn || tb != _actionColumn) && !isOutletAction) || (tb == _outlineTableColumn))
|
||||||
&& !drawingEditedObject) || (tb == _outlineTableColumn))
|
|
||||||
{
|
{
|
||||||
[cell drawWithFrame: drawingRect inView: self];
|
[cell drawWithFrame: drawingRect inView: self];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue