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_STACKED_PANEL_COLLECTION_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ |
6 #define CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ | 6 #define CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual void UpdatePanelOnCollectionChange(Panel* panel) OVERRIDE; | 58 virtual void UpdatePanelOnCollectionChange(Panel* panel) OVERRIDE; |
59 virtual void OnPanelExpansionStateChanged(Panel* panel) OVERRIDE; | 59 virtual void OnPanelExpansionStateChanged(Panel* panel) OVERRIDE; |
60 virtual void OnPanelActiveStateChanged(Panel* panel) OVERRIDE; | 60 virtual void OnPanelActiveStateChanged(Panel* panel) OVERRIDE; |
61 | 61 |
62 Panel* GetPanelAbove(Panel* panel) const; | 62 Panel* GetPanelAbove(Panel* panel) const; |
63 Panel* GetPanelBelow(Panel* panel) const; | 63 Panel* GetPanelBelow(Panel* panel) const; |
64 bool HasPanel(Panel* panel) const; | 64 bool HasPanel(Panel* panel) const; |
65 | 65 |
66 void MoveAllDraggingPanelsInstantly(const gfx::Vector2d& delta_origin); | 66 void MoveAllDraggingPanelsInstantly(const gfx::Vector2d& delta_origin); |
67 | 67 |
| 68 bool IsMinimized() const; |
| 69 |
68 // Returns the maximum available space from the bottom of the stack. The | 70 // Returns the maximum available space from the bottom of the stack. The |
69 // maximum available space is defined as the distance between the bottom | 71 // maximum available space is defined as the distance between the bottom |
70 // of the stack and the bottom of the working area, assuming that all inactive | 72 // of the stack and the bottom of the working area, assuming that all inactive |
71 // panels are collapsed. | 73 // panels are collapsed. |
72 int GetMaximiumAvailableBottomSpace() const; | 74 int GetMaximiumAvailableBottomSpace() const; |
73 | 75 |
74 NativePanelStackWindow* native_stack() const { return native_stack_; } | |
75 int num_panels() const { return panels_.size(); } | 76 int num_panels() const { return panels_.size(); } |
76 const Panels& panels() const { return panels_; } | 77 const Panels& panels() const { return panels_; } |
77 Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); } | 78 Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); } |
78 Panel* bottom_panel() const { | 79 Panel* bottom_panel() const { |
79 return panels_.empty() ? NULL : panels_.back(); | 80 return panels_.empty() ? NULL : panels_.back(); |
80 } | 81 } |
81 Panel* most_recently_active_panel() const { | 82 Panel* most_recently_active_panel() const { |
82 return most_recently_active_panels_.empty() ? | 83 return most_recently_active_panels_.empty() ? |
83 NULL : most_recently_active_panels_.front(); | 84 NULL : most_recently_active_panels_.front(); |
84 } | 85 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 141 |
141 // Used to save the placement information for a panel. | 142 // Used to save the placement information for a panel. |
142 PanelPlacement saved_panel_placement_; | 143 PanelPlacement saved_panel_placement_; |
143 | 144 |
144 bool minimizing_all_; // True while minimizing all panels. | 145 bool minimizing_all_; // True while minimizing all panels. |
145 | 146 |
146 DISALLOW_COPY_AND_ASSIGN(StackedPanelCollection); | 147 DISALLOW_COPY_AND_ASSIGN(StackedPanelCollection); |
147 }; | 148 }; |
148 | 149 |
149 #endif // CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ | 150 #endif // CHROME_BROWSER_UI_PANELS_STACKED_PANEL_COLLECTION_H_ |
OLD | NEW |