1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include "precompiled_sd.hxx" 29 30 #include "controller/SlsProperties.hxx" 31 #include <vcl/svapp.hxx> 32 33 namespace sd { namespace slidesorter { namespace controller { 34 35 Properties::Properties (void) 36 : mbIsHighlightCurrentSlide(false), 37 mbIsShowSelection(true), 38 mbIsShowFocus(true), 39 mbIsCenterSelection(false), 40 mbIsSmoothSelectionScrolling(true), 41 mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true), 42 maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()), 43 maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()), 44 maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()), 45 maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()), 46 mbIsUIReadOnly(false), 47 mbIsOnlyPreviewTriggersMouseOver(true), 48 mbIsHighContrastModeActive( 49 Application::GetSettings().GetStyleSettings().GetHighContrastMode()) 50 { 51 } 52 53 54 55 56 Properties::~Properties (void) 57 { 58 } 59 60 61 62 63 void Properties::HandleDataChangeEvent (void) 64 { 65 maBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); 66 maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor(); 67 maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor(); 68 maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor(); 69 mbIsHighContrastModeActive 70 = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); 71 } 72 73 74 75 76 bool Properties::IsHighlightCurrentSlide (void) const 77 { 78 return mbIsHighlightCurrentSlide; 79 } 80 81 82 83 84 void Properties::SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide) 85 { 86 mbIsHighlightCurrentSlide = bIsHighlightCurrentSlide; 87 } 88 89 90 91 92 bool Properties::IsShowSelection (void) const 93 { 94 return mbIsShowSelection; 95 } 96 97 98 99 100 void Properties::SetShowSelection (const bool bIsShowSelection) 101 { 102 mbIsShowSelection = bIsShowSelection; 103 } 104 105 106 107 108 bool Properties::IsShowFocus (void) const 109 { 110 return mbIsShowFocus; 111 } 112 113 114 115 116 void Properties::SetShowFocus (const bool bIsShowFocus) 117 { 118 mbIsShowFocus = bIsShowFocus; 119 } 120 121 122 123 124 bool Properties::IsCenterSelection (void) const 125 { 126 return mbIsCenterSelection; 127 } 128 129 130 131 132 void Properties::SetCenterSelection (const bool bIsCenterSelection) 133 { 134 mbIsCenterSelection = bIsCenterSelection; 135 } 136 137 138 139 140 bool Properties::IsSmoothSelectionScrolling (void) const 141 { 142 return mbIsSmoothSelectionScrolling; 143 } 144 145 146 147 148 void Properties::SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling) 149 { 150 mbIsSmoothSelectionScrolling = bIsSmoothSelectionScrolling; 151 } 152 153 154 155 156 bool Properties::IsSuspendPreviewUpdatesDuringFullScreenPresentation (void) const 157 { 158 return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation; 159 } 160 161 162 163 164 void Properties::SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag) 165 { 166 mbIsSuspendPreviewUpdatesDuringFullScreenPresentation = bFlag; 167 } 168 169 170 171 172 Color Properties::GetBackgroundColor (void) const 173 { 174 return maBackgroundColor; 175 } 176 177 178 179 180 void Properties::SetBackgroundColor (const Color& rColor) 181 { 182 maBackgroundColor = rColor; 183 } 184 185 186 187 Color Properties::GetTextColor (void) const 188 { 189 return maTextColor; 190 } 191 192 193 194 195 void Properties::SetTextColor (const Color& rColor) 196 { 197 maTextColor = rColor; 198 } 199 200 201 202 203 Color Properties::GetSelectionColor (void) const 204 { 205 return maSelectionColor; 206 } 207 208 209 210 211 void Properties::SetSelectionColor (const Color& rColor) 212 { 213 maSelectionColor = rColor; 214 } 215 216 217 218 219 Color Properties::GetHighlightColor (void) const 220 { 221 return maHighlightColor; 222 } 223 224 225 226 227 void Properties::SetHighlightColor (const Color& rColor) 228 { 229 maHighlightColor = rColor; 230 } 231 232 233 234 235 bool Properties::IsUIReadOnly (void) const 236 { 237 return mbIsUIReadOnly; 238 } 239 240 241 242 243 void Properties::SetUIReadOnly (const bool bIsUIReadOnly) 244 { 245 mbIsUIReadOnly = bIsUIReadOnly; 246 } 247 248 249 250 251 bool Properties::IsOnlyPreviewTriggersMouseOver (void) const 252 { 253 return mbIsOnlyPreviewTriggersMouseOver; 254 } 255 256 257 258 259 void Properties::SetOnlyPreviewTriggersMouseOver (const bool bFlag) 260 { 261 mbIsOnlyPreviewTriggersMouseOver = bFlag; 262 } 263 264 265 266 267 bool Properties::IsHighContrastModeActive (void) const 268 { 269 return mbIsHighContrastModeActive; 270 } 271 272 273 } } } // end of namespace ::sd::slidesorter::controller 274