| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class BookmarkModel; | 40 class BookmarkModel; |
| 41 class BookmarkNode; | 41 class BookmarkNode; |
| 42 class ManagedBookmarkService; | 42 class ManagedBookmarkService; |
| 43 | 43 |
| 44 // Magic numbers from Cole | 44 // Magic numbers from Cole |
| 45 // TODO(jrg): create an objc-friendly version of bookmark_bar_constants.h? | 45 // TODO(jrg): create an objc-friendly version of bookmark_bar_constants.h? |
| 46 | 46 |
| 47 // Used as a maximum width for buttons on the bar. | 47 // Used as a maximum width for buttons on the bar. |
| 48 const CGFloat kDefaultBookmarkWidth = 150.0; | 48 const CGFloat kDefaultBookmarkWidth = 150.0; |
| 49 | 49 |
| 50 // Horizontal frame inset for buttons in the bookmark bar. | 50 // Right margin before the last button in the bookmark bar. |
| 51 CGFloat BookmarkHorizontalPadding(); | 51 const CGFloat kBookmarkRightMargin = 8.0; |
| 52 |
| 53 // Left margin before the first button in the bookmark bar. |
| 54 const CGFloat kBookmarkLeftMargin = 8.0; |
| 52 | 55 |
| 53 // Vertical frame inset for buttons in the bookmark bar. | 56 // Vertical frame inset for buttons in the bookmark bar. |
| 54 CGFloat BookmarkVerticalPadding(); | 57 const CGFloat kBookmarkVerticalPadding = 4.0; |
| 55 | 58 |
| 56 // Left margin before the first button in the bookmark bar. | 59 // Horizontal frame inset for buttons in the bookmark bar. |
| 57 CGFloat BookmarkLeftMargin(); | 60 const CGFloat kBookmarkHorizontalPadding = 4.0; |
| 58 | |
| 59 // Right margin before the last button in the bookmark bar. | |
| 60 CGFloat BookmarkRightMargin(); | |
| 61 | 61 |
| 62 // Used as a min/max width for buttons on menus (not on the bar). | 62 // Used as a min/max width for buttons on menus (not on the bar). |
| 63 const CGFloat kBookmarkMenuButtonMinimumWidth = 100.0; | 63 const CGFloat kBookmarkMenuButtonMinimumWidth = 100.0; |
| 64 const CGFloat kBookmarkMenuButtonMaximumWidth = 485.0; | 64 const CGFloat kBookmarkMenuButtonMaximumWidth = 485.0; |
| 65 | 65 |
| 66 // The minimum separation between a folder menu and the edge of the screen. | 66 // The minimum separation between a folder menu and the edge of the screen. |
| 67 // If the menu gets closer to the edge of the screen (either right or left) | 67 // If the menu gets closer to the edge of the screen (either right or left) |
| 68 // then it is pops up in the opposite direction. | 68 // then it is pops up in the opposite direction. |
| 69 // (See -[BookmarkBarFolderController childFolderWindowLeftForWidth:]). | 69 // (See -[BookmarkBarFolderController childFolderWindowLeftForWidth:]). |
| 70 const CGFloat kBookmarkHorizontalScreenPadding = 8.0; | 70 const CGFloat kBookmarkHorizontalScreenPadding = 8.0; |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; | 460 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; |
| 461 - (BOOL)isEventAnExitEvent:(NSEvent*)event; | 461 - (BOOL)isEventAnExitEvent:(NSEvent*)event; |
| 462 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; | 462 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; |
| 463 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node; | 463 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node; |
| 464 | 464 |
| 465 // The following are for testing purposes only and are not used internally. | 465 // The following are for testing purposes only and are not used internally. |
| 466 - (NSMenu *)menuForFolderNode:(const bookmarks::BookmarkNode*)node; | 466 - (NSMenu *)menuForFolderNode:(const bookmarks::BookmarkNode*)node; |
| 467 @end | 467 @end |
| 468 | 468 |
| 469 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 469 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
| OLD | NEW |