| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_SCROLL_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_SCROLL_VIEW_H_ | 6 #define VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "views/controls/scrollbar/scroll_bar.h" | 11 #include "views/controls/scrollbar/scroll_bar.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 | 14 |
| 15 ///////////////////////////////////////////////////////////////////////////// | 15 ///////////////////////////////////////////////////////////////////////////// |
| 16 // | 16 // |
| 17 // ScrollView class | 17 // ScrollView class |
| 18 // | 18 // |
| 19 // A ScrollView is used to make any View scrollable. The view is added to | 19 // A ScrollView is used to make any View scrollable. The view is added to |
| 20 // a viewport which takes care of clipping. | 20 // a viewport which takes care of clipping. |
| 21 // | 21 // |
| 22 // In this current implementation both horizontal and vertical scrollbars are | 22 // In this current implementation both horizontal and vertical scrollbars are |
| 23 // added as needed. | 23 // added as needed. |
| 24 // | 24 // |
| 25 // The scrollview supports keyboard UI and mousewheel. | 25 // The scrollview supports keyboard UI and mousewheel. |
| 26 // | 26 // |
| 27 ///////////////////////////////////////////////////////////////////////////// | 27 ///////////////////////////////////////////////////////////////////////////// |
| 28 | 28 |
| 29 class VIEWS_API ScrollView : public View, public ScrollBarController { | 29 class VIEWS_EXPORT ScrollView : public View, public ScrollBarController { |
| 30 public: | 30 public: |
| 31 static const char* const kViewClassName; | 31 static const char* const kViewClassName; |
| 32 | 32 |
| 33 ScrollView(); | 33 ScrollView(); |
| 34 // Initialize with specific views. resize_corner is optional. | 34 // Initialize with specific views. resize_corner is optional. |
| 35 ScrollView(ScrollBar* horizontal_scrollbar, | 35 ScrollView(ScrollBar* horizontal_scrollbar, |
| 36 ScrollBar* vertical_scrollbar, | 36 ScrollBar* vertical_scrollbar, |
| 37 View* resize_corner); | 37 View* resize_corner); |
| 38 virtual ~ScrollView(); | 38 virtual ~ScrollView(); |
| 39 | 39 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 private: | 197 private: |
| 198 int top_margin_; | 198 int top_margin_; |
| 199 int row_height_; | 199 int row_height_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 201 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 } // namespace views | 204 } // namespace views |
| 205 | 205 |
| 206 #endif // VIEWS_CONTROLS_SCROLL_VIEW_H_ | 206 #endif // VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| OLD | NEW |