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 INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSPROPERTIES_HXX
21 : #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSPROPERTIES_HXX
22 :
23 : #include <tools/color.hxx>
24 :
25 : namespace sd { namespace slidesorter { namespace controller {
26 :
27 : /** An extensible set of properties used throughout the slide sorter.
28 : */
29 : class Properties
30 : {
31 : public:
32 : Properties();
33 : ~Properties();
34 :
35 : /** Call this method after receiving a VCLEVENT_APPLICATION_DATACHANGED
36 : event.
37 : */
38 : void HandleDataChangeEvent();
39 :
40 : /** When this method returns <TRUE/> then the current slide is
41 : highlighted in the view. The default value is <FALSE/>.
42 : */
43 0 : bool IsHighlightCurrentSlide() const { return mbIsHighlightCurrentSlide;}
44 : void SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide);
45 :
46 : /** When this method returns <TRUE/> then the selection is indicated in
47 : the view (typically by drawing rectangles around the selected
48 : slides.) The default value is <TRUE/>.
49 : */
50 0 : bool IsShowSelection() const { return mbIsShowSelection;}
51 : void SetShowSelection (const bool bIsShowSelection);
52 :
53 : /** When this method returns <TRUE/> then the focusdselection is indicated in
54 : the view (typically by drawing dotted rectangles around the selected
55 : slides.) The default value is <TRUE/>.
56 : */
57 0 : bool IsShowFocus() const { return mbIsShowFocus;}
58 : void SetShowFocus (const bool bIsShowFocus);
59 :
60 : /** When this method returns <TRUE/> then on a selection change the
61 : visible area is adapted so that the selected slides are shown
62 : centered in the view. This can be used to center the current slide
63 : by selecting only the current slide. The default value is <FALSE/>.
64 : */
65 0 : bool IsCenterSelection() const { return mbIsCenterSelection;}
66 : void SetCenterSelection (const bool bIsCenterSelection);
67 :
68 : /** When this mehod returns <TRUE/> then the view may try to change the
69 : visible area by scrolling it smoothly on the screen. Experimental.
70 : Default value is <FALSE/>.
71 : */
72 0 : bool IsSmoothSelectionScrolling() const { return mbIsSmoothSelectionScrolling;}
73 : void SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling);
74 :
75 : /** When this method returns <TRUE/> then during a full screen
76 : presentation the previews in a slide sorter are not updated.
77 : Default value is <TRUE/>.
78 : */
79 0 : bool IsSuspendPreviewUpdatesDuringFullScreenPresentation() const { return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;}
80 : void SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag);
81 :
82 : /** Return the background color.
83 : */
84 128 : Color GetBackgroundColor() const { return maBackgroundColor;}
85 : void SetBackgroundColor (const Color& rColor);
86 :
87 : /** Return the text color.
88 : */
89 0 : Color GetTextColor() const { return maTextColor;}
90 : void SetTextColor (const Color& rColor);
91 :
92 : /** Return the color in which selections are to be painted.
93 : */
94 64 : Color GetSelectionColor() const { return maSelectionColor;}
95 : void SetSelectionColor (const Color& rColor);
96 :
97 : /** Return the color used for highlighting e.g. the current slide.
98 : */
99 0 : Color GetHighlightColor() const { return maHighlightColor;}
100 : void SetHighlightColor (const Color& rColor);
101 :
102 : /** The UI can be set to be read only indepently from the model status.
103 : Used for instance in the presenter view.
104 : */
105 0 : bool IsUIReadOnly() const { return mbIsUIReadOnly;}
106 : void SetUIReadOnly (const bool bIsUIReadOnly);
107 :
108 : /** The mouse over effect (and whether a mouse motion starts a multi
109 : selection or a drag-and-drop) can be triggered by just the preview
110 : area or the whole page object area.
111 : */
112 0 : bool IsOnlyPreviewTriggersMouseOver() const { return mbIsOnlyPreviewTriggersMouseOver;}
113 :
114 : private:
115 : bool mbIsHighlightCurrentSlide;
116 : bool mbIsShowSelection;
117 : bool mbIsShowFocus;
118 : bool mbIsCenterSelection;
119 : bool mbIsSmoothSelectionScrolling;
120 : bool mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
121 : Color maBackgroundColor;
122 : Color maTextColor;
123 : Color maSelectionColor;
124 : Color maHighlightColor;
125 : bool mbIsUIReadOnly;
126 : bool mbIsOnlyPreviewTriggersMouseOver;
127 : bool mbIsHighContrastModeActive;
128 : };
129 :
130 : } } } // end of namespace ::sd::slidesorter::controller
131 :
132 : #endif
133 :
134 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|