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 TreatAllPanelsAsMinimized() const = 0; |
| 68 |
65 // Returns true if |panel| can be shown as active. | 69 // Returns true if |panel| can be shown as active. |
66 virtual bool CanShowPanelAsActive(const Panel* panel) const = 0; | 70 virtual bool CanShowPanelAsActive(const Panel* panel) const = 0; |
67 | 71 |
68 // Returns true if |panel| is draggable. | 72 // Returns true if |panel| is draggable. |
69 virtual bool CanDragPanel(const Panel* panel) const = 0; | 73 virtual bool CanDragPanel(const Panel* panel) const = 0; |
70 | 74 |
71 // Drags |panel| in the bounds of this strip. | 75 // Drags |panel| in the bounds of this strip. |
72 virtual void StartDraggingPanel(Panel* panel) = 0; | 76 virtual void StartDraggingPanel(Panel* panel) = 0; |
73 // |delta_x| and |delta_y| denotes how much the mouse has been moved since | 77 // |delta_x| and |delta_y| denotes how much the mouse has been moved since |
74 // last time when DragPanel or StartDraggingPanel is called. | 78 // last time when DragPanel or StartDraggingPanel is called. |
75 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) = 0; | 79 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) = 0; |
76 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; | 80 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; |
77 | 81 |
78 protected: | 82 protected: |
79 explicit PanelStrip(Type type); | 83 explicit PanelStrip(Type type); |
80 virtual ~PanelStrip(); | 84 virtual ~PanelStrip(); |
81 | 85 |
82 const Type type_; // Type of this panel strip. | 86 const Type type_; // Type of this panel strip. |
83 }; | 87 }; |
84 | 88 |
85 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 89 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
OLD | NEW |