bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / slidesorter / inc / view / SlsTheme.hxx
blob808b515de22c300dea798d2da990638f0da55928
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 "model/SlsVisualState.hxx"
25 #include <vcl/bitmapex.hxx>
26 #include <vcl/font.hxx>
27 #include <vcl/gradient.hxx>
28 #include <tools/color.hxx>
30 #include <boost/shared_ptr.hpp>
31 #include <boost/weak_ptr.hpp>
33 namespace sd { namespace slidesorter { namespace controller {
34 class Properties;
35 } } }
37 namespace sd { namespace slidesorter { namespace view {
39 const int Theme_FocusIndicatorWidth = 3;
41 /** Collection of colors and styles that are used to paint the slide sorter
42 view.
44 class Theme
46 public:
47 Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties);
49 /** Call this method to update some colors as response to a change of
50 a system color change.
52 void Update (
53 const ::boost::shared_ptr<controller::Properties>& rpProperties);
55 // BitmapEx GetInsertIndicatorIcon() const;
57 enum FontType {
58 Font_PageNumber,
59 Font_PageCount
61 static boost::shared_ptr<vcl::Font> GetFont (
62 const FontType eType,
63 const OutputDevice& rDevice);
65 enum ColorType {
66 Color_Background,
67 Color_PageNumberDefault,
68 Color_PageNumberHover,
69 Color_PageNumberHighContrast,
70 Color_PageNumberBrightBackground,
71 Color_PageNumberDarkBackground,
72 Color_Selection,
73 Color_PreviewBorder,
74 Color_PageCountFontColor,
75 _ColorType_Size_
77 ColorData GetColor (const ColorType eType);
79 enum GradientColorType {
80 Gradient_NormalPage,
81 Gradient_SelectedPage,
82 Gradient_SelectedAndFocusedPage,
83 Gradient_MouseOverPage,
84 Gradient_MouseOverSelected,
85 Gradient_MouseOverSelectedAndFocusedPage,
86 Gradient_FocusedPage,
87 _GradientColorType_Size_
89 enum GradientColorClass {
90 Border1,
91 Border2,
92 Fill1,
93 Fill2,
94 Base
96 ColorData GetGradientColor (
97 const GradientColorType eType,
98 const GradientColorClass eClass);
99 void SetGradient (
100 const GradientColorType eType,
101 const ColorData aBaseColor,
102 const sal_Int32 nSaturationOverride,
103 const sal_Int32 nBrightnessOverride,
104 const sal_Int32 nFillStartOffset,
105 const sal_Int32 nFillEndOffset,
106 const sal_Int32 nBorderStartOffset,
107 const sal_Int32 nBorderEndOffset);
109 enum IconType
111 Icon_RawShadow,
112 Icon_RawInsertShadow,
113 Icon_HideSlideOverlay,
114 Icon_FocusBorder,
115 _IconType_Size_
117 const BitmapEx& GetIcon (const IconType eType);
119 private:
120 class GradientDescriptor
122 public:
123 ColorData maBaseColor;
125 sal_Int32 mnSaturationOverride;
126 sal_Int32 mnBrightnessOverride;
128 ColorData maFillColor1;
129 ColorData maFillColor2;
130 ColorData maBorderColor1;
131 ColorData maBorderColor2;
133 sal_Int32 mnFillOffset1;
134 sal_Int32 mnFillOffset2;
135 sal_Int32 mnBorderOffset1;
136 sal_Int32 mnBorderOffset2;
138 ColorData maBackgroundColor;
139 ColorData maPageBackgroundColor;
140 ::std::vector<GradientDescriptor> maGradients;
141 ::std::vector<BitmapEx> maIcons;
142 ::std::vector<ColorData> maColor;
144 GradientDescriptor& GetGradient (const GradientColorType eType);
145 /** Guarded initialization of the specified icon in the maIcons
146 container. Call only while a LocalResource object is active.
148 void InitializeIcon (const IconType eType, sal_uInt16 nResourceId);
151 } } } // end of namespace ::sd::slidesorter::view
153 #endif
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */