Implemented double click

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6705 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2000-06-16 17:36:19 +00:00
parent 4769a17666
commit 9e46108d93

View file

@ -34,6 +34,7 @@
#include <AppKit/NSTableHeaderView.h>
#include <AppKit/NSTableColumn.h>
#include <AppKit/NSTableView.h>
#include <AppKit/NSEvent.h>
@implementation NSTableHeaderView
{
@ -170,7 +171,31 @@
}
-(void)mouseDown: (NSEvent*)event
{
// TODO
NSPoint location = [event locationInWindow];
int clickCount;
int columnIndex;
clickCount = [event clickCount];
if (clickCount > 2)
{
return;
}
location = [self convertPoint: location fromView: nil];
columnIndex = [self columnAtPoint: location];
if (columnIndex == -1)
{
return;
}
if (clickCount == 2)
{
[_tableView _sendDoubleActionForColumn: columnIndex];
return;
}
// TODO - simple click events
[super mouseDown: event];
}
@end