Home | History | Annotate | Download | only in cocoa
      1 // Copyright 2014 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 UI_MESSAGE_CENTER_COCOA_OPAQUE_VIEWS_H_
      6 #define UI_MESSAGE_CENTER_COCOA_OPAQUE_VIEWS_H_
      7 
      8 #import <Cocoa/Cocoa.h>
      9 
     10 #include "base/mac/scoped_nsobject.h"
     11 
     12 // MCDropDown is the same as an NSPopupButton except that it fills its
     13 // background with a settable color.
     14 @interface MCDropDown : NSPopUpButton {
     15  @private
     16   base::scoped_nsobject<NSColor> backgroundColor_;
     17 }
     18 
     19 // Gets and sets the bubble's background color.
     20 - (NSColor*)backgroundColor;
     21 - (void)setBackgroundColor:(NSColor*)backgroundColor;
     22 @end
     23 
     24 // MCTextField fills its background with an opaque color.  It also configures
     25 // the view to have a plan appearance, without bezel, border, editing, etc.
     26 @interface MCTextField : NSTextField {
     27  @private
     28   base::scoped_nsobject<NSColor> backgroundColor_;
     29 }
     30 
     31 // Use this method to create the text field.  The color is required so it
     32 // can correctly subpixel antialias.
     33 - (id)initWithFrame:(NSRect)frameRect backgroundColor:(NSColor*)color;
     34 @end
     35 
     36 #endif  // UI_MESSAGE_CENTER_COCOA_OPAQUE_VIEWS_H_
     37