xref: /AOO41X/main/sd/source/ui/slidesorter/controller/SlsProperties.cxx (revision 79aad27f7f29270c03e208e3d687e8e3850af11d)
1*5b190011SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*5b190011SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*5b190011SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*5b190011SAndrew Rist  * distributed with this work for additional information
6*5b190011SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*5b190011SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*5b190011SAndrew Rist  * "License"); you may not use this file except in compliance
9*5b190011SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*5b190011SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*5b190011SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*5b190011SAndrew Rist  * software distributed under the License is distributed on an
15*5b190011SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*5b190011SAndrew Rist  * KIND, either express or implied.  See the License for the
17*5b190011SAndrew Rist  * specific language governing permissions and limitations
18*5b190011SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*5b190011SAndrew Rist  *************************************************************/
21*5b190011SAndrew Rist 
22*5b190011SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include "precompiled_sd.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "controller/SlsProperties.hxx"
27cdf0e10cSrcweir #include <vcl/svapp.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir namespace sd { namespace slidesorter { namespace controller {
30cdf0e10cSrcweir 
Properties(void)31cdf0e10cSrcweir Properties::Properties (void)
32cdf0e10cSrcweir     : mbIsHighlightCurrentSlide(false),
33cdf0e10cSrcweir       mbIsShowSelection(true),
34cdf0e10cSrcweir       mbIsShowFocus(true),
35cdf0e10cSrcweir       mbIsCenterSelection(false),
36cdf0e10cSrcweir       mbIsSmoothSelectionScrolling(true),
37cdf0e10cSrcweir       mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
38cdf0e10cSrcweir       maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
39cdf0e10cSrcweir       maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
40cdf0e10cSrcweir       maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
41cdf0e10cSrcweir       maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
42cdf0e10cSrcweir       mbIsUIReadOnly(false),
43cdf0e10cSrcweir       mbIsOnlyPreviewTriggersMouseOver(true),
44cdf0e10cSrcweir       mbIsHighContrastModeActive(
45cdf0e10cSrcweir           Application::GetSettings().GetStyleSettings().GetHighContrastMode())
46cdf0e10cSrcweir {
47cdf0e10cSrcweir }
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 
51cdf0e10cSrcweir 
~Properties(void)52cdf0e10cSrcweir Properties::~Properties (void)
53cdf0e10cSrcweir {
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 
HandleDataChangeEvent(void)59cdf0e10cSrcweir void Properties::HandleDataChangeEvent (void)
60cdf0e10cSrcweir {
61cdf0e10cSrcweir     maBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
62cdf0e10cSrcweir     maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
63cdf0e10cSrcweir     maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
64cdf0e10cSrcweir     maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
65cdf0e10cSrcweir     mbIsHighContrastModeActive
66cdf0e10cSrcweir         = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
67cdf0e10cSrcweir }
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 
IsHighlightCurrentSlide(void) const72cdf0e10cSrcweir bool Properties::IsHighlightCurrentSlide (void) const
73cdf0e10cSrcweir {
74cdf0e10cSrcweir     return mbIsHighlightCurrentSlide;
75cdf0e10cSrcweir }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 
SetHighlightCurrentSlide(const bool bIsHighlightCurrentSlide)80cdf0e10cSrcweir void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide)
81cdf0e10cSrcweir {
82cdf0e10cSrcweir     mbIsHighlightCurrentSlide = bIsHighlightCurrentSlide;
83cdf0e10cSrcweir }
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 
IsShowSelection(void) const88cdf0e10cSrcweir bool Properties::IsShowSelection (void) const
89cdf0e10cSrcweir {
90cdf0e10cSrcweir     return mbIsShowSelection;
91cdf0e10cSrcweir }
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 
SetShowSelection(const bool bIsShowSelection)96cdf0e10cSrcweir void Properties::SetShowSelection (const bool bIsShowSelection)
97cdf0e10cSrcweir {
98cdf0e10cSrcweir     mbIsShowSelection = bIsShowSelection;
99cdf0e10cSrcweir }
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 
103cdf0e10cSrcweir 
IsShowFocus(void) const104cdf0e10cSrcweir bool Properties::IsShowFocus (void) const
105cdf0e10cSrcweir {
106cdf0e10cSrcweir     return mbIsShowFocus;
107cdf0e10cSrcweir }
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 
SetShowFocus(const bool bIsShowFocus)112cdf0e10cSrcweir void Properties::SetShowFocus (const bool bIsShowFocus)
113cdf0e10cSrcweir {
114cdf0e10cSrcweir     mbIsShowFocus = bIsShowFocus;
115cdf0e10cSrcweir }
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 
IsCenterSelection(void) const120cdf0e10cSrcweir bool Properties::IsCenterSelection (void) const
121cdf0e10cSrcweir {
122cdf0e10cSrcweir     return mbIsCenterSelection;
123cdf0e10cSrcweir }
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 
127cdf0e10cSrcweir 
SetCenterSelection(const bool bIsCenterSelection)128cdf0e10cSrcweir void Properties::SetCenterSelection (const bool bIsCenterSelection)
129cdf0e10cSrcweir {
130cdf0e10cSrcweir     mbIsCenterSelection = bIsCenterSelection;
131cdf0e10cSrcweir }
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 
IsSmoothSelectionScrolling(void) const136cdf0e10cSrcweir bool Properties::IsSmoothSelectionScrolling (void) const
137cdf0e10cSrcweir {
138cdf0e10cSrcweir     return mbIsSmoothSelectionScrolling;
139cdf0e10cSrcweir }
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 
142cdf0e10cSrcweir 
143cdf0e10cSrcweir 
SetSmoothSelectionScrolling(const bool bIsSmoothSelectionScrolling)144cdf0e10cSrcweir void Properties::SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling)
145cdf0e10cSrcweir {
146cdf0e10cSrcweir     mbIsSmoothSelectionScrolling = bIsSmoothSelectionScrolling;
147cdf0e10cSrcweir }
148cdf0e10cSrcweir 
149cdf0e10cSrcweir 
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 
IsSuspendPreviewUpdatesDuringFullScreenPresentation(void) const152cdf0e10cSrcweir bool Properties::IsSuspendPreviewUpdatesDuringFullScreenPresentation (void) const
153cdf0e10cSrcweir {
154cdf0e10cSrcweir     return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
155cdf0e10cSrcweir }
156cdf0e10cSrcweir 
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 
159cdf0e10cSrcweir 
SetSuspendPreviewUpdatesDuringFullScreenPresentation(const bool bFlag)160cdf0e10cSrcweir void Properties::SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag)
161cdf0e10cSrcweir {
162cdf0e10cSrcweir     mbIsSuspendPreviewUpdatesDuringFullScreenPresentation = bFlag;
163cdf0e10cSrcweir }
164cdf0e10cSrcweir 
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 
167cdf0e10cSrcweir 
GetBackgroundColor(void) const168cdf0e10cSrcweir Color Properties::GetBackgroundColor (void) const
169cdf0e10cSrcweir {
170cdf0e10cSrcweir     return maBackgroundColor;
171cdf0e10cSrcweir }
172cdf0e10cSrcweir 
173cdf0e10cSrcweir 
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 
SetBackgroundColor(const Color & rColor)176cdf0e10cSrcweir void Properties::SetBackgroundColor (const Color& rColor)
177cdf0e10cSrcweir {
178cdf0e10cSrcweir     maBackgroundColor = rColor;
179cdf0e10cSrcweir }
180cdf0e10cSrcweir 
181cdf0e10cSrcweir 
182cdf0e10cSrcweir 
GetTextColor(void) const183cdf0e10cSrcweir Color Properties::GetTextColor (void) const
184cdf0e10cSrcweir {
185cdf0e10cSrcweir     return maTextColor;
186cdf0e10cSrcweir }
187cdf0e10cSrcweir 
188cdf0e10cSrcweir 
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 
SetTextColor(const Color & rColor)191cdf0e10cSrcweir void Properties::SetTextColor (const Color& rColor)
192cdf0e10cSrcweir {
193cdf0e10cSrcweir     maTextColor = rColor;
194cdf0e10cSrcweir }
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 
197cdf0e10cSrcweir 
198cdf0e10cSrcweir 
GetSelectionColor(void) const199cdf0e10cSrcweir Color Properties::GetSelectionColor (void) const
200cdf0e10cSrcweir {
201cdf0e10cSrcweir     return maSelectionColor;
202cdf0e10cSrcweir }
203cdf0e10cSrcweir 
204cdf0e10cSrcweir 
205cdf0e10cSrcweir 
206cdf0e10cSrcweir 
SetSelectionColor(const Color & rColor)207cdf0e10cSrcweir void Properties::SetSelectionColor (const Color& rColor)
208cdf0e10cSrcweir {
209cdf0e10cSrcweir     maSelectionColor = rColor;
210cdf0e10cSrcweir }
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 
213cdf0e10cSrcweir 
214cdf0e10cSrcweir 
GetHighlightColor(void) const215cdf0e10cSrcweir Color Properties::GetHighlightColor (void) const
216cdf0e10cSrcweir {
217cdf0e10cSrcweir     return maHighlightColor;
218cdf0e10cSrcweir }
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 
SetHighlightColor(const Color & rColor)223cdf0e10cSrcweir void Properties::SetHighlightColor (const Color& rColor)
224cdf0e10cSrcweir {
225cdf0e10cSrcweir     maHighlightColor = rColor;
226cdf0e10cSrcweir }
227cdf0e10cSrcweir 
228cdf0e10cSrcweir 
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 
IsUIReadOnly(void) const231cdf0e10cSrcweir bool Properties::IsUIReadOnly (void) const
232cdf0e10cSrcweir {
233cdf0e10cSrcweir     return mbIsUIReadOnly;
234cdf0e10cSrcweir }
235cdf0e10cSrcweir 
236cdf0e10cSrcweir 
237cdf0e10cSrcweir 
238cdf0e10cSrcweir 
SetUIReadOnly(const bool bIsUIReadOnly)239cdf0e10cSrcweir void Properties::SetUIReadOnly (const bool bIsUIReadOnly)
240cdf0e10cSrcweir {
241cdf0e10cSrcweir     mbIsUIReadOnly = bIsUIReadOnly;
242cdf0e10cSrcweir }
243cdf0e10cSrcweir 
244cdf0e10cSrcweir 
245cdf0e10cSrcweir 
246cdf0e10cSrcweir 
IsOnlyPreviewTriggersMouseOver(void) const247cdf0e10cSrcweir bool Properties::IsOnlyPreviewTriggersMouseOver (void) const
248cdf0e10cSrcweir {
249cdf0e10cSrcweir     return mbIsOnlyPreviewTriggersMouseOver;
250cdf0e10cSrcweir }
251cdf0e10cSrcweir 
252cdf0e10cSrcweir 
253cdf0e10cSrcweir 
254cdf0e10cSrcweir 
SetOnlyPreviewTriggersMouseOver(const bool bFlag)255cdf0e10cSrcweir void Properties::SetOnlyPreviewTriggersMouseOver (const bool bFlag)
256cdf0e10cSrcweir {
257cdf0e10cSrcweir     mbIsOnlyPreviewTriggersMouseOver = bFlag;
258cdf0e10cSrcweir }
259cdf0e10cSrcweir 
260cdf0e10cSrcweir 
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 
IsHighContrastModeActive(void) const263cdf0e10cSrcweir bool Properties::IsHighContrastModeActive (void) const
264cdf0e10cSrcweir {
265cdf0e10cSrcweir     return mbIsHighContrastModeActive;
266cdf0e10cSrcweir }
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 
269cdf0e10cSrcweir } } } // end of namespace ::sd::slidesorter::controller
270