OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INFO_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 | 11 |
12 namespace info_bubble { | 12 namespace info_bubble { |
13 | 13 |
14 // These values are in view coordinates. | 14 // These values are in view coordinates. |
15 const CGFloat kBubbleArrowHeight = 8.0; | 15 const CGFloat kBubbleArrowHeight = 8.0; |
16 const CGFloat kBubbleArrowWidth = 15.0; | 16 const CGFloat kBubbleArrowWidth = 15.0; |
17 const CGFloat kBubbleCornerRadius = 2.0; | 17 const CGFloat kBubbleCornerRadius = 2.0; |
18 const CGFloat kBubbleArrowXOffset = kBubbleArrowWidth + kBubbleCornerRadius; | 18 const CGFloat kBubbleArrowXOffset = kBubbleArrowWidth + kBubbleCornerRadius; |
19 | 19 |
20 // Constants that define where the bubble will have rounded corners. | 20 // Constants that define where the bubble will have rounded corners. |
21 enum CornerFlags { | 21 enum CornerFlags { |
22 kRoundedTopCorners = 1, | 22 kRoundedTopCorners = 1, |
23 kRoundedBottomCorners = 1 << 1, | 23 kRoundedBottomCorners = 1 << 1, |
24 kRoundedAllCorners = kRoundedTopCorners | kRoundedBottomCorners, | 24 kRoundedAllCorners = kRoundedTopCorners | kRoundedBottomCorners, |
25 }; | 25 }; |
26 | 26 |
27 enum BubbleArrowLocation { | 27 enum BubbleArrowLocation { |
28 kTopLeft, | 28 kTopLeading, |
29 kTopCenter, | 29 kTopCenter, |
30 kTopRight, | 30 kTopTrailing, |
31 kNoArrow, | 31 kNoArrow, |
32 }; | 32 } |
Elly Fong-Jones
2017/02/24 15:34:31
remove newline?
lgrey
2017/02/24 15:38:39
CL format made me do this! Will kill two birds wit
Nico
2017/02/24 15:52:09
That looks pretty bad :-( filed https://bugs.chrom
lgrey
2017/02/27 15:56:25
Thanks for the clang-format fix, done.
| |
33 ; | |
33 | 34 |
34 enum BubbleAlignment { | 35 enum BubbleAlignment { |
35 // The tip of the arrow points to the anchor point. | 36 // The tip of the arrow points to the anchor point. |
36 kAlignArrowToAnchor, | 37 kAlignArrowToAnchor, |
37 // The edge nearest to the arrow is lined up with the anchor point. | 38 // The edge nearest to the arrow is lined up with the anchor point. |
38 kAlignEdgeToAnchorEdge, | 39 kAlignEdgeToAnchorEdge, |
39 // Align the trailing edge (right in LTR, left in RTL) to the anchor point. | 40 // Align the trailing edge (right in LTR, left in RTL) to the anchor point. |
40 kAlignTrailingEdgeToAnchorEdge, | 41 kAlignTrailingEdgeToAnchorEdge, |
41 // Align the leading edge (left in LTR, right in RTL) to the anchor point. | 42 // Align the leading edge (left in LTR, right in RTL) to the anchor point. |
42 kAlignLeadingEdgeToAnchorEdge, | 43 kAlignLeadingEdgeToAnchorEdge, |
(...skipping 18 matching lines...) Expand all Loading... | |
61 // Returns the point location in view coordinates of the tip of the arrow. | 62 // Returns the point location in view coordinates of the tip of the arrow. |
62 - (NSPoint)arrowTip; | 63 - (NSPoint)arrowTip; |
63 | 64 |
64 // Gets and sets the bubble's background color. | 65 // Gets and sets the bubble's background color. |
65 - (NSColor*)backgroundColor; | 66 - (NSColor*)backgroundColor; |
66 - (void)setBackgroundColor:(NSColor*)backgroundColor; | 67 - (void)setBackgroundColor:(NSColor*)backgroundColor; |
67 | 68 |
68 @end | 69 @end |
69 | 70 |
70 #endif // CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ | 71 #endif // CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ |
OLD | NEW |