| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include "views/controls/button/image_button.h" | 8 #include "views/controls/button/image_button.h" |
| 9 #include "views/controls/menu/menu.h" | 9 #include "views/controls/menu/menu.h" |
| 10 #include "views/controls/scrollbar/scroll_bar.h" | 10 #include "views/controls/scrollbar/scroll_bar.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // position of the thumb (thumb track coordinates). If |scroll_to_middle| is | 88 // position of the thumb (thumb track coordinates). If |scroll_to_middle| is |
| 89 // true, then the conversion assumes |thumb_position| is in the middle of the | 89 // true, then the conversion assumes |thumb_position| is in the middle of the |
| 90 // thumb rather than the top. | 90 // thumb rather than the top. |
| 91 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle); | 91 void ScrollToThumbPosition(int thumb_position, bool scroll_to_middle); |
| 92 | 92 |
| 93 // Scroll the contents by the specified offset (contents coordinates). | 93 // Scroll the contents by the specified offset (contents coordinates). |
| 94 void ScrollByContentsOffset(int contents_offset); | 94 void ScrollByContentsOffset(int contents_offset); |
| 95 | 95 |
| 96 // View overrides: | 96 // View overrides: |
| 97 virtual gfx::Size GetPreferredSize(); | 97 virtual gfx::Size GetPreferredSize(); |
| 98 virtual void Paint(ChromeCanvas* canvas); | 98 virtual void Paint(gfx::Canvas* canvas); |
| 99 virtual void Layout(); | 99 virtual void Layout(); |
| 100 virtual bool OnMousePressed(const MouseEvent& event); | 100 virtual bool OnMousePressed(const MouseEvent& event); |
| 101 virtual void OnMouseReleased(const MouseEvent& event, bool canceled); | 101 virtual void OnMouseReleased(const MouseEvent& event, bool canceled); |
| 102 virtual bool OnMouseWheel(const MouseWheelEvent& event); | 102 virtual bool OnMouseWheel(const MouseWheelEvent& event); |
| 103 virtual bool OnKeyPressed(const KeyEvent& event); | 103 virtual bool OnKeyPressed(const KeyEvent& event); |
| 104 | 104 |
| 105 // BaseButton::ButtonListener overrides: | 105 // BaseButton::ButtonListener overrides: |
| 106 virtual void ButtonPressed(Button* sender); | 106 virtual void ButtonPressed(Button* sender); |
| 107 | 107 |
| 108 // ScrollBar overrides: | 108 // ScrollBar overrides: |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 // True if the scroll buttons at each end of the scroll bar should be shown. | 184 // True if the scroll buttons at each end of the scroll bar should be shown. |
| 185 bool show_scroll_buttons_; | 185 bool show_scroll_buttons_; |
| 186 | 186 |
| 187 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar); | 187 DISALLOW_EVIL_CONSTRUCTORS(BitmapScrollBar); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 } // namespace views | 190 } // namespace views |
| 191 | 191 |
| 192 #endif // #ifndef VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ | 192 #endif // #ifndef VIEWS_CONTROLS_SCROLLBAR_BITMAP_SCROLL_BAR_H_ |
| OLD | NEW |