#ifndef ASH_STYLE_OPTION_BUTTON_GROUP_H_
#define ASH_STYLE_OPTION_BUTTON_GROUP_H_
#include "ash/ash_export.h"
#include "ash/style/option_button_base.h"
#include "base/memory/raw_ptr.h"
namespace ash {
class ASH_EXPORT OptionButtonGroup : public views::View {
METADATA_HEADER(OptionButtonGroup, views::View)
public:
explicit OptionButtonGroup(int group_width);
OptionButtonGroup(int group_width,
const gfx::Insets& inside_border_insets,
int between_child_spacing,
const gfx::Insets& option_button_padding,
int image_label_spacing);
OptionButtonGroup(const OptionButtonGroup&) = delete;
OptionButtonGroup& operator=(const OptionButtonGroup&) = delete;
~OptionButtonGroup() override;
virtual OptionButtonBase* AddButton(
OptionButtonBase::PressedCallback callback,
const std::u16string& label) = 0;
void SelectButtonAtIndex(size_t index);
std::vector<OptionButtonBase*> GetSelectedButtons();
protected:
void OnEnableChanged();
const int group_width_;
const gfx::Insets inside_border_insets_;
const gfx::Insets button_padding_;
const int image_label_spacing_;
std::vector<raw_ptr<OptionButtonBase, VectorExperimental>> buttons_;
base::CallbackListSubscription enabled_changed_subscription_;
};
}
#endif