#include "ui/views/examples/dialog_example.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/examples/examples_window.h"
#include "ui/views/examples/grit/views_examples_resources.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
namespace views::examples {
namespace {
constexpr size_t kFakeModeless = …;
}
template <class DialogType>
class DialogExample::Delegate : public virtual DialogType { … };
class DialogExample::Bubble : public Delegate<BubbleDialogDelegateView> { … };
class DialogExample::Dialog : public Delegate<DialogDelegateView> { … };
DialogExample::DialogExample()
: … { … }
DialogExample::~DialogExample() { … }
void DialogExample::CreateExampleView(View* container) { … }
void DialogExample::StartTextfieldRow(View* parent,
raw_ptr<Textfield>* member,
std::u16string label,
std::u16string value,
Label** created_label,
bool pad_last_col) { … }
void DialogExample::AddCheckbox(View* parent,
raw_ptr<Checkbox>* member,
Label* label) { … }
ui::mojom::ModalType DialogExample::GetModalType() const { … }
int DialogExample::GetDialogButtons() const { … }
void DialogExample::OnCloseCallback() { … }
bool DialogExample::AllowDialogClose(bool accept) { … }
void DialogExample::ResizeDialog() { … }
void DialogExample::ShowButtonPressed() { … }
void DialogExample::BubbleCheckboxPressed() { … }
void DialogExample::OtherCheckboxPressed() { … }
void DialogExample::ContentsChanged(Textfield* sender,
const std::u16string& new_contents) { … }
void DialogExample::OnPerformAction() { … }
}