1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_
8 #include "base/strings/string16.h"
9 #include "ui/views/controls/button/checkbox.h"
13 // A native themed class representing a radio button. This class does not use
14 // platform specific objects to replicate the native platforms looks and feel.
15 class VIEWS_EXPORT RadioButton
: public Checkbox
{
17 // The button's class name.
18 static const char kViewClassName
[];
20 RadioButton(const base::string16
& label
, int group_id
);
21 ~RadioButton() override
;
23 // Overridden from View:
24 const char* GetClassName() const override
;
25 void GetAccessibleState(ui::AXViewState
* state
) override
;
26 View
* GetSelectedViewForGroup(int group
) override
;
27 bool IsGroupFocusTraversable() const override
;
28 void OnFocus() override
;
30 // Overridden from Button:
31 void NotifyClick(const ui::Event
& event
) override
;
33 // Overridden from LabelButton:
34 ui::NativeTheme::Part
GetThemePart() const override
;
36 // Overridden from Checkbox:
37 void SetChecked(bool checked
) override
;
40 DISALLOW_COPY_AND_ASSIGN(RadioButton
);
45 #endif // UI_VIEWS_CONTROLS_BUTTON_RADIO_BUTTON_H_