chromium/ui/views/controls/progress_bar.h

// Copyright 2011 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_PROGRESS_BAR_H_
#define UI_VIEWS_CONTROLS_PROGRESS_BAR_H_

#include <memory>
#include <optional>

#include "ui/color/color_id.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/view.h"

namespace gfx {
class LinearAnimation;
}

namespace views {

// Progress bar is a control that indicates progress visually.
class VIEWS_EXPORT ProgressBar : public View, public gfx::AnimationDelegate {};

BEGIN_VIEW_BUILDER(VIEWS_EXPORT, ProgressBar, View)
VIEW_BUILDER_PROPERTY(double, Value)
VIEW_BUILDER_PROPERTY(bool, Paused)
VIEW_BUILDER_PROPERTY(SkColor, ForegroundColor)
VIEW_BUILDER_PROPERTY(std::optional<ui::ColorId>, ForegroundColorId)
VIEW_BUILDER_PROPERTY(SkColor, BackgroundColor)
VIEW_BUILDER_PROPERTY(std::optional<ui::ColorId>, BackgroundColorId)
VIEW_BUILDER_PROPERTY(int, PreferredHeight)
VIEW_BUILDER_PROPERTY(std::optional<gfx::RoundedCornersF>, PreferredCornerRadii)
END_VIEW_BUILDER

}  // namespace views

DEFINE_VIEW_BUILDER()

#endif  // UI_VIEWS_CONTROLS_PROGRESS_BAR_H_