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