chromium/ui/views/controls/button/label_button.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/button/label_button.h"

#include <stddef.h>

#include <algorithm>
#include <utility>

#include "base/lazy_instance.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/actions/actions.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/ui_base_features.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/background.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/layout/delegating_layout_manager.h"
#include "ui/views/layout/proposed_layout.h"
#include "ui/views/painter.h"
#include "ui/views/style/platform_style.h"
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/window/dialog_delegate.h"

namespace views {

namespace {
constexpr Button::ButtonState kEnabledStates[] =;
}  // namespace

LabelButton::LabelButton(
    PressedCallback callback,
    const std::u16string& text,
    int button_context,
    std::unique_ptr<LabelButtonImageContainer> image_container)
    :{}

LabelButton::~LabelButton() {}

gfx::ImageSkia LabelButton::GetImage(ButtonState state) const {}

const std::optional<ui::ImageModel>& LabelButton::GetImageModel(
    ButtonState state) const {}

void LabelButton::SetImageModel(
    ButtonState state,
    const std::optional<ui::ImageModel>& image_model) {}

bool LabelButton::HasImage(ButtonState state) const {}

const std::u16string& LabelButton::GetText() const {}

void LabelButton::SetText(const std::u16string& text) {}

void LabelButton::SetLabelStyle(views::style::TextStyle text_style) {}

void LabelButton::ShrinkDownThenClearText() {}

void LabelButton::SetTextColor(ButtonState for_state, SkColor color) {}

void LabelButton::SetTextColorId(ButtonState for_state, ui::ColorId color_id) {}

float LabelButton::GetFocusRingCornerRadius() const {}

void LabelButton::SetFocusRingCornerRadius(float radius) {}

void LabelButton::SetEnabledTextColors(std::optional<SkColor> color) {}

void LabelButton::SetEnabledTextColorIds(ui::ColorId color_id) {}

SkColor LabelButton::GetCurrentTextColor() const {}

void LabelButton::SetTextShadows(const gfx::ShadowValues& shadows) {}

void LabelButton::SetTextSubpixelRenderingEnabled(bool enabled) {}

void LabelButton::SetElideBehavior(gfx::ElideBehavior elide_behavior) {}

void LabelButton::SetHorizontalAlignment(gfx::HorizontalAlignment alignment) {}

gfx::HorizontalAlignment LabelButton::GetHorizontalAlignment() const {}

gfx::Size LabelButton::GetMinSize() const {}

void LabelButton::SetMinSize(const gfx::Size& min_size) {}

gfx::Size LabelButton::GetMaxSize() const {}

void LabelButton::SetMaxSize(const gfx::Size& max_size) {}

bool LabelButton::GetIsDefault() const {}

void LabelButton::SetIsDefault(bool is_default) {}

int LabelButton::GetImageLabelSpacing() const {}

void LabelButton::SetImageLabelSpacing(int spacing) {}

bool LabelButton::GetImageCentered() const {}

void LabelButton::SetImageCentered(bool image_centered) {}

std::unique_ptr<LabelButtonBorder> LabelButton::CreateDefaultBorder() const {}

void LabelButton::SetAppearDisabledInInactiveWidget(bool appear_disabled) {}

void LabelButton::SetBorder(std::unique_ptr<Border> border) {}

void LabelButton::OnBoundsChanged(const gfx::Rect& previous_bounds) {}

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

gfx::Size LabelButton::GetMinimumSize() const {}

ProposedLayout LabelButton::CalculateProposedLayout(
    const SizeBounds& size_bounds) const {}

void LabelButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {}

ui::NativeTheme::Part LabelButton::GetThemePart() const {}

gfx::Rect LabelButton::GetThemePaintRect() const {}

ui::NativeTheme::State LabelButton::GetThemeState(
    ui::NativeTheme::ExtraParams* params) const {}

const gfx::Animation* LabelButton::GetThemeAnimation() const {}

ui::NativeTheme::State LabelButton::GetBackgroundThemeState(
    ui::NativeTheme::ExtraParams* params) const {}

ui::NativeTheme::State LabelButton::GetForegroundThemeState(
    ui::NativeTheme::ExtraParams* params) const {}

void LabelButton::UpdateImage() {}

void LabelButton::AddLayerToRegion(ui::Layer* new_layer,
                                   views::LayerRegion region) {}

void LabelButton::RemoveLayerFromRegions(ui::Layer* old_layer) {}

std::unique_ptr<ActionViewInterface> LabelButton::GetActionViewInterface() {}

void LabelButton::GetExtraParams(ui::NativeTheme::ExtraParams* params) const {}

PropertyEffects LabelButton::UpdateStyleToIndicateDefaultStatus() {}

void LabelButton::ChildPreferredSizeChanged(View* child) {}

void LabelButton::AddedToWidget() {}

void LabelButton::RemovedFromWidget() {}

void LabelButton::OnFocus() {}

void LabelButton::OnBlur() {}

void LabelButton::OnThemeChanged() {}

void LabelButton::StateChanged(ButtonState old_state) {}

void LabelButton::SetTextInternal(const std::u16string& text) {}

void LabelButton::ClearTextIfShrunkDown() {}

gfx::Size LabelButton::GetUnclampedSizeWithoutLabel() const {}

Button::ButtonState LabelButton::GetVisualState() const {}

void LabelButton::VisualStateChanged() {}

void LabelButton::ResetColorsFromNativeTheme() {}

void LabelButton::ResetLabelEnabledColor() {}

Button::ButtonState LabelButton::ImageStateForState(
    ButtonState for_state) const {}

void LabelButton::FlipCanvasOnPaintForRTLUIChanged() {}

LabelButtonActionViewInterface::LabelButtonActionViewInterface(
    LabelButton* action_view)
    :{}

void LabelButtonActionViewInterface::ActionItemChangedImpl(
    actions::ActionItem* action_item) {}

BEGIN_METADATA()

}  // namespace views