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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 void OnPaintFocus(gfx::Canvas* canvas); | 88 void OnPaintFocus(gfx::Canvas* canvas); |
89 | 89 |
90 // Notify the listener_, if not NULL, that dragging started. | 90 // Notify the listener_, if not NULL, that dragging started. |
91 void OnSliderDragStarted(); | 91 void OnSliderDragStarted(); |
92 | 92 |
93 // Notify the listener_, if not NULL, that dragging ended. | 93 // Notify the listener_, if not NULL, that dragging ended. |
94 void OnSliderDragEnded(); | 94 void OnSliderDragEnded(); |
95 | 95 |
96 // views::View overrides: | 96 // views::View overrides: |
97 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 97 virtual gfx::Size GetPreferredSize() const override; |
98 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 98 virtual void OnPaint(gfx::Canvas* canvas) override; |
99 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 99 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
100 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 100 virtual bool OnMouseDragged(const ui::MouseEvent& event) override; |
101 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 101 virtual void OnMouseReleased(const ui::MouseEvent& event) override; |
102 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 102 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
103 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 103 virtual void GetAccessibleState(ui::AXViewState* state) override; |
104 virtual void OnFocus() OVERRIDE; | 104 virtual void OnFocus() override; |
105 virtual void OnBlur() OVERRIDE; | 105 virtual void OnBlur() override; |
106 | 106 |
107 // ui::EventHandler overrides: | 107 // ui::EventHandler overrides: |
108 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 108 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
109 | 109 |
110 // gfx::AnimationDelegate overrides: | 110 // gfx::AnimationDelegate overrides: |
111 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 111 virtual void AnimationProgressed(const gfx::Animation* animation) override; |
112 | 112 |
113 void set_listener(SliderListener* listener) { | 113 void set_listener(SliderListener* listener) { |
114 listener_ = listener; | 114 listener_ = listener; |
115 } | 115 } |
116 | 116 |
117 SliderListener* listener_; | 117 SliderListener* listener_; |
118 Orientation orientation_; | 118 Orientation orientation_; |
119 | 119 |
120 scoped_ptr<gfx::SlideAnimation> move_animation_; | 120 scoped_ptr<gfx::SlideAnimation> move_animation_; |
121 | 121 |
(...skipping 14 matching lines...) Expand all Loading... |
136 const gfx::ImageSkia* thumb_; | 136 const gfx::ImageSkia* thumb_; |
137 const gfx::ImageSkia* images_[4]; | 137 const gfx::ImageSkia* images_[4]; |
138 int bar_height_; | 138 int bar_height_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(Slider); | 140 DISALLOW_COPY_AND_ASSIGN(Slider); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace views | 143 } // namespace views |
144 | 144 |
145 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ | 145 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ |
OLD | NEW |