2020-02-10 22:26:01 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef nsNativeBasicTheme_h
|
|
|
|
#define nsNativeBasicTheme_h
|
|
|
|
|
2020-07-31 15:04:29 +03:00
|
|
|
#include "Units.h"
|
2020-07-30 20:02:02 +03:00
|
|
|
#include "mozilla/StaticPrefs_layout.h"
|
|
|
|
#include "mozilla/ClearOnShutdown.h"
|
|
|
|
#include "mozilla/dom/HTMLMeterElement.h"
|
|
|
|
#include "mozilla/dom/HTMLProgressElement.h"
|
2020-07-31 15:04:29 +03:00
|
|
|
#include "mozilla/gfx/2D.h"
|
|
|
|
#include "mozilla/gfx/Rect.h"
|
|
|
|
#include "mozilla/gfx/Types.h"
|
2020-07-30 20:02:02 +03:00
|
|
|
#include "nsColorControlFrame.h"
|
|
|
|
#include "nsDateTimeControlFrame.h"
|
|
|
|
#include "nsDeviceContext.h"
|
2020-02-10 22:26:01 +03:00
|
|
|
#include "nsITheme.h"
|
2020-07-30 20:02:02 +03:00
|
|
|
#include "nsMeterFrame.h"
|
2020-02-10 22:26:01 +03:00
|
|
|
#include "nsNativeTheme.h"
|
2020-07-30 20:02:02 +03:00
|
|
|
#include "nsProgressFrame.h"
|
|
|
|
#include "nsRangeFrame.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace widget {
|
|
|
|
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sColorWhite(gfx::sRGBColor::OpaqueWhite());
|
|
|
|
static const gfx::sRGBColor sColorWhiteAlpha50(gfx::sRGBColor::White(0.5f));
|
|
|
|
static const gfx::sRGBColor sColorWhiteAlpha80(gfx::sRGBColor::White(0.8f));
|
|
|
|
static const gfx::sRGBColor sColorBlack(gfx::sRGBColor::OpaqueBlack());
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sColorGrey10(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffe9e9ed));
|
|
|
|
static const gfx::sRGBColor sColorGrey10Alpha50(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0x7fe9e9ed));
|
|
|
|
static const gfx::sRGBColor sColorGrey20(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffd0d0d7));
|
|
|
|
static const gfx::sRGBColor sColorGrey30(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffb1b1b9));
|
|
|
|
static const gfx::sRGBColor sColorGrey40(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff8f8f9d));
|
|
|
|
static const gfx::sRGBColor sColorGrey40Alpha50(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0x7f8f8f9d));
|
|
|
|
static const gfx::sRGBColor sColorGrey50(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff676774));
|
|
|
|
static const gfx::sRGBColor sColorGrey50Alpha50(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0x7f676774));
|
|
|
|
static const gfx::sRGBColor sColorGrey60(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff484851));
|
|
|
|
static const gfx::sRGBColor sColorGrey60Alpha50(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0x7f484851));
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sColorAccentLight(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0x4d008deb));
|
|
|
|
static const gfx::sRGBColor sColorAccent(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff0060df));
|
|
|
|
static const gfx::sRGBColor sColorAccentDark(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff0250bb));
|
|
|
|
static const gfx::sRGBColor sColorAccentDarker(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff054096));
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sColorMeterGreen10(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff00ab60));
|
|
|
|
static const gfx::sRGBColor sColorMeterGreen20(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff056139));
|
|
|
|
static const gfx::sRGBColor sColorMeterYellow10(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffffbd4f));
|
|
|
|
static const gfx::sRGBColor sColorMeterYellow20(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffd2811e));
|
|
|
|
static const gfx::sRGBColor sColorMeterRed10(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffe22850));
|
|
|
|
static const gfx::sRGBColor sColorMeterRed20(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xff810220));
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2021-01-21 00:33:34 +03:00
|
|
|
static const gfx::sRGBColor sScrollbarColor(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xfff0f0f0));
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sScrollbarBorderColor(gfx::sRGBColor(1.0f, 1.0f,
|
|
|
|
1.0f));
|
2021-01-21 00:33:34 +03:00
|
|
|
static const gfx::sRGBColor sScrollbarThumbColor(
|
|
|
|
gfx::sRGBColor::UnusualFromARGB(0xffcdcdcd));
|
2020-07-31 15:04:29 +03:00
|
|
|
static const gfx::sRGBColor sScrollbarThumbColorActive(gfx::sRGBColor(0.375f,
|
|
|
|
0.375f,
|
|
|
|
0.375f));
|
|
|
|
static const gfx::sRGBColor sScrollbarThumbColorHover(gfx::sRGBColor(0.65f,
|
|
|
|
0.65f,
|
|
|
|
0.65f));
|
|
|
|
static const gfx::sRGBColor sScrollbarArrowColor(gfx::sRGBColor(0.375f, 0.375f,
|
|
|
|
0.375f));
|
|
|
|
static const gfx::sRGBColor sScrollbarArrowColorActive(gfx::sRGBColor(1.0f,
|
|
|
|
1.0f,
|
|
|
|
1.0f));
|
|
|
|
static const gfx::sRGBColor sScrollbarArrowColorHover(gfx::sRGBColor(0.0f, 0.0f,
|
|
|
|
0.0f));
|
|
|
|
static const gfx::sRGBColor sScrollbarButtonColor(sScrollbarColor);
|
|
|
|
static const gfx::sRGBColor sScrollbarButtonActiveColor(gfx::sRGBColor(0.375f,
|
|
|
|
0.375f,
|
|
|
|
0.375f));
|
|
|
|
static const gfx::sRGBColor sScrollbarButtonHoverColor(gfx::sRGBColor(0.86f,
|
|
|
|
0.86f,
|
|
|
|
0.86f));
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-11-30 07:48:07 +03:00
|
|
|
static const CSSCoord kMinimumWidgetSize = 14.0f;
|
2021-01-21 00:33:34 +03:00
|
|
|
static const CSSCoord kMinimumScrollbarSize = 17.0f;
|
2020-11-30 07:48:07 +03:00
|
|
|
static const CSSCoord kMinimumThinScrollbarSize = 6.0f;
|
|
|
|
static const CSSCoord kMinimumColorPickerHeight = 32.0f;
|
|
|
|
static const CSSCoord kMinimumRangeThumbSize = 20.0f;
|
|
|
|
static const CSSCoord kMinimumDropdownArrowButtonWidth = 18.0f;
|
2021-01-22 19:09:35 +03:00
|
|
|
static const CSSCoord kMinimumSpinnerButtonWidth = 18.0f;
|
|
|
|
static const CSSCoord kMinimumSpinnerButtonHeight = 9.0f;
|
2020-07-30 20:02:02 +03:00
|
|
|
static const CSSCoord kButtonBorderWidth = 1.0f;
|
|
|
|
static const CSSCoord kMenulistBorderWidth = 1.0f;
|
|
|
|
static const CSSCoord kTextFieldBorderWidth = 1.0f;
|
|
|
|
static const CSSCoord kRangeHeight = 6.0f;
|
|
|
|
static const CSSCoord kProgressbarHeight = 6.0f;
|
|
|
|
static const CSSCoord kMeterHeight = 12.0f;
|
|
|
|
|
2021-01-20 23:08:35 +03:00
|
|
|
// nsCheckboxRadioFrame takes the bottom of the content box as the baseline.
|
|
|
|
// This border-width makes its baseline 2px under the bottom, which is nice.
|
|
|
|
static const CSSCoord kCheckboxRadioBorderWidth = 2.0f;
|
|
|
|
|
2020-07-30 20:02:02 +03:00
|
|
|
} // namespace widget
|
|
|
|
} // namespace mozilla
|
2020-02-10 22:26:01 +03:00
|
|
|
|
2020-10-06 00:15:18 +03:00
|
|
|
class nsNativeBasicTheme : protected nsNativeTheme, public nsITheme {
|
|
|
|
protected:
|
2020-07-31 15:04:29 +03:00
|
|
|
using sRGBColor = mozilla::gfx::sRGBColor;
|
|
|
|
using CSSCoord = mozilla::CSSCoord;
|
2020-11-30 07:48:07 +03:00
|
|
|
using CSSPoint = mozilla::CSSPoint;
|
2020-12-03 02:11:32 +03:00
|
|
|
using CSSIntCoord = mozilla::CSSIntCoord;
|
2020-10-15 07:54:06 +03:00
|
|
|
using ComputedStyle = mozilla::ComputedStyle;
|
2020-07-31 15:04:29 +03:00
|
|
|
using EventStates = mozilla::EventStates;
|
|
|
|
using DrawTarget = mozilla::gfx::DrawTarget;
|
|
|
|
using Path = mozilla::gfx::Path;
|
|
|
|
using Rect = mozilla::gfx::Rect;
|
2020-11-02 20:09:05 +03:00
|
|
|
using Point = mozilla::gfx::Point;
|
2020-07-31 15:04:29 +03:00
|
|
|
using RectCornerRadii = mozilla::gfx::RectCornerRadii;
|
2020-11-30 07:48:07 +03:00
|
|
|
using LayoutDeviceCoord = mozilla::LayoutDeviceCoord;
|
2020-11-30 01:19:10 +03:00
|
|
|
using LayoutDeviceRect = mozilla::LayoutDeviceRect;
|
2020-07-31 15:04:29 +03:00
|
|
|
|
2020-02-10 22:26:01 +03:00
|
|
|
public:
|
2020-11-30 07:48:07 +03:00
|
|
|
using DPIRatio = mozilla::CSSToLayoutDeviceScale;
|
|
|
|
|
2020-02-10 22:26:01 +03:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// The nsITheme interface.
|
|
|
|
NS_IMETHOD DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance,
|
|
|
|
const nsRect& aRect,
|
|
|
|
const nsRect& aDirtyRect) override;
|
|
|
|
/*bool CreateWebRenderCommandsForWidget(mozilla::wr::DisplayListBuilder&
|
|
|
|
aBuilder, mozilla::wr::IpcResourceUpdateQueue& aResources, const
|
|
|
|
mozilla::layers::StackingContextHelper& aSc,
|
|
|
|
mozilla::layers::RenderRootStateManager*
|
|
|
|
aManager, nsIFrame* aFrame, StyleAppearance aAppearance, const nsRect&
|
|
|
|
aRect) override;*/
|
2020-12-03 02:11:32 +03:00
|
|
|
[[nodiscard]] LayoutDeviceIntMargin GetWidgetBorder(
|
2020-03-26 21:48:30 +03:00
|
|
|
nsDeviceContext* aContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance) override;
|
2020-02-10 22:26:01 +03:00
|
|
|
bool GetWidgetPadding(nsDeviceContext* aContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance,
|
2020-12-03 02:11:32 +03:00
|
|
|
LayoutDeviceIntMargin* aResult) override;
|
2020-07-30 20:02:02 +03:00
|
|
|
bool GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance,
|
|
|
|
nsRect* aOverflowRect) override;
|
2020-02-10 22:26:01 +03:00
|
|
|
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance,
|
2020-12-03 02:11:32 +03:00
|
|
|
mozilla::LayoutDeviceIntSize* aResult,
|
2020-02-10 22:26:01 +03:00
|
|
|
bool* aIsOverridable) override;
|
2020-07-30 20:02:02 +03:00
|
|
|
Transparency GetWidgetTransparency(nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance) override;
|
2020-02-10 22:26:01 +03:00
|
|
|
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, StyleAppearance aAppearance,
|
|
|
|
nsAtom* aAttribute, bool* aShouldRepaint,
|
|
|
|
const nsAttrValue* aOldValue) override;
|
|
|
|
NS_IMETHOD ThemeChanged() override;
|
2020-07-30 20:02:02 +03:00
|
|
|
bool WidgetAppearanceDependsOnWindowFocus(
|
2020-02-10 22:26:01 +03:00
|
|
|
StyleAppearance aAppearance) override;
|
2020-07-30 20:02:02 +03:00
|
|
|
/*bool NeedToClearBackgroundBehindWidget(
|
|
|
|
nsIFrame* aFrame, StyleAppearance aAppearance) override;*/
|
|
|
|
ThemeGeometryType ThemeGeometryTypeForWidget(
|
2020-02-10 22:26:01 +03:00
|
|
|
nsIFrame* aFrame, StyleAppearance aAppearance) override;
|
|
|
|
bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame,
|
|
|
|
StyleAppearance aAppearance) override;
|
|
|
|
bool WidgetIsContainer(StyleAppearance aAppearance) override;
|
|
|
|
bool ThemeDrawsFocusForWidget(StyleAppearance aAppearance) override;
|
|
|
|
bool ThemeNeedsComboboxDropmarker() override;
|
|
|
|
|
|
|
|
protected:
|
2020-07-30 20:02:02 +03:00
|
|
|
nsNativeBasicTheme() = default;
|
2020-02-10 22:26:01 +03:00
|
|
|
virtual ~nsNativeBasicTheme() = default;
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2021-01-27 00:34:35 +03:00
|
|
|
static DPIRatio GetDPIRatio(nsIFrame* aFrame, StyleAppearance);
|
2020-07-30 20:02:02 +03:00
|
|
|
static bool IsDateTimeResetButton(nsIFrame* aFrame);
|
|
|
|
static bool IsColorPickerButton(nsIFrame* aFrame);
|
2020-10-06 00:15:18 +03:00
|
|
|
static bool IsRootScrollbar(nsIFrame* aFrame);
|
2020-11-30 01:19:10 +03:00
|
|
|
static LayoutDeviceRect FixAspectRatio(const LayoutDeviceRect& aRect);
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeCheckboxColors(
|
2021-01-05 15:45:48 +03:00
|
|
|
const EventStates& aState, StyleAppearance aAppearance);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual sRGBColor ComputeCheckmarkColor(const EventStates& aState);
|
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeRadioCheckmarkColors(
|
|
|
|
const EventStates& aState);
|
|
|
|
virtual sRGBColor ComputeBorderColor(const EventStates& aState);
|
|
|
|
|
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeButtonColors(
|
2020-07-30 20:02:02 +03:00
|
|
|
const EventStates& aState, nsIFrame* aFrame = nullptr);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeTextfieldColors(
|
|
|
|
const EventStates& aState);
|
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeRangeProgressColors(
|
2020-07-30 20:02:02 +03:00
|
|
|
const EventStates& aState);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeRangeTrackColors(
|
2020-07-30 20:02:02 +03:00
|
|
|
const EventStates& aState);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeRangeThumbColors(
|
2020-07-30 20:02:02 +03:00
|
|
|
const EventStates& aState);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeProgressColors();
|
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeProgressTrackColors();
|
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeMeterchunkColors(
|
2021-01-06 09:00:28 +03:00
|
|
|
const EventStates& aMeterState);
|
2020-11-17 23:53:01 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeMeterTrackColors();
|
|
|
|
virtual sRGBColor ComputeMenulistArrowButtonColor(const EventStates& aState);
|
|
|
|
virtual std::array<sRGBColor, 3> ComputeFocusRectColors();
|
2021-01-21 00:33:34 +03:00
|
|
|
virtual std::pair<sRGBColor, sRGBColor> ComputeScrollbarColors(
|
|
|
|
nsIFrame* aFrame, const ComputedStyle& aStyle,
|
|
|
|
const EventStates& aDocumentState, bool aIsRoot);
|
|
|
|
virtual sRGBColor ComputeScrollbarThumbColor(
|
|
|
|
nsIFrame* aFrame, const ComputedStyle& aStyle,
|
|
|
|
const EventStates& aElementState, const EventStates& aDocumentState);
|
|
|
|
virtual std::array<sRGBColor, 3> ComputeScrollbarButtonColors(
|
|
|
|
nsIFrame* aFrame, StyleAppearance aAppearance,
|
2020-11-17 23:53:01 +03:00
|
|
|
const ComputedStyle& aStyle, const EventStates& aElementState,
|
2020-10-15 07:54:41 +03:00
|
|
|
const EventStates& aDocumentState);
|
2020-11-17 23:53:01 +03:00
|
|
|
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintRoundedFocusRect(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect, DPIRatio aDpiRatio,
|
|
|
|
CSSCoord aRadius, CSSCoord aOffset);
|
|
|
|
void PaintRoundedRect(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-17 23:53:01 +03:00
|
|
|
const sRGBColor& aBackgroundColor,
|
|
|
|
const sRGBColor& aBorderColor, CSSCoord aBorderWidth,
|
2020-11-30 07:48:07 +03:00
|
|
|
RectCornerRadii aDpiAdjustedRadii, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintRoundedRectWithRadius(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-17 23:53:01 +03:00
|
|
|
const sRGBColor& aBackgroundColor,
|
|
|
|
const sRGBColor& aBorderColor,
|
|
|
|
CSSCoord aBorderWidth, CSSCoord aRadius,
|
2020-11-30 07:48:07 +03:00
|
|
|
DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintCheckboxControl(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintCheckMark(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2021-01-21 00:54:58 +03:00
|
|
|
const EventStates& aState);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintIndeterminateMark(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2021-01-21 00:54:58 +03:00
|
|
|
const EventStates& aState);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintStrokedEllipse(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-17 23:53:01 +03:00
|
|
|
const sRGBColor& aBackgroundColor,
|
|
|
|
const sRGBColor& aBorderColor,
|
2020-11-30 07:48:07 +03:00
|
|
|
const CSSCoord aBorderWidth, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintEllipseShadow(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect, float aShadowAlpha,
|
|
|
|
const CSSPoint& aShadowOffset,
|
2020-11-30 07:48:07 +03:00
|
|
|
CSSCoord aShadowBlurStdDev, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintRadioControl(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintRadioCheckmark(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintTextField(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintListbox(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintMenulist(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintArrow(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2021-01-21 00:54:58 +03:00
|
|
|
const float aArrowPolygonX[], const float aArrowPolygonY[],
|
|
|
|
const int32_t aArrowNumPoints, const sRGBColor aFillColor);
|
2020-11-17 23:53:01 +03:00
|
|
|
void PaintMenulistArrowButton(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
2020-11-30 01:19:10 +03:00
|
|
|
const LayoutDeviceRect& aRect,
|
2021-01-21 00:54:58 +03:00
|
|
|
const EventStates& aState);
|
2020-11-17 23:53:01 +03:00
|
|
|
void PaintSpinnerButton(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
2020-11-30 01:19:10 +03:00
|
|
|
const LayoutDeviceRect& aRect,
|
|
|
|
const EventStates& aState,
|
2020-11-30 07:48:07 +03:00
|
|
|
StyleAppearance aAppearance, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintRange(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect, const EventStates& aState,
|
|
|
|
DPIRatio aDpiRatio, bool aHorizontal);
|
|
|
|
void PaintProgressBar(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-17 23:53:01 +03:00
|
|
|
void PaintProgresschunk(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
2020-11-30 01:19:10 +03:00
|
|
|
const LayoutDeviceRect& aRect,
|
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
|
|
|
void PaintMeter(DrawTarget* aDrawTarget, const LayoutDeviceRect& aRect,
|
2020-11-30 07:48:07 +03:00
|
|
|
const EventStates& aState, DPIRatio aDpiRatio);
|
2020-11-17 23:53:01 +03:00
|
|
|
void PaintMeterchunk(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
2021-01-06 09:00:28 +03:00
|
|
|
const LayoutDeviceRect& aRect, DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
void PaintButton(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect, const EventStates& aState,
|
|
|
|
DPIRatio aDpiRatio);
|
2020-07-30 20:02:02 +03:00
|
|
|
|
2020-11-30 01:19:10 +03:00
|
|
|
virtual void PaintScrollbarThumb(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-02 20:08:58 +03:00
|
|
|
bool aHorizontal, nsIFrame* aFrame,
|
2020-10-27 18:27:31 +03:00
|
|
|
const ComputedStyle& aStyle,
|
|
|
|
const EventStates& aElementState,
|
|
|
|
const EventStates& aDocumentState,
|
2020-11-30 07:48:07 +03:00
|
|
|
DPIRatio aDpiRatio);
|
2020-11-30 01:19:10 +03:00
|
|
|
virtual void PaintScrollbar(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect, bool aHorizontal,
|
|
|
|
nsIFrame* aFrame, const ComputedStyle& aStyle,
|
2020-10-27 18:27:31 +03:00
|
|
|
const EventStates& aDocumentState,
|
2020-11-30 07:48:07 +03:00
|
|
|
DPIRatio aDpiRatio, bool aIsRoot);
|
2020-11-30 01:19:10 +03:00
|
|
|
virtual void PaintScrollbarTrack(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-02 20:09:00 +03:00
|
|
|
bool aHorizontal, nsIFrame* aFrame,
|
|
|
|
const ComputedStyle& aStyle,
|
|
|
|
const EventStates& aDocumentState,
|
2020-11-30 07:48:07 +03:00
|
|
|
DPIRatio aDpiRatio, bool aIsRoot);
|
2020-11-30 01:19:10 +03:00
|
|
|
virtual void PaintScrollCorner(DrawTarget* aDrawTarget,
|
|
|
|
const LayoutDeviceRect& aRect,
|
2020-11-02 20:08:58 +03:00
|
|
|
nsIFrame* aFrame, const ComputedStyle& aStyle,
|
2020-10-27 18:27:31 +03:00
|
|
|
const EventStates& aDocumentState,
|
2020-11-30 07:48:07 +03:00
|
|
|
DPIRatio aDpiRatio, bool aIsRoot);
|
2021-01-21 00:33:34 +03:00
|
|
|
virtual void PaintScrollbarButton(
|
|
|
|
DrawTarget* aDrawTarget, StyleAppearance aAppearance,
|
|
|
|
const LayoutDeviceRect& aRect, nsIFrame* aFrame,
|
|
|
|
const ComputedStyle& aStyle, const EventStates& aElementState,
|
|
|
|
const EventStates& aDocumentState, DPIRatio aDpiRatio);
|
2020-02-10 22:26:01 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|