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_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // draw attention state. | 55 // draw attention state. |
56 virtual void OnPanelAttentionStateChanged(Panel* panel) = 0; | 56 virtual void OnPanelAttentionStateChanged(Panel* panel) = 0; |
57 | 57 |
58 // Updates the display to show |panel| as active. | 58 // Updates the display to show |panel| as active. |
59 virtual void ActivatePanel(Panel* panel) = 0; | 59 virtual void ActivatePanel(Panel* panel) = 0; |
60 | 60 |
61 // Updates the display to show |panel| as minimized/restored. | 61 // Updates the display to show |panel| as minimized/restored. |
62 virtual void MinimizePanel(Panel* panel) = 0; | 62 virtual void MinimizePanel(Panel* panel) = 0; |
63 virtual void RestorePanel(Panel* panel) = 0; | 63 virtual void RestorePanel(Panel* panel) = 0; |
64 | 64 |
65 // Returns true if all panels in the strip | |
66 // should be treated as minimized (overflow strip) | |
67 virtual bool IsPanelMinimized(Panel* panel) const = 0; | |
68 | |
69 // Returns true if |panel| can be shown as active. | 65 // Returns true if |panel| can be shown as active. |
70 virtual bool CanShowPanelAsActive(const Panel* panel) const = 0; | 66 virtual bool CanShowPanelAsActive(const Panel* panel) const = 0; |
71 | 67 |
72 // Returns true if |panel| is draggable. | 68 // Returns true if |panel| is draggable. |
73 virtual bool CanDragPanel(const Panel* panel) const = 0; | 69 virtual bool CanDragPanel(const Panel* panel) const = 0; |
74 | 70 |
75 // Drags |panel| in the bounds of this strip. | 71 // Drags |panel| in the bounds of this strip. |
76 virtual void StartDraggingPanel(Panel* panel) = 0; | 72 virtual void StartDraggingPanel(Panel* panel) = 0; |
77 // |delta_x| and |delta_y| denotes how much the mouse has been moved since | 73 // |delta_x| and |delta_y| denotes how much the mouse has been moved since |
78 // last time when DragPanel or StartDraggingPanel is called. | 74 // last time when DragPanel or StartDraggingPanel is called. |
79 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) = 0; | 75 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) = 0; |
80 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; | 76 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; |
81 | 77 |
82 protected: | 78 protected: |
83 explicit PanelStrip(Type type); | 79 explicit PanelStrip(Type type); |
84 virtual ~PanelStrip(); | 80 virtual ~PanelStrip(); |
85 | 81 |
86 const Type type_; // Type of this panel strip. | 82 const Type type_; // Type of this panel strip. |
87 }; | 83 }; |
88 | 84 |
89 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 85 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
OLD | NEW |