chromium/ui/views/controls/message_box_view.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/controls/message_box_view.h"

#include <stddef.h>

#include <memory>
#include <numeric>
#include <utility>

#include "base/functional/bind.h"
#include "base/i18n/rtl.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/accessibility/accessibility_paint_checks.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/client_view.h"
#include "ui/views/window/dialog_delegate.h"

namespace {

constexpr int kDefaultMessageWidth =;

// Paragraph separators are defined in
// http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBidiClass.txt
//
// # Bidi_Class=Paragraph_Separator
//
// 000A          ; B # Cc       <control-000A>
// 000D          ; B # Cc       <control-000D>
// 001C..001E    ; B # Cc   [3] <control-001C>..<control-001E>
// 0085          ; B # Cc       <control-0085>
// 2029          ; B # Zp       PARAGRAPH SEPARATOR
bool IsParagraphSeparator(char16_t c) {}

// Splits |text| into a vector of paragraphs.
// Given an example "\nabc\ndef\n\n\nhij\n", the split results should be:
// "", "abc", "def", "", "", "hij", and "".
void SplitStringIntoParagraphs(const std::u16string& text,
                               std::vector<std::u16string>* paragraphs) {}

}  // namespace

namespace views {

///////////////////////////////////////////////////////////////////////////////
// MessageBoxView, public:

MessageBoxView::MessageBoxView(const std::u16string& message,
                               bool detect_directionality)
    :{}

MessageBoxView::~MessageBoxView() = default;

views::Textfield* MessageBoxView::GetVisiblePromptField() {}

std::u16string MessageBoxView::GetInputText() {}

bool MessageBoxView::HasVisibleCheckBox() const {}

bool MessageBoxView::IsCheckBoxSelected() {}

void MessageBoxView::SetCheckBoxLabel(const std::u16string& label) {}

void MessageBoxView::SetCheckBoxSelected(bool selected) {}

void MessageBoxView::SetLink(const std::u16string& text,
                             Link::ClickedCallback callback) {}

void MessageBoxView::SetInterRowVerticalSpacing(int spacing) {}

void MessageBoxView::SetMessageWidth(int width) {}

void MessageBoxView::SetPromptField(const std::u16string& default_prompt) {}

///////////////////////////////////////////////////////////////////////////////
// MessageBoxView, View overrides:

gfx::Size MessageBoxView::CalculatePreferredSize(
    const SizeBounds& available_size) const {}

void MessageBoxView::ViewHierarchyChanged(
    const ViewHierarchyChangedDetails& details) {}

bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) {}

///////////////////////////////////////////////////////////////////////////////
// MessageBoxView, private:

void MessageBoxView::ResetLayoutManager() {}

gfx::Insets MessageBoxView::GetHorizontalInsets(
    const LayoutProvider* provider) {}

BEGIN_METADATA()

}  // namespace views