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 #include <controller/SlsProperties.hxx>
21 #include <vcl/svapp.hxx>
22 #include <vcl/settings.hxx>
24 namespace sd
{ namespace slidesorter
{ namespace controller
{
26 Properties::Properties()
27 : mbIsHighlightCurrentSlide(false),
28 mbIsShowSelection(true),
30 mbIsCenterSelection(false),
31 mbIsSmoothSelectionScrolling(true),
32 mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
33 maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
34 maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
35 maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
36 maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
41 Properties::~Properties()
45 void Properties::HandleDataChangeEvent()
47 maBackgroundColor
= Application::GetSettings().GetStyleSettings().GetWindowColor();
48 maTextColor
= Application::GetSettings().GetStyleSettings().GetActiveTextColor();
49 maSelectionColor
= Application::GetSettings().GetStyleSettings().GetHighlightColor();
50 maHighlightColor
= Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
53 void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide
)
55 mbIsHighlightCurrentSlide
= bIsHighlightCurrentSlide
;
58 void Properties::SetShowSelection (const bool bIsShowSelection
)
60 mbIsShowSelection
= bIsShowSelection
;
63 void Properties::SetShowFocus (const bool bIsShowFocus
)
65 mbIsShowFocus
= bIsShowFocus
;
68 void Properties::SetCenterSelection (const bool bIsCenterSelection
)
70 mbIsCenterSelection
= bIsCenterSelection
;
73 void Properties::SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling
)
75 mbIsSmoothSelectionScrolling
= bIsSmoothSelectionScrolling
;
78 void Properties::SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag
)
80 mbIsSuspendPreviewUpdatesDuringFullScreenPresentation
= bFlag
;
83 void Properties::SetBackgroundColor (const Color
& rColor
)
85 maBackgroundColor
= rColor
;
88 void Properties::SetTextColor (const Color
& rColor
)
93 void Properties::SetSelectionColor (const Color
& rColor
)
95 maSelectionColor
= rColor
;
98 void Properties::SetHighlightColor (const Color
& rColor
)
100 maHighlightColor
= rColor
;
103 void Properties::SetUIReadOnly (const bool bIsUIReadOnly
)
105 mbIsUIReadOnly
= bIsUIReadOnly
;
108 } } } // end of namespace ::sd::slidesorter::controller
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */