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 UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ | 5 #ifndef UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ |
6 #define UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ | 6 #define UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 @interface NSView (ChromeAdditions) | 10 @interface NSView (ChromeAdditions) |
(...skipping 19 matching lines...) Expand all Loading... |
30 - (NSColor*)cr_keyboardFocusIndicatorColor; | 30 - (NSColor*)cr_keyboardFocusIndicatorColor; |
31 | 31 |
32 // Invoke |block| on this view and all descendants. | 32 // Invoke |block| on this view and all descendants. |
33 - (void)cr_recursivelyInvokeBlock:(void (^)(id view))block; | 33 - (void)cr_recursivelyInvokeBlock:(void (^)(id view))block; |
34 | 34 |
35 // Set needsDisplay for this view and all descendants. | 35 // Set needsDisplay for this view and all descendants. |
36 - (void)cr_recursivelySetNeedsDisplay:(BOOL)flag; | 36 - (void)cr_recursivelySetNeedsDisplay:(BOOL)flag; |
37 | 37 |
38 // Draw using ancestorView's drawRect function into this view's rect. Do any | 38 // Draw using ancestorView's drawRect function into this view's rect. Do any |
39 // required translating or flipping to transform between the two coordinate | 39 // required translating or flipping to transform between the two coordinate |
40 // systems. | 40 // systems, and optionally clip to the ancestor view's bounds. |
| 41 - (void)cr_drawUsingAncestor:(NSView*)ancestorView inRect:(NSRect)dirtyRect |
| 42 clippedToAncestorBounds:(BOOL)clipToAncestorBounds; |
| 43 |
| 44 // Same as cr_drawUsingAncestor:inRect:clippedToAncestorBounds: except always |
| 45 // clips to the ancestor view's bounds. |
41 - (void)cr_drawUsingAncestor:(NSView*)ancestorView inRect:(NSRect)dirtyRect; | 46 - (void)cr_drawUsingAncestor:(NSView*)ancestorView inRect:(NSRect)dirtyRect; |
42 | 47 |
43 // Used by ancestorView in the above draw call, to look up the child view that | 48 // Used by ancestorView in the above draw call, to look up the child view that |
44 // it is actually drawing to. | 49 // it is actually drawing to. |
45 - (NSView*)cr_viewBeingDrawnTo; | 50 - (NSView*)cr_viewBeingDrawnTo; |
46 | 51 |
47 @end | 52 @end |
48 | 53 |
49 #endif // UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ | 54 #endif // UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ |
OLD | NEW |