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 UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // the contents have not been set. | 104 // the contents have not been set. |
105 void ScrollContentsRegionToBeVisible(const gfx::Rect& rect); | 105 void ScrollContentsRegionToBeVisible(const gfx::Rect& rect); |
106 | 106 |
107 // Computes the visibility of both scrollbars, taking in account the view port | 107 // Computes the visibility of both scrollbars, taking in account the view port |
108 // and content sizes. | 108 // and content sizes. |
109 void ComputeScrollBarsVisibility(const gfx::Size& viewport_size, | 109 void ComputeScrollBarsVisibility(const gfx::Size& viewport_size, |
110 const gfx::Size& content_size, | 110 const gfx::Size& content_size, |
111 bool* horiz_is_shown, | 111 bool* horiz_is_shown, |
112 bool* vert_is_shown) const; | 112 bool* vert_is_shown) const; |
113 | 113 |
114 // Shows or hides the scrollbar/resize_corner based on the value of | 114 // Shows or hides the scrollbar/corner_view based on the value of |
115 // |should_show|. | 115 // |should_show|. |
116 void SetControlVisibility(View* control, bool should_show); | 116 void SetControlVisibility(View* control, bool should_show); |
117 | 117 |
118 // Update the scrollbars positions given viewport and content sizes. | 118 // Update the scrollbars positions given viewport and content sizes. |
119 void UpdateScrollBarPositions(); | 119 void UpdateScrollBarPositions(); |
120 | 120 |
121 // The current contents and its viewport. |contents_| is contained in | 121 // The current contents and its viewport. |contents_| is contained in |
122 // |contents_viewport_|. | 122 // |contents_viewport_|. |
123 View* contents_; | 123 View* contents_; |
124 View* contents_viewport_; | 124 View* contents_viewport_; |
125 | 125 |
126 // The current header and its viewport. |header_| is contained in | 126 // The current header and its viewport. |header_| is contained in |
127 // |header_viewport_|. | 127 // |header_viewport_|. |
128 View* header_; | 128 View* header_; |
129 View* header_viewport_; | 129 View* header_viewport_; |
130 | 130 |
131 // Horizontal scrollbar. | 131 // Horizontal scrollbar. |
132 ScrollBar* horiz_sb_; | 132 ScrollBar* horiz_sb_; |
133 | 133 |
134 // Vertical scrollbar. | 134 // Vertical scrollbar. |
135 ScrollBar* vert_sb_; | 135 ScrollBar* vert_sb_; |
136 | 136 |
137 // Resize corner. | 137 // Corner view. |
138 View* resize_corner_; | 138 View* corner_view_; |
Andre
2014/08/12 23:55:04
Renamed this since I don't think this is related t
| |
139 | 139 |
140 // The min and max height for the bounded scroll view. These are negative | 140 // The min and max height for the bounded scroll view. These are negative |
141 // values if the view is not bounded. | 141 // values if the view is not bounded. |
142 int min_height_; | 142 int min_height_; |
143 int max_height_; | 143 int max_height_; |
144 | 144 |
145 // If true, never show the horizontal scrollbar (even if the contents is wider | 145 // If true, never show the horizontal scrollbar (even if the contents is wider |
146 // than the viewport). | 146 // than the viewport). |
147 bool hide_horizontal_scrollbar_; | 147 bool hide_horizontal_scrollbar_; |
148 | 148 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
215 private: | 215 private: |
216 int top_margin_; | 216 int top_margin_; |
217 int row_height_; | 217 int row_height_; |
218 | 218 |
219 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 219 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
220 }; | 220 }; |
221 | 221 |
222 } // namespace views | 222 } // namespace views |
223 | 223 |
224 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 224 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
OLD | NEW |