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