| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_SLIDER_SLIDER_H_ | 5 #ifndef VIEWS_CONTROLS_SLIDER_SLIDER_H_ |
| 6 #define VIEWS_CONTROLS_SLIDER_SLIDER_H_ | 6 #define VIEWS_CONTROLS_SLIDER_SLIDER_H_ |
| 7 | 7 |
| 8 #if defined(OS_LINUX) | 8 #if defined(OS_LINUX) |
| 9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
| 10 #endif | 10 #endif |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 Slider(); | 45 Slider(); |
| 46 Slider(double min, double max, double step, StyleFlags style, | 46 Slider(double min, double max, double step, StyleFlags style, |
| 47 SliderListener* listener); | 47 SliderListener* listener); |
| 48 virtual ~Slider(); | 48 virtual ~Slider(); |
| 49 | 49 |
| 50 // Cause the slider to notify the listener that the value has changed. | 50 // Cause the slider to notify the listener that the value has changed. |
| 51 virtual void NotifyValueChanged(); | 51 virtual void NotifyValueChanged(); |
| 52 | 52 |
| 53 // Gets/Sets the value in the slider. | 53 // Gets/Sets the value in the slider. |
| 54 const double value() const { return value_; } | 54 double value() const { return value_; } |
| 55 void SetValue(double value); | 55 void SetValue(double value); |
| 56 | 56 |
| 57 // Accessor for |style_|. | 57 // Accessor for |style_|. |
| 58 StyleFlags style() const { return style_; } | 58 StyleFlags style() const { return style_; } |
| 59 | 59 |
| 60 // Accessor for |min_|. | 60 // Accessor for |min_|. |
| 61 const double min() const { return min_; } | 61 double min() const { return min_; } |
| 62 | 62 |
| 63 // Accessor for |max_|. | 63 // Accessor for |max_|. |
| 64 const double max() const { return max_; } | 64 double max() const { return max_; } |
| 65 | 65 |
| 66 // Accessor for |step_|. | 66 // Accessor for |step_|. |
| 67 const double step() const { return step_; } | 67 double step() const { return step_; } |
| 68 | 68 |
| 69 // Overridden from View: | 69 // Overridden from View: |
| 70 virtual void Layout(); | 70 virtual void Layout(); |
| 71 virtual gfx::Size GetPreferredSize(); | 71 virtual gfx::Size GetPreferredSize(); |
| 72 virtual bool IsFocusable() const; | 72 virtual bool IsFocusable() const; |
| 73 virtual void SetEnabled(bool enabled); | 73 virtual void SetEnabled(bool enabled); |
| 74 virtual void PaintFocusBorder(gfx::Canvas* canvas); | 74 virtual void PaintFocusBorder(gfx::Canvas* canvas); |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 virtual void Focus(); | 77 virtual void Focus(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 103 | 103 |
| 104 // The value displayed in the slider. | 104 // The value displayed in the slider. |
| 105 double value_; | 105 double value_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(Slider); | 107 DISALLOW_COPY_AND_ASSIGN(Slider); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace views | 110 } // namespace views |
| 111 | 111 |
| 112 #endif // VIEWS_CONTROLS_SLIDER_SLIDER_H_ | 112 #endif // VIEWS_CONTROLS_SLIDER_SLIDER_H_ |
| OLD | NEW |