OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. |
| 4 |
| 5 #ifndef VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ |
| 6 #define VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ |
| 7 |
| 8 #include "base/gfx/native_widget_types.h" |
| 9 |
| 10 namespace views { |
| 11 |
| 12 class Slider; |
| 13 class View; |
| 14 |
| 15 // An interface implemented by an object that provides a platform-native slider. |
| 16 class NativeSliderWrapper { |
| 17 public: |
| 18 // The Slider calls this when it is destroyed to clean up the wrapper object. |
| 19 virtual ~NativeSliderWrapper() {} |
| 20 |
| 21 // Updates the enabled state of the native slider. |
| 22 virtual void UpdateEnabled() = 0; |
| 23 |
| 24 // Gets the value of the slider. |
| 25 virtual double GetValue() = 0; |
| 26 |
| 27 // Sets the value of the slider. |
| 28 virtual void SetValue(double value) = 0; |
| 29 |
| 30 // Sets the focus to the slider. |
| 31 virtual void SetFocus() = 0; |
| 32 |
| 33 // Returns the preferred size of the combobox. |
| 34 virtual gfx::Size GetPreferredSize() = 0; |
| 35 |
| 36 // Retrieves the views::View that hosts the native control. |
| 37 virtual View* GetView() = 0; |
| 38 |
| 39 // Returns a handle to the underlying native view for testing. |
| 40 virtual gfx::NativeView GetTestingHandle() const = 0; |
| 41 |
| 42 // Creates an appropriate NativeSliderWrapper for the platform. |
| 43 static NativeSliderWrapper* CreateWrapper(Slider* slider); |
| 44 }; |
| 45 |
| 46 } // namespace views |
| 47 |
| 48 #endif // VIEWS_CONTROLS_SLIDER_NATIVE_SLIDER_WRAPPER_H_ |
OLD | NEW |