1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <vcl/bitmapex.hxx>
23 #include <tools/color.hxx>
27 namespace vcl
{ class Font
; }
29 namespace sd::slidesorter::controller
{ class Properties
; }
31 namespace sd::slidesorter::view
{
33 const int Theme_FocusIndicatorWidth
= 3;
35 /** Collection of colors and styles that are used to paint the slide sorter
41 Theme (const std::shared_ptr
<controller::Properties
>& rpProperties
);
43 /** Call this method to update some colors as response to a change of
44 a system color change.
47 const std::shared_ptr
<controller::Properties
>& rpProperties
);
49 // BitmapEx GetInsertIndicatorIcon() const;
55 static std::shared_ptr
<vcl::Font
> GetFont (
57 const OutputDevice
& rDevice
);
61 Color_PageNumberDefault
,
62 Color_PageNumberHover
,
63 Color_PageNumberHighContrast
,
64 Color_PageNumberBrightBackground
,
65 Color_PageNumberDarkBackground
,
68 Color_PageCountFontColor
,
71 Color
GetColor (const ColorType eType
);
73 enum GradientColorType
{
75 Gradient_SelectedPage
,
76 Gradient_SelectedAndFocusedPage
,
77 Gradient_MouseOverPage
,
78 Gradient_MouseOverSelected
,
79 Gradient_MouseOverSelectedAndFocusedPage
,
81 GradientColorType_Size_
83 enum class GradientColorClass
{
89 Color
GetGradientColor (
90 const GradientColorType eType
,
91 const GradientColorClass eClass
);
93 const GradientColorType eType
,
94 const Color aBaseColor
,
95 const sal_Int32 nSaturationOverride
,
96 const sal_Int32 nBrightnessOverride
,
97 const sal_Int32 nFillStartOffset
,
98 const sal_Int32 nFillEndOffset
,
99 const sal_Int32 nBorderStartOffset
,
100 const sal_Int32 nBorderEndOffset
);
105 Icon_RawInsertShadow
,
106 Icon_HideSlideOverlay
,
110 const BitmapEx
& GetIcon (const IconType eType
);
113 class GradientDescriptor
118 Color maBorderColor1
;
119 Color maBorderColor2
;
121 Color maBackgroundColor
;
122 ::std::vector
<GradientDescriptor
> maGradients
;
123 ::std::vector
<BitmapEx
> maIcons
;
124 ::std::vector
<Color
> maColor
;
126 GradientDescriptor
& GetGradient (const GradientColorType eType
);
127 /** Guarded initialization of the specified icon in the maIcons
130 void InitializeIcon(const IconType eType
, const OUString
& rResourceId
);
133 } // end of namespace ::sd::slidesorter::view
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */