| 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_SCROLLBAR_SCROLL_BAR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // Get the width or height of this scrollbar, for use in layout calculations. | 84 // Get the width or height of this scrollbar, for use in layout calculations. |
| 85 // For a vertical scrollbar, this is the width of the scrollbar, likewise it | 85 // For a vertical scrollbar, this is the width of the scrollbar, likewise it |
| 86 // is the height for a horizontal scrollbar. | 86 // is the height for a horizontal scrollbar. |
| 87 virtual int GetLayoutSize() const = 0; | 87 virtual int GetLayoutSize() const = 0; |
| 88 | 88 |
| 89 // Get the width or height for this scrollbar which overlaps with the content. | 89 // Get the width or height for this scrollbar which overlaps with the content. |
| 90 // Default is 0. | 90 // Default is 0. |
| 91 virtual int GetContentOverlapSize() const; | 91 virtual int GetContentOverlapSize() const; |
| 92 | 92 |
| 93 virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event); | |
| 94 virtual void OnMouseExitedScrollView(const ui::MouseEvent& event); | |
| 95 | |
| 96 protected: | 93 protected: |
| 97 // Create new scrollbar, either horizontal or vertical. These are protected | 94 // Create new scrollbar, either horizontal or vertical. These are protected |
| 98 // since you need to be creating either a NativeScrollBar or a | 95 // since you need to be creating either a NativeScrollBar or a |
| 99 // ImageScrollBar. | 96 // ImageScrollBar. |
| 100 explicit ScrollBar(bool is_horiz); | 97 explicit ScrollBar(bool is_horiz); |
| 101 | 98 |
| 102 private: | 99 private: |
| 103 const bool is_horiz_; | 100 const bool is_horiz_; |
| 104 | 101 |
| 105 ScrollBarController* controller_; | 102 ScrollBarController* controller_; |
| 106 | 103 |
| 107 int max_pos_; | 104 int max_pos_; |
| 108 | 105 |
| 109 DISALLOW_COPY_AND_ASSIGN(ScrollBar); | 106 DISALLOW_COPY_AND_ASSIGN(ScrollBar); |
| 110 }; | 107 }; |
| 111 | 108 |
| 112 } // namespace views | 109 } // namespace views |
| 113 | 110 |
| 114 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ | 111 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| OLD | NEW |