2003-03-03 09:15:48 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
2005-03-31 03:01:36 +00:00
|
|
|
#include <GormCore/GormPrivate.h>
|
|
|
|
#include <GormCore/GormControlEditor.h>
|
|
|
|
#include <GormCore/GormViewWithSubviewsEditor.h>
|
2012-04-20 16:03:21 +00:00
|
|
|
#include "GormNSPopUpButton.h"
|
2002-09-21 15:24:59 +00:00
|
|
|
|
|
|
|
#define _EO ((NSPopUpButton *)_editedObject)
|
|
|
|
|
|
|
|
@interface GormPopUpButtonEditor : GormControlEditor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation GormPopUpButtonEditor
|
|
|
|
- (void) mouseDown: (NSEvent *)theEvent
|
|
|
|
{
|
2004-02-21 18:48:48 +00:00
|
|
|
// double-clicked -> let's edit
|
2002-09-21 15:24:59 +00:00
|
|
|
if (([theEvent clickCount] == 2) && [parent isOpened])
|
|
|
|
{
|
|
|
|
[[_EO cell]
|
|
|
|
attachPopUpWithFrame: [_EO bounds]
|
|
|
|
inView: _editedObject];
|
2004-02-21 18:48:48 +00:00
|
|
|
NSDebugLog(@"attach down");
|
2002-09-21 15:24:59 +00:00
|
|
|
[[document openEditorForObject: [[_EO cell] menu]] activate];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
[super mouseDown: theEvent];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@end
|