OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ |
6 #define CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ | 6 #define CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // If it has a popup menu, for example, we want to perform the action on mouse | 119 // If it has a popup menu, for example, we want to perform the action on mouse |
120 // down, if possible (as long as user still gets chance to drag, if | 120 // down, if possible (as long as user still gets chance to drag, if |
121 // appropriate). | 121 // appropriate). |
122 @property(nonatomic) BOOL actsOnMouseDown; | 122 @property(nonatomic) BOOL actsOnMouseDown; |
123 | 123 |
124 // Designated initializer. | 124 // Designated initializer. |
125 - (id)initWithButton:(NSButton<DraggableButtonMixin>*)button; | 125 - (id)initWithButton:(NSButton<DraggableButtonMixin>*)button; |
126 | 126 |
127 // NSResponder implementation. NSButton subclasses should invoke these methods | 127 // NSResponder implementation. NSButton subclasses should invoke these methods |
128 // and only call super if the return value indicates such. | 128 // and only call super if the return value indicates such. |
129 - (DraggableButtonResult)mouseDown:(NSEvent*)event; | 129 - (DraggableButtonResult)mouseDownImpl:(NSEvent*)event; |
130 - (DraggableButtonResult)mouseUp:(NSEvent*)event; | 130 - (DraggableButtonResult)mouseUpImpl:(NSEvent*)event; |
131 | 131 |
132 @end | 132 @end |
133 | 133 |
134 #endif // CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ | 134 #endif // CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_MIXIN_H_ |
OLD | NEW |