chromium/ui/views/touchui/touch_selection_menu_views.cc

// Copyright 2018 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/touchui/touch_selection_menu_views.h"

#include <memory>
#include <utility>

#include "base/check.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/pointer/touch_editing_controller.h"
#include "ui/base/ui_base_features.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/text_utils.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/touch_selection/touch_selection_menu_runner.h"
#include "ui/touch_selection/touch_selection_metrics.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"

namespace views {
namespace {

struct MenuCommand {};

MenuCommand kMenuCommands[] =;

MenuCommand kMenuSelectCommands[] =;

// Constants to apply when touch text editing redesign is disabled.
constexpr gfx::Insets kMenuMargins =;
constexpr gfx::Size kMenuButtonMinSize =;

// Constants to apply when touch text editing redesign is enabled.
constexpr gfx::Insets kEmptyMenuMargins =;
constexpr int kMenuCornerRadius =;
// Padding to add space between the menu and the selection bounds and handles.
constexpr int kMenuAnchorRectPadding =;
// Padding to apply horizontally around button labels.
constexpr int kButtonHorizontalPadding =;
constexpr int kButtonMinHeight =;

}  // namespace

TouchSelectionMenuViews::TouchSelectionMenuViews(
    TouchSelectionMenuRunnerViews* owner,
    base::WeakPtr<ui::TouchSelectionMenuClient> client,
    aura::Window* context)
    :{}

void TouchSelectionMenuViews::ShowMenu(const gfx::Rect& anchor_rect,
                                       const gfx::Size& handle_image_size) {}

bool TouchSelectionMenuViews::IsMenuAvailable(
    const ui::TouchSelectionMenuClient* client) {}

void TouchSelectionMenuViews::CloseMenu() {}

TouchSelectionMenuViews::~TouchSelectionMenuViews() = default;

void TouchSelectionMenuViews::CreateButtons() {}

LabelButton* TouchSelectionMenuViews::CreateButton(
    const std::u16string& title,
    Button::PressedCallback callback) {}

void TouchSelectionMenuViews::CreateSeparator() {}

void TouchSelectionMenuViews::DisconnectOwner() {}

void TouchSelectionMenuViews::WindowClosing() {}

void TouchSelectionMenuViews::ButtonPressed(int command,
                                            const ui::Event& event) {}

void TouchSelectionMenuViews::EllipsisPressed(const ui::Event& event) {}

BEGIN_METADATA()

}  // namespace views