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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Returns the amount to scroll relative to the visible bounds. This invokes | 66 // Returns the amount to scroll relative to the visible bounds. This invokes |
67 // either GetPageScrollIncrement or GetLineScrollIncrement to determine the | 67 // either GetPageScrollIncrement or GetLineScrollIncrement to determine the |
68 // amount to scroll. If the view returns 0 (or a negative value) a default | 68 // amount to scroll. If the view returns 0 (or a negative value) a default |
69 // value is used. | 69 // value is used. |
70 virtual int GetScrollIncrement(ScrollBar* source, | 70 virtual int GetScrollIncrement(ScrollBar* source, |
71 bool is_page, | 71 bool is_page, |
72 bool is_positive) OVERRIDE; | 72 bool is_positive) OVERRIDE; |
73 | 73 |
74 // Keyboard events | 74 // Keyboard events |
75 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 75 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
76 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; | 76 virtual ui::GestureStatus OnGestureEvent( |
77 virtual bool OnMouseWheel(const MouseWheelEvent& e) OVERRIDE; | 77 const ui::GestureEvent& event) OVERRIDE; |
| 78 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE; |
78 | 79 |
79 virtual std::string GetClassName() const OVERRIDE; | 80 virtual std::string GetClassName() const OVERRIDE; |
80 | 81 |
81 // Retrieves the vertical scrollbar width. | 82 // Retrieves the vertical scrollbar width. |
82 int GetScrollBarWidth() const; | 83 int GetScrollBarWidth() const; |
83 | 84 |
84 // Retrieves the horizontal scrollbar height. | 85 // Retrieves the horizontal scrollbar height. |
85 int GetScrollBarHeight() const; | 86 int GetScrollBarHeight() const; |
86 | 87 |
87 // Computes the visibility of both scrollbars, taking in account the view port | 88 // Computes the visibility of both scrollbars, taking in account the view port |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 private: | 199 private: |
199 int top_margin_; | 200 int top_margin_; |
200 int row_height_; | 201 int row_height_; |
201 | 202 |
202 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 203 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
203 }; | 204 }; |
204 | 205 |
205 } // namespace views | 206 } // namespace views |
206 | 207 |
207 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 208 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
OLD | NEW |