mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +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>
|
||||
|
||||
* GormOutlineView.m: Corrected a leak.
|
||||
|
|
|
@ -378,6 +378,9 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
id identifier = [aTableColumn identifier];
|
||||
id className = item;
|
||||
|
||||
if([item isKindOfClass: [GormOutletActionHolder class]])
|
||||
return item;
|
||||
|
||||
if ([identifier isEqualToString: @"classes"])
|
||||
{
|
||||
return className;
|
||||
|
|
|
@ -144,11 +144,6 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren;
|
||||
{
|
||||
if (!_isEditing)
|
||||
|
@ -321,7 +316,6 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
NSRect imageRect;
|
||||
int i;
|
||||
float x_pos;
|
||||
static BOOL drawingEditedObject = NO;
|
||||
|
||||
if (_dataSource == nil)
|
||||
{
|
||||
|
@ -379,7 +373,6 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
{
|
||||
valueforcell = [value getName];
|
||||
isOutletAction = YES;
|
||||
drawingEditedObject = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -406,27 +399,12 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
drawingRect.size.width -= _attributeOffset;
|
||||
}
|
||||
|
||||
|
||||
/* For later...
|
||||
if (drawingEditedObject)
|
||||
{
|
||||
[self setBackgroundColor: salmonColor];
|
||||
}
|
||||
else
|
||||
if (_isEditing)
|
||||
{
|
||||
[self setBackgroundColor: darkSalmonColor];
|
||||
}
|
||||
*/
|
||||
|
||||
if (tb == _outlineTableColumn && !isOutletAction)
|
||||
{
|
||||
NSImage *image = nil;
|
||||
int level = 0;
|
||||
float indentationFactor = 0.0;
|
||||
// float originalWidth = drawingRect.size.width;
|
||||
|
||||
drawingEditedObject = NO;
|
||||
// display the correct arrow...
|
||||
if ([self isItemExpanded: item])
|
||||
{
|
||||
|
@ -466,11 +444,10 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
+= indentationFactor + [image size].width + 5;
|
||||
drawingRect.size.width
|
||||
-= indentationFactor + [image size].width + 5;
|
||||
// [cell drawWithFrame: drawingRect inView: self];
|
||||
}
|
||||
|
||||
|
||||
if ((tb == _actionColumn || tb == _outletColumn)
|
||||
&& !drawingEditedObject)
|
||||
else if ((tb == _actionColumn || tb == _outletColumn)
|
||||
&& isOutletAction == NO)
|
||||
{
|
||||
NSImage *image = nil;
|
||||
|
||||
|
@ -494,10 +471,10 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
// Adjust drawing rect of cell being displayed...
|
||||
drawingRect.origin.x += [image size].width + 5;
|
||||
drawingRect.size.width -= [image size].width + 5;
|
||||
// [cell drawWithFrame: drawingRect inView: self];
|
||||
}
|
||||
|
||||
if (((tb != _outletColumn || tb != _actionColumn)
|
||||
&& !drawingEditedObject) || (tb == _outlineTableColumn))
|
||||
if (((tb != _outletColumn || tb != _actionColumn) && !isOutletAction) || (tb == _outlineTableColumn))
|
||||
{
|
||||
[cell drawWithFrame: drawingRect inView: self];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue