chromium/ui/views/controls/link.h

// 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.

#ifndef UI_VIEWS_CONTROLS_LINK_H_
#define UI_VIEWS_CONTROLS_LINK_H_

#include <memory>
#include <optional>
#include <string>
#include <utility>

#include "base/functional/callback.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/color_palette.h"
#include "ui/views/controls/label.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/style/typography.h"

namespace views {

////////////////////////////////////////////////////////////////////////////////
//
// Link class
//
// A Link is a label subclass that looks like an HTML link. It has a
// controller which is notified when a click occurs.
//
////////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT Link : public Label {};

BEGIN_VIEW_BUILDER(VIEWS_EXPORT, Link, Label)
VIEW_BUILDER_OVERLOAD_METHOD(SetCallback, base::RepeatingClosure)
VIEW_BUILDER_OVERLOAD_METHOD(SetCallback, Link::ClickedCallback)
VIEW_BUILDER_PROPERTY(bool, ForceUnderline)
END_VIEW_BUILDER

}  // namespace views

DEFINE_VIEW_BUILDER()

#endif  // UI_VIEWS_CONTROLS_LINK_H_