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_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 BOOL openMenuOnClick_; | 29 BOOL openMenuOnClick_; |
30 scoped_nsobject<NSPopUpButtonCell> popUpCell_; | 30 scoped_nsobject<NSPopUpButtonCell> popUpCell_; |
31 } | 31 } |
32 | 32 |
33 // The menu to display. Note that it should have no (i.e., a blank) title and | 33 // The menu to display. Note that it should have no (i.e., a blank) title and |
34 // that the 0-th entry should be blank (and won't be displayed). (This is | 34 // that the 0-th entry should be blank (and won't be displayed). (This is |
35 // because we use a pulldown list, for which Cocoa uses the 0-th item as "title" | 35 // because we use a pulldown list, for which Cocoa uses the 0-th item as "title" |
36 // in the button. This might change if we ever switch to a pop-up. Our direct | 36 // in the button. This might change if we ever switch to a pop-up. Our direct |
37 // use of the given NSMenu object means that the one can set and use NSMenu's | 37 // use of the given NSMenu object means that the one can set and use NSMenu's |
38 // delegate as usual.) | 38 // delegate as usual.) |
39 @property (retain, nonatomic) IBOutlet NSMenu* attachedMenu; | 39 @property(retain, nonatomic) IBOutlet NSMenu* attachedMenu; |
40 | 40 |
41 // Whether or not to open the menu when the button is clicked. Otherwise, the | 41 // Whether or not to open the menu when the button is clicked. Otherwise, the |
42 // menu will only be opened when clicked and held. | 42 // menu will only be opened when clicked and held. |
43 @property (assign, nonatomic) BOOL openMenuOnClick; | 43 @property(assign, nonatomic) BOOL openMenuOnClick; |
44 | 44 |
45 @end // @interface MenuButton | 45 @end // @interface MenuButton |
46 | 46 |
47 // Available for subclasses. | 47 // Available for subclasses. |
48 @interface MenuButton (Protected) | 48 @interface MenuButton (Protected) |
49 - (void)configureCell; | 49 - (void)configureCell; |
50 @end | 50 @end |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ | 52 #endif // CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
OLD | NEW |