diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 23:15:37 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 23:15:37 +0000 |
commit | 856b972eff8770d5c08ae8ca7dd452817a402e87 (patch) | |
tree | b3224e8ad14bbe3487c4efb9182ff28ef6a82b7c /ui/views/examples/slider_example.h | |
parent | f8560588a7791b90d24aac01112fbfd22a39bc9c (diff) | |
download | chromium_src-856b972eff8770d5c08ae8ca7dd452817a402e87.zip chromium_src-856b972eff8770d5c08ae8ca7dd452817a402e87.tar.gz chromium_src-856b972eff8770d5c08ae8ca7dd452817a402e87.tar.bz2 |
views: Add a slider control.
BUG=110130
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9455082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/examples/slider_example.h')
-rw-r--r-- | ui/views/examples/slider_example.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ui/views/examples/slider_example.h b/ui/views/examples/slider_example.h new file mode 100644 index 0000000..a94a00c --- /dev/null +++ b/ui/views/examples/slider_example.h @@ -0,0 +1,42 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_ +#define UI_VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_ +#pragma once + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "ui/views/controls/slider.h" +#include "ui/views/examples/example_base.h" + +namespace views { +class Label; + +namespace examples { + +class SliderExample : public ExampleBase, public SliderListener { + public: + SliderExample(); + virtual ~SliderExample(); + + // Overridden from ExampleBase: + virtual void CreateExampleView(View* container) OVERRIDE; + + private: + // Overridden from SliderListener: + virtual void SliderValueChanged(Slider* sender, + float value, + float old_value) OVERRIDE; + + Slider* slider_; + Label* label_; + + DISALLOW_COPY_AND_ASSIGN(SliderExample); +}; + +} // namespace examples +} // namespace views + +#endif // UI_VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_ |