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

Side by Side Diff: ui/base/cocoa/controls/hyperlink_button_cell.h

Issue 18355002: Move HyperlinkButtonCell to /ui/base/cocoa/controls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 3 files not actually using it Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | ui/base/cocoa/controls/hyperlink_button_cell.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_BASE_COCOA_CONTROLS_HYPERLINK_BUTTON_CELL_H_
6 #define UI_BASE_COCOA_CONTROLS_HYPERLINK_BUTTON_CELL_H_
7
5 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9
6 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "ui/base/ui_export.h"
7 12
8 // A HyperlinkButtonCell is used to create an NSButton that looks and acts 13 // A HyperlinkButtonCell is used to create an NSButton that looks and acts
9 // like a hyperlink. The default styling is to look like blue, underlined text 14 // like a hyperlink. The default styling is to look like blue, underlined text
10 // and to have the pointingHand cursor on mouse over. 15 // and to have the pointingHand cursor on mouse over.
11 // 16 //
12 // To use in Interface Builder: 17 // To use in Interface Builder:
13 // 1. Drag out an NSButton. 18 // 1. Drag out an NSButton.
14 // 2. Double click on the button so you have the cell component selected. 19 // 2. Double click on the button so you have the cell component selected.
15 // 3. In the Identity panel of the inspector, set the custom class to this. 20 // 3. In the Identity panel of the inspector, set the custom class to this.
16 // 4. In the Attributes panel, change the Bezel to Square. 21 // 4. In the Attributes panel, change the Bezel to Square.
17 // 5. In the Size panel, set the Height to 16. 22 // 5. In the Size panel, set the Height to 16.
Nico 2013/07/03 19:31:07 Maybe this should have a sentence "Use this if all
tapted 2013/07/03 23:30:05 Done. (Another difference: HyperlinkTextView does
23 UI_EXPORT
18 @interface HyperlinkButtonCell : NSButtonCell { 24 @interface HyperlinkButtonCell : NSButtonCell {
19 base::scoped_nsobject<NSColor> textColor_; 25 base::scoped_nsobject<NSColor> textColor_;
20 BOOL shouldUnderline_; 26 BOOL shouldUnderline_;
21 BOOL underlineOnHover_; 27 BOOL underlineOnHover_;
22 BOOL mouseIsInside_; 28 BOOL mouseIsInside_;
23 } 29 }
24 @property(nonatomic, retain) NSColor* textColor; 30 @property(nonatomic, retain) NSColor* textColor;
25 @property(nonatomic, assign) BOOL underlineOnHover; 31 @property(nonatomic, assign) BOOL underlineOnHover;
26 @property(nonatomic, assign) BOOL shouldUnderline; 32 @property(nonatomic, assign) BOOL shouldUnderline;
27 33
28 + (NSColor*)defaultTextColor; 34 + (NSColor*)defaultTextColor;
29 35
30 // Helper function to create a button with HyperLinkButtonCell as its cell. 36 // Helper function to create a button with HyperLinkButtonCell as its cell.
31 + (NSButton*)buttonWithString:(NSString*)string; 37 + (NSButton*)buttonWithString:(NSString*)string;
32 38
33 @end 39 @end
34 40
35 @interface HyperlinkButtonCell (ExposedForTesting) 41 @interface HyperlinkButtonCell (ExposedForTesting)
36 - (NSDictionary*)linkAttributes; 42 - (NSDictionary*)linkAttributes;
37 @end 43 @end
44
45 #endif // UI_BASE_COCOA_CONTROLS_HYPERLINK_BUTTON_CELL_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | ui/base/cocoa/controls/hyperlink_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698