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