mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Added some additional visual effect to the outline view to make it more
apparent which type of attribute is being edited. GJC git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14096 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4955a36d4f
commit
240d6ebadf
6 changed files with 32 additions and 1 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2002-07-08 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormOutlineView.m -[drawRow:] Added logic to draw inverse
|
||||
image of the outlet or action button to visually indicate which
|
||||
is being edited in the outline view.
|
||||
* GormOutlineView.h: Added typedef to indicate whether actions or
|
||||
outlets are being edited.
|
||||
* Images/GormActionSelected.tiff: Added
|
||||
* Images/GormOutletSelected.tiff: Added
|
||||
* GNUmakefile: Modified to copy images to the resources directory.
|
||||
|
||||
2002-07-08 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormOutlineView.[hm] : Added. This is a NSOutlineView
|
||||
|
|
|
@ -105,6 +105,8 @@ Gorm_RESOURCE_FILES = \
|
|||
Images/iconTop_nib.tiff \
|
||||
Images/GormAction.tiff \
|
||||
Images/GormOutlet.tiff \
|
||||
Images/GormActionSelected.tiff \
|
||||
Images/GormOutletSelected.tiff \
|
||||
Resources/GormViewSizeInspector.gorm
|
||||
|
||||
Gorm_HEADERS = \
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
@class NSTableColumn;
|
||||
|
||||
typedef enum {None, Outlets, Actions} GSAttributeType;
|
||||
|
||||
@interface GormOutlineView : NSOutlineView
|
||||
{
|
||||
float _attributeOffset;
|
||||
|
@ -41,6 +43,7 @@
|
|||
id _itemBeingEdited;
|
||||
NSTableColumn *_actionColumn;
|
||||
NSTableColumn *_outletColumn;
|
||||
GSAttributeType _edittype;
|
||||
}
|
||||
|
||||
// Instance methods
|
||||
|
|
|
@ -42,6 +42,8 @@ static NSImage *expanded = nil;
|
|||
static NSImage *unexpandable = nil;
|
||||
static NSImage *action = nil;
|
||||
static NSImage *outlet = nil;
|
||||
static NSImage *actionSelected = nil;
|
||||
static NSImage *outletSelected = nil;
|
||||
|
||||
// some common colors which will be used to indicate state in the outline
|
||||
// view.
|
||||
|
@ -96,6 +98,8 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
unexpandable = [NSImage imageNamed: @"common_outlineUnexpandable.tiff"];
|
||||
action = [NSImage imageNamed: @"GormAction.tiff"];
|
||||
outlet = [NSImage imageNamed: @"GormOutlet.tiff"];
|
||||
actionSelected = [NSImage imageNamed: @"GormActionSelected.tiff"];
|
||||
outletSelected = [NSImage imageNamed: @"GormOutletSelected.tiff"];
|
||||
|
||||
// initialize colors
|
||||
salmonColor =
|
||||
|
@ -128,6 +132,7 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
_outletColumn = nil;
|
||||
_isEditing = NO;
|
||||
_attributeOffset = 0.0;
|
||||
_edittype = None;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -409,7 +414,15 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
|
||||
if((tb == _actionColumn || tb == _outletColumn) && !drawingEditedObject)
|
||||
{
|
||||
NSImage *image = (tb == _actionColumn)?action:outlet;
|
||||
NSImage *image = nil;
|
||||
|
||||
if(item == _itemBeingEdited && tb == _actionColumn && _edittype == Actions)
|
||||
image = actionSelected;
|
||||
else
|
||||
if(item == _itemBeingEdited && tb == _outletColumn && _edittype == Outlets)
|
||||
image = outletSelected;
|
||||
else
|
||||
image = (tb == _actionColumn)?action:outlet;
|
||||
|
||||
// Prepare image cell...
|
||||
imageCell = [[NSCell alloc] initImageCell: image];
|
||||
|
@ -472,10 +485,12 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
// [self setBackgroundColor: darkSalmonColor]; // for later
|
||||
if(tb == _actionColumn)
|
||||
{
|
||||
_edittype = Actions;
|
||||
[self _openActions: _clickedItem];
|
||||
}
|
||||
else if(tb == _outletColumn)
|
||||
{
|
||||
_edittype = Outlets;
|
||||
[self _openOutlets: _clickedItem];
|
||||
}
|
||||
}
|
||||
|
|
BIN
Images/GormActionSelected.tiff
Normal file
BIN
Images/GormActionSelected.tiff
Normal file
Binary file not shown.
BIN
Images/GormOutletSelected.tiff
Normal file
BIN
Images/GormOutletSelected.tiff
Normal file
Binary file not shown.
Loading…
Reference in a new issue