summaryrefslogtreecommitdiffstats
path: root/views/examples/slider_example.h
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 06:15:51 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 06:15:51 +0000
commit7b8a6e4b33e39ce54e9e99553eba5e25cc071fa7 (patch)
tree5d027024363a95717630a5e9d5a0753272044bbf /views/examples/slider_example.h
parent4871cf94831beb0fa94bbeb99a33a90a9a520446 (diff)
downloadchromium_src-7b8a6e4b33e39ce54e9e99553eba5e25cc071fa7.zip
chromium_src-7b8a6e4b33e39ce54e9e99553eba5e25cc071fa7.tar.gz
chromium_src-7b8a6e4b33e39ce54e9e99553eba5e25cc071fa7.tar.bz2
Revert 34142 - Add views/examples/slider_example.h
The example demonstrates how to use the Slider class. BUG=none TEST=manually Review URL: http://codereview.chromium.org/466055 TBR=satorux@chromium.org Review URL: http://codereview.chromium.org/467062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/examples/slider_example.h')
-rw-r--r--views/examples/slider_example.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/views/examples/slider_example.h b/views/examples/slider_example.h
deleted file mode 100644
index 601e6c1..0000000
--- a/views/examples/slider_example.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2009 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 VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_
-#define VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_
-
-#include "views/controls/slider/slider.h"
-#include "views/examples/example_base.h"
-#include "views/fill_layout.h"
-
-namespace examples {
-
-// SliderExample demonstrates how to use the Slider class.
-class SliderExample : public ExampleBase, views::SliderListener {
- public:
- explicit SliderExample(ExamplesMain* main) : ExampleBase(main) {
- }
-
- virtual ~SliderExample() {}
-
- virtual std::wstring GetExampleTitle() {
- return L"Slider";
- }
-
- virtual void CreateExampleView(views::View* container) {
- const double min = 0.0;
- const double max = 100.0;
- const double step = 1.0;
- const views::Slider::StyleFlags style =
- views::Slider::STYLE_DRAW_VALUE;
- slider_ = new views::Slider(min, max, step, style, this);
-
- container->SetLayoutManager(new views::FillLayout);
- container->AddChildView(slider_);
- }
-
- private:
- virtual void SliderValueChanged(views::Slider* sender) {
- PrintStatus(L"Value: %.1f", sender->value());
- }
-
- views::Slider* slider_;
-
- DISALLOW_COPY_AND_ASSIGN(SliderExample);
-};
-
-} // namespace examples
-
-#endif // VIEWS_EXAMPLES_SLIDER_EXAMPLE_H_
-