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_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
7 | 7 |
8 // A class acting as the Objective-C controller for the Panel window | 8 // A class acting as the Objective-C controller for the Panel window |
9 // object. Handles interactions between Cocoa and the cross-platform | 9 // object. Handles interactions between Cocoa and the cross-platform |
10 // code. Each window has a single titlebar and is managed/owned by Panel. | 10 // code. Each window has a single titlebar and is managed/owned by Panel. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // indicating the potential drop slot. | 94 // indicating the potential drop slot. |
95 // |frame| is in screen coordinates, same as [window frame]. | 95 // |frame| is in screen coordinates, same as [window frame]. |
96 // |animate| controls if the bounds animation is needed or not. | 96 // |animate| controls if the bounds animation is needed or not. |
97 - (void)setPanelFrame:(NSRect)frame | 97 - (void)setPanelFrame:(NSRect)frame |
98 animate:(BOOL)animate; | 98 animate:(BOOL)animate; |
99 | 99 |
100 // Used by PanelTitlebarViewCocoa when user rearranges the Panels by dragging. | 100 // Used by PanelTitlebarViewCocoa when user rearranges the Panels by dragging. |
101 - (BOOL)isDraggable; | 101 - (BOOL)isDraggable; |
102 - (void)startDrag; | 102 - (void)startDrag; |
103 - (void)endDrag:(BOOL)cancelled; | 103 - (void)endDrag:(BOOL)cancelled; |
104 - (void)dragWithDeltaX:(int)deltaX; | 104 - (void)dragWithDeltaX:(int)deltaX |
| 105 deltaY:(int)deltaY; |
105 | 106 |
106 // Accessor for titlebar view. | 107 // Accessor for titlebar view. |
107 - (PanelTitlebarViewCocoa*)titlebarView; | 108 - (PanelTitlebarViewCocoa*)titlebarView; |
108 // Returns the height of titlebar, used to show the titlebar in | 109 // Returns the height of titlebar, used to show the titlebar in |
109 // "Draw Attention" state. | 110 // "Draw Attention" state. |
110 - (int)titlebarHeightInScreenCoordinates; | 111 - (int)titlebarHeightInScreenCoordinates; |
111 | 112 |
112 // Invoked when user clicks on the titlebar. Attempts to flip the | 113 // Invoked when user clicks on the titlebar. Attempts to flip the |
113 // Minimized/Restored states. | 114 // Minimized/Restored states. |
114 - (void)onTitlebarMouseClicked; | 115 - (void)onTitlebarMouseClicked; |
(...skipping 24 matching lines...) Expand all Loading... |
139 - (BOOL)canBecomeKeyWindow; | 140 - (BOOL)canBecomeKeyWindow; |
140 | 141 |
141 // Returns width of titlebar when shown in "icon only" mode. | 142 // Returns width of titlebar when shown in "icon only" mode. |
142 - (int)titlebarIconOnlyWidthInScreenCoordinates; | 143 - (int)titlebarIconOnlyWidthInScreenCoordinates; |
143 | 144 |
144 - (void)applyVisualStyleForStrip; | 145 - (void)applyVisualStyleForStrip; |
145 | 146 |
146 @end // @interface PanelWindowController | 147 @end // @interface PanelWindowController |
147 | 148 |
148 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 149 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
OLD | NEW |