LibreOffice Module sd (master) 1
SlsTheme.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <vcl/bitmapex.hxx>
23#include <tools/color.hxx>
24
25#include <memory>
26
27namespace vcl { class Font; }
28
29namespace sd::slidesorter::controller { class Properties; }
30
31namespace sd::slidesorter::view {
32
34
38class Theme
39{
40public:
41 Theme (const std::shared_ptr<controller::Properties>& rpProperties);
42
46 void Update (
47 const std::shared_ptr<controller::Properties>& rpProperties);
48
49 // BitmapEx GetInsertIndicatorIcon() const;
50
51 enum FontType {
54 };
55 static std::shared_ptr<vcl::Font> GetFont (
56 const FontType eType,
57 const OutputDevice& rDevice);
58
59 enum ColorType {
70 };
71 Color GetColor (const ColorType eType);
72
82 };
83 enum class GradientColorClass {
84 Border1,
85 Border2,
86 Fill1,
87 Fill2
88 };
90 const GradientColorType eType,
91 const GradientColorClass eClass);
92 void SetGradient (
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);
101
103 {
109 };
110 const BitmapEx& GetIcon (const IconType eType);
111
112private:
114 {
115 public:
120 };
122 ::std::vector<GradientDescriptor> maGradients;
123 ::std::vector<BitmapEx> maIcons;
124 ::std::vector<Color> maColor;
125
130 void InitializeIcon(const IconType eType, const OUString& rResourceId);
131};
132
133} // end of namespace ::sd::slidesorter::view
134
135/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Collection of colors and styles that are used to paint the slide sorter view.
Definition: SlsTheme.hxx:39
::std::vector< GradientDescriptor > maGradients
Definition: SlsTheme.hxx:122
Color GetColor(const ColorType eType)
Definition: SlsTheme.cxx:156
void SetGradient(const GradientColorType eType, const Color aBaseColor, const sal_Int32 nSaturationOverride, const sal_Int32 nBrightnessOverride, const sal_Int32 nFillStartOffset, const sal_Int32 nFillEndOffset, const sal_Int32 nBorderStartOffset, const sal_Int32 nBorderEndOffset)
Definition: SlsTheme.cxx:180
Theme(const std::shared_ptr< controller::Properties > &rpProperties)
Definition: SlsTheme.cxx:59
Color GetGradientColor(const GradientColorType eType, const GradientColorClass eClass)
Definition: SlsTheme.cxx:164
GradientDescriptor & GetGradient(const GradientColorType eType)
Definition: SlsTheme.cxx:213
void InitializeIcon(const IconType eType, const OUString &rResourceId)
Guarded initialization of the specified icon in the maIcons container.
Definition: SlsTheme.cxx:224
::std::vector< Color > maColor
Definition: SlsTheme.hxx:124
static std::shared_ptr< vcl::Font > GetFont(const FontType eType, const OutputDevice &rDevice)
Definition: SlsTheme.cxx:118
const BitmapEx & GetIcon(const IconType eType)
Definition: SlsTheme.cxx:202
void Update(const std::shared_ptr< controller::Properties > &rpProperties)
Call this method to update some colors as response to a change of a system color change.
Definition: SlsTheme.cxx:74
::std::vector< BitmapEx > maIcons
Definition: SlsTheme.hxx:123
FontType
const int Theme_FocusIndicatorWidth
Definition: SlsTheme.hxx:33
ColorType