blob: b24e0be07701e1e305232a9f90809db951c87625 [file] [log] [blame]
// 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_CONTROLS_BUTTON_RADIO_BUTTON_H_
#define UI_VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
#include "base/strings/string16.h"
#include "ui/views/controls/button/checkbox.h"
namespace views {
// A native themed class representing a radio button. This class does not use
// platform specific objects to replicate the native platforms looks and feel.
class VIEWS_EXPORT RadioButton : public Checkbox {
public:
// The button's class name.
static const char kViewClassName[];
RadioButton(const base::string16& label, int group_id);
virtual ~RadioButton();
// Overridden from View:
virtual const char* GetClassName() const override;
virtual void GetAccessibleState(ui::AXViewState* state) override;
virtual View* GetSelectedViewForGroup(int group) override;
virtual bool IsGroupFocusTraversable() const override;
virtual void OnFocus() override;
// Overridden from Button:
virtual void NotifyClick(const ui::Event& event) override;
// Overridden from LabelButton:
virtual ui::NativeTheme::Part GetThemePart() const override;
// Overridden from Checkbox:
virtual void SetChecked(bool checked) override;
private:
DISALLOW_COPY_AND_ASSIGN(RadioButton);
};
} // namespace views
#endif // UI_VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_