bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / slidesorter / inc / view / SlsTheme.hxx
blobe94c97b1c44b74d57ef30542dfce2e7042736e34
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_VIEW_SLSTHEME_HXX
21 #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_VIEW_SLSTHEME_HXX
23 #include <vcl/bitmapex.hxx>
24 #include <tools/color.hxx>
26 #include <memory>
28 namespace vcl { class Font; }
30 namespace sd { namespace slidesorter { namespace controller {
31 class Properties;
32 } } }
34 namespace sd { namespace slidesorter { namespace view {
36 const int Theme_FocusIndicatorWidth = 3;
38 /** Collection of colors and styles that are used to paint the slide sorter
39 view.
41 class Theme
43 public:
44 Theme (const std::shared_ptr<controller::Properties>& rpProperties);
46 /** Call this method to update some colors as response to a change of
47 a system color change.
49 void Update (
50 const std::shared_ptr<controller::Properties>& rpProperties);
52 // BitmapEx GetInsertIndicatorIcon() const;
54 enum FontType {
55 Font_PageNumber,
56 Font_PageCount
58 static std::shared_ptr<vcl::Font> GetFont (
59 const FontType eType,
60 const OutputDevice& rDevice);
62 enum ColorType {
63 Color_Background,
64 Color_PageNumberDefault,
65 Color_PageNumberHover,
66 Color_PageNumberHighContrast,
67 Color_PageNumberBrightBackground,
68 Color_PageNumberDarkBackground,
69 Color_Selection,
70 Color_PreviewBorder,
71 Color_PageCountFontColor,
72 ColorType_Size_
74 Color GetColor (const ColorType eType);
76 enum GradientColorType {
77 Gradient_NormalPage,
78 Gradient_SelectedPage,
79 Gradient_SelectedAndFocusedPage,
80 Gradient_MouseOverPage,
81 Gradient_MouseOverSelected,
82 Gradient_MouseOverSelectedAndFocusedPage,
83 Gradient_FocusedPage,
84 GradientColorType_Size_
86 enum class GradientColorClass {
87 Border1,
88 Border2,
89 Fill1,
90 Fill2
92 Color GetGradientColor (
93 const GradientColorType eType,
94 const GradientColorClass eClass);
95 void SetGradient (
96 const GradientColorType eType,
97 const Color aBaseColor,
98 const sal_Int32 nSaturationOverride,
99 const sal_Int32 nBrightnessOverride,
100 const sal_Int32 nFillStartOffset,
101 const sal_Int32 nFillEndOffset,
102 const sal_Int32 nBorderStartOffset,
103 const sal_Int32 nBorderEndOffset);
105 enum IconType
107 Icon_RawShadow,
108 Icon_RawInsertShadow,
109 Icon_HideSlideOverlay,
110 Icon_FocusBorder,
111 IconType_Size_
113 const BitmapEx& GetIcon (const IconType eType);
115 private:
116 class GradientDescriptor
118 public:
119 Color maFillColor1;
120 Color maFillColor2;
121 Color maBorderColor1;
122 Color maBorderColor2;
124 Color maBackgroundColor;
125 ::std::vector<GradientDescriptor> maGradients;
126 ::std::vector<BitmapEx> maIcons;
127 ::std::vector<Color> maColor;
129 GradientDescriptor& GetGradient (const GradientColorType eType);
130 /** Guarded initialization of the specified icon in the maIcons
131 container.
133 void InitializeIcon(const IconType eType, const OUString& rResourceId);
136 } } } // end of namespace ::sd::slidesorter::view
138 #endif
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */