| 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_SLIDER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SLIDER_H_ |
| 6 #define UI_VIEWS_CONTROLS_SLIDER_H_ | 6 #define UI_VIEWS_CONTROLS_SLIDER_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/animation/animation_delegate.h" | 8 #include "ui/gfx/animation/animation_delegate.h" |
| 9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
| 10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // position of the mouse cursor (or the touch point) on the button to | 75 // position of the mouse cursor (or the touch point) on the button to |
| 76 // accurately move the button using the MoveButtonTo() method. | 76 // accurately move the button using the MoveButtonTo() method. |
| 77 void PrepareForMove(const gfx::Point& point); | 77 void PrepareForMove(const gfx::Point& point); |
| 78 | 78 |
| 79 // Moves the button to the specified point and updates the value accordingly. | 79 // Moves the button to the specified point and updates the value accordingly. |
| 80 void MoveButtonTo(const gfx::Point& point); | 80 void MoveButtonTo(const gfx::Point& point); |
| 81 | 81 |
| 82 void OnPaintFocus(gfx::Canvas* canvas); | 82 void OnPaintFocus(gfx::Canvas* canvas); |
| 83 | 83 |
| 84 // views::View overrides: | 84 // views::View overrides: |
| 85 virtual gfx::Size GetPreferredSize() OVERRIDE; | 85 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 86 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 86 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 87 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 87 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 88 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 88 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
| 89 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 89 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 90 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 90 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 91 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 91 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 92 virtual void OnFocus() OVERRIDE; | 92 virtual void OnFocus() OVERRIDE; |
| 93 virtual void OnBlur() OVERRIDE; | 93 virtual void OnBlur() OVERRIDE; |
| 94 | 94 |
| 95 // ui::EventHandler overrides: | 95 // ui::EventHandler overrides: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 120 const gfx::ImageSkia* thumb_; | 120 const gfx::ImageSkia* thumb_; |
| 121 const gfx::ImageSkia* images_[4]; | 121 const gfx::ImageSkia* images_[4]; |
| 122 int bar_height_; | 122 int bar_height_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(Slider); | 124 DISALLOW_COPY_AND_ASSIGN(Slider); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace views | 127 } // namespace views |
| 128 | 128 |
| 129 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ | 129 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ |
| OLD | NEW |