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 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ 6#define CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ 7#pragma once 8 9#include "base/memory/scoped_nsobject.h" 10 11#import <Cocoa/Cocoa.h> 12 13// Draws a vertical background gradient with a bottom stroke. The gradient and 14// stroke colors can be defined by calling |setGradient| and |setStrokeColor|, 15// respectively. Alternatively, you may override the |gradient| and 16// |strokeColor| accessors in order to provide colors dynamically. If the 17// gradient or color is |nil|, the respective element will not be drawn. 18@interface VerticalGradientView : NSView { 19 @private 20 // The gradient to draw. 21 scoped_nsobject<NSGradient> gradient_; 22 // Color for bottom stroke. 23 scoped_nsobject<NSColor> strokeColor_; 24} 25 26// Gets and sets the gradient to paint as background. 27- (NSGradient*)gradient; 28- (void)setGradient:(NSGradient*)gradient; 29 30// Gets and sets the color of the stroke drawn at the bottom of the view. 31- (NSColor*)strokeColor; 32- (void)setStrokeColor:(NSColor*)gradient; 33 34@end 35 36#endif // CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ 37