| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/base/animation/animation_delegate.h" | 9 #include "ui/base/animation/animation_delegate.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 void SetAccessibleName(const string16& name); | 51 void SetAccessibleName(const string16& name); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void SetValueInternal(float value, SliderChangeReason reason); | 54 void SetValueInternal(float value, SliderChangeReason reason); |
| 55 | 55 |
| 56 // views::View overrides: | 56 // views::View overrides: |
| 57 virtual gfx::Size GetPreferredSize() OVERRIDE; | 57 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 58 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 58 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 59 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 59 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 60 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 60 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 61 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 61 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 62 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 63 virtual bool AcceleratorPressed(const ui::Accelerator&) OVERRIDE; |
| 62 | 64 |
| 63 // ui::AnimationDelegate overrides: | 65 // ui::AnimationDelegate overrides: |
| 64 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 66 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 65 | 67 |
| 66 SliderListener* listener_; | 68 SliderListener* listener_; |
| 67 Orientation orientation_; | 69 Orientation orientation_; |
| 68 | 70 |
| 69 scoped_ptr<ui::SlideAnimation> move_animation_; | 71 scoped_ptr<ui::SlideAnimation> move_animation_; |
| 70 | 72 |
| 71 float value_; | 73 float value_; |
| 72 float animating_value_; | 74 float animating_value_; |
| 75 float original_value_; |
| 73 bool value_is_valid_; | 76 bool value_is_valid_; |
| 74 string16 accessible_name_; | 77 string16 accessible_name_; |
| 78 bool esc_was_pressed_; |
| 75 | 79 |
| 76 DISALLOW_COPY_AND_ASSIGN(Slider); | 80 DISALLOW_COPY_AND_ASSIGN(Slider); |
| 77 }; | 81 }; |
| 78 | 82 |
| 79 } // namespace views | 83 } // namespace views |
| 80 | 84 |
| 81 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ | 85 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ |
| OLD | NEW |