Home | History | Annotate | Download | only in cocoa
      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 #import <Cocoa/Cocoa.h>
      6 
      7 #include "base/memory/scoped_nsobject.h"
      8 #include "chrome/browser/ui/cocoa/hover_button.h"
      9 
     10 // The standard close button for our Mac UI which is the "x" that changes to a
     11 // dark circle with the "x" when you hover over it. At this time it is used by
     12 // the popup blocker, download bar, info bar and tabs.
     13 @interface HoverCloseButton : HoverButton {
     14  @private
     15   // Bezier path for drawing the 'x' within the button.
     16   scoped_nsobject<NSBezierPath> xPath_;
     17 
     18   // Bezier path for drawing the hover state circle behind the 'x'.
     19   scoped_nsobject<NSBezierPath> circlePath_;
     20 
     21   // Translation of the 'x' button to the middle vertically.
     22   scoped_nsobject<NSAffineTransform> transform_;
     23 
     24   // The size of the control when the last drawRect: was called, to recenter
     25   // the paths above if it changed.
     26   NSSize oldSize_;
     27 }
     28 
     29 // Sets up the button's tracking areas and accessibility info when instantiated
     30 // via initWithFrame or awakeFromNib.
     31 - (void)commonInit;
     32 
     33 @end
     34