Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/cocoa/draggable_button.h

Issue 2973004: [Mac]Implement ViewID support. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Turns out that, it's not a good solution. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #import "chrome/browser/cocoa/button_with_viewid.h"
6 7
7 // Class for buttons that can be drag sources. If the mouse is clicked and moved 8 // Class for buttons that can be drag sources. If the mouse is clicked and moved
8 // more than a given distance, this class will call |-beginDrag:| instead of 9 // more than a given distance, this class will call |-beginDrag:| instead of
9 // |-performClick:|. Subclasses should override these two methods. 10 // |-performClick:|. Subclasses should override these two methods.
10 @interface DraggableButton : NSButton { 11 @interface DraggableButton : ButtonWithViewID {
11 @private 12 @private
12 BOOL draggable_; // Is this a draggable type of button? 13 BOOL draggable_; // Is this a draggable type of button?
13 } 14 }
14 15
15 // Enable or disable dragability for special buttons like "Other Bookmarks". 16 // Enable or disable dragability for special buttons like "Other Bookmarks".
16 @property (nonatomic) BOOL draggable; 17 @property (nonatomic) BOOL draggable;
17 18
18 // Called when a drag should start. Subclasses must override this to do any 19 // Called when a drag should start. Subclasses must override this to do any
19 // pasteboard manipulation and begin the drag, usually with 20 // pasteboard manipulation and begin the drag, usually with
20 // -dragImage:at:offset:event:. Subclasses must call one of the blocking 21 // -dragImage:at:offset:event:. Subclasses must call one of the blocking
21 // -drag* methods of NSView when overriding this method. 22 // -drag* methods of NSView when overriding this method.
22 - (void)beginDrag:(NSEvent*)dragEvent; 23 - (void)beginDrag:(NSEvent*)dragEvent;
23 24
24 @end // @interface DraggableButton 25 @end // @interface DraggableButton
25 26
26 @interface DraggableButton (Private) 27 @interface DraggableButton (Private)
27 28
28 // Resets the draggable state of the button after dragging is finished. This is 29 // Resets the draggable state of the button after dragging is finished. This is
29 // called by DraggableButton when the beginDrag call returns, it should not be 30 // called by DraggableButton when the beginDrag call returns, it should not be
30 // called by the subclass. 31 // called by the subclass.
31 - (void)endDrag; 32 - (void)endDrag;
32 33
33 @end // @interface DraggableButton(Private) 34 @end // @interface DraggableButton(Private)
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/download_shelf_view.mm ('k') | chrome/browser/cocoa/extensions/browser_actions_container_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698