blob: 14811dcd08d0e43966ea598376b652b4c201b283 [file] [log] [blame]
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <AppKit/AppKit.h>
#include <vector>
struct KeyEquivalentAndModifierMask {
KeyEquivalentAndModifierMask() : charCode(nil), mask(0) {}
NSString* charCode;
NSUInteger mask;
// MultiKeyEquivalentButton is an NSButton subclass that is capable of
// responding to additional key equivalents. It will respond to the ordinary
// NSButton key equivalent set by -setKeyEquivalent: and
// -setKeyEquivalentModifierMask:, and it will also respond to any additional
// equivalents provided to it in a KeyEquivalentAndModifierMask structure
// passed to -addKeyEquivalent:.
@interface MultiKeyEquivalentButton : NSButton {
std::vector<KeyEquivalentAndModifierMask> extraKeys_;
- (void)addKeyEquivalent:(KeyEquivalentAndModifierMask)key;