Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: chrome/browser/cocoa/bookmark_button_cell.h

Issue 1731001: UI review follow-up for m5 bookmark bar deliverables... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_ 5 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_
6 #define CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_ 6 #define CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_
7 7
8 #import "base/cocoa_protocols_mac.h" 8 #import "base/cocoa_protocols_mac.h"
9 #import "chrome/browser/cocoa/gradient_button_cell.h" 9 #import "chrome/browser/cocoa/gradient_button_cell.h"
10 10
11 class BookmarkNode; 11 class BookmarkNode;
12 12
13 // A button cell that handles drawing/highlighting of buttons in the 13 // A button cell that handles drawing/highlighting of buttons in the
14 // bookmark bar. This cell forwards mouseEntered/mouseExited events 14 // bookmark bar. This cell forwards mouseEntered/mouseExited events
15 // to its control view so that pseudo-menu operations 15 // to its control view so that pseudo-menu operations
16 // (e.g. hover-over to open) can be implemented. 16 // (e.g. hover-over to open) can be implemented.
17 @interface BookmarkButtonCell : GradientButtonCell<NSMenuDelegate> { 17 @interface BookmarkButtonCell : GradientButtonCell<NSMenuDelegate> {
18 @private 18 @private
19 BOOL empty_; // is this an "empty" button placeholder button cell? 19 BOOL empty_; // is this an "empty" button placeholder button cell?
20 20
21 // Starting index of bookmarkFolder children that we care to use. 21 // Starting index of bookmarkFolder children that we care to use.
22 int startingChildIndex_; 22 int startingChildIndex_;
23
24 // Should we draw the folder arrow as needed? Not used for the bar
25 // itself but used on the folder windows.
26 BOOL drawFolderArrow_;
27
28 // Arrow for folders
29 scoped_nsobject<NSImage> arrowImage_;
23 } 30 }
24 31
25 @property (readwrite, assign) const BookmarkNode* bookmarkNode; 32 @property (readwrite, assign) const BookmarkNode* bookmarkNode;
26 @property (readwrite, assign) int startingChildIndex; 33 @property (readwrite, assign) int startingChildIndex;
34 @property (readwrite, assign) BOOL drawFolderArrow;
27 35
28 // Create a button cell which draws with a theme. 36 // Create a button cell which draws with a theme.
29 + (id)buttonCellForNode:(const BookmarkNode*)node 37 + (id)buttonCellForNode:(const BookmarkNode*)node
30 contextMenu:(NSMenu*)contextMenu 38 contextMenu:(NSMenu*)contextMenu
31 cellText:(NSString*)cellText 39 cellText:(NSString*)cellText
32 cellImage:(NSImage*)cellImage; 40 cellImage:(NSImage*)cellImage;
33 41
34 // Initialize a button cell which draws with a theme. 42 // Initialize a button cell which draws with a theme.
35 // Designated initializer. 43 // Designated initializer.
36 - (id)initForNode:(const BookmarkNode*)node 44 - (id)initForNode:(const BookmarkNode*)node
(...skipping 10 matching lines...) Expand all
47 // there is not. If |title| is nil, do not reset the title. 55 // there is not. If |title| is nil, do not reset the title.
48 - (void)setBookmarkCellText:(NSString*)title 56 - (void)setBookmarkCellText:(NSString*)title
49 image:(NSImage*)image; 57 image:(NSImage*)image;
50 58
51 // Set the color of text in this cell. 59 // Set the color of text in this cell.
52 - (void)setTextColor:(NSColor*)color; 60 - (void)setTextColor:(NSColor*)color;
53 61
54 @end 62 @end
55 63
56 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_ 64 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BUTTON_CELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_folder_window_unittest.mm ('k') | chrome/browser/cocoa/bookmark_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698