// 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_NATIVE_THEME_NATIVE_THEME_H_ #define UI_NATIVE_THEME_NATIVE_THEME_H_ #include <map> #include <optional> #include "base/containers/flat_map.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/observer_list.h" #include "base/sequence_checker.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "third_party/abseil-cpp/absl/types/variant.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/models/menu_separator_types.h" #include "ui/color/color_id.h" #include "ui/color/color_provider_key.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/native_widget_types.h" #include "ui/native_theme/caption_style.h" #include "ui/native_theme/native_theme_export.h" #include "ui/native_theme/native_theme_observer.h" namespace cc { class PaintCanvas; } namespace gfx { class Insets; class Rect; class Size; } namespace ui { // This class supports drawing UI controls (like buttons, text fields, lists, // comboboxes, etc) that look like the native UI controls of the underlying // platform, such as Windows or Linux. It also supplies default colors for // dialog box backgrounds, etc., which are obtained from the system theme where // possible. // // The supported control types are listed in the Part enum. These parts can be // in any state given by the State enum, where the actual definition of the // state is part-specific. The supported colors are listed in the ColorId enum. // // Some parts require more information than simply the state in order to be // drawn correctly, and this information is given to the Paint() method via the // ExtraParams union. Each part that requires more information has its own // field in the union. // // NativeTheme also supports getting the default size of a given part with // the GetPartSize() method. class NATIVE_THEME_EXPORT NativeTheme { … }; } // namespace ui #endif // UI_NATIVE_THEME_NATIVE_THEME_H_