OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Initiate the closing of the panel, starting from the platform-independent | 84 // Initiate the closing of the panel, starting from the platform-independent |
85 // layer. This will take care of PanelManager, other panels and close the | 85 // layer. This will take care of PanelManager, other panels and close the |
86 // native window at the end. | 86 // native window at the end. |
87 - (void)closePanel; | 87 - (void)closePanel; |
88 | 88 |
89 // Uses nonblocking animation for moving the Panels. It's especially | 89 // Uses nonblocking animation for moving the Panels. It's especially |
90 // important in case of dragging a Panel when other Panels should 'slide out', | 90 // important in case of dragging a Panel when other Panels should 'slide out', |
91 // indicating the potential drop slot. | 91 // indicating the potential drop slot. |
92 // |frame| is in screen coordinates, same as [window frame]. | 92 // |frame| is in screen coordinates, same as [window frame]. |
93 - (void)setPanelFrame:(NSRect)frame; | 93 // |animate| controls if the bounds animation is needed or not. |
| 94 - (void)setPanelFrame:(NSRect)frame |
| 95 animate:(BOOL)animate; |
94 | 96 |
95 // Used by PanelTitlebarViewCocoa when user rearranges the Panels by dragging. | 97 // Used by PanelTitlebarViewCocoa when user rearranges the Panels by dragging. |
96 - (void)startDrag; | 98 - (void)startDrag; |
97 - (void)endDrag:(BOOL)cancelled; | 99 - (void)endDrag:(BOOL)cancelled; |
98 - (void)dragWithDeltaX:(int)deltaX; | 100 - (void)dragWithDeltaX:(int)deltaX; |
99 | 101 |
100 // Accessor for titlebar view. | 102 // Accessor for titlebar view. |
101 - (PanelTitlebarViewCocoa*)titlebarView; | 103 - (PanelTitlebarViewCocoa*)titlebarView; |
102 // Returns the height of titlebar, used to show the titlebar in | 104 // Returns the height of titlebar, used to show the titlebar in |
103 // "Draw Attention" state. | 105 // "Draw Attention" state. |
(...skipping 21 matching lines...) Expand all Loading... |
125 // Removes the Key status from the panel to some other window. | 127 // Removes the Key status from the panel to some other window. |
126 - (void)deactivate; | 128 - (void)deactivate; |
127 | 129 |
128 // Helper for NSWindow, returns NO for minimized panels in some cases, so they | 130 // Helper for NSWindow, returns NO for minimized panels in some cases, so they |
129 // are not un-minimized when another panel is minimized. | 131 // are not un-minimized when another panel is minimized. |
130 - (BOOL)canBecomeKeyWindow; | 132 - (BOOL)canBecomeKeyWindow; |
131 | 133 |
132 @end // @interface PanelWindowController | 134 @end // @interface PanelWindowController |
133 | 135 |
134 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 136 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
OLD | NEW |