| OLD | NEW |
| 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 // A helper class for animating the display of native widget content. | 5 // A helper class for animating the display of native widget content. |
| 6 // Currently only handle vertical sliding, but could be extended to handle | 6 // Currently only handle vertical sliding, but could be extended to handle |
| 7 // horizontal slides or other types of animations. | 7 // horizontal slides or other types of animations. |
| 8 // | 8 // |
| 9 // NOTE: This does not handle clipping. If you are not careful, you will | 9 // NOTE: This does not handle clipping. If you are not careful, you will |
| 10 // wind up with visibly overlapping widgets. If you need clipping, you can | 10 // wind up with visibly overlapping widgets. If you need clipping, you can |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // Slide open. | 55 // Slide open. |
| 56 void Open(); | 56 void Open(); |
| 57 | 57 |
| 58 // Immediately show the widget. | 58 // Immediately show the widget. |
| 59 void OpenWithoutAnimation(); | 59 void OpenWithoutAnimation(); |
| 60 | 60 |
| 61 // Slide shut. | 61 // Slide shut. |
| 62 void Close(); | 62 void Close(); |
| 63 | 63 |
| 64 // End the current animation. |
| 65 void End(); |
| 66 |
| 64 // Immediately hide the widget. | 67 // Immediately hide the widget. |
| 65 void CloseWithoutAnimation(); | 68 void CloseWithoutAnimation(); |
| 66 | 69 |
| 67 // Returns whether the widget is visible. | 70 // Returns whether the widget is visible. |
| 68 bool IsShowing(); | 71 bool IsShowing(); |
| 69 | 72 |
| 70 // Returns whether the widget is currently showing the close animation. | 73 // Returns whether the widget is currently showing the close animation. |
| 71 bool IsClosing(); | 74 bool IsClosing(); |
| 72 | 75 |
| 73 // AnimationDelegate implementation. | 76 // AnimationDelegate implementation. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 99 bool fixed_needs_resize_; | 102 bool fixed_needs_resize_; |
| 100 | 103 |
| 101 // We need to move the child widget to (0, -height), but we don't know its | 104 // We need to move the child widget to (0, -height), but we don't know its |
| 102 // height until it has been allocated. This variable will be true until the | 105 // height until it has been allocated. This variable will be true until the |
| 103 // child widget has been allocated, at which point we will move it, and then | 106 // child widget has been allocated, at which point we will move it, and then |
| 104 // set this variable to false to indicate it should not be moved again. | 107 // set this variable to false to indicate it should not be moved again. |
| 105 bool child_needs_move_; | 108 bool child_needs_move_; |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 #endif // CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ | 111 #endif // CHROME_BROWSER_GTK_SLIDE_ANIMATOR_GTK_H_ |
| OLD | NEW |