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_SCROLLBAR_BITMAP_SCROLL_BAR_H_ | 5 #ifndef VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ |
6 #define VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ | 6 #define VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/controls/button/image_button.h" | 9 #include "views/controls/button/image_button.h" |
10 #include "views/controls/menu/menu.h" | 10 #include "views/controls/menu/menu.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // thumb rather than the top. | 91 // thumb rather than the top. |
92 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle); | 92 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle); |
93 | 93 |
94 // Scroll the contents by the specified offset (contents coordinates). | 94 // Scroll the contents by the specified offset (contents coordinates). |
95 void ScrollByContentsOffset(int contents_offset); | 95 void ScrollByContentsOffset(int contents_offset); |
96 | 96 |
97 // View overrides: | 97 // View overrides: |
98 virtual gfx::Size GetPreferredSize() OVERRIDE; | 98 virtual gfx::Size GetPreferredSize() OVERRIDE; |
99 virtual void Layout() OVERRIDE; | 99 virtual void Layout() OVERRIDE; |
100 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 100 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
101 virtual void OnMouseReleased(const MouseEvent& event, bool canceled) OVERRIDE; | 101 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 102 virtual void OnMouseCaptureLost() OVERRIDE; |
102 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 103 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
103 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; | 104 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; |
104 | 105 |
105 // BaseButton::ButtonListener overrides: | 106 // BaseButton::ButtonListener overrides: |
106 virtual void ButtonPressed(Button* sender, | 107 virtual void ButtonPressed(Button* sender, |
107 const views::Event& event) OVERRIDE; | 108 const views::Event& event) OVERRIDE; |
108 | 109 |
109 // ScrollBar overrides: | 110 // ScrollBar overrides: |
110 virtual void Update(int viewport_size, | 111 virtual void Update(int viewport_size, |
111 int content_size, | 112 int content_size, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 188 |
188 // True if the scroll buttons at each end of the scroll bar should be shown. | 189 // True if the scroll buttons at each end of the scroll bar should be shown. |
189 bool show_scroll_buttons_; | 190 bool show_scroll_buttons_; |
190 | 191 |
191 DISALLOW_COPY_AND_ASSIGN(BitmapScrollBar); | 192 DISALLOW_COPY_AND_ASSIGN(BitmapScrollBar); |
192 }; | 193 }; |
193 | 194 |
194 } // namespace views | 195 } // namespace views |
195 | 196 |
196 #endif // VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ | 197 #endif // VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ |
OLD | NEW |