| 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 11 matching lines...) Expand all Loading... |
| 22 - (BOOL)cr_isAboveView:(NSView*)otherView; | 22 - (BOOL)cr_isAboveView:(NSView*)otherView; |
| 23 | 23 |
| 24 // Ensures that the z-order of |subview| is correct relative to |otherView|. | 24 // Ensures that the z-order of |subview| is correct relative to |otherView|. |
| 25 - (void)cr_ensureSubview:(NSView*)subview | 25 - (void)cr_ensureSubview:(NSView*)subview |
| 26 isPositioned:(NSWindowOrderingMode)place | 26 isPositioned:(NSWindowOrderingMode)place |
| 27 relativeTo:(NSView *)otherView; | 27 relativeTo:(NSView *)otherView; |
| 28 | 28 |
| 29 // Return best color for keyboard focus ring. | 29 // Return best color for keyboard focus ring. |
| 30 - (NSColor*)cr_keyboardFocusIndicatorColor; | 30 - (NSColor*)cr_keyboardFocusIndicatorColor; |
| 31 | 31 |
| 32 // Invoke |block| on this view and all descendants. |
| 33 - (void)cr_recursivelyInvokeBlock:(void (^)(id view))block; |
| 34 |
| 32 // Set needsDisplay for this view and all descendants. | 35 // Set needsDisplay for this view and all descendants. |
| 33 - (void)cr_recursivelySetNeedsDisplay:(BOOL)flag; | 36 - (void)cr_recursivelySetNeedsDisplay:(BOOL)flag; |
| 34 | 37 |
| 35 // 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 |
| 36 // required translating or flipping to transform between the two coordinate | 39 // required translating or flipping to transform between the two coordinate |
| 37 // systems. | 40 // systems. |
| 38 - (void)cr_drawUsingAncestor:(NSView*)ancestorView inRect:(NSRect)rect; | 41 - (void)cr_drawUsingAncestor:(NSView*)ancestorView inRect:(NSRect)rect; |
| 39 | 42 |
| 40 // Used by ancestorView in the above draw call, to look up the child view that | 43 // Used by ancestorView in the above draw call, to look up the child view that |
| 41 // it is actually drawing to. | 44 // it is actually drawing to. |
| 42 - (NSView*)cr_viewBeingDrawnTo; | 45 - (NSView*)cr_viewBeingDrawnTo; |
| 43 | 46 |
| 44 @end | 47 @end |
| 45 | 48 |
| 46 #endif // UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ | 49 #endif // UI_BASE_COCOA_NSVIEW_ADDITIONS_H_ |
| OLD | NEW |