Line data Source code
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 : #ifndef _SV_SETTINGS_HXX
21 : #define _SV_SETTINGS_HXX
22 :
23 : #include "tools/solar.h"
24 : #include "vcl/dllapi.h"
25 : #include "tools/color.hxx"
26 : #include "vcl/font.hxx"
27 : #include "vcl/accel.hxx"
28 : #include "vcl/wall.hxx"
29 : #include <i18npool/languagetag.hxx>
30 : #include <unotools/syslocale.hxx>
31 :
32 : class CollatorWrapper;
33 : class LocaleDataWrapper;
34 :
35 : namespace vcl {
36 : class I18nHelper;
37 : }
38 :
39 : // -----------------
40 : // - ImplMouseData -
41 : // -----------------
42 :
43 : class ImplMouseData
44 : {
45 : friend class MouseSettings;
46 :
47 : ImplMouseData();
48 : ImplMouseData( const ImplMouseData& rData );
49 :
50 : private:
51 : sal_uLong mnRefCount;
52 : sal_uLong mnOptions;
53 : sal_uLong mnDoubleClkTime;
54 : long mnDoubleClkWidth;
55 : long mnDoubleClkHeight;
56 : long mnStartDragWidth;
57 : long mnStartDragHeight;
58 : sal_uInt16 mnStartDragCode;
59 : sal_uInt16 mnDragMoveCode;
60 : sal_uInt16 mnDragCopyCode;
61 : sal_uInt16 mnDragLinkCode;
62 : sal_uInt16 mnContextMenuCode;
63 : sal_uInt16 mnContextMenuClicks;
64 : sal_Bool mbContextMenuDown;
65 : sal_uLong mnScrollRepeat;
66 : sal_uLong mnButtonStartRepeat;
67 : sal_uLong mnButtonRepeat;
68 : sal_uLong mnActionDelay;
69 : sal_uLong mnMenuDelay;
70 : sal_uLong mnFollow;
71 : sal_uInt16 mnMiddleButtonAction;
72 : sal_uInt16 mnWheelBehavior;
73 : };
74 :
75 : // -----------------
76 : // - MouseSettings -
77 : // -----------------
78 :
79 : #define MOUSE_OPTION_AUTOFOCUS ((sal_uLong)0x00000001)
80 : #define MOUSE_OPTION_AUTOCENTERPOS ((sal_uLong)0x00000002)
81 : #define MOUSE_OPTION_AUTODEFBTNPOS ((sal_uLong)0x00000004)
82 :
83 : #define MOUSE_FOLLOW_MENU ((sal_uLong)0x00000001)
84 : #define MOUSE_FOLLOW_DDLIST ((sal_uLong)0x00000002)
85 :
86 : #define MOUSE_MIDDLE_NOTHING ((sal_uInt16)0)
87 : #define MOUSE_MIDDLE_AUTOSCROLL ((sal_uInt16)1)
88 : #define MOUSE_MIDDLE_PASTESELECTION ((sal_uInt16)2)
89 :
90 : #define MOUSE_WHEEL_DISABLE ((sal_uInt16)0)
91 : #define MOUSE_WHEEL_FOCUS_ONLY ((sal_uInt16)1)
92 : #define MOUSE_WHEEL_ALWAYS ((sal_uInt16)2)
93 :
94 : class VCL_DLLPUBLIC MouseSettings
95 : {
96 : void CopyData();
97 :
98 : private:
99 : ImplMouseData* mpData;
100 :
101 : public:
102 : MouseSettings();
103 : MouseSettings( const MouseSettings& rSet );
104 : ~MouseSettings();
105 :
106 0 : void SetOptions( sal_uLong nOptions )
107 0 : { CopyData(); mpData->mnOptions = nOptions; }
108 0 : sal_uLong GetOptions() const
109 0 : { return mpData->mnOptions; }
110 :
111 0 : void SetDoubleClickTime( sal_uLong nDoubleClkTime )
112 0 : { CopyData(); mpData->mnDoubleClkTime = nDoubleClkTime; }
113 0 : sal_uLong GetDoubleClickTime() const
114 0 : { return mpData->mnDoubleClkTime; }
115 0 : void SetDoubleClickWidth( long nDoubleClkWidth )
116 0 : { CopyData(); mpData->mnDoubleClkWidth = nDoubleClkWidth; }
117 0 : long GetDoubleClickWidth() const
118 0 : { return mpData->mnDoubleClkWidth; }
119 0 : void SetDoubleClickHeight( long nDoubleClkHeight )
120 0 : { CopyData(); mpData->mnDoubleClkHeight = nDoubleClkHeight; }
121 0 : long GetDoubleClickHeight() const
122 0 : { return mpData->mnDoubleClkHeight; }
123 :
124 0 : void SetStartDragWidth( long nDragWidth )
125 0 : { CopyData(); mpData->mnStartDragWidth = nDragWidth; }
126 0 : long GetStartDragWidth() const
127 0 : { return mpData->mnStartDragWidth; }
128 0 : void SetStartDragHeight( long nDragHeight )
129 0 : { CopyData(); mpData->mnStartDragHeight = nDragHeight; }
130 0 : long GetStartDragHeight() const
131 0 : { return mpData->mnStartDragHeight; }
132 : void SetStartDragCode( sal_uInt16 nCode )
133 : { CopyData(); mpData->mnStartDragCode = nCode; }
134 0 : sal_uInt16 GetStartDragCode() const
135 0 : { return mpData->mnStartDragCode; }
136 : void SetDragMoveCode( sal_uInt16 nCode )
137 : { CopyData(); mpData->mnDragMoveCode = nCode; }
138 : sal_uInt16 GetDragMoveCode() const
139 : { return mpData->mnDragMoveCode; }
140 : void SetDragCopyCode( sal_uInt16 nCode )
141 : { CopyData(); mpData->mnDragCopyCode = nCode; }
142 : sal_uInt16 GetDragCopyCode() const
143 : { return mpData->mnDragCopyCode; }
144 : void SetDragLinkCode( sal_uInt16 nCode )
145 : { CopyData(); mpData->mnDragLinkCode = nCode; }
146 : sal_uInt16 GetDragLinkCode() const
147 : { return mpData->mnDragLinkCode; }
148 :
149 : void SetContextMenuCode( sal_uInt16 nCode )
150 : { CopyData(); mpData->mnContextMenuCode = nCode; }
151 0 : sal_uInt16 GetContextMenuCode() const
152 0 : { return mpData->mnContextMenuCode; }
153 : void SetContextMenuClicks( sal_uInt16 nClicks )
154 : { CopyData(); mpData->mnContextMenuClicks = nClicks; }
155 0 : sal_uInt16 GetContextMenuClicks() const
156 0 : { return mpData->mnContextMenuClicks; }
157 : void SetContextMenuDown( sal_Bool bDown )
158 : { CopyData(); mpData->mbContextMenuDown = bDown; }
159 0 : sal_Bool GetContextMenuDown() const
160 0 : { return mpData->mbContextMenuDown; }
161 :
162 : void SetScrollRepeat( sal_uLong nRepeat )
163 : { CopyData(); mpData->mnScrollRepeat = nRepeat; }
164 0 : sal_uLong GetScrollRepeat() const
165 0 : { return mpData->mnScrollRepeat; }
166 : void SetButtonStartRepeat( sal_uLong nRepeat )
167 : { CopyData(); mpData->mnButtonStartRepeat = nRepeat; }
168 0 : sal_uLong GetButtonStartRepeat() const
169 0 : { return mpData->mnButtonStartRepeat; }
170 0 : void SetButtonRepeat( sal_uLong nRepeat )
171 0 : { CopyData(); mpData->mnButtonRepeat = nRepeat; }
172 0 : sal_uLong GetButtonRepeat() const
173 0 : { return mpData->mnButtonRepeat; }
174 : void SetActionDelay( sal_uLong nDelay )
175 : { CopyData(); mpData->mnActionDelay = nDelay; }
176 0 : sal_uLong GetActionDelay() const
177 0 : { return mpData->mnActionDelay; }
178 0 : void SetMenuDelay( sal_uLong nDelay )
179 0 : { CopyData(); mpData->mnMenuDelay = nDelay; }
180 0 : sal_uLong GetMenuDelay() const
181 0 : { return mpData->mnMenuDelay; }
182 :
183 0 : void SetFollow( sal_uLong nFollow )
184 0 : { CopyData(); mpData->mnFollow = nFollow; }
185 0 : sal_uLong GetFollow() const
186 0 : { return mpData->mnFollow; }
187 :
188 0 : void SetMiddleButtonAction( sal_uInt16 nAction )
189 0 : { CopyData(); mpData->mnMiddleButtonAction = nAction; }
190 0 : sal_uInt16 GetMiddleButtonAction() const
191 0 : { return mpData->mnMiddleButtonAction; }
192 :
193 4092 : void SetWheelBehavior( sal_uInt16 nBehavior )
194 4092 : { CopyData(); mpData->mnWheelBehavior = nBehavior; }
195 4092 : sal_uInt16 GetWheelBehavior() const
196 4092 : { return mpData->mnWheelBehavior; }
197 :
198 : const MouseSettings& operator =( const MouseSettings& rSet );
199 :
200 : sal_Bool operator ==( const MouseSettings& rSet ) const;
201 5637 : sal_Bool operator !=( const MouseSettings& rSet ) const
202 5637 : { return !(*this == rSet); }
203 : };
204 :
205 : struct DialogStyle
206 : {
207 : int content_area_border;
208 : int content_area_spacing;
209 : int button_spacing;
210 : int action_area_border;
211 26 : DialogStyle()
212 : : content_area_border(2)
213 : , content_area_spacing(0)
214 : , button_spacing(6)
215 26 : , action_area_border(5)
216 26 : {}
217 : };
218 :
219 : struct FrameStyle
220 : {
221 : int left;
222 : int right;
223 : int top;
224 : int bottom;
225 26 : FrameStyle()
226 : : left(2)
227 : , right(2)
228 : , top(2)
229 26 : , bottom(2)
230 26 : {}
231 : };
232 :
233 : // -----------------
234 : // - ImplStyleData -
235 : // -----------------
236 :
237 1361 : class ImplStyleData
238 : {
239 : friend class StyleSettings;
240 :
241 : ImplStyleData();
242 : ImplStyleData( const ImplStyleData& rData );
243 : void SetStandardStyles();
244 :
245 : private:
246 : sal_uLong mnRefCount;
247 :
248 : Color maActiveBorderColor;
249 : Color maActiveColor;
250 : Color maActiveColor2;
251 : Color maActiveTextColor;
252 : Color maButtonTextColor;
253 : Color maButtonRolloverTextColor;
254 : Color maCheckedColor;
255 : Color maDarkShadowColor;
256 : Color maDeactiveBorderColor;
257 : Color maDeactiveColor;
258 : Color maDeactiveColor2;
259 : Color maDeactiveTextColor;
260 : Color maDialogColor;
261 : Color maDialogTextColor;
262 : Color maDisableColor;
263 : Color maFaceColor;
264 : Color maFieldColor;
265 : Color maFieldTextColor;
266 : Color maFieldRolloverTextColor;
267 : Color maFontColor;
268 : Color maGroupTextColor;
269 : Color maHelpColor;
270 : Color maHelpTextColor;
271 : Color maHighlightColor;
272 : Color maHighlightLinkColor;
273 : Color maHighlightTextColor;
274 : Color maInfoTextColor;
275 : Color maLabelTextColor;
276 : Color maLightBorderColor;
277 : Color maLightColor;
278 : Color maLinkColor;
279 : Color maMenuBarColor;
280 : Color maMenuBorderColor;
281 : Color maMenuColor;
282 : Color maMenuHighlightColor;
283 : Color maMenuHighlightTextColor;
284 : Color maMenuTextColor;
285 : Color maMenuBarTextColor;
286 : Color maMonoColor;
287 : Color maRadioCheckTextColor;
288 : Color maShadowColor;
289 : Color maVisitedLinkColor;
290 : Color maWindowColor;
291 : Color maWindowTextColor;
292 : Color maWorkspaceColor;
293 : Color maActiveTabColor;
294 : Color maInactiveTabColor;
295 : Font maAppFont;
296 : Font maHelpFont;
297 : Font maTitleFont;
298 : Font maFloatTitleFont;
299 : Font maMenuFont;
300 : Font maToolFont;
301 : Font maLabelFont;
302 : Font maInfoFont;
303 : Font maRadioCheckFont;
304 : Font maPushButtonFont;
305 : Font maFieldFont;
306 : Font maIconFont;
307 : Font maGroupFont;
308 : long mnBorderSize;
309 : long mnTitleHeight;
310 : long mnFloatTitleHeight;
311 : long mnTearOffTitleHeight;
312 : long mnScrollBarSize;
313 : long mnSplitSize;
314 : long mnSpinSize;
315 : long mnCursorSize;
316 : long mnMenuBarHeight;
317 : long mnIconHorzSpace;
318 : long mnIconVertSpace;
319 : long mnAntialiasedMin;
320 : sal_uLong mnCursorBlinkTime;
321 : sal_uLong mnDragFullOptions;
322 : sal_uLong mnAnimationOptions;
323 : sal_uLong mnSelectionOptions;
324 : sal_uLong mnLogoDisplayTime;
325 : sal_uLong mnDisplayOptions;
326 : sal_uLong mnToolbarIconSize;
327 : sal_uLong mnUseFlatMenues;
328 : sal_uLong mnOptions;
329 : sal_uInt16 mnScreenZoom;
330 : sal_uInt16 mnScreenFontZoom;
331 : sal_uInt16 mnHighContrast;
332 : sal_uInt16 mnUseSystemUIFonts;
333 : sal_uInt16 mnAutoMnemonic;
334 : sal_uInt16 mnUseImagesInMenus;
335 : sal_uLong mnUseFlatBorders;
336 : sal_Bool mbPreferredUseImagesInMenus;
337 : long mnMinThumbSize;
338 : sal_uLong mnSymbolsStyle;
339 : sal_uLong mnPreferredSymbolsStyle;
340 : sal_uInt16 mnSkipDisabledInMenus;
341 : sal_Bool mbHideDisabledMenuItems;
342 : sal_Bool mbAcceleratorsInContextMenus;
343 : //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise
344 : //primary means scroll by single page. Secondary button takes the alternative behaviour
345 : sal_Bool mbPrimaryButtonWarpsSlider;
346 : Wallpaper maWorkspaceGradient;
347 : DialogStyle maDialogStyle;
348 : FrameStyle maFrameStyle;
349 : const void* mpFontOptions;
350 : };
351 :
352 : #define DEFAULT_WORKSPACE_GRADIENT_START_COLOR Color( 0xa3, 0xae, 0xb8 )
353 : #define DEFAULT_WORKSPACE_GRADIENT_END_COLOR Color( 0x73, 0x7e, 0x88 )
354 :
355 : // -----------------
356 : // - StyleSettings -
357 : // -----------------
358 :
359 : #define STYLE_OPTION_MONO ((sal_uLong)0x00000001)
360 : #define STYLE_OPTION_COLOR ((sal_uLong)0x00000002)
361 : #define STYLE_OPTION_FLAT ((sal_uLong)0x00000004)
362 : #define STYLE_OPTION_GREAT ((sal_uLong)0x00000008)
363 : #define STYLE_OPTION_HIGHLIGHT ((sal_uLong)0x00000010)
364 : #define STYLE_OPTION_ADVANCEDUSER ((sal_uLong)0x00000020)
365 : #define STYLE_OPTION_SCROLLARROW ((sal_uLong)0x00000040)
366 : #define STYLE_OPTION_SPINARROW ((sal_uLong)0x00000080)
367 : #define STYLE_OPTION_SPINUPDOWN ((sal_uLong)0x00000100)
368 : #define STYLE_OPTION_NOMNEMONICS ((sal_uLong)0x00000200)
369 :
370 : #define DRAGFULL_OPTION_WINDOWMOVE ((sal_uLong)0x00000001)
371 : #define DRAGFULL_OPTION_WINDOWSIZE ((sal_uLong)0x00000002)
372 : #define DRAGFULL_OPTION_OBJECTMOVE ((sal_uLong)0x00000004)
373 : #define DRAGFULL_OPTION_OBJECTSIZE ((sal_uLong)0x00000008)
374 : #define DRAGFULL_OPTION_DOCKING ((sal_uLong)0x00000010)
375 : #define DRAGFULL_OPTION_SPLIT ((sal_uLong)0x00000020)
376 : #define DRAGFULL_OPTION_SCROLL ((sal_uLong)0x00000040)
377 :
378 : #define LOGO_DISPLAYTIME_STARTTIME ((sal_uLong)0xFFFFFFFF)
379 :
380 : #define SELECTION_OPTION_WORD ((sal_uLong)0x00000001)
381 : #define SELECTION_OPTION_FOCUS ((sal_uLong)0x00000002)
382 : #define SELECTION_OPTION_INVERT ((sal_uLong)0x00000004)
383 : #define SELECTION_OPTION_SHOWFIRST ((sal_uLong)0x00000008)
384 :
385 : #define DISPLAY_OPTION_AA_DISABLE ((sal_uLong)0x00000001)
386 :
387 : #define STYLE_RADIOBUTTON_MONO ((sal_uInt16)0x0001) // legacy
388 : #define STYLE_CHECKBOX_MONO ((sal_uInt16)0x0001) // legacy
389 :
390 : #define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((sal_uLong)0)
391 : #define STYLE_TOOLBAR_ICONSIZE_SMALL ((sal_uLong)1)
392 : #define STYLE_TOOLBAR_ICONSIZE_LARGE ((sal_uLong)2)
393 :
394 : #define STYLE_SYMBOLS_AUTO ((sal_uLong)0)
395 : #define STYLE_SYMBOLS_DEFAULT ((sal_uLong)1)
396 : #define STYLE_SYMBOLS_HICONTRAST ((sal_uLong)2)
397 : #define STYLE_SYMBOLS_INDUSTRIAL ((sal_uLong)3)
398 : #define STYLE_SYMBOLS_CRYSTAL ((sal_uLong)4)
399 : #define STYLE_SYMBOLS_TANGO ((sal_uLong)5)
400 : #define STYLE_SYMBOLS_OXYGEN ((sal_uLong)6)
401 : #define STYLE_SYMBOLS_CLASSIC ((sal_uLong)7)
402 : #define STYLE_SYMBOLS_HUMAN ((sal_uLong)8)
403 : #define STYLE_SYMBOLS_TANGO_TESTING ((sal_uLong)9)
404 : #define STYLE_SYMBOLS_THEMES_MAX ((sal_uLong)10)
405 :
406 : #define STYLE_MENUIMAGES_OFF ((sal_uInt16)0)
407 : #define STYLE_MENUIMAGES_ON ((sal_uInt16)1)
408 : #define STYLE_MENUIMAGES_AUTO ((sal_uInt16)2)
409 :
410 : #define STYLE_CURSOR_NOBLINKTIME ((sal_uLong)0xFFFFFFFF)
411 :
412 : class VCL_DLLPUBLIC StyleSettings
413 : {
414 : void CopyData();
415 :
416 : private:
417 : ImplStyleData* mpData;
418 :
419 : public:
420 : StyleSettings();
421 : StyleSettings( const StyleSettings& rSet );
422 : ~StyleSettings();
423 :
424 : void Set3DColors( const Color& rColor );
425 6 : void SetFaceColor( const Color& rColor )
426 6 : { CopyData(); mpData->maFaceColor = rColor; }
427 28451 : const Color& GetFaceColor() const
428 28451 : { return mpData->maFaceColor; }
429 : Color GetFaceGradientColor() const;
430 : Color GetSeparatorColor() const;
431 6 : void SetCheckedColor( const Color& rColor )
432 6 : { CopyData(); mpData->maCheckedColor = rColor; }
433 : void SetCheckedColorSpecialCase( );
434 1702 : const Color& GetCheckedColor() const
435 1702 : { return mpData->maCheckedColor; }
436 0 : void SetLightColor( const Color& rColor )
437 0 : { CopyData(); mpData->maLightColor = rColor; }
438 5709 : const Color& GetLightColor() const
439 5709 : { return mpData->maLightColor; }
440 0 : void SetLightBorderColor( const Color& rColor )
441 0 : { CopyData(); mpData->maLightBorderColor = rColor; }
442 3813 : const Color& GetLightBorderColor() const
443 3813 : { return mpData->maLightBorderColor; }
444 6 : void SetShadowColor( const Color& rColor )
445 6 : { CopyData(); mpData->maShadowColor = rColor; }
446 15700 : const Color& GetShadowColor() const
447 15700 : { return mpData->maShadowColor; }
448 0 : void SetDarkShadowColor( const Color& rColor )
449 0 : { CopyData(); mpData->maDarkShadowColor = rColor; }
450 8296 : const Color& GetDarkShadowColor() const
451 8296 : { return mpData->maDarkShadowColor; }
452 6 : void SetButtonTextColor( const Color& rColor )
453 6 : { CopyData(); mpData->maButtonTextColor = rColor; }
454 13844 : const Color& GetButtonTextColor() const
455 13844 : { return mpData->maButtonTextColor; }
456 0 : void SetButtonRolloverTextColor( const Color& rColor )
457 0 : { CopyData(); mpData->maButtonRolloverTextColor = rColor; }
458 0 : const Color& GetButtonRolloverTextColor() const
459 0 : { return mpData->maButtonRolloverTextColor; }
460 0 : void SetRadioCheckTextColor( const Color& rColor )
461 0 : { CopyData(); mpData->maRadioCheckTextColor = rColor; }
462 0 : const Color& GetRadioCheckTextColor() const
463 0 : { return mpData->maRadioCheckTextColor; }
464 0 : void SetGroupTextColor( const Color& rColor )
465 0 : { CopyData(); mpData->maGroupTextColor = rColor; }
466 13 : const Color& GetGroupTextColor() const
467 13 : { return mpData->maGroupTextColor; }
468 0 : void SetLabelTextColor( const Color& rColor )
469 0 : { CopyData(); mpData->maLabelTextColor = rColor; }
470 0 : const Color& GetLabelTextColor() const
471 0 : { return mpData->maLabelTextColor; }
472 0 : void SetInfoTextColor( const Color& rColor )
473 0 : { CopyData(); mpData->maInfoTextColor = rColor; }
474 0 : const Color& GetInfoTextColor() const
475 0 : { return mpData->maInfoTextColor; }
476 0 : void SetWindowColor( const Color& rColor )
477 0 : { CopyData(); mpData->maWindowColor = rColor; }
478 3899 : const Color& GetWindowColor() const
479 3899 : { return mpData->maWindowColor; }
480 0 : void SetWindowTextColor( const Color& rColor )
481 0 : { CopyData(); mpData->maWindowTextColor = rColor; }
482 2439 : const Color& GetWindowTextColor() const
483 2439 : { return mpData->maWindowTextColor; }
484 0 : void SetDialogColor( const Color& rColor )
485 0 : { CopyData(); mpData->maDialogColor = rColor; }
486 0 : const Color& GetDialogColor() const
487 0 : { return mpData->maDialogColor; }
488 0 : void SetDialogTextColor( const Color& rColor )
489 0 : { CopyData(); mpData->maDialogTextColor = rColor; }
490 0 : const Color& GetDialogTextColor() const
491 0 : { return mpData->maDialogTextColor; }
492 0 : void SetWorkspaceColor( const Color& rColor )
493 0 : { CopyData(); mpData->maWorkspaceColor = rColor; }
494 1714 : const Color& GetWorkspaceColor() const
495 1714 : { return mpData->maWorkspaceColor; }
496 0 : void SetFieldColor( const Color& rColor )
497 0 : { CopyData(); mpData->maFieldColor = rColor; }
498 496 : const Color& GetFieldColor() const
499 496 : { return mpData->maFieldColor; }
500 12 : void SetFieldTextColor( const Color& rColor )
501 12 : { CopyData(); mpData->maFieldTextColor = rColor; }
502 278 : const Color& GetFieldTextColor() const
503 278 : { return mpData->maFieldTextColor; }
504 0 : void SetFieldRolloverTextColor( const Color& rColor )
505 0 : { CopyData(); mpData->maFieldRolloverTextColor = rColor; }
506 0 : const Color& GetFieldRolloverTextColor() const
507 0 : { return mpData->maFieldRolloverTextColor; }
508 0 : void SetActiveColor( const Color& rColor )
509 0 : { CopyData(); mpData->maActiveColor = rColor; }
510 0 : const Color& GetActiveColor() const
511 0 : { return mpData->maActiveColor; }
512 : void SetActiveColor2( const Color& rColor )
513 : { CopyData(); mpData->maActiveColor2 = rColor; }
514 : const Color& GetActiveColor2() const
515 : { return mpData->maActiveColor2; }
516 0 : void SetActiveTextColor( const Color& rColor )
517 0 : { CopyData(); mpData->maActiveTextColor = rColor; }
518 0 : const Color& GetActiveTextColor() const
519 0 : { return mpData->maActiveTextColor; }
520 0 : void SetActiveBorderColor( const Color& rColor )
521 0 : { CopyData(); mpData->maActiveBorderColor = rColor; }
522 0 : const Color& GetActiveBorderColor() const
523 0 : { return mpData->maActiveBorderColor; }
524 0 : void SetDeactiveColor( const Color& rColor )
525 0 : { CopyData(); mpData->maDeactiveColor = rColor; }
526 0 : const Color& GetDeactiveColor() const
527 0 : { return mpData->maDeactiveColor; }
528 : void SetDeactiveColor2( const Color& rColor )
529 : { CopyData(); mpData->maDeactiveColor2 = rColor; }
530 : const Color& GetDeactiveColor2() const
531 : { return mpData->maDeactiveColor2; }
532 0 : void SetDeactiveTextColor( const Color& rColor )
533 0 : { CopyData(); mpData->maDeactiveTextColor = rColor; }
534 0 : const Color& GetDeactiveTextColor() const
535 0 : { return mpData->maDeactiveTextColor; }
536 0 : void SetDeactiveBorderColor( const Color& rColor )
537 0 : { CopyData(); mpData->maDeactiveBorderColor = rColor; }
538 0 : const Color& GetDeactiveBorderColor() const
539 0 : { return mpData->maDeactiveBorderColor; }
540 0 : void SetHighlightColor( const Color& rColor )
541 0 : { CopyData(); mpData->maHighlightColor = rColor; }
542 173 : const Color& GetHighlightColor() const
543 173 : { return mpData->maHighlightColor; }
544 0 : void SetHighlightTextColor( const Color& rColor )
545 0 : { CopyData(); mpData->maHighlightTextColor = rColor; }
546 0 : const Color& GetHighlightTextColor() const
547 0 : { return mpData->maHighlightTextColor; }
548 0 : void SetDisableColor( const Color& rColor )
549 0 : { CopyData(); mpData->maDisableColor = rColor; }
550 12 : const Color& GetDisableColor() const
551 12 : { return mpData->maDisableColor; }
552 0 : void SetHelpColor( const Color& rColor )
553 0 : { CopyData(); mpData->maHelpColor = rColor; }
554 21 : const Color& GetHelpColor() const
555 21 : { return mpData->maHelpColor; }
556 0 : void SetHelpTextColor( const Color& rColor )
557 0 : { CopyData(); mpData->maHelpTextColor = rColor; }
558 21 : const Color& GetHelpTextColor() const
559 21 : { return mpData->maHelpTextColor; }
560 0 : void SetMenuColor( const Color& rColor )
561 0 : { CopyData(); mpData->maMenuColor = rColor; }
562 177 : const Color& GetMenuColor() const
563 177 : { return mpData->maMenuColor; }
564 0 : void SetMenuBarColor( const Color& rColor )
565 0 : { CopyData(); mpData->maMenuBarColor = rColor; }
566 0 : const Color& GetMenuBarColor() const
567 0 : { return mpData->maMenuBarColor; }
568 0 : void SetMenuBorderColor( const Color& rColor )
569 0 : { CopyData(); mpData->maMenuBorderColor = rColor; }
570 0 : const Color& GetMenuBorderColor() const
571 0 : { return mpData->maMenuBorderColor; }
572 0 : void SetMenuTextColor( const Color& rColor )
573 0 : { CopyData(); mpData->maMenuTextColor = rColor; }
574 0 : const Color& GetMenuTextColor() const
575 0 : { return mpData->maMenuTextColor; }
576 0 : void SetMenuBarTextColor( const Color& rColor )
577 0 : { CopyData(); mpData->maMenuBarTextColor = rColor; }
578 236 : const Color& GetMenuBarTextColor() const
579 236 : { return mpData->maMenuBarTextColor; }
580 0 : void SetMenuHighlightColor( const Color& rColor )
581 0 : { CopyData(); mpData->maMenuHighlightColor = rColor; }
582 0 : const Color& GetMenuHighlightColor() const
583 0 : { return mpData->maMenuHighlightColor; }
584 0 : void SetMenuHighlightTextColor( const Color& rColor )
585 0 : { CopyData(); mpData->maMenuHighlightTextColor = rColor; }
586 0 : const Color& GetMenuHighlightTextColor() const
587 0 : { return mpData->maMenuHighlightTextColor; }
588 0 : void SetLinkColor( const Color& rColor )
589 0 : { CopyData(); mpData->maLinkColor = rColor; }
590 10 : const Color& GetLinkColor() const
591 10 : { return mpData->maLinkColor; }
592 0 : void SetVisitedLinkColor( const Color& rColor )
593 0 : { CopyData(); mpData->maVisitedLinkColor = rColor; }
594 10 : const Color& GetVisitedLinkColor() const
595 10 : { return mpData->maVisitedLinkColor; }
596 : void SetHighlightLinkColor( const Color& rColor )
597 : { CopyData(); mpData->maHighlightLinkColor = rColor; }
598 0 : const Color& GetHighlightLinkColor() const
599 0 : { return mpData->maHighlightLinkColor; }
600 :
601 0 : void SetMonoColor( const Color& rColor )
602 0 : { CopyData(); mpData->maMonoColor = rColor; }
603 0 : const Color& GetMonoColor() const
604 0 : { return mpData->maMonoColor; }
605 :
606 0 : void SetActiveTabColor( const Color& rColor )
607 0 : { CopyData(); mpData->maActiveTabColor = rColor; }
608 0 : const Color& GetActiveTabColor() const
609 0 : { return mpData->maActiveTabColor; }
610 0 : void SetInactiveTabColor( const Color& rColor )
611 0 : { CopyData(); mpData->maInactiveTabColor = rColor; }
612 0 : const Color& GetInactiveTabColor() const
613 0 : { return mpData->maInactiveTabColor; }
614 :
615 9 : void SetHighContrastMode( sal_Bool bHighContrast )
616 9 : { CopyData(); mpData->mnHighContrast = bHighContrast; }
617 8745 : sal_Bool GetHighContrastMode() const
618 8745 : { return (sal_Bool) mpData->mnHighContrast; }
619 0 : void SetUseSystemUIFonts( sal_Bool bUseSystemUIFonts )
620 0 : { CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; }
621 9 : sal_Bool GetUseSystemUIFonts() const
622 9 : { return (sal_Bool) mpData->mnUseSystemUIFonts; }
623 : void SetUseFlatBorders( sal_Bool bUseFlatBorders )
624 : { CopyData(); mpData->mnUseFlatBorders = bUseFlatBorders; }
625 914 : sal_Bool GetUseFlatBorders() const
626 914 : { return (sal_Bool) mpData->mnUseFlatBorders; }
627 : void SetUseFlatMenues( sal_Bool bUseFlatMenues )
628 : { CopyData(); mpData->mnUseFlatMenues = bUseFlatMenues; }
629 0 : sal_Bool GetUseFlatMenues() const
630 0 : { return (sal_Bool) mpData->mnUseFlatMenues; }
631 0 : void SetUseImagesInMenus( sal_Bool bUseImagesInMenus )
632 0 : { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
633 : sal_Bool GetUseImagesInMenus() const;
634 0 : void SetPreferredUseImagesInMenus( sal_Bool bPreferredUseImagesInMenus )
635 0 : { CopyData(); mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; }
636 472 : sal_Bool GetPreferredUseImagesInMenus() const
637 472 : { return mpData->mbPreferredUseImagesInMenus; }
638 0 : void SetSkipDisabledInMenus( sal_Bool bSkipDisabledInMenus )
639 0 : { CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; }
640 0 : sal_Bool GetSkipDisabledInMenus() const
641 0 : { return (sal_Bool) mpData->mnSkipDisabledInMenus; }
642 : void SetHideDisabledMenuItems( sal_Bool bHideDisabledMenuItems )
643 : { CopyData(); mpData->mbHideDisabledMenuItems = bHideDisabledMenuItems; }
644 0 : sal_Bool GetHideDisabledMenuItems() const
645 0 : { return mpData->mbHideDisabledMenuItems; }
646 0 : void SetAcceleratorsInContextMenus( sal_Bool bAcceleratorsInContextMenus )
647 0 : { CopyData(); mpData->mbAcceleratorsInContextMenus = bAcceleratorsInContextMenus; }
648 0 : sal_Bool GetAcceleratorsInContextMenus() const
649 0 : { return mpData->mbAcceleratorsInContextMenus; }
650 0 : void SetPrimaryButtonWarpsSlider( sal_Bool bPrimaryButtonWarpsSlider )
651 0 : { CopyData(); mpData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider; }
652 0 : sal_Bool GetPrimaryButtonWarpsSlider() const
653 0 : { return mpData->mbPrimaryButtonWarpsSlider; }
654 :
655 0 : void SetCairoFontOptions( const void *pOptions )
656 0 : { CopyData(); mpData->mpFontOptions = pOptions; }
657 0 : const void* GetCairoFontOptions() const
658 0 : { return mpData->mpFontOptions; }
659 :
660 9 : void SetAppFont( const Font& rFont )
661 9 : { CopyData(); mpData->maAppFont = rFont; }
662 10771 : const Font& GetAppFont() const
663 10771 : { return mpData->maAppFont; }
664 0 : void SetHelpFont( const Font& rFont )
665 0 : { CopyData(); mpData->maHelpFont = rFont; }
666 0 : const Font& GetHelpFont() const
667 0 : { return mpData->maHelpFont; }
668 9 : void SetTitleFont( const Font& rFont )
669 9 : { CopyData(); mpData->maTitleFont = rFont; }
670 9 : const Font& GetTitleFont() const
671 9 : { return mpData->maTitleFont; }
672 9 : void SetFloatTitleFont( const Font& rFont )
673 9 : { CopyData(); mpData->maFloatTitleFont = rFont; }
674 9 : const Font& GetFloatTitleFont() const
675 9 : { return mpData->maFloatTitleFont; }
676 0 : void SetMenuFont( const Font& rFont )
677 0 : { CopyData(); mpData->maMenuFont = rFont; }
678 245 : const Font& GetMenuFont() const
679 245 : { return mpData->maMenuFont; }
680 9 : void SetToolFont( const Font& rFont )
681 9 : { CopyData(); mpData->maToolFont = rFont; }
682 2162 : const Font& GetToolFont() const
683 2162 : { return mpData->maToolFont; }
684 9 : void SetGroupFont( const Font& rFont )
685 9 : { CopyData(); mpData->maGroupFont = rFont; }
686 22 : const Font& GetGroupFont() const
687 22 : { return mpData->maGroupFont; }
688 9 : void SetLabelFont( const Font& rFont )
689 9 : { CopyData(); mpData->maLabelFont = rFont; }
690 9 : const Font& GetLabelFont() const
691 9 : { return mpData->maLabelFont; }
692 9 : void SetInfoFont( const Font& rFont )
693 9 : { CopyData(); mpData->maInfoFont = rFont; }
694 9 : const Font& GetInfoFont() const
695 9 : { return mpData->maInfoFont; }
696 9 : void SetRadioCheckFont( const Font& rFont )
697 9 : { CopyData(); mpData->maRadioCheckFont = rFont; }
698 9 : const Font& GetRadioCheckFont() const
699 9 : { return mpData->maRadioCheckFont; }
700 9 : void SetPushButtonFont( const Font& rFont )
701 9 : { CopyData(); mpData->maPushButtonFont = rFont; }
702 1208 : const Font& GetPushButtonFont() const
703 1208 : { return mpData->maPushButtonFont; }
704 21 : void SetFieldFont( const Font& rFont )
705 21 : { CopyData(); mpData->maFieldFont = rFont; }
706 329 : const Font& GetFieldFont() const
707 329 : { return mpData->maFieldFont; }
708 9 : void SetIconFont( const Font& rFont )
709 9 : { CopyData(); mpData->maIconFont = rFont; }
710 9 : const Font& GetIconFont() const
711 9 : { return mpData->maIconFont; }
712 :
713 : void SetBorderSize( long nSize )
714 : { CopyData(); mpData->mnBorderSize = nSize; }
715 0 : long GetBorderSize() const
716 0 : { return mpData->mnBorderSize; }
717 : void SetTitleHeight( long nSize )
718 : { CopyData(); mpData->mnTitleHeight = nSize; }
719 0 : long GetTitleHeight() const
720 0 : { return mpData->mnTitleHeight; }
721 : void SetFloatTitleHeight( long nSize )
722 : { CopyData(); mpData->mnFloatTitleHeight = nSize; }
723 0 : long GetFloatTitleHeight() const
724 0 : { return mpData->mnFloatTitleHeight; }
725 : void SetTearOffTitleHeight( long nSize )
726 : { CopyData(); mpData->mnTearOffTitleHeight = nSize; }
727 0 : long GetTearOffTitleHeight() const
728 0 : { return mpData->mnTearOffTitleHeight; }
729 : void SetMenuBarHeight( long nSize )
730 : { CopyData(); mpData->mnMenuBarHeight = nSize; }
731 : long GetMenuBarHeight() const
732 : { return mpData->mnMenuBarHeight; }
733 0 : void SetScrollBarSize( long nSize )
734 0 : { CopyData(); mpData->mnScrollBarSize = nSize; }
735 2028 : long GetScrollBarSize() const
736 2028 : { return mpData->mnScrollBarSize; }
737 0 : void SetMinThumbSize( long nSize )
738 0 : { CopyData(); mpData->mnMinThumbSize = nSize; }
739 1002 : long GetMinThumbSize() const
740 1002 : { return mpData->mnMinThumbSize; }
741 : void SetSpinSize( long nSize )
742 : { CopyData(); mpData->mnSpinSize = nSize; }
743 0 : long GetSpinSize() const
744 0 : { return mpData->mnSpinSize; }
745 : void SetSplitSize( long nSize )
746 : { CopyData(); mpData->mnSplitSize = nSize; }
747 0 : long GetSplitSize() const
748 0 : { return mpData->mnSplitSize; }
749 :
750 : void SetIconHorzSpace( long nSpace )
751 : { CopyData(); mpData->mnIconHorzSpace = nSpace; }
752 : long GetIconHorzSpace() const
753 : { return mpData->mnIconHorzSpace; }
754 : void SetIconVertSpace( long nSpace )
755 : { CopyData(); mpData->mnIconVertSpace = nSpace; }
756 : long GetIconVertSpace() const
757 : { return mpData->mnIconVertSpace; }
758 :
759 : void SetCursorSize( long nSize )
760 : { CopyData(); mpData->mnCursorSize = nSize; }
761 642 : long GetCursorSize() const
762 642 : { return mpData->mnCursorSize; }
763 1492 : void SetCursorBlinkTime( long nBlinkTime )
764 1492 : { CopyData(); mpData->mnCursorBlinkTime = nBlinkTime; }
765 3534 : long GetCursorBlinkTime() const
766 3534 : { return (long) mpData->mnCursorBlinkTime; }
767 :
768 0 : void SetScreenZoom( sal_uInt16 nPercent )
769 0 : { CopyData(); mpData->mnScreenZoom = nPercent; }
770 10520 : sal_uInt16 GetScreenZoom() const
771 10520 : { return mpData->mnScreenZoom; }
772 0 : void SetScreenFontZoom( sal_uInt16 nPercent )
773 0 : { CopyData(); mpData->mnScreenFontZoom = nPercent; }
774 14386 : sal_uInt16 GetScreenFontZoom() const
775 14386 : { return mpData->mnScreenFontZoom; }
776 :
777 : void SetLogoDisplayTime( sal_uLong nDisplayTime )
778 : { CopyData(); mpData->mnLogoDisplayTime = nDisplayTime; }
779 : sal_uLong GetLogoDisplayTime() const
780 : { return mpData->mnLogoDisplayTime; }
781 :
782 0 : void SetDragFullOptions( sal_uLong nOptions )
783 0 : { CopyData(); mpData->mnDragFullOptions = nOptions; }
784 488 : sal_uLong GetDragFullOptions() const
785 488 : { return mpData->mnDragFullOptions; }
786 :
787 : void SetAnimationOptions( sal_uLong nOptions )
788 : { CopyData(); mpData->mnAnimationOptions = nOptions; }
789 : sal_uLong GetAnimationOptions() const
790 : { return mpData->mnAnimationOptions; }
791 :
792 0 : void SetSelectionOptions( sal_uLong nOptions )
793 0 : { CopyData(); mpData->mnSelectionOptions = nOptions; }
794 0 : sal_uLong GetSelectionOptions() const
795 0 : { return mpData->mnSelectionOptions; }
796 :
797 0 : void SetDisplayOptions( sal_uLong nOptions )
798 0 : { CopyData(); mpData->mnDisplayOptions = nOptions; }
799 15251 : sal_uLong GetDisplayOptions() const
800 15251 : { return mpData->mnDisplayOptions; }
801 0 : void SetAntialiasingMinPixelHeight( long nMinPixel )
802 0 : { CopyData(); mpData->mnAntialiasedMin = nMinPixel; }
803 15251 : sal_uLong GetAntialiasingMinPixelHeight() const
804 15251 : { return mpData->mnAntialiasedMin; }
805 :
806 0 : void SetOptions( sal_uLong nOptions )
807 0 : { CopyData(); mpData->mnOptions = nOptions; }
808 10237 : sal_uLong GetOptions() const
809 10237 : { return mpData->mnOptions; }
810 19 : void SetAutoMnemonic( sal_Bool bAutoMnemonic )
811 19 : { CopyData(); mpData->mnAutoMnemonic = (sal_uInt16)bAutoMnemonic; }
812 0 : sal_Bool GetAutoMnemonic() const
813 0 : { return mpData->mnAutoMnemonic ? sal_True : sal_False; }
814 :
815 0 : void SetFontColor( const Color& rColor )
816 0 : { CopyData(); mpData->maFontColor = rColor; }
817 16 : const Color& GetFontColor() const
818 16 : { return mpData->maFontColor; }
819 :
820 0 : void SetToolbarIconSize( sal_uLong nSize )
821 0 : { CopyData(); mpData->mnToolbarIconSize = nSize; }
822 731 : sal_uLong GetToolbarIconSize() const
823 731 : { return mpData->mnToolbarIconSize; }
824 :
825 0 : void SetSymbolsStyle( sal_uLong nStyle )
826 0 : { CopyData(); mpData->mnSymbolsStyle = nStyle; }
827 3726 : sal_uLong GetSymbolsStyle() const
828 3726 : { return mpData->mnSymbolsStyle; }
829 :
830 0 : void SetPreferredSymbolsStyle( sal_uLong nStyle )
831 0 : { CopyData(); mpData->mnPreferredSymbolsStyle = nStyle; }
832 : void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
833 3708 : sal_uLong GetPreferredSymbolsStyle() const
834 3708 : { return mpData->mnPreferredSymbolsStyle; }
835 : // check whether the symbols style is supported (icons are installed)
836 : bool CheckSymbolStyle( sal_uLong nStyle ) const;
837 : sal_uLong GetAutoSymbolsStyle() const;
838 :
839 : sal_uLong GetCurrentSymbolsStyle() const;
840 :
841 0 : void SetSymbolsStyleName( const ::rtl::OUString &rName )
842 0 : { return SetSymbolsStyle( ImplNameToSymbolsStyle( rName ) ); }
843 18 : ::rtl::OUString GetSymbolsStyleName() const
844 18 : { return ImplSymbolsStyleToName( GetSymbolsStyle() ); }
845 743 : ::rtl::OUString GetCurrentSymbolsStyleName() const
846 743 : { return ImplSymbolsStyleToName( GetCurrentSymbolsStyle() ); }
847 :
848 : const Wallpaper& GetWorkspaceGradient() const
849 : { return mpData->maWorkspaceGradient; }
850 9 : void SetWorkspaceGradient( const Wallpaper& rWall )
851 9 : { CopyData(); mpData->maWorkspaceGradient = rWall; }
852 :
853 0 : const DialogStyle& GetDialogStyle() const
854 0 : { return mpData->maDialogStyle; }
855 0 : void SetDialogStyle( const DialogStyle& rStyle )
856 0 : { CopyData(); mpData->maDialogStyle = rStyle; }
857 :
858 0 : const FrameStyle& GetFrameStyle() const
859 0 : { return mpData->maFrameStyle; }
860 0 : void SetFrameStyle( const FrameStyle& rStyle )
861 0 : { CopyData(); mpData->maFrameStyle = rStyle; }
862 :
863 : void SetStandardStyles();
864 :
865 : const StyleSettings& operator =( const StyleSettings& rSet );
866 :
867 : sal_Bool operator ==( const StyleSettings& rSet ) const;
868 5637 : sal_Bool operator !=( const StyleSettings& rSet ) const
869 5637 : { return !(*this == rSet); }
870 :
871 : protected:
872 : ::rtl::OUString ImplSymbolsStyleToName( sal_uLong nStyle ) const;
873 : sal_uLong ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
874 : };
875 :
876 : // ----------------
877 : // - ImplMiscData -
878 : // ----------------
879 :
880 : class ImplMiscData
881 : {
882 : friend class MiscSettings;
883 :
884 : ImplMiscData();
885 : ImplMiscData( const ImplMiscData& rData );
886 :
887 : private:
888 : sal_uLong mnRefCount;
889 : sal_uInt16 mnEnableATT;
890 : sal_Bool mbEnableLocalizedDecimalSep;
891 : sal_uInt16 mnDisablePrinting;
892 : };
893 :
894 : // ----------------
895 : // - MiscSettings -
896 : // ----------------
897 :
898 : class VCL_DLLPUBLIC MiscSettings
899 : {
900 : void CopyData();
901 :
902 : private:
903 : ImplMiscData* mpData;
904 :
905 : public:
906 : MiscSettings();
907 : MiscSettings( const MiscSettings& rSet );
908 : ~MiscSettings();
909 :
910 : #ifdef WNT
911 : void SetEnableATToolSupport( sal_Bool bEnable );
912 : #endif
913 : sal_Bool GetEnableATToolSupport() const;
914 : sal_Bool GetDisablePrinting() const;
915 : void SetEnableLocalizedDecimalSep( sal_Bool bEnable );
916 : sal_Bool GetEnableLocalizedDecimalSep() const;
917 : const MiscSettings& operator =( const MiscSettings& rSet );
918 :
919 : sal_Bool operator ==( const MiscSettings& rSet ) const;
920 5637 : sal_Bool operator !=( const MiscSettings& rSet ) const
921 5637 : { return !(*this == rSet); }
922 : };
923 :
924 : // ----------------
925 : // - ImplHelpData -
926 : // ----------------
927 :
928 : class ImplHelpData
929 : {
930 : friend class HelpSettings;
931 :
932 : ImplHelpData();
933 : ImplHelpData( const ImplHelpData& rData );
934 :
935 : private:
936 : sal_uLong mnRefCount;
937 : sal_uLong mnOptions;
938 : sal_uLong mnTipDelay;
939 : sal_uLong mnTipTimeout;
940 : sal_uLong mnBalloonDelay;
941 : };
942 :
943 : // ----------------
944 : // - HelpSettings -
945 : // ----------------
946 :
947 : class VCL_DLLPUBLIC HelpSettings
948 : {
949 : void CopyData();
950 :
951 : private:
952 : ImplHelpData* mpData;
953 :
954 : public:
955 : HelpSettings();
956 : HelpSettings( const HelpSettings& rSet );
957 : ~HelpSettings();
958 :
959 : void SetOptions( sal_uLong nOptions )
960 : { CopyData(); mpData->mnOptions = nOptions; }
961 : sal_uLong GetOptions() const
962 : { return mpData->mnOptions; }
963 : void SetTipDelay( sal_uLong nTipDelay )
964 : { CopyData(); mpData->mnTipDelay = nTipDelay; }
965 0 : sal_uLong GetTipDelay() const
966 0 : { return mpData->mnTipDelay; }
967 0 : void SetTipTimeout( sal_uLong nTipTimeout )
968 0 : { CopyData(); mpData->mnTipTimeout = nTipTimeout; }
969 0 : sal_uLong GetTipTimeout() const
970 0 : { return mpData->mnTipTimeout; }
971 : void SetBalloonDelay( sal_uLong nBalloonDelay )
972 : { CopyData(); mpData->mnBalloonDelay = nBalloonDelay; }
973 0 : sal_uLong GetBalloonDelay() const
974 0 : { return mpData->mnBalloonDelay; }
975 :
976 : const HelpSettings& operator =( const HelpSettings& rSet );
977 :
978 : sal_Bool operator ==( const HelpSettings& rSet ) const;
979 5637 : sal_Bool operator !=( const HelpSettings& rSet ) const
980 5637 : { return !(*this == rSet); }
981 : };
982 :
983 : // -----------------------
984 : // - ImplAllSettingsData -
985 : // -----------------------
986 : class ImplAllSettingsData
987 : {
988 : friend class AllSettings;
989 :
990 : ImplAllSettingsData();
991 : ImplAllSettingsData( const ImplAllSettingsData& rData );
992 : ~ImplAllSettingsData();
993 :
994 : private:
995 : sal_uLong mnRefCount;
996 : MouseSettings maMouseSettings;
997 : StyleSettings maStyleSettings;
998 : MiscSettings maMiscSettings;
999 : HelpSettings maHelpSettings;
1000 : LanguageTag maLocale;
1001 : sal_uLong mnSystemUpdate;
1002 : sal_uLong mnWindowUpdate;
1003 : LanguageTag maUILocale;
1004 : LocaleDataWrapper* mpLocaleDataWrapper;
1005 : LocaleDataWrapper* mpUILocaleDataWrapper;
1006 : vcl::I18nHelper* mpI18nHelper;
1007 : vcl::I18nHelper* mpUII18nHelper;
1008 : SvtSysLocale maSysLocale;
1009 : };
1010 :
1011 : // ---------------
1012 : // - AllSettings -
1013 : // ---------------
1014 :
1015 : const int SETTINGS_MOUSE = 0x00000001;
1016 : const int SETTINGS_STYLE = 0x00000002;
1017 : const int SETTINGS_MISC = 0x00000004;
1018 : const int SETTINGS_SOUND = 0x00000008;
1019 : const int SETTINGS_HELP = 0x00000010;
1020 : const int SETTINGS_LOCALE = 0x00000020;
1021 : const int SETTINGS_UILOCALE = 0x00000040;
1022 : const int SETTINGS_ALLSETTINGS = ( SETTINGS_MOUSE |
1023 : SETTINGS_STYLE | SETTINGS_MISC |
1024 : SETTINGS_SOUND |
1025 : SETTINGS_HELP |
1026 : SETTINGS_LOCALE | SETTINGS_UILOCALE );
1027 : const int SETTINGS_IN_UPDATE_SETTINGS = 0x00000800; // this flag indicates that the data changed event was created
1028 : // in Windows::UpdateSettings probably because of a global
1029 : // settings changed
1030 :
1031 : class VCL_DLLPUBLIC AllSettings
1032 : {
1033 : void CopyData();
1034 :
1035 : private:
1036 : ImplAllSettingsData* mpData;
1037 :
1038 : public:
1039 : AllSettings();
1040 : AllSettings( const AllSettings& rSet );
1041 : ~AllSettings();
1042 :
1043 4092 : void SetMouseSettings( const MouseSettings& rSet )
1044 4092 : { CopyData(); mpData->maMouseSettings = rSet; }
1045 8184 : const MouseSettings& GetMouseSettings() const
1046 8184 : { return mpData->maMouseSettings; }
1047 :
1048 1559 : void SetStyleSettings( const StyleSettings& rSet )
1049 1559 : { CopyData(); mpData->maStyleSettings = rSet; }
1050 93891 : const StyleSettings& GetStyleSettings() const
1051 93891 : { return mpData->maStyleSettings; }
1052 :
1053 0 : void SetMiscSettings( const MiscSettings& rSet )
1054 0 : { CopyData(); mpData->maMiscSettings = rSet; }
1055 236 : const MiscSettings& GetMiscSettings() const
1056 236 : { return mpData->maMiscSettings; }
1057 :
1058 0 : void SetHelpSettings( const HelpSettings& rSet )
1059 0 : { CopyData(); mpData->maHelpSettings = rSet; }
1060 0 : const HelpSettings& GetHelpSettings() const
1061 0 : { return mpData->maHelpSettings; }
1062 :
1063 : void SetLanguageTag( const LanguageTag& rLanguageTag );
1064 : const LanguageTag& GetLanguageTag() const;
1065 : void SetUILanguageTag( const LanguageTag& rLanguageTag );
1066 : const LanguageTag& GetUILanguageTag() const;
1067 : bool GetLayoutRTL() const; // returns true if UI language requires right-to-left UI
1068 : const LocaleDataWrapper& GetLocaleDataWrapper() const;
1069 : const LocaleDataWrapper& GetUILocaleDataWrapper() const;
1070 : const vcl::I18nHelper& GetLocaleI18nHelper() const;
1071 : const vcl::I18nHelper& GetUILocaleI18nHelper() const;
1072 :
1073 : void SetSystemUpdate( sal_uLong nUpdate )
1074 : { CopyData(); mpData->mnSystemUpdate = nUpdate; }
1075 : sal_uLong GetSystemUpdate() const
1076 : { return mpData->mnSystemUpdate; }
1077 : void SetWindowUpdate( sal_uLong nUpdate )
1078 : { CopyData(); mpData->mnWindowUpdate = nUpdate; }
1079 4092 : sal_uLong GetWindowUpdate() const
1080 4092 : { return mpData->mnWindowUpdate; }
1081 :
1082 : sal_uLong Update( sal_uLong nFlags, const AllSettings& rSettings );
1083 : sal_uLong GetChangeFlags( const AllSettings& rSettings ) const;
1084 :
1085 : const AllSettings& operator =( const AllSettings& rSet );
1086 :
1087 : sal_Bool operator ==( const AllSettings& rSet ) const;
1088 : sal_Bool operator !=( const AllSettings& rSet ) const
1089 : { return !(*this == rSet); }
1090 : static void LocaleSettingsChanged( sal_uInt32 nHint );
1091 26 : SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; }
1092 : };
1093 :
1094 : #endif // _SV_SETTINGS_HXX
1095 :
1096 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|