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 .
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
{
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
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.
53 const ::boost::shared_ptr
<controller::Properties
>& rpProperties
);
55 // BitmapEx GetInsertIndicatorIcon() const;
61 static boost::shared_ptr
<vcl::Font
> GetFont (
63 const OutputDevice
& rDevice
);
67 Color_PageNumberDefault
,
68 Color_PageNumberHover
,
69 Color_PageNumberHighContrast
,
70 Color_PageNumberBrightBackground
,
71 Color_PageNumberDarkBackground
,
74 Color_PageCountFontColor
,
77 ColorData
GetColor (const ColorType eType
);
79 enum GradientColorType
{
81 Gradient_SelectedPage
,
82 Gradient_SelectedAndFocusedPage
,
83 Gradient_MouseOverPage
,
84 Gradient_MouseOverSelected
,
85 Gradient_MouseOverSelectedAndFocusedPage
,
87 _GradientColorType_Size_
89 enum GradientColorClass
{
96 ColorData
GetGradientColor (
97 const GradientColorType eType
,
98 const GradientColorClass eClass
);
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
);
112 Icon_RawInsertShadow
,
113 Icon_HideSlideOverlay
,
117 const BitmapEx
& GetIcon (const IconType eType
);
120 class GradientDescriptor
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
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */