root/ui/views/examples/radio_button_example.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


// Copyright (c) 2011 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_RADIO_BUTTON_EXAMPLE_H_
#define UI_VIEWS_EXAMPLES_RADIO_BUTTON_EXAMPLE_H_

#include <string>

#include "base/macros.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/examples/example_base.h"

namespace views {

class LabelButton;
class RadioButton;

namespace examples {

class VIEWS_EXAMPLES_EXPORT RadioButtonExample : public ExampleBase,
                                                 public ButtonListener {
 public:
  RadioButtonExample();
  virtual ~RadioButtonExample();

  // ExampleBase:
  virtual void CreateExampleView(View* container) OVERRIDE;

 private:
  // ButtonListener:
  virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;

  // Group of 3 radio buttons.
  RadioButton* radio_buttons_[3];

  // Control button to select radio buttons, and show the status of buttons.
  LabelButton* select_;
  LabelButton* status_;

  // The number of times the button is pressed.
  int count_;

  DISALLOW_COPY_AND_ASSIGN(RadioButtonExample);
};

}  // namespace examples
}  // namespace views

#endif  // UI_VIEWS_EXAMPLES_RADIO_BUTTON_EXAMPLE_H_

/* [<][>][^][v][top][bottom][index][help] */